help-make
[Top][All Lists]
Advanced

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

RE: how to advice please : rules with dependencies created in commands


From: Paul D. Smith
Subject: RE: how to advice please : rules with dependencies created in commands
Date: Fri, 5 May 2006 17:00:36 -0400

%% "PATTON, BILLY \(SBCSI\)" <address@hidden> writes:

  pb> Here I have a makefile that will create all programs and their
  pb> dependencies.
  pb> Problem now is that I don't know how to have top program have dependency
  pb> on something that it creates based on the value of a variable.
  pb> Obviously prog_1 : $(CREATE) would fail.  They are created by prog_1

As far as I understand it, you have this the wrong way around.

If the stuff in $(CREATE) is created by prog_1, then $(CREATE) depends
on prog_1, not the other way around.

You would write:

    all: $(CREATE)

    $(CREATE): prog_1

so that prog_1 was built before any of the others.

-- 
-------------------------------------------------------------------------------
 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]