[ http://lists.gnu.org/archive/html/bug-automake/2006-10/msg00001.html ]
* Jim Meyering wrote on Sat, Oct 07, 2006 at 06:06:25PM CEST: > [cc'ing bug-automake, in case this is a bug. > I was using both automake-1.9b and the latest from cvs. ] OK to apply? 2006-10-09 Ralf Wildenhues <[EMAIL PROTECTED]> * automake.in (handle_LIBOBJS_or_ALLOCA): If we are in the LIBOBJDIR, then we should not add a DEPDIR prefix. * tests/pr401.test: Update test. * tests/pr401b.test: Likewise. * tests/pr401c.test: Likewise. Report by Jim Meyering and Eric Blake. Index: automake.in =================================================================== RCS file: /cvs/automake/automake/automake.in,v retrieving revision 1.1631 diff -u -r1.1631 automake.in --- automake.in 30 Aug 2006 20:35:56 -0000 1.1631 +++ automake.in 9 Oct 2006 20:06:40 -0000 @@ -2178,12 +2178,12 @@ { my ($var) = @_; - my $dir = $config_libobj_dir ? "$config_libobj_dir/" : ''; + my $dir = ''; # If LIBOBJS files must be built in another directory we have # to define LIBOBJDIR and ensure the files get cleaned. # Otherwise LIBOBJDIR can be left undefined, and the cleaning - # is achieved by `rm -f *.($OBJEXT)' in compile.am. + # is achieved by `rm -f *.$(OBJEXT)' in compile.am. if ($config_libobj_dir && $relative_dir ne $config_libobj_dir) { @@ -2193,6 +2193,7 @@ # we are already there, and since the targets are built without # a $(top_builddir), it helps BSD Make to match them with # dependencies. + $dir = "$config_libobj_dir/" if $config_libobj_dir ne '.'; $dir = "$topsrcdir/$dir" if $relative_dir ne '.'; define_variable ('LIBOBJDIR', "$dir", INTERNAL); $clean_files{"\$($var)"} = MOSTLY_CLEAN; Index: tests/pr401.test =================================================================== RCS file: /cvs/automake/automake/tests/pr401.test,v retrieving revision 1.4 diff -u -r1.4 pr401.test --- tests/pr401.test 4 Aug 2006 06:08:58 -0000 1.4 +++ tests/pr401.test 9 Oct 2006 20:06:40 -0000 @@ -53,7 +53,7 @@ ## These lines are activated for later tests #: AC_CONFIG_LIBOBJ_DIR([lib]) AC_PROG_CC -#: AM_PROG_CC_C_O +#x AM_PROG_CC_C_O AC_LIBOBJ([feep]) AC_LIBSOURCE([feep.c]) AC_PROG_RANLIB @@ -89,11 +89,29 @@ $MAKE distcheck +## ------------------------------------------ ## +## Traditional LIBOBJS with LIBOBJDIR set. ## +## ------------------------------------------ ## + +# Invocation of AC_CONFIG_LIBOBJ_DIR may be necessary for reasons +# unrelated to Automake or Makefile.am layout. + +sed 's/#: //' configure.in >configure.int +mv -f configure.int configure.in + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure +test ! -d lib/lib +$MAKE distcheck + + ## -------------------------------------------- ## ## Test using LIBOBJS from a sibling directory. ## ## -------------------------------------------- ## -sed 's/#: //; s/lib\/Makefile //' configure.in >configure.int +sed 's/#x //; s/lib\/Makefile //' configure.in >configure.int mv -f configure.int configure.in cat >Makefile.am <<'EOF' Index: tests/pr401b.test =================================================================== RCS file: /cvs/automake/automake/tests/pr401b.test,v retrieving revision 1.4 diff -u -r1.4 pr401b.test --- tests/pr401b.test 4 Aug 2006 06:08:58 -0000 1.4 +++ tests/pr401b.test 9 Oct 2006 20:06:40 -0000 @@ -53,7 +53,7 @@ ## These lines are activated for later tests #: AC_CONFIG_LIBOBJ_DIR([lib]) AC_PROG_CC -#: AM_PROG_CC_C_O +#x AM_PROG_CC_C_O AC_LIBOBJ([feep]) AC_LIBSOURCE([feep.c]) AC_PROG_LIBTOOL @@ -90,11 +90,29 @@ $MAKE distcheck +## ------------------------------------------ ## +## Traditional LIBOBJS with LIBOBJDIR set. ## +## ------------------------------------------ ## + +# Invocation of AC_CONFIG_LIBOBJ_DIR may be necessary for reasons +# unrelated to Automake or Makefile.am layout. + +sed 's/#: //' configure.in >configure.int +mv -f configure.int configure.in + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a +./configure +test ! -d lib/lib +$MAKE distcheck + + ## ---------------------------------------------- ## ## Test using LTLIBOBJS from a sibling directory. ## ## ---------------------------------------------- ## -sed 's/#: //; s/lib\/Makefile //' configure.in >configure.int +sed 's/#x //; s/lib\/Makefile //' configure.in >configure.int mv -f configure.int configure.in cat >Makefile.am <<'EOF' Index: tests/pr401c.test =================================================================== RCS file: /cvs/automake/automake/tests/pr401c.test,v retrieving revision 1.4 diff -u -r1.4 pr401c.test --- tests/pr401c.test 4 Aug 2006 06:08:58 -0000 1.4 +++ tests/pr401c.test 9 Oct 2006 20:06:40 -0000 @@ -56,7 +56,7 @@ ## These lines are activated for later tests #: AC_CONFIG_LIBOBJ_DIR([lib]) AC_PROG_CC -#: AM_PROG_CC_C_O +#x AM_PROG_CC_C_O AC_PROG_RANLIB AC_FUNC_ALLOCA AC_CONFIG_FILES([lib/Makefile src/Makefile]) @@ -91,11 +91,29 @@ $MAKE distcheck +## ------------------------------------------ ## +## Traditional LIBOBJS with LIBOBJDIR set. ## +## ------------------------------------------ ## + +# Invocation of AC_CONFIG_LIBOBJ_DIR may be necessary for reasons +# unrelated to Automake or Makefile.am layout. + +sed 's/#: //' configure.in >configure.int +mv -f configure.int configure.in + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure +test ! -d lib/lib +$MAKE distcheck + + ## ------------------------------------------- ## ## Test using ALLOCA from a sibling directory. ## ## ------------------------------------------- ## -sed 's/#: //; s/lib\/Makefile //' configure.in >configure.int +sed 's/#x //; s/lib\/Makefile //' configure.in >configure.int mv -f configure.int configure.in cat >Makefile.am <<'EOF'