autogen.sh revision 458c00f658fec84d2c78dd3fbbb11d33ba8afba0
1#!/bin/sh
2#copied by ianw from ipbench (originally from oprofile 18-11-2003)
3
4# run to generate needed files not in CVS
5
6# NB: if you run this file with AUTOMAKE, AUTOCONF, etc. environment
7# variables set, you *must* run "configure" with the same variables
8# set. this is because "configure" will embed the values of these variables
9# into the generated Makefiles, as @AUTOMAKE@, @AUTOCONF@ etc. and it will
10# trigger regeneration of configuration state using those programs when any
11# of Makefile.am etc. change.
12
13run() {
14	echo "Running $1 ..."
15	$1
16}
17
18set -e
19
20ACLOCAL=${ACLOCAL:-aclocal}
21AUTOHEADER=${AUTOHEADER:-autoheader}
22AUTOCONF=${AUTOCONF:-autoconf}
23
24if test -n "$1"; then
25	echo "autogen.sh doesn't take any options" >&2
26	exit 1
27fi
28
29run "$ACLOCAL"
30run "$AUTOHEADER"
31run "$AUTOCONF"
32