, , :
TARGETS:=$(patsubst %_tpl,%,$(wildcard *.xml_tpl *.tex_tpl))
.PHONY: all
all: $(TARGETS)
.SECONDEXPANSION:
$(TARGETS): %: $$(wildcard %*_tpl)
./generate $^ -o $@
.SECONDEXPANSION, $$(wildcard %*_tpl) . , $ ; .
:
a.tex-subpart1_tpl
a.tex_tpl
a.xml-subpart1_tpl
a.xml-subpart2_tpl
a.xml_tpl
make -n, :
./generate a.xml_tpl a.xml-subpart1_tpl a.xml-subpart2_tpl -o a.xml
./generate a.tex_tpl a.tex-subpart1_tpl -o a.tex
?
$(wildcard %*_tpl) , $$ . make $$(wildcard..) , , , .
, $(wildcard %*_tpl) , ( " " ). % , wildcard - ls %*_tpl .
make - , . , .SECONDEXPANSION, . - , . $$(wildcard: $(wildcard . make $(wildcard %*_tpl), % , wildcard , %.
$(TARGETS) ?
:
%: $$(wildcard %*_tpl)
./generate $^ -o $@
$(TARGETS). , " match-anything" . , make , , , , , Makefile . , , Makefile .
$(TARGETS) , match-anything. $(TARGETS) , , .