summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2009-12-30 15:34:56 +0200
committerYaniv Kamay <ykamay@redhat.com>2010-01-10 19:43:55 +0200
commitb298008eaccf9afc418e486b012f7f023d5e0867 (patch)
treeacf83ddc4d41c2612a72f84b226ea309a1497d1b
parent17dd5f047e9ae0fd95a9d22503138174efb80239 (diff)
downloadspice-b298008eaccf9afc418e486b012f7f023d5e0867.tar.gz
spice-b298008eaccf9afc418e486b012f7f023d5e0867.tar.xz
spice-b298008eaccf9afc418e486b012f7f023d5e0867.zip
autogen: run "do_cmd auto*" for subdirs too (subdir config)
subdirs are defined in configure.ac Note we also mkdir m4 (just in case) And touch some needed files (README NEWS ...) to prevent warnings/errors. It may be better to add those files and commit them, or copy from parent dir. Signed-off-by: Uri Lublin <uril@redhat.com>
-rwxr-xr-xautogen.sh34
1 files changed, 29 insertions, 5 deletions
diff --git a/autogen.sh b/autogen.sh
index 2619803e..140a31d7 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -154,11 +154,35 @@ do_cmd() {
# Run for top level directory
printbold "Setting up $PACKAGE toplevel"
-do_cmd $LIBTOOLIZE $LIBTOOLIZE_FLAGS
-do_cmd $ACLOCAL $ACLOCAL_FLAGS
-do_cmd $AUTOHEADER
-do_cmd $AUTOMAKE $AUTOMAKE_FLAGS
-do_cmd $AUTOCONF
+
+config_specific_directory ()
+{
+ local d=${1:-.}
+ local cur=$(pwd)
+ if [ "$d" != "." ]; then
+ cd $d
+ printbold " ----- Entering $d -----"
+ fi
+ touch NEWS README AUTHORS ChangeLog ### ToDo: define those.
+ mkdir -p m4
+ do_cmd $LIBTOOLIZE $LIBTOOLIZE_FLAGS
+ do_cmd $ACLOCAL $ACLOCAL_FLAGS
+ do_cmd $AUTOHEADER
+ do_cmd $AUTOMAKE $AUTOMAKE_FLAGS
+ do_cmd $AUTOCONF --force
+ if [ "$d" != "." ]; then
+ cd $cur
+ printbold " ----- Exiting $d -----"
+ fi
+}
+
+subdirs=$(grep '^AC_CONFIG_SUBDIRS' configure.ac | \
+ sed 's/AC_CONFIG_SUBDIRS(\[\(.*\)\]) *$/\1/')
+printbold "subdirs are $subdirs"
+
+for sd in $subdirs .; do
+ config_specific_directory $sd
+done
cd $ORIGDIR || exit $?
rm -f config.cache