[m-dev.] More build system patches

Peter Moulder Peter.Moulder at infotech.monash.edu.au
Tue Jul 20 10:56:24 AEST 2004


On Sun, Jul 18, 2004 at 02:12:25PM +1000, Peter Hawkins wrote:

> Makefile.patch:
> If you run make all or make install from the top-level mercury directory and 
> the build fails, the exit status of make will not reflect that. This is 
> because the makefile contains targets like this:
> 
> all:
> 	$(MMAKE) all 2>&1 | tee make_all.log

> [points out that one problem is that it hides the exit status of
> mmake]

Another problem is that it joins stdout and stderr together.
Users expect to be able to direct stdout to one place and stderr to
another.

> Accordingly, this patch contains a rather disgusting hack to work around this. 

I suggest that the real fix is to make it

   all:
   	$(MMAKE) all

which is what people expect.  If users want a log, they will add `>'
etc. for themselves.  They will probably do so even if we do it for
them too: they probably won't know that we've done so for them.

This version also has the advantage of not inverting one's brain upon
trying to read it.

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