From: Nicholas Clark Date: Fri, 3 Dec 2010 21:07:17 +0000 (+0000) Subject: Remove the Makefile command to touch perlmain.c after running makedepend. X-Git-Tag: accepted/trunk/20130322.191538~6585^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1811a1510c616ea350802dcd28682a4b8c378ce;p=platform%2Fupstream%2Fperl.git Remove the Makefile command to touch perlmain.c after running makedepend. Jerry D. Hedden was right to question whether this was now superfluous, because as best I can tell it was *always* superfluous. Perl 5.000 shipped with a Makefile rule to build perlmain.c using a shell script, with a dependency for perlmain.c on makefile. [Lowercase makefile, now abstracted as $(FIRSTMAKEFILE). This is generated by makedepend from Makefile, by calculating the dependency rules to append to it.] The rule to generate perlmain.c had a prerequisite on $(FIRSTMAKEFILE), and in turn $(FIRSTMAKEFILE) has a dependency on $(c), which included perlmain.c. Hence there was a circular dependency, and the "solution" to avoiding repeated rebuilds was to touch perlmain.c (if it exists), after running makedepend. As best I can tell there is no *actual* dependency for the correct generation of perlmain.c on the contents of $(FIRSTMAKEFILE), as the relevant variables are the same in both Makefile and $(FIRSTMAKEFILE). Hence this command should have been removed, along with the dependency, years ago. However, no-one spotted this until Jerry observed that fbcaf61123069fe4 changed the build rules, and removed the dependency, but not the touch command. --- diff --git a/Makefile.SH b/Makefile.SH index 3cf2939..027b2b2 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -1352,11 +1352,9 @@ $(FIRSTMAKEFILE): README $(MAKEDEPEND) config.h: config_h.SH config.sh $(SHELL) config_h.SH -# When done, touch perlmain.c so that it doesn't get remade each time. .PHONY: depend depend: makedepend sh ./makedepend MAKE=$(MAKE) - - test -s perlmain.c && touch perlmain.c cd x2p; $(MAKE) depend # Cannot postpone this until $firstmakefile is ready ;-)