help-make
[Top][All Lists]
Advanced

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

Re: outputting which dependencies triggered a target action


From: Shawn Halpenny
Subject: Re: outputting which dependencies triggered a target action
Date: Fri, 19 Aug 2005 16:42:22 -0400

On 8/19/05, Shawn Halpenny <address@hidden> wrote:

I posted a bit too soon.  With some additional work, I can get the
full dependency list for any target.  The problem with my original
solution:

> ifneq ($(PREREQS),)
> @echo $@: $? \| $|
> else
> @<generic link/compile rule cmds>
> endif

Since the @echo rule doesn't actually create the target, the link rule
won't run because the .o files never exist.  I could fake it with the
-t switch to just touch the targets, but I don't want to create any
files is PREREQS is defined.  So, with a quick change to not actually
use the shell at all, and running make with -n:

ifneq ($(PREREQS),)
$(info $@: $? | $|)
else
@<generic link/compile rule cmds>
endif

Now it requires the $(info) function, so you'll need a make from CVS
after late February.  One annoyance is that make reports "nothing to
be done for <sometarget>", but that's a small price to pay in order to
get this information in a more readable format.

-- 
Shawn Halpenny




reply via email to

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