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 incommands


From: PATTON, BILLY \(SBCSI\)
Subject: RE: how to advice please : rules with dependencies created incommands
Date: Mon, 8 May 2006 08:13:01 -0500

The CREATE variable was just for the purpose of a demo.  Where the
values in CREATE will com from will be in  parameter file passed to
prog_1.  The Makefile will have no knowledge of what needs to be built.
I think I can use Tom Tromey's method of auto-dependency to accomplish
this.


> -----Original Message-----
> From: Paul Smith [mailto:address@hidden On Behalf Of Paul D. Smith
> Sent: Friday, May 05, 2006 4:01 PM
> To: PATTON, BILLY (SBCSI)
> Cc: address@hidden
> Subject: RE: how to advice please : rules with dependencies 
> created incommands
> 
> 
> %% "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]