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