ビルドプロセス用に小さなnmakemakefileが必要です。ファイルタイプは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)
このnmakeMakefileで得られるのは次のとおりです。
NMAKE : fatal error U1073: don't know how to make 'A-123.pdf'