%% "PATTON, BILLY \(SBCSI\)" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>          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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to