for review: MLOBJS.

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Mar 13 12:10:22 AEDT 1998


On 20-Feb-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> Fix bugs in how MLOBJS works.
> 
> Because mmake puts the contents of the .dep file before the Mmakefile
> when generating a makefile for gmake, the scheme of using
> 	MLOBJS=foo.o bar.o
> in the Mmakefile won't work. The dependencies in the .dep file such as
> 	libxyz.a: ..... $(MLOBJS)
> are expanded when read, but MLOBJS is not set until later. This means
> MLOBJS won't be generated from the .c files.
> 
> So the solution is to output
> 	libxyz.a: ..... MLOBJS
> where MLOBJS is a target, and is defined in Mmake.rules (which is seen
> by make after the contents of Mmakefile).
> 	MLOBJS: $(MLOBJS).

The trouble with this is that if MLOBJS is empty, then
Make will always rebuild libxyz.a, even if nothing has changed.

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



More information about the developers mailing list