[m-dev.] mmake realclean in the runtime directory

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Sep 16 05:02:12 AEST 1999


On 23-Aug-1999, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> Warwick Harvey writes:
> > 
> > Mark Brown wrote:
> > 
> > > I think that this could be fixed by changing the line
> > > 
> > > 	clean: clean_o clean_check
> > > 
> > > in runtime/Mmakefile to
> > > 
> > > 	clean_local: clean_o clean_check
> > > 
> > > .
> > 
> > Yes, this fixes this particular example, but I didn't think the user was 
> > supposed to know about/tamper with the local targets...  (Of course in the 
> > runtime directory it hardly matters since there are no Mercury source files.)
> > 
> 
> I agree that requiring the user to know about the local targets is
> a drawback of the current design.  But, I couldn't figure out how to
> avoid this and still achieve the other aims, which included being
> able to have `clean' and `realclean' both invoke mmake recursively.

Is there any reason why we can't add

	realclean: clean

in scripts/Mmake.rules?

It would be a little inefficient, since `mmake realclean' in a directory
with subdirectories would first invoke a recursive `mmake clean' and then
invoke a recursive `mmake realclean'.  However, that is probably a reasonable
price to pay for keeping the user interface simple (the user doesn't
*need* to know about `clean_local' etc.) and for preserving backwards
compatibility with existing Mmakefiles.

If you want to preserve the possibility of a more efficient `mmake realclean'
for expert users, we could make it configurable:

	ifneq($(DISABLE_REALCLEAN_DEPENDENCY),yes)
	realclean: clean
	endif

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list