2001-06-14 Tom Tromey <tromey@redhat.com>
+ Fix for bug reported by Steve M. Robbins:
+ * automake.in (handle_single_transform_list): When building a file
+ from a subdirectory, continue to use `AM_' prefix.
+ * tests/Makefile.am (TESTS): Added subobj7.test.
+ * tests/subobj7.test: New file.
+
* lib/am/configure.am ($(top_builddir)/config.status): Added
$(top_builddir) prefix to work around problems with some vendor
makes. From Nicholas Joly.
{
my $obj_sans_ext = substr ($object, 0,
- length ($this_obj_ext));
- push (@{$lang_specific_files{$lang->name}},
- "$derived $full $obj_sans_ext");
+ my $val = "$full $obj_sans_ext";
+
+ # If we renamed the object then we want to use the
+ # per-executable flag name. But if this is simply a
+ # subdir build then we still want to use the AM_ flag
+ # name.
+ if ($renamed)
+ {
+ $val = "$derived $val";
+ }
+ else
+ {
+ $val = "AM $val";
+ }
+
+ push (@{$lang_specific_files{$lang->name}}, $val);
}
}
elsif ($extension eq 'o')
subobj4.test \
subobj5.test \
subobj6.test \
+subobj7.test \
subst.test \
suffix.test \
suffix2.test \
subobj4.test \
subobj5.test \
subobj6.test \
+subobj7.test \
subst.test \
suffix.test \
suffix2.test \
--- /dev/null
+#! /bin/sh
+
+# Test to make sure AM_CFLAGS appears in subdir compilation rule.
+# Report from Steve M. Robbins.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_INIT(f)
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AM_PROG_CC_C_O
+AC_PROG_CC
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = wish
+wish_SOURCES = foo.c generic/a.c
+END
+
+$ACLOCAL || exit 1
+$AUTOMAKE || exit 1
+
+grep wish_CFLAGS Makefile.in && exit 1
+exit 0