diff options
author | Uri Lublin <uril@redhat.com> | 2009-12-30 15:34:56 +0200 |
---|---|---|
committer | Yaniv Kamay <ykamay@redhat.com> | 2010-01-10 19:43:55 +0200 |
commit | b298008eaccf9afc418e486b012f7f023d5e0867 (patch) | |
tree | acf83ddc4d41c2612a72f84b226ea309a1497d1b | |
parent | 17dd5f047e9ae0fd95a9d22503138174efb80239 (diff) | |
download | spice-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-x | autogen.sh | 34 |
1 files changed, 29 insertions, 5 deletions
@@ -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 |