Makefile question with no answer?

Steven W. Orr steveo at syslang.net
Mon May 15 14:21:01 EDT 2006


On Monday, May 15th 2006 at 13:58 -0400, quoth Jerry Feldman:

=>On Monday 15 May 2006 1:35 pm, Steven W. Orr wrote:
=>> I suspect that there is no answer to what I'm looking for, but if the
=>> answer exists I'll probably get it here.
=>>
=>> I have a Makefile of normal industrial complexity. It builds a huge
=>> variety of different things, .o's, executables, libs, .PHONYs, etc..
=>>
=>> It sincludes a collection of other files.
=>>
=>> I want to add a line in one place that will cause *all* targets to have a
=>> new dependency added to it.
=>>
=>> make all or here or there or clean or whatever, I want any make to all of
=>> a sudden check for newthing as a required target but I want to do it by
=>> adding a one-liner someplace.
=>>
=>> Anyone?
=>Unless I misinterpreted.
=>let's say your existing Makefile has:
=>all: foo fubar barfu bar
=>
=>Just add a line above all:
=>everything: newdep all
=>
=>Since you are adding it before the all target, it becomes the default

Like I said, I suspect that there is no answer that smells like I want it 
to. My problem is that I also want this to work for things that do not get 
invoked unless it is explicit. e.g., make clean
In that case I would *also* need to add newdep to all of those other 
targets as well.

-- 
steveo at syslang dot net TMMP1 http://frambors.syslang.net/
Do you have neighbors who are not frambors?



More information about the gnhlug-discuss mailing list