Mercurial > audlegacy
annotate autogen.sh @ 4671:414966b3a933
clean up some parts that have been made obsolete by nenolod's great work:
- removed/restructured headers
- moved one function to ui_legacy
- removed obsolete comment of mine
author | mf0102 <0102@gmx.at> |
---|---|
date | Sun, 29 Jun 2008 15:52:18 +0200 |
parents | 72ec866d6b81 |
children |
rev | line source |
---|---|
0 | 1 #! /bin/sh |
2 | |
3 TOP_DIR=$(dirname $0) | |
4 LAST_DIR=$PWD | |
5 | |
6 if test ! -f $TOP_DIR/configure.ac ; then | |
7 echo "You must execute this script from the top level directory." | |
8 exit 1 | |
9 fi | |
10 | |
51 | 11 AUTOCONF=${AUTOCONF:-autoconf} |
1620
84006edb5293
[svn] - don't be picky about what aclocal version we are using.
nenolod
parents:
745
diff
changeset
|
12 ACLOCAL=${ACLOCAL:-aclocal} |
51 | 13 AUTOHEADER=${AUTOHEADER:-autoheader} |
0 | 14 |
15 dump_help_screen () | |
16 { | |
17 echo "Usage: gen-auto-scripts.sh [options]" | |
18 echo | |
19 echo "options:" | |
20 echo " -n skip CVS changelog creation" | |
21 echo " -h,--help show this help screen" | |
22 echo | |
23 exit 0 | |
24 } | |
25 | |
26 parse_options () | |
27 { | |
28 while test "$1" != "" ; do | |
29 case $1 in | |
30 -h|--help) | |
31 dump_help_screen | |
32 ;; | |
33 -n) | |
34 SKIP_CVS_CHANGELOG=yes | |
35 ;; | |
36 *) | |
37 echo Invalid argument - $1 | |
38 dump_help_screen | |
39 ;; | |
40 esac | |
41 shift | |
42 done | |
43 } | |
44 | |
45 run_or_die () | |
46 { | |
47 COMMAND=$1 | |
48 | |
49 # check for empty commands | |
50 if test -z "$COMMAND" ; then | |
51 echo "*warning* no command specified" | |
52 return 1 | |
53 fi | |
54 | |
55 shift; | |
56 | |
57 OPTIONS="$@" | |
58 | |
59 # print a message | |
60 echo -n "*info* running $COMMAND" | |
61 if test -n "$OPTIONS" ; then | |
62 echo " ($OPTIONS)" | |
63 else | |
64 echo | |
65 fi | |
66 | |
67 # run or die | |
68 $COMMAND $OPTIONS ; RESULT=$? | |
69 if test $RESULT -ne 0 ; then | |
70 echo "*error* $COMMAND failed. (exit code = $RESULT)" | |
71 exit 1 | |
72 fi | |
73 | |
74 return 0 | |
75 } | |
76 | |
77 parse_options "$@" | |
78 | |
79 cd $TOP_DIR | |
80 | |
51 | 81 run_or_die $ACLOCAL -I m4 |
0 | 82 run_or_die $AUTOHEADER |
83 run_or_die $AUTOCONF | |
84 | |
85 cd $LAST_DIR | |
86 |