bootstrap.conf 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. # Bootstrap configuration for GNU tar.
  2. # Copyright 2006-2023 Free Software Foundation, Inc.
  3. # This file is part of GNU tar.
  4. # GNU tar is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 3 of the License, or
  7. # (at your option) any later version.
  8. # GNU tar is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. source_base=gnu
  15. gnulib_name=libgnu
  16. # We don't need these modules, even though gnulib-tool ordinarily
  17. # includes them because of dependencies on the modules 'exclude’ and 'regex'.
  18. avoided_gnulib_modules='
  19. --avoid=lock
  20. --avoid=mbuiter
  21. --avoid=mbuiterf
  22. '
  23. # Additional xgettext options to use. Use "\\\newline" to break lines.
  24. XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
  25. --flag=_:1:pass-c-format\\\
  26. --flag=N_:1:pass-c-format\\\
  27. --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
  28. --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
  29. --flag=argp_error:2:c-format\\\
  30. --flag=__argp_error:2:c-format\\\
  31. --flag=argp_failure:4:c-format\\\
  32. --flag=__argp_failure:4:c-format\\\
  33. --flag=argp_fmtstream_printf:2:c-format\\\
  34. --flag=__argp_fmtstream_printf:2:c-format\\\
  35. '
  36. # Gettext supplies these files, but we don't need them since
  37. # we don't have an intl subdirectory.
  38. excluded_files='
  39. m4/glibc2.m4
  40. m4/intdiv0.m4
  41. m4/lcmessage.m4
  42. m4/lock.m4
  43. m4/printf-posix.m4
  44. m4/uintmax_t.m4
  45. m4/ulonglong.m4
  46. m4/visibility.m4
  47. '
  48. # Read local configuration file
  49. if [ -r .bootstrap ]; then
  50. echo "$0: Reading configuration file .bootstrap"
  51. eval set -- "`sed 's/#.*$//;/^$/d' .bootstrap | tr '\n' ' '` $*"
  52. fi
  53. bootstrap_post_pull_hook() {
  54. mkdir -p m4 $source_base
  55. git submodule init
  56. git submodule update
  57. }
  58. PAXUTILS=paxutils
  59. # gnulib modules used by this package.
  60. # getopt-gnu is for paxutils.
  61. gnulib_modules="$avoided_gnulib_modules
  62. `grep -h '^[^#]' gnulib.modules`
  63. getopt-gnu
  64. "
  65. # copy_files srcdir dstdir
  66. copy_files() {
  67. for file in `cat $1/DISTFILES`
  68. do
  69. case $file in
  70. "#*") continue;;
  71. esac
  72. dst=`echo $file | sed 's^.*/^^'`
  73. if [ $# -eq 3 ]; then
  74. case $dst in
  75. ${3}*) ;;
  76. *) dst=${3}$dst;;
  77. esac
  78. fi
  79. if [ "$2" = '.' ]; then
  80. ln -sf $1/$file $2
  81. else
  82. symlink_to_dir "$1" "$file" "$2/$dst" || exit
  83. fi
  84. # FIXME ignorefile $2 $dst
  85. done
  86. }
  87. bootstrap_post_import_hook() {
  88. test -f ChangeLog || cat > ChangeLog <<EOT
  89. This file is a placeholder. It will be replaced with the actual ChangeLog
  90. by make dist. Run make ChangeLog if you wish to create it earlier.
  91. EOT
  92. # Import from paxutils
  93. copy_files ${PAXUTILS} .
  94. copy_files ${PAXUTILS}/am m4
  95. echo "$0: Creating m4/paxutils.m4"
  96. (echo "# This file is generated automatically. Please, do not edit."
  97. echo "#"
  98. echo "AC_DEFUN([${package}_PAXUTILS],["
  99. cat ${PAXUTILS}/am/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z
  100. echo "])") > ./m4/paxutils.m4
  101. #FIXME ignorefile m4 paxutils.m4
  102. mkdir -p rmt
  103. for dir in doc rmt lib tests; do
  104. copy_files ${PAXUTILS}/$dir $dir
  105. done
  106. copy_files ${PAXUTILS}/paxlib lib pax
  107. }