]> Dogcows Code - chaz/tar/blob - bootstrap
Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
[chaz/tar] / bootstrap
1 #! /bin/sh
2
3 # Bootstrap 'tar' from CVS.
4
5 # Copyright (C) 2003 Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 # 02111-1307, USA.
21
22 # Written by Paul Eggert.
23
24
25 # Parse options.
26
27 for option
28 do
29 case $option in
30 --help)
31 echo "$0: usage: $0 [--gnulib-srcdir=DIR][--cvs-auth=AUTH-METHOD][--cvs-user=USERNAME]"
32 exit;;
33 --gnulib-srcdir=*)
34 GNULIB_SRCDIR=`expr "$1" : '--gnulib-srcdir=\(.*\)'`;;
35 --cvs-auth=*)
36 CVS_AUTH=`expr "$1" : '--cvs-auth=\(.*\)'`;;
37 --cvs-user=*)
38 CVS_USER=`expr "$1" : '--cvs-user=\(.*\)'`;;
39 *)
40 echo >&2 "$0: $option: unknown option"
41 exit 1;;
42 esac
43 done
44
45 echo "$0: Bootstrapping CVS tar..."
46
47 build_cvs_prefix() {
48 CVS_PREFIX=:${1}:
49 if [ "${2}" != - ]; then
50 CVS_PREFIX=${CVS_PREFIX}${2}@
51 fi
52 }
53
54 # Get gnulib files.
55
56 case ${GNULIB_SRCDIR--} in
57 -)
58 if [ ! -d gnulib ]; then
59 echo "$0: getting gnulib files..."
60
61 trap exit 1 2 13 15
62 trap 'rm -fr gnulib; exit 1' 0
63
64 case "${CVS_AUTH--}" in
65 -) : ${CVS_RSH:?}
66 CVS_PREFIX="";;
67 pserver) build_cvs_prefix $CVS_AUTH ${CVS_USER:-anoncvs};;
68 gserver|server)
69 build_cvs_prefix $CVS_AUTH ${CVS_USER--};;
70 ext) : ${CVS_RSH:?}
71 build_cvs_prefix $CVS_AUTH ${CVS_USER--};;
72 *) echo "$0: Unknown CVS access method" >&2
73 exit 1;;
74 esac
75 if [ "${CVS_AUTH--}" = "pserver" ]; then
76 cvs -d ${CVS_PREFIX}subversions.gnu.org:/cvsroot/gnulib login || exit
77 fi
78 cvs -q -d ${CVS_PREFIX}subversions.gnu.org:/cvsroot/gnulib co gnulib || exit
79
80 trap 0
81 fi
82 GNULIB_SRCDIR=gnulib
83 esac
84
85 <$GNULIB_SRCDIR/gnulib-tool || exit
86
87 gnulib_modules='
88 alloca
89 argmatch
90 backupfile
91 dirname
92 error
93 exclude
94 fileblocks
95 fnmatch-gnu
96 ftruncate
97 full-write
98 getdate
99 getline
100 getopt
101 gettext
102 hash
103 human
104 lchown
105 memset
106 modechange
107 obstack
108 quote
109 quotearg
110 rmdir
111 safe-read
112 save-cwd
113 savedir
114 stdbool
115 strtol
116 strtoul
117 unlocked-io
118 utime
119 xalloc
120 xgetcwd
121 xstrtoumax
122 '
123
124 previous_gnulib_modules=
125 while [ "$gnulib_modules" != "$previous_gnulib_modules" ]; do
126 previous_gnulib_modules=$gnulib_modules
127 gnulib_modules=`
128 (echo "$gnulib_modules"
129 for gnulib_module in $gnulib_modules; do
130 $GNULIB_SRCDIR/gnulib-tool --extract-dependencies $gnulib_module
131 done) | sort -u
132 `
133 done
134
135 gnulib_files=`
136 (for gnulib_module in $gnulib_modules; do
137 $GNULIB_SRCDIR/gnulib-tool --extract-filelist $gnulib_module
138 done) | sort -u
139 `
140
141 gnulib_dirs=`echo "$gnulib_files" | sed 's,/[^/]*$,,' | sort -u`
142 mkdir -p $gnulib_dirs || exit
143
144 for gnulib_file in $gnulib_files; do
145 dest=$gnulib_file
146
147 case $gnulib_file in
148 m4/onceonly_2_57.m4) dest=m4/onceonly.m4;;
149 esac
150
151 rm -f $dest &&
152 echo "$0: Copying file $GNULIB_SRCDIR/$gnulib_file" &&
153 cp -p $GNULIB_SRCDIR/$gnulib_file $dest || exit
154 done
155
156
157 # Get translations.
158
159 echo "$0: getting translations into po..."
160 (cd po &&
161 rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'` &&
162 wget -nv -nd -r -l 1 -A .po -C off \
163 http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/ &&
164 ls *.po | sed 's/\.po$//' >LINGUAS
165 ) || exit
166
167
168 # Reconfigure, getting other files.
169
170 echo "$0: autoreconf --verbose --install --force ..."
171 autoreconf --verbose --install --force || exit
172
173
174 echo "$0: done. Now you can run './configure'."
This page took 0.045607 seconds and 5 git commands to generate.