Mercurial > audlegacy
annotate autogen.sh @ 2324:2ab9ef1e9544 trunk
[svn] - remove leftover remnants of automake from buildsystem
author | nenolod |
---|---|
date | Sat, 13 Jan 2007 14:49:55 -0800 |
parents | e4c359265eb0 |
children | 72ec866d6b81 |
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 | |
2030
f158696b050d
[svn] - touch audacious/.svn because gentoo's subversion eclass sucks
nenolod
parents:
1677
diff
changeset
|
11 ### XXX: Gentoo's subversion.eclass sucks, yet people insist on using |
f158696b050d
[svn] - touch audacious/.svn because gentoo's subversion eclass sucks
nenolod
parents:
1677
diff
changeset
|
12 ### it. |
2072 | 13 mkdir -p audacious/.svn |
2030
f158696b050d
[svn] - touch audacious/.svn because gentoo's subversion eclass sucks
nenolod
parents:
1677
diff
changeset
|
14 |
51 | 15 AUTOCONF=${AUTOCONF:-autoconf} |
1620
84006edb5293
[svn] - don't be picky about what aclocal version we are using.
nenolod
parents:
745
diff
changeset
|
16 ACLOCAL=${ACLOCAL:-aclocal} |
51 | 17 AUTOHEADER=${AUTOHEADER:-autoheader} |
0 | 18 |
19 dump_help_screen () | |
20 { | |
21 echo "Usage: gen-auto-scripts.sh [options]" | |
22 echo | |
23 echo "options:" | |
24 echo " -n skip CVS changelog creation" | |
25 echo " -h,--help show this help screen" | |
26 echo | |
27 exit 0 | |
28 } | |
29 | |
30 parse_options () | |
31 { | |
32 while test "$1" != "" ; do | |
33 case $1 in | |
34 -h|--help) | |
35 dump_help_screen | |
36 ;; | |
37 -n) | |
38 SKIP_CVS_CHANGELOG=yes | |
39 ;; | |
40 *) | |
41 echo Invalid argument - $1 | |
42 dump_help_screen | |
43 ;; | |
44 esac | |
45 shift | |
46 done | |
47 } | |
48 | |
49 run_or_die () | |
50 { | |
51 COMMAND=$1 | |
52 | |
53 # check for empty commands | |
54 if test -z "$COMMAND" ; then | |
55 echo "*warning* no command specified" | |
56 return 1 | |
57 fi | |
58 | |
59 shift; | |
60 | |
61 OPTIONS="$@" | |
62 | |
63 # print a message | |
64 echo -n "*info* running $COMMAND" | |
65 if test -n "$OPTIONS" ; then | |
66 echo " ($OPTIONS)" | |
67 else | |
68 echo | |
69 fi | |
70 | |
71 # run or die | |
72 $COMMAND $OPTIONS ; RESULT=$? | |
73 if test $RESULT -ne 0 ; then | |
74 echo "*error* $COMMAND failed. (exit code = $RESULT)" | |
75 exit 1 | |
76 fi | |
77 | |
78 return 0 | |
79 } | |
80 | |
81 parse_options "$@" | |
82 | |
83 cd $TOP_DIR | |
84 | |
51 | 85 run_or_die $ACLOCAL -I m4 |
0 | 86 run_or_die $AUTOHEADER |
87 run_or_die $AUTOCONF | |
88 | |
89 cd $LAST_DIR | |
90 |