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