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