]> git.draconx.ca Git - cdecl99.git/blob - bootstrap
Improve bootstrap error messages.
[cdecl99.git] / bootstrap
1 #!/bin/sh
2
3 scriptname=$0
4
5 err() {
6         printf '%s: %s\n' "$scriptname" "$@" 1>&2
7 }
8
9 die() {
10         err "$@"
11         exit 1
12 }
13
14 : ${AUTORECONF=autoreconf}
15 : ${GNULIB=gnulib}
16 : ${GIT=git}
17 : ${PERL=perl}
18
19 $GIT submodule update --init || err "Failed to update submodules from git."
20
21 if test -x $GNULIB/gnulib-tool; then
22         $GNULIB/gnulib-tool --update -S || die "Failed to update Gnulib."
23 else
24         die "Gnulib sources are not properly installed in gnulib/."
25 fi
26
27 $PERL common/scripts/fix-gnulib.pl -o lib/gnulib.mk -i lib/gnulib.mk.in \
28         || die "Failed to fixup Gnulib makefile fragment."
29
30 $AUTORECONF -fis