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