.bootstrap 1.49 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#! /bin/sh

# Build all automatically generated files that are not present in the
# CVS repository.

# This script is for use in the source directory, before you run
# configure. To get started from a fresh CVS checkout, you also need
# to run configure and make bootstrap from your build directory.

set -e

relative_symlink() {
    (
	target="$1"
	shift
	while [ $# -ge 1 ] ; do
	    dir="$1"
Niels Möller's avatar
Niels Möller committed
18
	    if [ "$dir" = "." ] ; then
19 20 21
		ln -s "$target" "$dir"
	    else
		dotdots="`echo "$dir" | sed 's%[^/][^/]*%..%g'`"
Niels Möller's avatar
Niels Möller committed
22
		(cd "$dir" && ln -s "$dotdots/$target" . || true)
23
	    fi
Niels Möller's avatar
Niels Möller committed
24
	    shift
25 26 27 28 29
	done
    )
}

relative_symlink misc/run-tests \
30
    argp/testsuite nettle/testsuite nettle/examples \
Niels Möller's avatar
Niels Möller committed
31
    spki/testsuite sftp/testsuite src/testsuite
32

33
relative_symlink aclocal.m4 \
Niels Möller's avatar
Niels Möller committed
34
    argp nettle spki sftp
35

36
relative_symlink misc/vsnprintf.c \
Niels Möller's avatar
Niels Möller committed
37
    argp sftp
38
    
Niels Möller's avatar
Niels Möller committed
39
relative_symlink misc/getopt.c \
40
    src/testsuite nettle/examples nettle/tools spki/tools
Niels Möller's avatar
Niels Möller committed
41
relative_symlink misc/getopt1.c \
42
    src/testsuite nettle/examples nettle/tools spki/tools
Niels Möller's avatar
Niels Möller committed
43
relative_symlink misc/getopt.h \
44
    src/testsuite nettle/examples nettle/tools spki/tools
45 46 47 48

relative_symlink config.guess nettle spki
relative_symlink config.sub nettle spki

Niels Möller's avatar
Niels Möller committed
49
relative_symlink install-sh argp nettle spki sftp
50
relative_symlink texinfo.tex nettle
51

52
relative_symlink INSTALL nettle spki
53

54
if [ "$1" = "links" ] ; then
55
    # Skip the time consuming autoconf stuff
56 57 58
    exit 0;
fi

Niels Möller's avatar
Niels Möller committed
59
for subdir in argp nettle spki sftp; do
Niels Möller's avatar
Niels Möller committed
60
    (cd $subdir && ./.bootstrap)
61 62
done

63
autoconf && autoheader