[m-dev.] for review: bootchecking the extras

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Nov 22 10:35:40 AEDT 2000


On 21-Nov-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> It might be a good idea to use `trap' to ensure that the
> extras/Mmake.params file gets restored if you interrupt a bootcheck.

It may be a good idea, but hard to do reliably, because it is difficult to
distinguish between (a) there is an original Mmake.params file, and we haven't
created the new one yet, and (b) there was no original Mmake.params file,
and we have created the new one. Setting up the trap after the last point at
which (a) may be the case would still leave a window in which an interrupt
would screw things up. Given that sh has no mechanism for wrapping a pair
of commands inside a transaction, and making an empty backup file if there
was no original Mmake.params file would be unnecessarily complicated,
I will leave things as they are.

> The indentation there is a bit odd.

I fixed it.

> > -depend: complex_numbers.depend
> > +
> >  all: libcomplex_numbers
> > +
> > +depend:	complex_numbers.depend
> 
> I'm not sure why you reordered those two.  I think it makes more sense
> for the `depend' target to be listed first, so that the order in the
> Mmakefile matches the order in which the user needs to invoke them.

The default target in a makefile should be first. That is the "all" target.

The various Mmakefiles in extras are inconsistent; some have an "all" target,
some don't.

> That should be `.PHONY: depend'.

Fixed.

> > +.PHONY: clean
> >  clean: main.clean
> > +
> > +.PHONY: realclean
> >  realclean: main.realclean
> 
> Those dependencies are not needed; they're added automatically by Mmake.

In any case they are effective only added if the .dep files exist. I removed
them.

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