Makefile question with no answer?

Jerry Feldman gaf at blu.org
Mon May 15 13:59:01 EDT 2006


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
-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9



More information about the gnhlug-discuss mailing list