On Thu, 28 Oct 2004 16:10:39 -0600, Hyrum Wright <[EMAIL PROTECTED]> wrote:
> Hello all,
> I'm trying to build a generic makefile rule, so that every time I get
> some more app code for one of my classes, I don't have to add a bunch of
> rules to the makefile, I just have to add the output binary to one
> place, and make magically finds it.
> 
> I'm not having very much success, though.  Here are the relevant
> portions of the makefile.
> 
> BIN_FILES=\
>          lab5.bin \
>          lab4d.bin \
>          lab4c.bin \
>          lab4b.bin
> 
> $(BIN_FILES): %.bin: %.s
>         nasm $@ -o $< -l %.lst
> 
> By my understanding, assuming the makefile knows how to build the
> corresponding .s file, this should do that, and then build the .bin
> file.  This rule should be applicable for each of the files specified in
> the BIN_FILES variable.  Except, it doesn't work.  I simply the
> following back from make:
> 
> mustard ee425lab $ make
> Make: Don't know how to make %.bin:.  Stop.
> 
> I've checked the GNU make documentation online, and this seems to be the
> convention that they use.  Any ideas why it isn't working for me?

Is mustard still an hpux box?  If so, you probably need to type gmake
instead of make.  hpux make probably doesn't do static pattern rules. 
Otherwise, I don't see a problem with syntax.

Bryan

P.S. You have no idea what feelings of nostolgia mustard brings back
for me.  I spent many hours doing layout (or, laying out) on mustard
for ee 451 back in the day.  One of the better spice lab machines,
with an easy name to remember for remote logins.  Man, those were the
days!

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to