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