summaryrefslogtreecommitdiffstats
path: root/autogen
blob: ad3b67ff8b63c793b021ade94a3e9cdcfa9759f4 (plain) (blame)
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
60
61
62
63
64
65
66
67
68
#!/bin/sh
#
# helps bootstrapping, when checked out from CVS
# requires GNU autoconf and GNU automake
#
# $Id$

# this is not meant to be exported outside the source tree

# NOTE: Inspired by libtool's autogen script

# to be run from the toplevel directory of RTEMS'
# source tree

progname=`basename $0`
am_verbose="";
quiet="false"

usage()
{
  echo
  echo "usage: ${progname} [-h|-q|-v]"
  echo
  echo "options:"
  echo "	-h .. display this message and exit";
  echo "	-q .. quiet, don't display directories";
  echo "	-v .. verbose, pass -v to automake when invoking automake"
  echo
  exit 1;
}

if test ! -f VERSION; then
  echo "${progname}:"
  echo "	Please change directory to RTEMS's toplevel directory"
  exit 1;
fi

while test $# -gt 0; do
case $1 in
-h|--he|--hel|--help)
  usage ;;
-q|--qu|--qui|--quie|--quiet)
  quiet="true";
  shift;;
-v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
  verbose="-v";
  shift;;
-*) echo "unknown option $1" ;
  usage ;;
*) echo "invalid parameter $1" ;
  usage ;;
esac
done

pwd=`pwd`;
confs=`find $pwd -name 'configure.in' -print`

aclocal_dir=$pwd/aclocal
for i in $confs; do
dir=`dirname $i`;
( test "$quiet" = "true" || echo "$dir";
  cd $dir;
  aclocal -I $aclocal_dir;
  autoconf;
  test -n "`grep CONFIG_HEADER configure.in`" && autoheader ; 
  test -f Makefile.am && automake $verbose ;
)
done