bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'How makefiles are remade'


From: Jim
Subject: Re: 'How makefiles are remade'
Date: Wed, 21 Apr 2004 14:03:58 -0700
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Ted Stern wrote:

On 20 Apr 2004 at 23:03 PDT, address@hidden wrote:

Is there any way to cause make to exit without error?


Hi Jim,

For this problem, I think this might work

SHELL=/bin/ksh (or bash)

target:  dependency
         return 1

Same as /bin/false (returns non-zero for scripts)



Regarding what you're trying to do ... I have a 9200 object, million line
executable that I need to build.  Big source hierarchy, multiple copies of
source files.  Over the last 5 years I've put together a way to deal with
this.  It doesn't require any auto-generated included makefiles anymore -- the
way I deal my complexity is using something like

    $(foreach ....,$(eval $(call ....)))

I can actually use this to create a macro for each object, so instead of
referring to $(OBJDIR)/long/path/to/file.o, I just use $(file.o).  With clever
ordering of the directories, I end up redefining this macro to be the correct
path to the correct source name.  For instance, if there is a dir1/file.c and
a dir2/file.c and I want file.o to be created from the dir2 source, I put dir2
last in the foreach list so that it overwrites the dir1 definition.

Ted

Right at least we're talking from the same type of boat... Yeah right now I have a bunch of for eaches and relative things for each part of the tree, but a> this would have vastly improved the speed of compiling most of a compiled tree (it did, when it worked and was hand-massaged), but ahh well - looks like I can't cache this at this time. b> I dunno something like that...

Jim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]