make-w32
[Top][All Lists]
Advanced

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

Re: PATSUBST and FILTER help


From: Earnie Boyd
Subject: Re: PATSUBST and FILTER help
Date: Tue, 05 Aug 2003 07:19:41 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130

Paul D. Smith wrote:
%% Wehr Bruce <address@hidden> writes:

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

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

  wb> The rule to make all the objects is as follows:

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

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

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

It could be one of two things (at least...)  There isn't enough
information given to rule out the first, and I don't know enough about
how Windows handles these things to rule out the second.

The first is that he's creating the objects in a different directory
than the current working directory, and using (or trying to use) VPATH
to find them.  That's a no-no; there's a paper on my site (below)
describing the right way to use VPATH.


Hmm... Would a ``.SUFFIXES:'' specifying ``.obj'' help? IIRC, ``.obj'' isn't a predefined suffix.

The second is that he's got case-sensitivity problems.  GNU make is a
UNIX tool and as such expects to be case-sensitive; Windows filesystems
are not case-sensitive generally.


That depends on how the make executable was built. There is coding to handle case insensitvity and if the OP is using mingw32-make from www.mingw.org, then the case insensitivity coding is turned on.

So, if you have a rule that can create a .obj from a .asm, but you have
a .ASM file instead, then that won't match.  Maybe.  There's some
information about this in the README.W32 file in the GNU make
distribution, that might help.  Or, someone else on this list might have
a better idea/more information.


Again, that depends on how the make executable was built. Who distributed the make being used? Or, was it hand built?

Earnie.





reply via email to

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