summaryrefslogtreecommitdiffabout
path: root/bootstrap
blob: ba6a6c84531cd8b250e58dc0a619a6f7b81b1374 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/sh
checkout_only_file=README-hacking

usage() {
  echo >&2 "\
  Usage: $0 [OPTION]...
  Bootstrap this package from the checked-out sources.

  Supported options are:

  --force                  Attempt to bootstrap even if the sources seem
                           not to have been checked out.
  --gnulib-srcdir=DIRNAME  Specify the local directory where gnulib
                           sources reside. This option is required, unless
			   \`gnulib-tool' is in your PATH.
  --help                   Print this help list.
  "
}			     
  
for option
do
  case $option in
  --help)
    usage
    exit 0;;
  --gnulib-srcdir=*)
    GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`
    PATH=$GNULIB_SRCDIR:$PATH;;
  --force)
    checkout_only_file=;;
  *)
    echo >&2 "$0: $option: unknown option"
    exit 1;;
  esac
done  	

if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
  echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
  exit 1
fi    
   
test -d m4 || mkdir m4 || exit 1
test -d gnu || mkdir gnu || exit 1
gnulib-tool --source-base=gnu --import \
 xalloc obstack getopt hash error progname getline mkdtemp save-cwd \
 backupfile strerror vasprintf inttostr strftime &&
autoreconf -f -i -s

Return to:

Send suggestions and report system problems to the System administrator.