]> Dogcows Code - chaz/tar/blob - bootstrap
Support for "linkpath" extended keyword
[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; do
28 case $option in
29 --help)
30 echo "$0: usage: $0 [--gnulib-srcdir=DIR]"
31 exit;;
32 --gnulib-srcdir=*)
33 GNULIB_SRCDIR=`expr "$1" : '--gnulib-srcdir=\(.*\)'`;;
34 *)
35 echo >&2 "$0: $option: unknown option"
36 exit 1;;
37 esac
38 done
39
40
41 echo "$0: Bootstrapping CVS tar..."
42
43
44 # Get gnulib files.
45
46 echo "$0: getting gnulib files..."
47
48 case ${GNULIB_SRCDIR--} in
49 -)
50 if [ ! -d gnulib ]; then
51 trap exit 1 2 13 15
52 trap 'rm -fr gnulib; exit 1' 0
53 cvs -q -d savannah.gnu.org:/cvsroot/gnulib co gnulib || exit
54 trap 0
55 fi
56 GNULIB_SRCDIR=gnulib
57 esac
58
59 <$GNULIB_SRCDIR/gnulib-tool || exit
60
61 gnulib_modules='
62 alloca
63 argmatch
64 backupfile
65 dirname
66 error
67 exclude
68 fileblocks
69 fnmatch-gnu
70 ftruncate
71 full-write
72 getdate
73 getline
74 getopt
75 gettext
76 hash
77 human
78 lchown
79 memset
80 modechange
81 obstack
82 quote
83 quotearg
84 rmdir
85 safe-read
86 save-cwd
87 savedir
88 stdbool
89 strtol
90 strtoul
91 unlocked-io
92 utime
93 xalloc
94 xgetcwd
95 xstrtoumax
96 '
97
98 previous_gnulib_modules=
99 while [ "$gnulib_modules" != "$previous_gnulib_modules" ]; do
100 previous_gnulib_modules=$gnulib_modules
101 gnulib_modules=`
102 (echo "$gnulib_modules"
103 for gnulib_module in $gnulib_modules; do
104 $GNULIB_SRCDIR/gnulib-tool --extract-dependencies $gnulib_module
105 done) | sort -u
106 `
107 done
108
109 gnulib_files=`
110 (for gnulib_module in $gnulib_modules; do
111 $GNULIB_SRCDIR/gnulib-tool --extract-filelist $gnulib_module
112 done) | sort -u
113 `
114
115 gnulib_dirs=`echo "$gnulib_files" | sed 's,/[^/]*$,,' | sort -u`
116 mkdir -p $gnulib_dirs || exit
117
118 for gnulib_file in $gnulib_files; do
119 dest=$gnulib_file
120
121 case $gnulib_file in
122 m4/codeset.m4) continue;;
123 m4/glibc21.m4) continue;;
124 m4/intdiv0.m4) continue;;
125 m4/inttypes_h.m4) continue;;
126 m4/inttypes.m4) continue;;
127 m4/inttypes-pri.m4) continue;;
128 m4/isc-posix.m4) continue;;
129 m4/lcmessage.m4) continue;;
130 m4/onceonly_2_57.m4) dest=m4/onceonly.m4;;
131 esac
132
133 rm -f $dest &&
134 echo "$0: Copying file $GNULIB_SRCDIR/$gnulib_file" &&
135 cp -p $GNULIB_SRCDIR/$gnulib_file $dest || exit
136 done
137
138
139 # Get translations.
140
141 echo "$0: getting translations into po..."
142 (cd po &&
143 rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'` &&
144 wget -nv -nd -r -l 1 -A .po -C off \
145 http://www.iro.umontreal.ca/contrib/po/maint/tar/ &&
146 ls *.po | sed 's/\.po$//' >LINGUAS
147 ) || exit
148
149
150 # Reconfigure, getting other files.
151
152 echo "$0: autoreconf --verbose --install --force ..."
153 autoreconf --verbose --install --force
154
155
156 echo "$0: done. Now you can run './configure'."
This page took 0.044145 seconds and 4 git commands to generate.