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

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Sep 16 14:24:48 AEST 1999


On 16-Sep-1999, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> Fergus Henderson writes:
> > 
> > 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'.
> 
> That is the reason.
> 
> >  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.
> 
> It would be less reasonable in the case that some of the
> subdirectories also had subdirectories (and so on).

Ah.  I hadn't considered that.  That does make it considerably worse
(exponentially worse, actually...)

> > 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
> 
> Even novice users will want the more efficient `mmake realclean'
> if they use it in the toplevel directory of
> 
>     some_package/the_novice_got/off_the_web/which_has_many_dir_levels ...
> 
> which is a pretty bad worst-case, IMHO.

Well, presumably the package itself could contain

	DISABLE_REALCLEAN_DEPENDENCY = yes

in its Mmakefiles.  So the novice might not have to deal with it.
But certainly the creator of the package will need to.
That makes this approach much less attractive.

I guess I'll go back to editing */Mmakefile to replace
`clean' with `clean_local' and `realclean' with `realclean_local'
where appropriate...

-- 
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