include: fix bug in handling of user-defined makefile fragments generation
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 23 Dec 2014 12:10:21 +0000 (13:10 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 23 Dec 2014 12:21:24 +0000 (13:21 +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
well).

* 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
't/am-include-only-one-generated-fragment.sh'.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NEWS
lib/am/configure.am
t/list-of-tests.mk

diff --git a/NEWS b/NEWS
index 614eba64d8a9417e9d84fa674b2000c0b472b682..1fae7ad4cb1c534c44f6e1a2529cac930df49b67 100644 (file)
--- a/NEWS
+++ b/NEWS
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+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:
index 6f39f7dbe9bb67c943663db95db72e5794e98b5f..d159e1b55233cf3279382e506312fce6abf2f4e8 100644 (file)
@@ -83,7 +83,11 @@ endif %?TOPDIR_P%
        esac;
 
 ## Avoid the "deleted header file" problem for the dependencies.
-?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS%:
+##  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.
+?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS% $(am__empty):
 
 DIST_COMMON += %MAKEFILE-AM%
 
index 28b512cf6a7ebcfdd013c6d95aca367b777c9028..c07eb72bdb0dbb6cd72727876473a9d9306701ff 100644 (file)
@@ -30,7 +30,6 @@ t/pm/Version3.pl
 
 XFAIL_TESTS = \
 t/all.sh \
-t/am-include-only-one-generated-fragment.sh \
 t/cond17.sh \
 t/gcj6.sh \
 t/override-conditional-2.sh \