lix/mk/templates.mk
2016-11-25 15:48:27 +01:00

20 lines
394 B
Makefile

template-files :=
# Create the file $(1) from $(1).in by running config.status (which
# substitutes all '@var@' variables set by the configure script).
define instantiate-template
clean-files += $(1)
endef
ifneq ($(MAKECMDGOALS), clean)
%.h: %.h.in
$(trace-gen) rm -f $@ && ./config.status --quiet --header=$@
%: %.in
$(trace-gen) rm -f $@ && ./config.status --quiet --file=$@
endif