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