2
我需要一个用于构建过程的nmake makefile。文件类型是TXT和PDF。因此我将推理规则添加到我的mak文件中。但是nmake完全忽略它。怎么了?为什么nmake忽略我的隐式规则?
Number=123
Targets=A-$(Number).pdf B-$(Number).pdf
Sources=$(Targets:pdf=txt)
.txt.pdf:
copy $*.txt $*.pdf
all: test build
#this rule creates sample source files
setup:
echo hungry > A-$(Number).txt
echo thursty > B-$(Number).txt
#this rule checks the generated macros
test:
@echo Sources: $(Sources)
@echo Targets: $(Targets)
dir /b $(Sources)
build: $(Targets)
所有我这个NMAKE Makefile中得到的是:
NMAKE : fatal error U1073: don't know how to make 'A-123.pdf'
...并记住.SUFFIXES区分大小写。 – harper