aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
blob: caabd06f4ab62f2a3418a9d051f8266baad5d6af (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#! /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    
   
if ! which gnulib-tool >/dev/null; then
  echo >&2 "$0: gnulib-tool not found; try $0 --help"
  exit 1
fi

test -d m4 || mkdir m4 || exit 1
test -d gnu || mkdir gnu || exit 1

git submodule init
git submodule update

cat > ChangeLog <<EOT
This file is a placeholder. It will be replaced with the actual ChangeLog
by make.  Run make ChangeLog if you wish to create it earlier.
EOT

MODULES=`grep '^[^#]' gnulib.modules`

gnulib-tool --source-base=gnu --import $MODULES &&
 autoreconf -f -i -s

Return to:

Send suggestions and report system problems to the System administrator.