On 09/08/2012 07:46 PM, Jim Meyering wrote: > Stefano Lattarini wrote: >> On 09/08/2012 03:29 PM, Jim Meyering wrote: >>> >>> But, ... surprise! So far there is *no* improvement, and in fact a small >>> penalty in this very worst case: >>> >> My wild guess is that the culprit for this might be the Automake-generated >> recursive make invocation in the handling of $(BUILT_SOURCES): >> >> all: $(BUILT_SOURCES) >> $(MAKE) $(AM_MAKEFLAGS) all-am >> >> What happens if, after the first build, you substitute the rule above in >> your Makefile with simply: >> >> all: all-am >> >> ? Is there any improvement? > > Good call! Yes: > > [SNIP] > Unfortunately, the extra recursive invocation involving $(BUILT_SOURCES) is truly needed in order to have correct semantics, because $(BUILT_SOURCES) must be built before *any* other (direct or indirect) prerequisite of 'all'. Automake-NG plays dirty tricks to maintain this semantics while avoiding that recursion, but I haven't been able to come up with a similar trick working also for portable make.
Regards, Stefano
