Debian Codegraph @

bootstrap

raw
1 #!/bin/sh
2 # Generates ./configure, Makefile.in's and tools
3
4 # Copyright (C) 2007, 2008, 2010, 2014 Sylvain Beucler
5
6 # Copying and distribution of this file, with or without modification,
7 # are permitted in any medium without royalty provided the copyright
8 # notice and this notice are preserved.
9
10 # Cf. doc/bootstrap.txt.
11
12 # Stop at first error:
13 set -e
14 # Print commands:
15 set -x
16
17 if [ "x$1" = xclean ]; then
18 test ! -f Makefile || make maintainer-clean || true
19
20 # Generated by aclocal.
21 rm -f aclocal.m4
22 # Generated by autoheader.
23 rm -f config.h.in
24 # Generated by autoconf.
25 rm -f configure
26 rm -rf autom4te.cache/
27 # Generated or brought in by automake.
28 rm -f INSTALL
29 find -name "Makefile.in" | xargs -r rm
30 rm -rf autotools/
31 # Generated or brought by autopoint
32 rm -f ABOUT-NLS
33 # Generated by Gnulib
34 rm -rf gnulib/lib/
35 rm -rf gnulib/po/
36 rm -f $(ls gnulib/m4/* | grep -v /gnulib-cache.m4$)
37 exit
38 fi
39
40 # PKG_CHECK_MODULES
41 if ! which pkg-config > /dev/null; then
42 echo "Please install 'pkg-config' (used to query installed dependencies)"
43 echo "Cf. http://pkgconfig.freedesktop.org/"
44 exit 1
45 fi
46
47 # Gnulib
48 # Look for gnulib-tool. Use '|| true' because of 'set -e' above
49 GNULIB_TOOL=`PATH=gnulib-git:$PATH:/usr/src/gnulib which gnulib-tool || true`
50 if [ -z "$GNULIB_TOOL" ]; then
51 git clone git://git.savannah.gnu.org/gnulib.git gnulib-git
52 GNULIB_TOOL=./gnulib-git/gnulib-tool
53 fi
54 $GNULIB_TOOL --update --more-symlinks
55
56 if autoreconf --install --symlink --force $*
57 then echo "You now can run ./configure"
58 else echo "*** Error: please check the messages above. ***"
59 fi