我需要为我的构建过程有点NMAKE生成文件。 该文件类型TXT和PDF。 因此,我增加了一个推理规则我makfile。 但是,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'