From: Stefano Lattarini Date: Tue, 11 Sep 2012 08:29:35 +0000 (+0200) Subject: config headers: avoid extra make recursion X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f4efa6005407ffdb703dc9896bc7e598cdc4201;p=thirdparty%2Fautomake.git config headers: avoid extra make recursion * lib/am/remake-hdr.am (%CONFIG_H%). By rewriting its recipe to duplicate the '%STAMP%' recipe a little. Signed-off-by: Stefano Lattarini --- diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am index 665b3435a..cf4f013f8 100644 --- a/lib/am/remake-hdr.am +++ b/lib/am/remake-hdr.am @@ -15,10 +15,11 @@ ## along with this program. If not, see . %CONFIG_H%: %STAMP% -## Recover from removal of config headers. Break up in two invocations -## so that "make -n" is properly honored. - @test -f $@ || rm -f %STAMP% - @test -f $@ || $(MAKE) %STAMP% +## Recover from removal of config headers. This is duplicated with the +## '%STAMP%' rule below, but allow us to avoid a (potentially costly) +## make recursion. + $(if $(wildcard $@),,@rm -f %STAMP%) + $(if $(wildcard $@),,cd $(top_builddir) && $(SHELL) ./config.status %CONFIG_H_PATH%) %STAMP%: %CONFIG_H_DEPS% $(top_builddir)/config.status @rm -f %STAMP%