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