summaryrefslogtreecommitdiff
path: root/cpp/bootstrap
blob: 2ecdefabd296e459de3abc029f21eb6e41a705bb (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
#!/bin/sh
set -e
aclocal -I m4
autoheader
libtoolize --automake

# These are needed only if you don't already have the gen/*.{h,cpp} files.
: ${JAVA=java}
: ${JAVAC=javac}
export JAVA JAVAC

# Generate (for automake) lots of repetitive parts of tests/Makefile.am.
(cd src/tests && rm -f gen.mk
  perl -ne '/^(include |if |else|endif)/ or print' Makefile.am \
      | make -f - abs_srcdir=`dirname $(pwd)` gen.mk > /dev/null )

# Create empty Makefile include files, make will generate the real contents.
touch src/rubygen.mk src/generate.mk
automake
autoconf

if [ "$1" = "-build" -o "$1" = "--build" ] ; then
    shift
    ./configure "$@"
    make
    make check
fi