summaryrefslogtreecommitdiff
path: root/project/srcgen.mk
blob: ef689cefd7370b775a39c702022f6ec3ad4ade16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# srcgen.mk: rules for source-file generation.
# this file is covered by COPYING.BAUTOMAKE.

M4_GEN_SRCS             = m4/amversion.m4
M4_CONFIGURE_INPUT      = Generated via variable substitution from $(subst $(SOURCE_DIR)/m4/,,$<).

M4_SUBST_RULES          = \
			-e 's!@configure_input@!$(M4_CONFIGURE_INPUT)!g' \
			-e 's!@VERSION@!$(AUTOMAKE_VER)!g'               \
			-e 's!@APIVERSION@!$(AUTOMAKE_VER)!g'

ALL_GEN_SRCS            = $(M4_GEN_SRCS)

m4/amversion.m4: $(SOURCE_DIR)/m4/amversion.in tree.tag
	sed $(M4_SUBST_RULES) $< > $@

srcgen: $(ALL_GEN_SRCS)

srcgen-clean:
	rm -f $(ALL_GEN_SRCS)

all:	srcgen

clean:	srcgen-clean

.PHONY:	srcgen srcgen-clean