zsh-workers
 help / color / mirror / code / Atom feed
* Makefiles are still rebuilt on 'make clean'
@ 2000-05-30 11:27 Andrej Borsenkow
  2000-06-04  2:53 ` PATCH (?): " Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 2000-05-30 11:27 UTC (permalink / raw)
  To: ZSH workers mailing list

Well, as in subject. make (real|dist|)clean will happily rebuild all
Makefiles. I believe, it has been corrected at least once?

-andrej

Have a nice DOS!
B >>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* PATCH (?): Re: Makefiles are still rebuilt on 'make clean'
  2000-05-30 11:27 Makefiles are still rebuilt on 'make clean' Andrej Borsenkow
@ 2000-06-04  2:53 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-06-04  2:53 UTC (permalink / raw)
  To: ZSH workers mailing list

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   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-06-04  2:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-30 11:27 Makefiles are still rebuilt on 'make clean' Andrej Borsenkow
2000-06-04  2:53 ` PATCH (?): " Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).