Reputation: 63
I've been trying to compile a project using the Windows command window and the gnu compiler. I've got this error:
../../../../make/compiler_rules.mk:40: *** multiple target patterns. Stop.
Here is the lines 29 to 45 of the makefile:
#----------------------------------------------------------------------*
#### Compilation rules. ASM files.
#----------------------------------------------------------------------*
$(OBJ_DIR)/%.s.o: $(A_DIR)/%.s $(OIL_OUTPUTS)
@if [ ! -d $(OBJ_DIR) ];
then mkdir -p $(OBJ_DIR);
fi;
$(AS) $(ASFLAGS) $< -o $@
$(OBJ_DIR)/%.S.i: $(A_DIR)/%.S $(OIL_OUTPUTS)
@if [ ! -d $(OBJ_DIR) ]; then mkdir -p $(OBJ_DIR); fi;
$(CPP) $(CPPFLAGS) $< -o $@
$(OBJ_DIR)/%.S.o: $(OBJ_DIR)/%.S.i $(OIL_OUTPUTS)
@if [ ! -d $(OBJ_DIR) ]; then mkdir -p $(OBJ_DIR); fi;
$(AS) $(ASFLAGS) $< -o $@
I've understood through some previous posts here that it's due to whethere spaces or colons in tha names of files or directories. I've checked and ther is none. What could it be?
Upvotes: 1
Views: 999
Reputation: 16016
This is not a full answer, but hopefully it helps figure out whats going on. I created the following Makefile:
all: a.txt a.TXT
%.TXT:
echo HELLO > $@
%.txt:
echo hello > $@
When I run make
for this file under Linux, then the a.txt and a.TXT targets are treated separately, i.e. they both get built.
However if I copy this to my ancient windows XP VM, and run it with the gnuwin32 make distribution, it appears to treat a.txt and a.TXT as the same thing - specifically only one gets build. This is not exactly the same behavior you see with your $(OBJ_DIR)/%.s.o
and $(OBJ_DIR)/%.S.o
, but significantly it is different to the Linux behavior, so I believe this is due to case treatment, and how this particular distribution of make deals with it. Is this the same distribution you are using? (version 3.81)
So, I'm sorry I can't propose a fix right now, but I think you'd probably have to share more/all of your makefile (and supporting .mk files), along with which targets are required to be built.
Upvotes: 2