[GRASS-dev] another make problem (OSX, but could be a general problem)

Glynn Clements glynn at gclements.plus.com
Wed Oct 3 05:10:35 EDT 2007

William Kyngesburye wrote:

> On Oct 2, 2007, at 3:50 PM, Glynn Clements wrote:
> > I have 3.81, and that's the only version for which I can find online
> > documentation.
> >
> > Can you check the 3.80 documentation to ensure that order-only
> > prerequisites are mentioned? They should be described in:
> >
> > 	4 Writing Rules
> > 	4.3 Types of Prerequisites
> >
> Yep, it's there.
> > Other than that, I can only suggest re-building a directory with make
> > debugging enabled (make -d ...). It can generate a lot of output, so
> > pick the smallest case which demonstrates the problem (e.g. a module
> > with only one source file).
> >
> I picked the datetime lib (the first module I tried *didn't* recompile).

           Prerequisite `OBJ.i686-apple-darwin8.10.1' is newer than target `OBJ.i686-apple-darwin8.10.1/between.o'.
          Must remake target `OBJ.i686-apple-darwin8.10.1/between.o'.

This suggests a bug with order-only dependencies. The whole point of
order-only dependencies is that make only considers their existence;
the timestamp is supposed to be ignored.

> Interesting - on a closer look, it seems to be completely recompiling  
> libraries, but only relinking programs.  That's with a make at the  
> top level.
> If I make an individual library, it also completely recompiles.  But  
> re-making an individual program doesn't even relink, this seems to be  
> the only correct case.

That's particularly strange. The only rule which has $(OBJDIR) as a
prerequisite is the one to build object files (in Rules.make):

# default cc rules
$(OBJDIR)/%.o : %.c $(LOCAL_HEADERS) | $(OBJDIR)
		-o $(OBJDIR)/$*.o -c $*.c

But that rule is used for libraries and modules alike. I have no idea
why it would behave differently for libraries and for modules.

Everything points to this being a "make" bug. Can you try with 3.81 to
see if it happens there?

Before that, can you try using "make -p" on both a library and a

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list