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

Glynn Clements glynn at gclements.plus.com
Thu Oct 4 07:53:58 EDT 2007


William Kyngesburye wrote:

> > Note the vertical bar is missing from yours. Can you try the same
> > thing with a module (which doesn't re-compile everything)?
> 
> It's also missing the pipe:

It's missing, but that case *doesn't* recompile everything? Ugh; this
is getting confusing.

> I preceded the pipe with a backslash in Rules.make - now it keeps the  
> pipe and libraries aren't recompiled.  But, this doesn't work in  
> 3.81, so it doesn't look like a usable solution.

Okay, how about this:

# default cc rules
ifeq ($(MAKE_VERSION),3.81)
$(OBJDIR)/%.o : %.c $(LOCAL_HEADERS) | $(OBJDIR)
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(EXTRA_INC) $(INC) \
		-o $(OBJDIR)/$*.o -c $*.c
else
$(OBJDIR)/%.o : %.c $(LOCAL_HEADERS)
	$(MAKE) $(OBJDIR)
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(EXTRA_INC) $(INC) \
		-o $(OBJDIR)/$*.o -c $*.c
endif

?

This is less than ideal, as it will revert to the old form for 3.82,
but I can't think of a simple way to check for >= 3.81 (especially
considering that the version might not actually be a number, e.g. 
3.81-r1 or similar).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list