Due to how the handling of $(BUILT_SOURCES) was implemented in Automake-NG,
a recursive make call in the recipe of any $(BUILT_SOURCES) (or of any of
its prerequisites) would have caused an infinite recursion (complete with
fork bomb, yuck). Work around the issue.
See:
<http://lists.gnu.org/archive/html/help-smalltalk/2012-08/msg00027.html>
<http://lists.gnu.org/archive/html/automake-patches/2012-08/msg00052.html>
* lib/am/common-targets.mk: Here, with the help of ...
(am.hack.making-built-sources): ... this new internal variable.
* Makefile.am (XFAIL_TESTS): Remove 't/built-sources-fork-bomb.sh'.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
XFAIL_TESTS = \
t/all.sh \
- t/built-sources-fork-bomb.sh \
t/override-suggest-local.sh \
t/comments-in-var-def.sh \
t/cond17.sh \
# completely accurate.
all check install: | $(am.built-early)
else
+# Also, with this implementation, a recursive make call in the recipe
+# of any $(BUILT_SOURCES) (or any of its prerequisites) could cause an
+# infinite recursion (complete with fork bomb, yuck), if we are not
+# careful. The following hack takes care of the problem.
+$(am.built-early): am.hack.making-built-sources = yes
+export am.hack.making-built-sources
+ifndef am.hack.making-built-sources
$(foreach x,$(am.built-early),$(eval -include .am/built-sources/$(x)))
.am/built-sources/%: | %
@$(am.cmd.ensure-target-dir-exists)
@touch $@
endif
+endif