[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pattern rules not recognized on Win32
From: |
Brian Dessent |
Subject: |
Re: Pattern rules not recognized on Win32 |
Date: |
Fri, 18 Apr 2008 02:59:51 -0700 |
"Gerrit ." wrote:
> %.cost: $(COST_DIR)/%.scost $(COST)
> $(COST) -o $@ -I $(COST_DIR) $<
When you write a pattern rule like this, all the stated prerequisites
must exist (or be able to be built) in order for the pattern rule to
apply. COST is defined as
COST=$(BIN_PATH)/cost
However, assuming that cost is a binary, it is probably named "cost.exe"
on Win32, meaning that as written $(COST) does not exist and so the
pattern rule can't apply. You have to be conscientious about using
$(EXEEXT) if you're going to list executables as prerequisites, e.g.
COST=$(BIN_PATH)/cost$(EXEEXT)
(Assuming that you are using autoconf or something else that sets
EXEEXT.)
The ability to leave off the .exe suffix applies only when invoking a
program. If you expect make to be able to find it as a prerequisite you
have to include it.
Brian