bootstrap 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #! /bin/sh
  2. # Bootstrap 'tar' from CVS.
  3. # Copyright (C) 2003 Free Software Foundation, Inc.
  4. # This program 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 2, or (at your option)
  7. # any later version.
  8. # This program 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, write to the Free Software
  14. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  15. # 02111-1307, USA.
  16. # Written by Paul Eggert.
  17. # Parse options.
  18. for option; do
  19. case $option in
  20. --help)
  21. echo "$0: usage: $0 [--gnulib-srcdir=DIR]"
  22. exit;;
  23. --gnulib-srcdir=*)
  24. GNULIB_SRCDIR=`expr "$1" : '--gnulib-srcdir=\(.*\)'`;;
  25. *)
  26. echo >&2 "$0: $option: unknown option"
  27. exit 1;;
  28. esac
  29. done
  30. echo "$0: Bootstrapping CVS tar..."
  31. # Get gnulib files.
  32. echo "$0: getting gnulib files..."
  33. case ${GNULIB_SRCDIR--} in
  34. -)
  35. if [ ! -d gnulib ]; then
  36. trap exit 1 2 13 15
  37. trap 'rm -fr gnulib; exit 1' 0
  38. cvs -q -d savannah.gnu.org:/cvsroot/gnulib co gnulib || exit
  39. trap 0
  40. fi
  41. GNULIB_SRCDIR=gnulib
  42. esac
  43. <$GNULIB_SRCDIR/gnulib-tool || exit
  44. gnulib_modules='
  45. alloca
  46. argmatch
  47. backupfile
  48. dirname
  49. error
  50. exclude
  51. fileblocks
  52. fnmatch-gnu
  53. ftruncate
  54. full-write
  55. getdate
  56. getline
  57. getopt
  58. gettext
  59. hash
  60. human
  61. lchown
  62. memset
  63. modechange
  64. obstack
  65. quote
  66. quotearg
  67. rmdir
  68. safe-read
  69. save-cwd
  70. savedir
  71. stdbool
  72. strtol
  73. strtoul
  74. unlocked-io
  75. utime
  76. xalloc
  77. xgetcwd
  78. xstrtoumax
  79. '
  80. previous_gnulib_modules=
  81. while [ "$gnulib_modules" != "$previous_gnulib_modules" ]; do
  82. previous_gnulib_modules=$gnulib_modules
  83. gnulib_modules=`
  84. (echo "$gnulib_modules"
  85. for gnulib_module in $gnulib_modules; do
  86. $GNULIB_SRCDIR/gnulib-tool --extract-dependencies $gnulib_module
  87. done) | sort -u
  88. `
  89. done
  90. gnulib_files=`
  91. (for gnulib_module in $gnulib_modules; do
  92. $GNULIB_SRCDIR/gnulib-tool --extract-filelist $gnulib_module
  93. done) | sort -u
  94. `
  95. gnulib_dirs=`echo "$gnulib_files" | sed 's,/[^/]*$,,' | sort -u`
  96. mkdir -p $gnulib_dirs || exit
  97. for gnulib_file in $gnulib_files; do
  98. dest=$gnulib_file
  99. case $gnulib_file in
  100. m4/codeset.m4) continue;;
  101. m4/glibc21.m4) continue;;
  102. m4/intdiv0.m4) continue;;
  103. m4/inttypes_h.m4) continue;;
  104. m4/inttypes.m4) continue;;
  105. m4/inttypes-pri.m4) continue;;
  106. m4/isc-posix.m4) continue;;
  107. m4/lcmessage.m4) continue;;
  108. m4/onceonly_2_57.m4) dest=m4/onceonly.m4;;
  109. esac
  110. rm -f $dest &&
  111. echo "$0: Copying file $GNULIB_SRCDIR/$gnulib_file" &&
  112. cp -p $GNULIB_SRCDIR/$gnulib_file $dest || exit
  113. done
  114. # Get translations.
  115. echo "$0: getting translations into po..."
  116. (cd po &&
  117. rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'` &&
  118. wget -nv -nd -r -l 1 -A .po -C off \
  119. http://www.iro.umontreal.ca/contrib/po/maint/tar/ &&
  120. ls *.po | sed 's/\.po$//' >LINGUAS
  121. ) || exit
  122. # Reconfigure, getting other files.
  123. echo "$0: autoreconf --verbose --install --force ..."
  124. autoreconf --verbose --install --force
  125. echo "$0: done. Now you can run './configure'."