make-w32
[Top][All Lists]
Advanced

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

PATSUBST and FILTER help


From: Wehr Bruce
Subject: PATSUBST and FILTER help
Date: Mon, 4 Aug 2003 17:52:35 -0400

Hello,

I have a friend who uses GMAKE for Windows, and came to me with the following 
question.  In order for me to continue my fa├žade as Unix Guru, I humbly come to 
you for answers.  I haven't used GMAKE (easy on me, now :), so I'm not used to 
some of its powerful additional features. But, I have read the docs, and have 
failed to spot anything obvious.

Here's the pertinent portions of his cry for help:

=== QUOTE ===

Sorry to bother you with this, but I don't know anyone else to ask.  The
question is about using the GNU make utility GMAKE.  I use it all the
time, but have run into a bit of a snag that I can't figure out from the
docs. so here go's:

I have a makefile (attached) it used to build 3 different "flavors" of
menu code.  In order to build a list of object file needed to for each
flavor, I use the following cryptic command (this should be right up
your ally):

  OBJS=     $(patsubst %.c,%.obj,$(filter %.c,$(CFILES))) \
            $(patsubst %.asm,%.obj,$(filter %.asm,$(AFILES)))

The rule to make all the objects is as follows:

      %.obj: %.c $(HFILES)
            $(CC) $(FLAGS) $< $(CPU) $(CFLAGS) $(ST10DEF)

      %.obj: %.asm
            $(CC) $(FLAGS) $< $(ASMFLAGS) $(ST10DEF)

Now, everything works fine UNLESS there is currently no .OBJ file for a
corresponding .C or .ASM file!
In this case I get the error message: No rule to make foo.obj needed by
MenuXXX.out.
If foo.obj already exists, it will recompile foo.c just fine.
This is very perplexing.

Don't spend allot of time on it, I just thought that maybe you could see
something obvious.

=== END QUOTE ===

Now, since I can't see anything obvious, but desparately want to make it look 
like I did  :), I've come to the *real* experts ... just don't tell my friend.  
:)

Thanks to all for your time and attention.
                                                                                
                                     
  <><   Bruce Wehr
 <<...OLE_Obj...>> 
  INFORMATION SYSTEMS - PASSENGER CARS
  2400 EXECUTIVE HILLS BOULEVARD
  AUBURN HILLS, MICHIGAN 48326
   address@hidden <mailto:address@hidden> 
  (248)209-4352 DESK
  (248)209-7312 FAX





reply via email to

[Prev in Thread] Current Thread [Next in Thread]