From: Ralf Wildenhues Date: Sat, 14 Oct 2006 17:12:50 +0000 (+0000) Subject: * automake.in (handle_LIBOBJS_or_ALLOCA): If we are in the X-Git-Tag: Release-1-10~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30e2111cb8bb39036751c18bf78fe1c0b8d23252;p=thirdparty%2Fautomake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 0c94bb510..9a3268ca5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2006-10-14 Ralf Wildenhues + * 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. + * lib/depcomp (gcc3): Put dependency extraction flags before the `-c' flag, so they appear at the same position as in %FASTDEP% mode in depend2.am. Fixes build failure for FreeBSD's c89, diff --git a/automake.in b/automake.in index 939361556..52d7e15db 100755 --- a/automake.in +++ b/automake.in @@ -2180,12 +2180,12 @@ sub handle_LIBOBJS_or_ALLOCA ($) { 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) { @@ -2195,6 +2195,7 @@ sub handle_LIBOBJS_or_ALLOCA ($) # 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; diff --git a/tests/pr401.test b/tests/pr401.test index 5d55c6432..238b8bcbd 100755 --- a/tests/pr401.test +++ b/tests/pr401.test @@ -53,7 +53,7 @@ cat >>configure.in << 'EOF' ## 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 @@ $AUTOMAKE $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' diff --git a/tests/pr401b.test b/tests/pr401b.test index 66d8b1f42..45a19bf19 100755 --- a/tests/pr401b.test +++ b/tests/pr401b.test @@ -53,7 +53,7 @@ cat >>configure.in << 'EOF' ## 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 @@ $AUTOMAKE -a $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' diff --git a/tests/pr401c.test b/tests/pr401c.test index 456b21bf5..0cf086942 100755 --- a/tests/pr401c.test +++ b/tests/pr401c.test @@ -56,7 +56,7 @@ cat >>configure.in << 'EOF' ## 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 @@ $AUTOMAKE $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'