[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] include: fix bug in handling of user-defined makefile fragme
[PATCH 2/2] include: fix bug in handling of user-defined makefile fragments generation
Tue, 23 Dec 2014 13:26:49 +0100
If a user defined one single Makefile fragment to be included (via Automake
includes) in his main Makefile.am, and gave a rule to generate that file
from other data, Automake used to spuriously complain about with something
like "overrides Automake target '$(srcdir)/foo.am". This change remove that
spurious error (via a simple hack rather than a systematic change, but oh
* lib/am/configure.am (%MAKEFILE-IN-DEPS%) [?HAVE-MAKEFILE-IN-DEPS?]: Add
a trailing "$(am__empty)" to the list of targets, which is enough to trick
Automake into not complaining about "duplicated targets" in case the
'%MAKEFILE-IN-DEPS%' list expands to a single target that is also declared
in some user-defined rule.
* t/list-of-tests.mk (XFAIL_TESTS): Remove now-passing test
* NEWS: Update.
Signed-off-by: Stefano Lattarini <address@hidden>
NEWS | 13 +++++++++++++
lib/am/configure.am | 6 +++++-
t/list-of-tests.mk | 1 -
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 614eba6..1fae7ad 100644
@@ -104,6 +104,19 @@
+New in 1.14.2:
+* Bugs fixed:
+ - In older Automake versions, if a user defined one single Makefile
+ fragment (say 'foo.am') to be included (via Automake includes) in
+ his main Makefile.am, and defined a custom make rule to generate that
+ file from other data, Automake used to spuriously complain about with
+ something like "... overrides Automake target '$(srcdir)/foo.am".
+ This bug is now fixed.
New in 1.14.1:
* Bugs fixed:
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 6f39f7d..d159e1b 100644
@@ -83,7 +83,11 @@ endif %?TOPDIR_P%
## Avoid the "deleted header file" problem for the dependencies.
+## Add the trailing "$(am__empty)" to trick Automake into not spuriously
+## complaining about "duplicated targets" in case the %MAKEFILE-IN-DEPS%
+## list expands to a single target that is also declared in some
+## user-defined rule.
DIST_COMMON += %MAKEFILE-AM%
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 28b512c..c07eb72 100644
@@ -30,7 +30,6 @@ t/pm/Version3.pl
XFAIL_TESTS = \