seq: produce consistent error messages upon write error
[coreutils.git] / bootstrap.conf
blobf8f65f746f717c2f4bca087047e57e6e6f96f726
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   backup-rename
39   base32
40   base64
41   buffer-lcm
42   c-strcase
43   c-strtod
44   c-strtold
45   calloc-gnu
46   canon-host
47   canonicalize
48   chown
49   cloexec
50   closein
51   closeout
52   config-h
53   configmake
54   crypto/md5
55   crypto/sha1
56   crypto/sha256
57   crypto/sha512
58   cycle-check
59   d-ino
60   d-type
61   di-set
62   diacrit
63   dirfd
64   dirname
65   do-release-commit-and-tag
66   dtoastr
67   dup2
68   environ
69   error
70   euidaccess
71   exclude
72   exitfail
73   explicit_bzero
74   faccessat
75   fadvise
76   fchdir
77   fchmodat
78   fchownat
79   fclose
80   fcntl
81   fcntl-safer
82   fd-reopen
83   fdatasync
84   fdl
85   fdopen
86   fdutimensat
87   file-has-acl
88   file-type
89   fileblocks
90   filemode
91   filenamecat
92   filevercmp
93   flexmember
94   fnmatch-gnu
95   fopen-safer
96   fprintftime
97   freopen
98   freopen-safer
99   fseeko
100   fstatat
101   fsusage
102   fsync
103   ftello
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   mkstemp
175   mktime
176   modechange
177   mountlist
178   mpsort
179   netinet_in
180   non-recursive-gnulib-prefix-hack
181   nproc
182   obstack
183   parse-datetime
184   pathmax
185   perl
186   physmem
187   pipe-posix
188   posix-shell
189   posixtm
190   posixver
191   priv-set
192   progname
193   propername
194   pthread
195   putenv
196   quote
197   quotearg
198   randint
199   randperm
200   read-file
201   readlink
202   readtokens
203   readtokens0
204   readutmp
205   realloc-gnu
206   regex
207   remove
208   rename
209   renameat
210   renameat2
211   rmdir
212   root-dev-ino
213   rpmatch
214   safe-read
215   same
216   save-cwd
217   savedir
218   savewd
219   selinux-at
220   setenv
221   settime
222   sig2str
223   sigaction
224   smack
225   ssize_t
226   stat-macros
227   stat-size
228   stat-time
229   statat
230   stdbool
231   stdlib-safer
232   stpcpy
233   stpncpy
234   strdup-posix
235   strftime
236   strncat
237   strnumcmp
238   strpbrk
239   strsignal
240   strtod
241   strtoimax
242   strtoumax
243   symlinkat
244   sys_ioctl
245   sys_resource
246   sys_stat
247   sys_wait
248   tempname
249   termios
250   time_rz
251   timer-time
252   timespec
253   tzset
254   uname
255   unicodeio
256   unistd-safer
257   unlink-busy
258   unlinkat
259   unlocked-io
260   unsetenv
261   update-copyright
262   uptime
263   useless-if-before-free
264   userspec
265   utimecmp
266   utimens
267   vasprintf-posix
268   vc-list-files
269   verify
270   verror
271   version-etc-fsf
272   wcswidth
273   wcwidth
274   winsz-ioctl
275   winsz-termios
276   write-any-file
277   xalloc
278   xbinary-io
279   xdectoint
280   xfts
281   xgetcwd
282   xgetgroups
283   xgethostname
284   xmemcoll
285   xnanosleep
286   xprintf
287   xprintf-posix
288   xreadlink
289   xstrtod
290   xstrtoimax
291   xstrtol
292   xstrtold
293   xstrtoumax
294   yesno
297 # Other locale categories that need message catalogs.
298 EXTRA_LOCALE_CATEGORIES=LC_TIME
300 # Additional xgettext options to use.  Use "\\\newline" to break lines.
301 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
302  --flag=asnprintf:3:c-format\\\
303  --flag=asprintf:2:c-format\\\
304  --flag=error:3:c-format\\\
305  --flag=error_at_line:5:c-format\\\
306  --flag=vasnprintf:3:c-format\\\
307  --flag=vasprintf:2:c-format\\\
308  --flag=verror:3:c-format\\\
309  --flag=verror_at_line:5:c-format\\\
310  --flag=wrapf:1:c-format\\\
311  --flag=xasprintf:1:c-format\\\
312  --flag=xfprintf:2:c-format\\\
313  --flag=xprintf:1:c-format\\\
314  --from-code=UTF-8\\\
317 # Append these, since we use the propername module.
318 see_manual='"This is a proper name. See the gettext manual, section Names."'
319 see_manual=\'"$see_manual"\'
320 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
321  --keyword=proper_name:1,'"$see_manual"'\\\
322  --keyword=proper_name_utf8:1,'"$see_manual"'\\\
325 gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
326  --makefile-name=gnulib.mk
329 # Build prerequisites
330 buildreq="\
331 autoconf   2.64
332 automake   1.11.2
333 autopoint  0.19.2
334 bison      -
335 gettext    0.19.2
336 git        1.4.4
337 gperf      -
338 gzip       -
339 makeinfo   6.1
340 patch      -
341 perl       5.5
342 rsync      -
343 tar        -
344 xz         -
347 bootstrap_post_import_hook ()
349   # Automake requires that ChangeLog exist.
350   touch ChangeLog || return 1
351   # List of coreutils programs.  See heading comments in the invoked
352   # script for more info.  Keep this in sync with the rules in
353   (m4f=m4/cu-progs.m4 mkf=src/cu-progs.mk tmp=cu-progs.tmp \
354     && rm -f $m4f $mkf $tmp-1 $tmp-2 \
355     && build-aux/gen-lists-of-programs.sh --autoconf >$tmp-1 \
356     && build-aux/gen-lists-of-programs.sh --automake >$tmp-2 \
357     && chmod a-w $tmp-1 $tmp-2 \
358     && mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf)
360   # Massage lib/gnulib.mk before using it later in the bootstrapping process.
361   build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
363   # Regenerate src/single-binary.mk
364   (mkf=src/single-binary.mk tmp=single-binary.tmp \
365     && rm -f $mkf $tmp \
366     && build-aux/gen-single-binary.sh src/local.mk >$tmp \
367     && chmod a-w $tmp \
368     && mv -f $tmp $mkf)
372 bootstrap_epilogue()
374   # Since this is a "GNU" package, replace this line
375   #   if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
376   #      | grep -v 'libtool:' >/dev/null; then
377   # with this:
378   #   if true; then
379   # Why?  That pipeline searches all files in $(top_srcdir), and if you
380   # happen to have large files (or apparently large sparse files), the
381   # first grep may well run out of memory.
382   perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
383     po/Makefile.in.in
385   # Add dummy 'install-html' target, required for packages using
386   # non-recursive makefiles with older gettext.
387   # See https://debbugs.gnu.org/25690
388   if ! grep -w 'install-html' po/Makefile.in.in ; then
389     printf 'install-%s:;\n' dvi ps pdf html >> po/Makefile.in.in
390   fi
392   # Install our git hooks, as long as "cp" accepts the --backup option,
393   # so that we can back up any existing files.
394   case $(cp --help) in *--backup*) backup=1;; *) backup=0;; esac
395   if test $backup = 1; then
396     hooks=$(cd scripts/git-hooks && git ls-files)
397     for f in $hooks; do
398       # If it is identical, skip it.
399       cmp scripts/git-hooks/$f .git/hooks/$f > /dev/null \
400         && continue
401       cp --backup=numbered scripts/git-hooks/$f .git/hooks
402       chmod a-w .git/hooks/$f
403     done
404   fi