stat,tail: fix android build and support inotify
[coreutils.git] / bootstrap.conf
blob02e70b379cc6c2e0e94c4fff49dee9b9ccb5a0e5
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   selinux-at
225   setenv
226   settime
227   sig2str
228   sigaction
229   smack
230   ssize_t
231   stat-macros
232   stat-size
233   stat-time
234   statat
235   stdbool
236   stdlib-safer
237   stpcpy
238   stpncpy
239   strdup-posix
240   strncat
241   strnumcmp
242   strsignal
243   strtod
244   strtoimax
245   strtoumax
246   symlinkat
247   sys_ioctl
248   sys_resource
249   sys_stat
250   sys_wait
251   tempname
252   termios
253   time_rz
254   timer-time
255   timespec
256   tzset
257   uname
258   unicodeio
259   unistd-safer
260   unlink-busy
261   unlinkat
262   unlinkdir
263   unlocked-io
264   unsetenv
265   update-copyright
266   uptime
267   useless-if-before-free
268   userspec
269   utimecmp
270   utimens
271   vasprintf-posix
272   vc-list-files
273   verify
274   verror
275   version-etc-fsf
276   wchar-single
277   wcswidth
278   wcwidth
279   winsz-ioctl
280   winsz-termios
281   write-any-file
282   xalloc
283   xbinary-io
284   xdectoint
285   xfts
286   xgetcwd
287   xgetgroups
288   xgethostname
289   xmemcoll
290   xnanosleep
291   xprintf
292   xprintf-posix
293   xreadlink
294   xstrtod
295   xstrtoimax
296   xstrtol
297   xstrtold
298   xstrtoumax
299   year2038
300   yesno
303 # Other locale categories that need message catalogs.
304 EXTRA_LOCALE_CATEGORIES=LC_TIME
306 # Additional xgettext options to use.  Use "\\\newline" to break lines.
307 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
308  --flag=asnprintf:3:c-format\\\
309  --flag=asprintf:2:c-format\\\
310  --flag=error:3:c-format\\\
311  --flag=error_at_line:5:c-format\\\
312  --flag=vasnprintf:3:c-format\\\
313  --flag=vasprintf:2:c-format\\\
314  --flag=verror:3:c-format\\\
315  --flag=verror_at_line:5:c-format\\\
316  --flag=wrapf:1:c-format\\\
317  --flag=xasprintf:1:c-format\\\
318  --flag=xfprintf:2:c-format\\\
319  --flag=xprintf:1:c-format\\\
320  --from-code=UTF-8\\\
323 # Append these, since we use the propername module.
324 see_manual='"This is a proper name. See the gettext manual, section Names."'
325 see_manual=\'"$see_manual"\'
326 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
327  --keyword=proper_name:1,'"$see_manual"'\\\
328  --keyword=proper_name_utf8:1,'"$see_manual"'\\\
331 gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
332  --makefile-name=gnulib.mk
335 # Build prerequisites
336 buildreq="\
337 autoconf   2.64
338 automake   1.11.2
339 autopoint  0.19.2
340 bison      -
341 gettext    0.19.2
342 git        1.4.4
343 gperf      -
344 gzip       -
345 makeinfo   6.1
346 patch      -
347 perl       5.5
348 rsync      -
349 tar        -
350 xz         -
353 bootstrap_post_import_hook ()
355   # Automake requires that ChangeLog exist.
356   touch ChangeLog || return 1
357   # List of coreutils programs.  See heading comments in the invoked
358   # script for more info.  Keep this in sync with the rules in
359   (m4f=m4/cu-progs.m4 mkf=src/cu-progs.mk tmp=cu-progs.tmp \
360     && rm -f $m4f $mkf $tmp-1 $tmp-2 \
361     && build-aux/gen-lists-of-programs.sh --autoconf >$tmp-1 \
362     && build-aux/gen-lists-of-programs.sh --automake >$tmp-2 \
363     && chmod a-w $tmp-1 $tmp-2 \
364     && mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf)
366   # Massage lib/gnulib.mk before using it later in the bootstrapping process.
367   build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
369   # Regenerate src/single-binary.mk
370   (mkf=src/single-binary.mk tmp=single-binary.tmp \
371     && rm -f $mkf $tmp \
372     && build-aux/gen-single-binary.sh src/local.mk >$tmp \
373     && chmod a-w $tmp \
374     && mv -f $tmp $mkf)
378 bootstrap_epilogue()
380   # Since this is a "GNU" package, replace this line
381   #   if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
382   #      | grep -v 'libtool:' >/dev/null; then
383   # with this:
384   #   if true; then
385   # Why?  That pipeline searches all files in $(top_srcdir), and if you
386   # happen to have large files (or apparently large sparse files), the
387   # first grep may well run out of memory.
388   perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
389     po/Makefile.in.in
391   # Add dummy 'install-html' target, required for packages using
392   # non-recursive makefiles with older gettext.
393   # See https://debbugs.gnu.org/25690
394   if ! grep -w 'install-html' po/Makefile.in.in ; then
395     printf 'install-%s:;\n' dvi ps pdf html >> po/Makefile.in.in
396   fi
398   # Install our git hooks, as long as "cp" accepts the --backup option,
399   # so that we can back up any existing files.
400   case $(cp --help) in *--backup*) backup=1;; *) backup=0;; esac
401   if test $backup = 1; then
402     hooks=$(cd scripts/git-hooks && git ls-files)
403     for f in $hooks; do
404       # If it is identical, skip it.
405       cmp scripts/git-hooks/$f .git/hooks/$f > /dev/null \
406         && continue
407       cp --backup=numbered scripts/git-hooks/$f .git/hooks
408       chmod a-w .git/hooks/$f
409     done
410   fi