%% 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.
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.