aboutsummaryrefslogtreecommitdiff
path: root/mk/templates.mk
blob: 866bdc17f8b5a1901a418a37ec1a7141fa2bf832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)

$(buildprefix)%.h: %.h.in
	$(trace-gen) rm -f $@ && cd $(buildprefixrel) && ./config.status --quiet --header=$(@:$(buildprefix)%=%)

$(buildprefix)%: %.in
	$(trace-gen) rm -f $@ && cd $(buildprefixrel) && ./config.status --quiet --file=$(@:$(buildprefix)%=%)

endif