[m-rev.] for review: simplify the use of mdbrc by test cases

Peter Wang novalazy at gmail.com
Tue Oct 26 20:37:08 AEDT 2021


On Tue, 26 Oct 2021 20:00:26 +1100 Julien Fischer <jfischer at opturion.com> wrote:
> 
> On Tue, 26 Oct 2021, Peter Wang wrote:
> 
> > On Tue, 26 Oct 2021 14:46:29 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> >> 
> >> Do we even have a list of targets that *should* work with plain make,
> >> as opposed to mmake?
> >
> > I don't think there is such a list, but the targets listed in the
> > top-level Makefile ought to work, or should be deleted:
> >
> >    % grep '^[a-z].*:' Makefile
> >    all:
> >    install:
> >    clean:
> >    distclean: clean
> >    maintainer-clean:
> >    realclean:
> >    uninstall:
> 
> The idea at one point was that the standard GNU make targets should
> be supported.  It's questionable how useful that is since Mercury's
> behaviour varies from the "standard" behaviour anyway (e.g. make install
> for Mercury builds a load of stuff as well as installing it).
> 
> It's possible that packaging scripts may rely on the presence of some
> of the above targets, so I wouldn't remove them.

That's fine.

> > Maybe we should delete the .DEFAULT target in the Makefile.
> 
> It does seem a bit pointless given that just invoking "make"
> without the default target will invoke the "all" target anyway.

I meant this:

    .DEFAULT:
	    $(MMAKE) $@

It allows you to build targets that are only listed in the Mmakefile
using plain "make" instead of "mmake". If we delete that rule, we can
say that the only targets we support with plain "make" are those in the
Makefile, and no more.

Peter


More information about the reviews mailing list