Re: Avoiding cross-dependencies for aclocal.m4
Hello! > Pavel, you still consider this patch alive? I've just applied it. I'm sorry, this week is going to be very busy for me, but please consider me alive anyway :-) Regards, Pavel Roskin
Re: Avoiding cross-dependencies for aclocal.m4
> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes: Alexandre> On Oct 16, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: >> This guy looks good to me. Any objection? Alexandre> Nope. Pavel, you still consider this patch alive?
Re: Avoiding cross-dependencies for aclocal.m4
On Oct 16, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > This guy looks good to me. Any objection? Nope. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: Avoiding cross-dependencies for aclocal.m4
This guy looks good to me. Any objection? -- Hello! "ACLOCAL_AMFLAGS = -I ." causes circular dependencies. The patch fixes this problem, eliminates an extra occurence of acinclude.m4 and strips "./" from the remaining macro files in "." A test for the above patch is also provided. Regards, Pavel Roskin Index: ChangeLog --- ChangeLog Tue Aug 29 08:22:50 2000 +++ ChangeLog Tue Aug 29 16:50:52 2000 @@ -0,0 +1,7 @@ +2000-08-29 Pavel Roskin <[EMAIL PROTECTED]> + + * automake.in (handle_aclocal_m4): exclude aclocal.m4 and + acinclude.m4 from the dependencies of aclocal.m4 to avoid + circular and duplicated dependencies. Strip "./" from the + dependencies. + Index: automake.in --- automake.in Tue Aug 29 16:44:49 2000 +++ automake.in Tue Aug 29 16:47:58 2000 @@ -3178,7 +3178,13 @@ $examine_next = 0; if ($amdir !~ /^\// && -d $amdir) { - push (@ac_deps, &my_glob ($amdir . '/*.m4')); + foreach $ac_dep (&my_glob ($amdir . '/*.m4')) + { + $ac_dep =~ s/^\.\/*//; + push (@ac_deps, $ac_dep) + unless $ac_dep eq "aclocal.m4" + || $ac_dep eq "acinclude.m4"; + } } } elsif ($amdir eq '-I') Index: tests/ChangeLog --- tests/ChangeLog Tue Aug 29 17:08:10 2000 +++ tests/ChangeLog Tue Aug 29 16:59:54 2000 @@ -0,0 +1,5 @@ +2000-08-29 Pavel Roskin <[EMAIL PROTECTED]> + + * Makefile.am (TESTS): Added aclocali1.test. + * aclocali1.test: New file. + Index: tests/Makefile.am --- tests/Makefile.am Tue Aug 29 08:22:50 2000 +++ tests/Makefile.am Tue Aug 29 17:00:05 2000 @@ -7,6 +7,7 @@ acinclude.test \ aclocal.test \ aclocali.test \ +aclocali1.test \ aclocalii.test \ acoutnoq.test \ acoutput.test \ Index: tests/aclocali1.test --- tests/aclocali1.testThu Jan 1 00:00:00 1970 +++ tests/aclocali1.testTue Aug 29 17:06:33 2000 @@ -0,0 +1,23 @@ +#! /bin/sh + +# Make sure that ACLOCAL_AMFLAGS doesn't cause circular dependencies. +. $srcdir/defs || exit 1 + +echo AM_QUUX >> configure.in + +cat > quux.m4 << 'END' +AC_DEFUN([AM_QUUX], [ +]) +END + +cat > Makefile.am << 'END' +ACLOCAL_AMFLAGS = -I . +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 . || exit 1 + +$AUTOMAKE || exit 1 + +grep "\$(ACLOCAL_M4): *configure.in *quux.m4" Makefile.in || exit 1
Avoiding cross-dependencies for aclocal.m4
Hello! "ACLOCAL_AMFLAGS = -I ." causes circular dependencies. The patch fixes this problem, eliminates an extra occurence of acinclude.m4 and strips "./" from the remaining macro files in "." A test for the above patch is also provided. Regards, Pavel Roskin Index: ChangeLog --- ChangeLog Tue Aug 29 08:22:50 2000 +++ ChangeLog Tue Aug 29 16:50:52 2000 @@ -0,0 +1,7 @@ +2000-08-29 Pavel Roskin <[EMAIL PROTECTED]> + + * automake.in (handle_aclocal_m4): exclude aclocal.m4 and + acinclude.m4 from the dependencies of aclocal.m4 to avoid + circular and duplicated dependencies. Strip "./" from the + dependencies. + Index: automake.in --- automake.in Tue Aug 29 16:44:49 2000 +++ automake.in Tue Aug 29 16:47:58 2000 @@ -3178,7 +3178,13 @@ $examine_next = 0; if ($amdir !~ /^\// && -d $amdir) { - push (@ac_deps, &my_glob ($amdir . '/*.m4')); + foreach $ac_dep (&my_glob ($amdir . '/*.m4')) + { + $ac_dep =~ s/^\.\/*//; + push (@ac_deps, $ac_dep) + unless $ac_dep eq "aclocal.m4" + || $ac_dep eq "acinclude.m4"; + } } } elsif ($amdir eq '-I') Index: tests/ChangeLog --- tests/ChangeLog Tue Aug 29 17:08:10 2000 +++ tests/ChangeLog Tue Aug 29 16:59:54 2000 @@ -0,0 +1,5 @@ +2000-08-29 Pavel Roskin <[EMAIL PROTECTED]> + + * Makefile.am (TESTS): Added aclocali1.test. + * aclocali1.test: New file. + Index: tests/Makefile.am --- tests/Makefile.am Tue Aug 29 08:22:50 2000 +++ tests/Makefile.am Tue Aug 29 17:00:05 2000 @@ -7,6 +7,7 @@ acinclude.test \ aclocal.test \ aclocali.test \ +aclocali1.test \ aclocalii.test \ acoutnoq.test \ acoutput.test \ Index: tests/aclocali1.test --- tests/aclocali1.testThu Jan 1 00:00:00 1970 +++ tests/aclocali1.testTue Aug 29 17:06:33 2000 @@ -0,0 +1,23 @@ +#! /bin/sh + +# Make sure that ACLOCAL_AMFLAGS doesn't cause circular dependencies. +. $srcdir/defs || exit 1 + +echo AM_QUUX >> configure.in + +cat > quux.m4 << 'END' +AC_DEFUN([AM_QUUX], [ +]) +END + +cat > Makefile.am << 'END' +ACLOCAL_AMFLAGS = -I . +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 . || exit 1 + +$AUTOMAKE || exit 1 + +grep "\$(ACLOCAL_M4): *configure.in *quux.m4" Makefile.in || exit 1