nix/mk/templates.mk

20 lines
570 B
Makefile
Raw Normal View History

2014-02-01 11:20:06 +00:00
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
2014-02-01 11:20:06 +00:00
clean-files += $(1)
endef
ifneq ($(MAKECMDGOALS), clean)
2024-02-07 14:41:10 +00:00
$(buildprefix)%.h: %.h.in $(buildprefix)config.status
$(trace-gen) rm -f $@ && cd $(buildprefixrel) && ./config.status --quiet --header=$(@:$(buildprefix)%=%)
2014-08-20 16:39:48 +00:00
2024-02-07 14:41:10 +00:00
$(buildprefix)%: %.in $(buildprefix)config.status
$(trace-gen) rm -f $@ && cd $(buildprefixrel) && ./config.status --quiet --file=$(@:$(buildprefix)%=%)
endif