From: Tom Tromey Date: Mon, 16 Feb 1998 07:15:11 +0000 (+0000) Subject: fixed bug with -I and m4 dependencies X-Git-Tag: Release-1-2g~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8486e5455989c2bb771677d6f0b682dfb2b57ba1;p=thirdparty%2Fautomake.git fixed bug with -I and m4 dependencies --- diff --git a/ChangeLog b/ChangeLog index 36af336ce..007cfba79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Feb 16 00:12:03 1998 Tom Tromey + + * automake.in (handle_aclocal_m4): When processing -I options, + directory is separate argument. Test aclocali.test. + Fri Feb 13 14:35:39 1998 Ian Lance Taylor * automake.in (handle_texinfo): Correct condition for whether diff --git a/automake.in b/automake.in index 74c3f276e..efb9c3c72 100755 --- a/automake.in +++ b/automake.in @@ -2904,14 +2904,20 @@ sub handle_aclocal_m4 # dependencies. if (&variable_defined ('ACLOCAL_AMFLAGS')) { - local ($amdir); + local ($examine_next, $amdir) = 0; foreach $amdir (&variable_value_as_list ('ACLOCAL_AMFLAGS', '')) { - if ($amdir =~ s/^-I// - && $amdir !~ /^\// - && -d $amdir) + if ($examine_next) { - push (@ac_deps, &my_glob ($am_dir . '/*.m4')); + $examine_next = 0; + if ($amdir !~ /^\// && -d $amdir) + { + push (@ac_deps, &my_glob ($amdir . '/*.m4')); + } + } + elsif ($amdir eq '-I') + { + $examine_next = 1; } } } diff --git a/tests/ChangeLog b/tests/ChangeLog index 2dc97d0d7..6af0eee7f 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Mon Feb 16 00:08:58 1998 Tom Tromey + + * aclocali.test: New file. + Fri Feb 13 00:36:38 1998 Tom Tromey * texinfo5.test (info_TEXINFOS): New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 94a4e0968..21358d752 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,7 +28,7 @@ seenc.test cygwin32.test lisp.test stamph.test ldadd.test \ version2.test conf2.test cond.test cond2.test xsource.test \ libobj6.test depend3.test output5.test ammissing.test install.test \ libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test \ -whoami.test unused.test condman.test texinfo5.test +whoami.test unused.test condman.test texinfo5.test aclocali.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index f5b2f2bd2..de97aa68f 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -89,7 +89,7 @@ seenc.test cygwin32.test lisp.test stamph.test ldadd.test \ version2.test conf2.test cond.test cond2.test xsource.test \ libobj6.test depend3.test output5.test ammissing.test install.test \ libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test \ -whoami.test unused.test condman.test texinfo5.test +whoami.test unused.test condman.test texinfo5.test aclocali.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/aclocali.test b/tests/aclocali.test new file mode 100755 index 000000000..dfd3d3314 --- /dev/null +++ b/tests/aclocali.test @@ -0,0 +1,25 @@ +#! /bin/sh + +# Make sure that ACLOCAL_AMFLAGS actually gets the right dependencies. +. $srcdir/defs || exit 1 + +echo AM_QUUX >> configure.in + +mkdir macros + +cat > macros/quux.m4 << 'END' +AC_DEFUN([AM_QUUX], [ +]) +END + +cat > Makefile.am << 'END' +ACLOCAL_AMFLAGS = -I macros +END + +# We have to run aclocal first to make sure that aclocal.m4 exists. +# Otherwise automake won't guess that we want to auto-generate it. +$ACLOCAL -I macros || exit 1 + +$AUTOMAKE || exit 1 + +fgrep quux.m4 Makefile.in