maint: use mbszero
[coreutils.git] / bootstrap.conf
blob0b1ed95f632c65c656d076285d03d00201b2679e
1 # Bootstrap configuration.
3 # Copyright (C) 2006-2023 Free Software Foundation, Inc.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
19 # We don't need these modules.
20 avoided_gnulib_modules='
21   --avoid=canonicalize-lgpl
22   --avoid=dummy
23   --avoid=mbuiter
24   --avoid=mbuiterf
27 # gnulib modules used by this package.
28 gnulib_modules="
29   $avoided_gnulib_modules
30   acl
31   alignalloc
32   alignasof
33   alloca
34   announce-gen
35   areadlink-with-size
36   areadlinkat-with-size
37   argmatch
38   argv-iter
39   assert
40   assert-h
41   assure
42   attribute
43   autobuild
44   backup-rename
45   backupfile
46   base32
47   base64
48   btowc
49   buffer-lcm
50   byteswap
51   c-strcase
52   canon-host
53   canonicalize
54   chmodat
55   chown
56   chownat
57   cl-strtod
58   cl-strtold
59   closein
60   closeout
61   config-h
62   configmake
63   copy-file-range
64   count-leading-zeros
65   crypto/md5
66   crypto/sha1
67   crypto/sha256
68   crypto/sha512
69   crypto/sm3
70   cycle-check
71   d-ino
72   d-type
73   di-set
74   dirfd
75   dirname
76   do-release-commit-and-tag
77   dtoastr
78   dup2
79   environ
80   error
81   euidaccess
82   exclude
83   exitfail
84   explicit_bzero
85   faccessat
86   fadvise
87   fchdir
88   fchmodat
89   fchownat
90   fclose
91   fcntl
92   fcntl-safer
93   fd-reopen
94   fdatasync
95   fdopen
96   fdutimensat
97   file-has-acl
98   file-type
99   fileblocks
100   filemode
101   filenamecat
102   filevercmp
103   flexmember
104   fnmatch-gnu
105   fopen-safer
106   fprintftime
107   fpurge
108   free-posix
109   freopen
110   freopen-safer
111   fseeko
112   fstatat
113   fsusage
114   fsync
115   ftoastr
116   ftruncate
117   fts
118   full-read
119   full-write
120   gethrxtime
121   getline
122   getloadavg
123   getlogin
124   getndelim2
125   getopt-gnu
126   getpagesize
127   gettext-h
128   gettime
129   gettime-res
130   git-version-gen
131   gitlog-to-changelog
132   gnu-web-doc-update
133   gnumakefile
134   gnupload
135   hard-locale
136   hash
137   hash-triple
138   heap
139   host-os
140   human
141   idcache
142   idx
143   ignore-value
144   inttostr
145   inttypes
146   isapipe
147   isatty
148   isblank
149   largefile
150   lchmod
151   ldtoastr
152   lib-ignore
153   libgmp
154   linebuffer
155   link
156   link-follow
157   linkat
158   long-options
159   lstat
160   maintainer-makefile
161   malloc-gnu
162   manywarnings
163   mbrlen
164   mbrtowc
165   mbschr
166   mbslen
167   mbswidth
168   mbszero
169   mcel-prefer
170   memcasecmp
171   memchr
172   memcmp2
173   mempcpy
174   memrchr
175   minmax
176   mkancesdirs
177   mkdir
178   mkdir-p
179   mkdirat
180   mkfifo
181   mkfifoat
182   mknod
183   mkostemp
184   mkstemp
185   mktime
186   modechange
187   mountlist
188   mpsort
189   nproc
190   nstrftime
191   nullptr
192   obstack
193   open
194   openat-safer
195   parse-datetime
196   parse-datetime2
197   pathmax
198   perl
199   physmem
200   pipe-posix
201   pipe2
202   posix-shell
203   posixtm
204   posixver
205   priv-set
206   progname
207   propername-lite
208   pthread-cond
209   pthread-mutex
210   pthread-thread
211   pthread_sigmask
212   putenv
213   quote
214   quotearg
215   randint
216   randperm
217   rawmemchr
218   read-file
219   readtokens
220   readtokens0
221   readutmp
222   regex
223   remove
224   renameat
225   renameatu
226   rmdir
227   root-dev-ino
228   safe-read
229   same
230   save-cwd
231   savedir
232   savewd
233   select
234   selinux-at
235   setenv
236   settime
237   sig2str
238   sigaction
239   smack
240   ssize_t
241   stat-macros
242   stat-size
243   stat-time
244   stdbool
245   stdckdint
246   stdlib-safer
247   stpcpy
248   strdup-posix
249   strnlen
250   strnumcmp
251   strsignal
252   strtoimax
253   strtoumax
254   symlinkat
255   sys_ioctl
256   sys_resource
257   sys_stat
258   sys_wait
259   targetdir
260   tempname
261   termios
262   time_rz
263   timer-time
264   timespec
265   tmpdir
266   uname
267   unicodeio
268   unistd-safer
269   unlink-busy
270   unlinkat
271   unlinkdir
272   unlocked-io
273   unsetenv
274   update-copyright
275   useless-if-before-free
276   userspec
277   utimecmp
278   utimens
279   utimensat
280   vasprintf-posix
281   vc-list-files
282   verify
283   verror
284   version-etc-fsf
285   wcwidth
286   winsz-ioctl
287   winsz-termios
288   write-any-file
289   xalignalloc
290   xalloc
291   xbinary-io
292   xdectoint
293   xfts
294   xgetcwd
295   xgetgroups
296   xgethostname
297   xmemcoll
298   xnanosleep
299   xprintf
300   xprintf-posix
301   xreadlink
302   xstrtod
303   xstrtoimax
304   xstrtol
305   xstrtol-error
306   xstrtold
307   xstrtoumax
308   year2038-recommended
309   yesno
312 # Other locale categories that need message catalogs.
313 EXTRA_LOCALE_CATEGORIES=LC_TIME
315 # Additional xgettext options to use.  Use "\\\newline" to break lines.
316 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
317  --flag=asnprintf:3:c-format\\\
318  --flag=asprintf:2:c-format\\\
319  --flag=error:3:c-format\\\
320  --flag=error_at_line:5:c-format\\\
321  --flag=vasnprintf:3:c-format\\\
322  --flag=vasprintf:2:c-format\\\
323  --flag=verror:3:c-format\\\
324  --flag=verror_at_line:5:c-format\\\
325  --flag=wrapf:1:c-format\\\
326  --flag=xasprintf:1:c-format\\\
327  --flag=xfprintf:2:c-format\\\
328  --flag=xprintf:1:c-format\\\
329  --from-code=UTF-8\\\
332 # Append these, since we use the propername module.
333 see_manual='"This is a proper name. See the gettext manual, section Names."'
334 see_manual=\'"$see_manual"\'
335 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
336  --keyword=proper_name:1,'"$see_manual"'\\\
337  --keyword=proper_name_lite:1,'"$see_manual"'\\\
340 gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
341  --makefile-name=gnulib.mk --automake-subdir
344 # Build prerequisites
345 buildreq="\
346 autoconf   2.64
347 automake   1.11.2
348 autopoint  0.19.2
349 bison      -
350 gettext    0.19.2
351 git        1.4.4
352 gperf      -
353 gzip       -
354 m4         -
355 makeinfo   6.1
356 texi2pdf   6.1
357 patch      -
358 perl       5.5
359 tar        -
360 wget       -
361 xz         -
364 bootstrap_post_import_hook ()
366   # Automake requires that ChangeLog exist.
367   touch ChangeLog || return 1
368   # List of coreutils programs.  See heading comments in the invoked
369   # script for more info.  Keep this in sync with the rules in
370   (m4f=m4/cu-progs.m4 mkf=src/cu-progs.mk tmp=cu-progs.tmp \
371     && rm -f $m4f $mkf $tmp-1 $tmp-2 \
372     && build-aux/gen-lists-of-programs.sh --autoconf >$tmp-1 \
373     && build-aux/gen-lists-of-programs.sh --automake >$tmp-2 \
374     && chmod a-w $tmp-1 $tmp-2 \
375     && mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf)
377   # Regenerate src/single-binary.mk
378   (mkf=src/single-binary.mk tmp=single-binary.tmp \
379     && rm -f $mkf $tmp \
380     && build-aux/gen-single-binary.sh src/local.mk >$tmp \
381     && chmod a-w $tmp \
382     && mv -f $tmp $mkf)
386 bootstrap_epilogue()
388   # Since this is a "GNU" package, replace this line
389   #   if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
390   #      | grep -v 'libtool:' >/dev/null; then
391   # with this:
392   #   if true; then
393   # Why?  That pipeline searches all files in $(top_srcdir), and if you
394   # happen to have large files (or apparently large sparse files), the
395   # first grep may well run out of memory.
396   perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
397     po/Makefile.in.in
399   # Add dummy 'install-html' target, required for packages using
400   # non-recursive makefiles with older gettext.
401   # See https://debbugs.gnu.org/25690
402   if ! grep -w 'install-html' po/Makefile.in.in ; then
403     printf 'install-%s:;\n' dvi ps pdf html >> po/Makefile.in.in
404   fi
406   # Install our git hooks, as long as "cp" accepts the --backup option,
407   # so that we can back up any existing files.
408   case $(cp --help) in *--backup*) backup=1;; *) backup=0;; esac
409   if test $backup = 1; then
410     hooks=$(cd scripts/git-hooks && git ls-files)
411     for f in $hooks; do
412       # If it is identical, skip it.
413       cmp scripts/git-hooks/$f .git/hooks/$f > /dev/null \
414         && continue
415       cp --backup=numbered scripts/git-hooks/$f .git/hooks
416       chmod a-w .git/hooks/$f
417     done
418   fi