zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: PATCH (?): Re: Makefiles are still rebuilt on 'make clean'
Date: Sun, 4 Jun 2000 02:53:18 +0000	[thread overview]
Message-ID: <1000604025318.ZM15171@candle.brasslantern.com> (raw)
In-Reply-To: <000201bfca2a$06c23010$21c9ca95@mow.siemens.ru>

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   


      reply	other threads:[~2000-06-04  2:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-30 11:27 Andrej Borsenkow
2000-06-04  2:53 ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1000604025318.ZM15171@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).