3 # Bootstrap 'tar' from CVS.
5 # Copyright (C) 2003 Free Software Foundation, Inc.
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)
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.
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
22 # Written by Paul Eggert.
24 # URL of our text domain page in Translation Project
25 TP_URL
="http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/"
29 usage: $0 [--gnulib-srcdir=DIR][--cvs-auth=AUTH-METHOD][--cvs-user=USERNAME][--no-po]
31 --gnulib-srcdir=DIRNAME Specify the local directory where gnulib
32 sources reside. Use this if you already
33 have gnulib sources on your machine, and
34 do not want to waste your bandwidth dowloading
36 --cvs-auth=METHOD Set the CVS access method used for downloading
37 gnulib files. METHOD is one of the keywords
38 accepted by cvs -d option (see info cvs
40 --cvs-user=USERNAME Set the CVS username to be used when accessing
41 the gnulib repository.
42 --no-po Do not download po files.
44 Running without arguments will suffice in most cases. It is equivalent
47 ./bootstrap --cvs-auth=ext --cvs-user=anoncvs
62 GNULIB_SRCDIR
=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
64 CVS_AUTH
=`expr "$option" : '--cvs-auth=\(.*\)'`;;
66 CVS_USER
=`expr "$option" : '--cvs-user=\(.*\)'`;;
70 echo >&2 "$0: $option: unknown option"
75 echo "$0: Bootstrapping CVS tar..."
79 if [ "${2}" != - ]; then
80 CVS_PREFIX
=${CVS_PREFIX}${2}@
82 if [ "$1" = "ext" ]; then
83 if [ -z "${CVS_RSH}" ]; then
92 case ${GNULIB_SRCDIR--} in
94 if [ ! -d gnulib
]; then
95 echo "$0: getting gnulib files..."
98 trap 'rm -fr gnulib; exit 1' 0
100 case "${CVS_AUTH--}" in
101 -) build_cvs_prefix ext anoncvs
;;
102 pserver
) build_cvs_prefix
$CVS_AUTH ${CVS_USER:-anoncvs};;
104 build_cvs_prefix
$CVS_AUTH ${CVS_USER--};;
105 ext
) build_cvs_prefix
$CVS_AUTH ${CVS_USER--};;
106 *) echo "$0: Unknown CVS access method" >&2
109 if [ "${CVS_AUTH--}" = "pserver" ]; then
110 cvs
-d ${CVS_PREFIX}subversions.gnu.org
:/cvsroot
/gnulib login
|| exit
112 cvs
-q -d ${CVS_PREFIX}subversions.gnu.org
:/cvsroot
/gnulib co gnulib
|| exit
119 <$GNULIB_SRCDIR/gnulib
-tool || exit
158 previous_gnulib_modules
=
159 while [ "$gnulib_modules" != "$previous_gnulib_modules" ]; do
160 previous_gnulib_modules
=$gnulib_modules
162 (echo "$gnulib_modules"
163 for gnulib_module in $gnulib_modules; do
164 $GNULIB_SRCDIR/gnulib-tool --extract-dependencies $gnulib_module
170 (for gnulib_module in $gnulib_modules; do
171 $GNULIB_SRCDIR/gnulib-tool --extract-filelist $gnulib_module
175 gnulib_dirs
=`echo "$gnulib_files" | sed 's,/[^/]*$,,' | sort -u`
176 mkdir -p $gnulib_dirs || exit
178 for gnulib_file
in $gnulib_files; do
182 m
4/codeset.
m4) continue;;
183 m
4/glibc21.
m4) continue;;
184 m
4/intdiv0.
m4) continue;;
185 m
4/inttypes_h.
m4) continue;;
186 m
4/inttypes.
m4) continue;;
187 m
4/inttypes
-pri.
m4) continue;;
188 m
4/isc
-posix.
m4) continue;;
189 m
4/lcmessage.
m4) continue;;
190 m
4/onceonly_2_57.
m4) dest
=m
4/onceonly.
m4;;
194 echo "$0: Copying file $GNULIB_SRCDIR/$gnulib_file" &&
195 cp -p $GNULIB_SRCDIR/$gnulib_file $dest || exit
201 if test "$DOWNLOAD_PO" = "yes"; then
202 echo "$0: getting translations into po..."
204 rm -f dummy
`ls | sed -n '/\.gmo$/p; /\.po/p'` &&
205 wget
-nv -nd -r -l 1 -A .po
-C off
$TP_URL &&
206 ls *.po
| sed 's/\.po$//' >LINGUAS
210 # Reconfigure, getting other files.
212 echo "$0: autoreconf --verbose --install --force ..."
213 autoreconf
--verbose --install --force
216 echo "$0: done. Now you can run './configure'."