From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3830 invoked from network); 4 Jun 2000 02:53:42 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Jun 2000 02:53:42 -0000 Received: (qmail 5009 invoked by alias); 4 Jun 2000 02:53:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11737 Received: (qmail 4915 invoked from network); 4 Jun 2000 02:53:25 -0000 From: "Bart Schaefer" Message-Id: <1000604025318.ZM15171@candle.brasslantern.com> Date: Sun, 4 Jun 2000 02:53:18 +0000 In-Reply-To: <000201bfca2a$06c23010$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "Makefiles are still rebuilt on 'make clean'" (May 30, 3:27pm) References: <000201bfca2a$06c23010$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "ZSH workers mailing list" Subject: PATCH (?): Re: Makefiles are still rebuilt on 'make clean' MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 30, 3:27pm, Andrej Borsenkow wrote: } Subject: Makefiles are still rebuilt on 'make clean' } } Well, as in subject. make (real|dist|)clean will happily rebuild all } Makefiles. I believe, it has been corrected at least once? Do you get more things rebuilt than this? [prep stuff deleted] Updated `modules.index'. cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod creating Src/Makemod.in creating Src/Makemod echo 'timestamp for *.mdd files' > ../Src/modules.stamp creating Src/Aliases/Makefile.in creating Src/Aliases/Makefile creating Src/Builtins/Makefile.in creating Src/Builtins/Makefile creating Src/Modules/Makefile.in creating Src/Modules/Makefile creating Src/Zle/Makefile.in creating Src/Zle/Makefile [call to "make -f Makemod" and "rm"s deleted] Here's what's going on ... The rule for `clean' has a dependency on `clean-modules', which has a dependency on `modules.index'. The rule for clean-modules tries to avoid building Makemod if it doesn't already exist ... but the rule for modules.index unconditionally builds Makemod, so the test in clean-modules is irrelevant: it always succeeds. Further, the rule for modules.index invokes `make -f Makemod prep' which is what rebuilds all the rest of the subdirectory Makefiles. `clean' also has a dependency on `clean-here' which then removes both modules.index and modules-bltin (on which modules.index depends), thus guaranteeing that the whole process starts over at the top. It does not remove Makemod because of the clean-modules rule, but of course that is already irrelevant. Possible fixes are: (1) Don't remove `modules.index' and `modules-bltin' under `clean-here' (instead do it under `distclean-here'). This will at least keep two consecutive `make clean' from rebuilding everything the second time. (2) Rewrite the whole build system to avoid having Makefiles that build other Makefiles. Makefiles ought to get built at configure time. (I keep thinking of Rabbit and Winnie-the-Pooh: "It all comes of eating too much." "It all comes of not having front doors big enough.") Index: Src/Makefile.in =================================================================== @@ -216,12 +216,12 @@ clean-here: rm -f modules.index.tmp modules.stamp zsh$(EXEEXT) ansi2knr.o ansi2knr - rm -f modules.index modules-bltin rm -f libzsh-*.$(DL_EXT) .PHONY: clean-here distclean-here: rm -f TAGS tags + rm -f modules.index modules-bltin rm -f Makefile mymods.conf .PHONY: distclean-here -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net