bootstrap.conf 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. # Bootstrap configuration.
  2. # Copyright (C) 2006-2018 Free Software Foundation, Inc.
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  13. # We don't need these modules.
  14. avoided_gnulib_modules='
  15. --avoid=canonicalize-lgpl
  16. --avoid=dummy
  17. '
  18. # gnulib modules used by this package.
  19. gnulib_modules="
  20. $avoided_gnulib_modules
  21. acl
  22. alignof
  23. alloca
  24. announce-gen
  25. areadlink-with-size
  26. argmatch
  27. argv-iter
  28. assert
  29. autobuild
  30. backupfile
  31. backup-rename
  32. base32
  33. base64
  34. buffer-lcm
  35. c-strcase
  36. c-strtod
  37. c-strtold
  38. calloc-gnu
  39. canon-host
  40. canonicalize
  41. chown
  42. cloexec
  43. closein
  44. closeout
  45. config-h
  46. configmake
  47. crypto/md5
  48. crypto/sha1
  49. crypto/sha256
  50. crypto/sha512
  51. cycle-check
  52. d-ino
  53. d-type
  54. di-set
  55. diacrit
  56. dirfd
  57. dirname
  58. do-release-commit-and-tag
  59. dtoastr
  60. dup2
  61. environ
  62. error
  63. euidaccess
  64. exclude
  65. exitfail
  66. explicit_bzero
  67. faccessat
  68. fadvise
  69. fchdir
  70. fchmodat
  71. fchownat
  72. fclose
  73. fcntl
  74. fcntl-safer
  75. fd-reopen
  76. fdatasync
  77. fdl
  78. fdopen
  79. fdutimensat
  80. file-has-acl
  81. file-type
  82. fileblocks
  83. filemode
  84. filenamecat
  85. filevercmp
  86. flexmember
  87. fnmatch-gnu
  88. fopen-safer
  89. fprintftime
  90. freopen
  91. freopen-safer
  92. fseeko
  93. fstatat
  94. fsusage
  95. fsync
  96. ftoastr
  97. ftruncate
  98. fts
  99. full-read
  100. full-write
  101. getgroups
  102. gethrxtime
  103. getline
  104. getloadavg
  105. getlogin
  106. getndelim2
  107. getopt-gnu
  108. getpagesize
  109. getpass-gnu
  110. gettext-h
  111. gettime
  112. gettimeofday
  113. getugroups
  114. getusershell
  115. git-version-gen
  116. gitlog-to-changelog
  117. gnu-make
  118. gnu-web-doc-update
  119. gnumakefile
  120. gnupload
  121. group-member
  122. hard-locale
  123. hash
  124. hash-pjw
  125. heap
  126. host-os
  127. human
  128. idcache
  129. ignore-value
  130. inttostr
  131. inttypes
  132. isapipe
  133. isatty
  134. isblank
  135. largefile
  136. lchmod
  137. lchown
  138. ldtoastr
  139. lib-ignore
  140. linebuffer
  141. link
  142. link-follow
  143. linkat
  144. long-options
  145. lstat
  146. maintainer-makefile
  147. malloc-gnu
  148. manywarnings
  149. mbrlen
  150. mbrtowc
  151. mbsalign
  152. mbschr
  153. mbslen
  154. mbswidth
  155. memcasecmp
  156. memchr
  157. memcmp2
  158. mempcpy
  159. memrchr
  160. mgetgroups
  161. mkancesdirs
  162. mkdir
  163. mkdir-p
  164. mkfifo
  165. mknod
  166. mkostemp
  167. mkstemp
  168. mktime
  169. modechange
  170. mountlist
  171. mpsort
  172. netinet_in
  173. non-recursive-gnulib-prefix-hack
  174. nproc
  175. nstrftime
  176. obstack
  177. open
  178. parse-datetime
  179. pathmax
  180. perl
  181. physmem
  182. pipe-posix
  183. pipe2
  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. renameatu
  207. rmdir
  208. root-dev-ino
  209. rpmatch
  210. safe-read
  211. same
  212. save-cwd
  213. savedir
  214. savewd
  215. selinux-at
  216. setenv
  217. settime
  218. sig2str
  219. sigaction
  220. smack
  221. ssize_t
  222. stat-macros
  223. stat-size
  224. stat-time
  225. statat
  226. stdbool
  227. stdlib-safer
  228. stpcpy
  229. stpncpy
  230. strdup-posix
  231. strncat
  232. strnumcmp
  233. strsignal
  234. strtod
  235. strtoimax
  236. strtoumax
  237. symlinkat
  238. sys_ioctl
  239. sys_resource
  240. sys_stat
  241. sys_wait
  242. tempname
  243. termios
  244. time_rz
  245. timer-time
  246. timespec
  247. tzset
  248. uname
  249. unicodeio
  250. unistd-safer
  251. unlink-busy
  252. unlinkat
  253. unlocked-io
  254. unsetenv
  255. update-copyright
  256. uptime
  257. useless-if-before-free
  258. userspec
  259. utimecmp
  260. utimens
  261. vasprintf-posix
  262. vc-list-files
  263. verify
  264. verror
  265. version-etc-fsf
  266. wchar-single
  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. year2038
  290. yesno
  291. "
  292. # Other locale categories that need message catalogs.
  293. EXTRA_LOCALE_CATEGORIES=LC_TIME
  294. # Additional xgettext options to use. Use "\\\newline" to break lines.
  295. XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
  296. --flag=asnprintf:3:c-format\\\
  297. --flag=asprintf:2:c-format\\\
  298. --flag=error:3:c-format\\\
  299. --flag=error_at_line:5:c-format\\\
  300. --flag=vasnprintf:3:c-format\\\
  301. --flag=vasprintf:2:c-format\\\
  302. --flag=verror:3:c-format\\\
  303. --flag=verror_at_line:5:c-format\\\
  304. --flag=wrapf:1:c-format\\\
  305. --flag=xasprintf:1:c-format\\\
  306. --flag=xfprintf:2:c-format\\\
  307. --flag=xprintf:1:c-format\\\
  308. --from-code=UTF-8\\\
  309. '
  310. # Append these, since we use the propername module.
  311. see_manual='"This is a proper name. See the gettext manual, section Names."'
  312. see_manual=\'"$see_manual"\'
  313. XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
  314. --keyword=proper_name:1,'"$see_manual"'\\\
  315. --keyword=proper_name_utf8:1,'"$see_manual"'\\\
  316. '
  317. gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
  318. --makefile-name=gnulib.mk
  319. "
  320. # Build prerequisites
  321. buildreq="\
  322. autoconf 2.64
  323. automake 1.11.2
  324. autopoint 0.19.2
  325. bison -
  326. gettext 0.19.2
  327. git 1.4.4
  328. gperf -
  329. gzip -
  330. makeinfo 6.1
  331. patch -
  332. perl 5.5
  333. rsync -
  334. tar -
  335. xz -
  336. "
  337. bootstrap_post_import_hook ()
  338. {
  339. # Automake requires that ChangeLog exist.
  340. touch ChangeLog || return 1
  341. # List of coreutils programs. See heading comments in the invoked
  342. # script for more info. Keep this in sync with the rules in
  343. (m4f=m4/cu-progs.m4 mkf=src/cu-progs.mk tmp=cu-progs.tmp \
  344. && rm -f $m4f $mkf $tmp-1 $tmp-2 \
  345. && build-aux/gen-lists-of-programs.sh --autoconf >$tmp-1 \
  346. && build-aux/gen-lists-of-programs.sh --automake >$tmp-2 \
  347. && chmod a-w $tmp-1 $tmp-2 \
  348. && mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf)
  349. # Massage lib/gnulib.mk before using it later in the bootstrapping process.
  350. build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
  351. # Regenerate src/single-binary.mk
  352. (mkf=src/single-binary.mk tmp=single-binary.tmp \
  353. && rm -f $mkf $tmp \
  354. && build-aux/gen-single-binary.sh src/local.mk >$tmp \
  355. && chmod a-w $tmp \
  356. && mv -f $tmp $mkf)
  357. }
  358. bootstrap_epilogue()
  359. {
  360. # Since this is a "GNU" package, replace this line
  361. # if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
  362. # | grep -v 'libtool:' >/dev/null; then
  363. # with this:
  364. # if true; then
  365. # Why? That pipeline searches all files in $(top_srcdir), and if you
  366. # happen to have large files (or apparently large sparse files), the
  367. # first grep may well run out of memory.
  368. perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
  369. po/Makefile.in.in
  370. # Add dummy 'install-html' target, required for packages using
  371. # non-recursive makefiles with older gettext.
  372. # See https://debbugs.gnu.org/25690
  373. if ! grep -w 'install-html' po/Makefile.in.in ; then
  374. printf 'install-%s:;\n' dvi ps pdf html >> po/Makefile.in.in
  375. fi
  376. # Install our git hooks, as long as "cp" accepts the --backup option,
  377. # so that we can back up any existing files.
  378. case $(cp --help) in *--backup*) backup=1;; *) backup=0;; esac
  379. if test $backup = 1; then
  380. hooks=$(cd scripts/git-hooks && git ls-files)
  381. for f in $hooks; do
  382. # If it is identical, skip it.
  383. cmp scripts/git-hooks/$f .git/hooks/$f > /dev/null \
  384. && continue
  385. cp --backup=numbered scripts/git-hooks/$f .git/hooks
  386. chmod a-w .git/hooks/$f
  387. done
  388. fi
  389. }