File: bootstrap

package info (click to toggle)
freedink 109.6-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,956 kB
  • sloc: ansic: 27,668; cpp: 23,643; sh: 5,524; java: 1,224; makefile: 257; javascript: 106; xml: 103; perl: 52; python: 17; sed: 16
file content (59 lines) | stat: -rwxr-xr-x 1,647 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
# Generates ./configure, Makefile.in's and tools

# Copyright (C) 2007, 2008, 2010, 2014  Sylvain Beucler

# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.

# Cf. doc/bootstrap.txt.

# Stop at first error:
set -e
# Print commands:
set -x

if [ "x$1" = xclean ]; then
    test ! -f Makefile || make maintainer-clean || true

    # Generated by aclocal.
    rm -f aclocal.m4
    # Generated by autoheader.
    rm -f config.h.in
    # Generated by autoconf.
    rm -f configure
    rm -rf autom4te.cache/
    # Generated or brought in by automake.
    rm -f INSTALL
    find -name "Makefile.in" | xargs -r rm
    rm -rf autotools/
    # Generated or brought by autopoint
    rm -f ABOUT-NLS
    # Generated by Gnulib
    rm -rf gnulib/lib/
    rm -rf gnulib/po/
    rm -f $(ls gnulib/m4/* | grep -v /gnulib-cache.m4$)
    exit
fi

# PKG_CHECK_MODULES
if ! which pkg-config > /dev/null; then
    echo "Please install 'pkg-config' (used to query installed dependencies)"
    echo "Cf. http://pkgconfig.freedesktop.org/"
    exit 1
fi

# Gnulib
# Look for gnulib-tool. Use '|| true' because of 'set -e' above
GNULIB_TOOL=`PATH=gnulib-git:$PATH:/usr/src/gnulib which gnulib-tool || true`
if [ -z "$GNULIB_TOOL" ]; then
    git clone git://git.savannah.gnu.org/gnulib.git gnulib-git
    GNULIB_TOOL=./gnulib-git/gnulib-tool
fi
$GNULIB_TOOL --update --more-symlinks

if autoreconf --install --symlink --force $*
then echo "You now can run ./configure"
else echo "*** Error: please check the messages above. ***"
fi