help-make
[Top][All Lists]
Advanced

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

Re: problem with target-specific vars and dependencies


From: Paul D. Smith
Subject: Re: problem with target-specific vars and dependencies
Date: Thu, 19 Aug 2004 18:28:29 -0400

%% Boris Kolpackov <address@hidden> writes:

  bk> "Paul D. Smith" <address@hidden> writes:
  bk> IMO, target-specific variable inheritance is quite useless feature
  >> 
  >> It's useful for some situations

  bk> Can you share them with us?

The canonical use is:

    prog: prog1.o prog2.o

    debug: prog
    debug: CFLAGS += -g

  >> but not for others.

  bk> In all cases I know the difference between those situations is not 
  bk> qualitative therefore it often catches one off guard.

It only has surprising consequences if a single prerequisite can be
reached through multiple target paths where some paths have
target-specific variables and some don't (which isn't really that common
for most targets)... and it's only surprising if that's not what you
intended :).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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