[m-dev.] Re: for review: MLOBJS.

Tyson Dowd trd at cs.mu.OZ.AU
Fri Mar 13 14:14:48 AEDT 1998


On 13-Mar-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 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.

Hmmm... If MLOBJS is *non-empty*, it will always rebuild MLOBJS,
even if nothing has changed.

Any ideas on fixing it?

-- 
       Tyson Dowd           # There isn't any reason why Linux can't be
                            # implemented as an enterprise computing solution.
     trd at cs.mu.oz.au        # Find out what you've been missing while you've
http://www.cs.mu.oz.au/~trd # been rebooting Windows NT. -- InfoWorld, 1998.



More information about the developers mailing list