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.
2006-10-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * 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,
{
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)
{
# 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;
## 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
$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'
## 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
$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'
## 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])
$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'