+2004-05-13 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * automake.in (handle_source_transform): Also check for a
+ $(srcdir)/old_source rule when computing the default source name.
+ Propagate this $(srcdir) prefix in Automake variables.
+ * tests/ltlibsrc.test (noinst_LTLIBRARIES): Explicitly refer to
+ $(srcdir)/zoo_d_old2_la.c. This fixes another failure with BSD Make.
+
2004-05-13 Paul Eggert <eggert@cs.ucla.edu>
* Makefile.am (fetch): Work even with FreeBSD "make", which
my $old_default_source = "$one_file.c";
(my $default_source = $unxformed) =~ s,(\.[^./\\]*)?$,.c,;
if ($old_default_source ne $default_source
- && (rule $old_default_source || -f $old_default_source))
+ && (rule $old_default_source
+ || rule '$(srcdir)/' . $old_default_source
+ || rule '${srcdir}/' . $old_default_source
+ || -f $old_default_source))
{
my $loc = $where->clone;
$loc->pop_context;
. "backward compatibility.)");
$default_source = $old_default_source;
}
+ # If a rule exists to build this source with a $(srcdir)
+ # prefix, use that prefix in our variables too. This is for
+ # the sake of BSD Make.
+ if (rule '$(srcdir)/' . $default_source
+ || rule '${srcdir}/' . $default_source)
+ {
+ $default_source = '$(srcdir)/' . $default_source;
+ }
&define_variable ($one_file . "_SOURCES", $default_source, $where);
push (@sources, $default_source);
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
pkglib_LTLIBRARIES = zoo.d/bar.la old.la
noinst_LTLIBRARIES = foo.la zoo.d/old2.la
-zoo_d_old2_la.c: $(srcdir)/old_la.c
+$(srcdir)/zoo_d_old2_la.c: $(srcdir)/old_la.c
cp $(srcdir)/old_la.c $@
END