From 90dd090d4a72a05bbfeaa37fa840032d84ec06b6 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 20 Jan 2020 05:01:57 +0000 Subject: project: added logic for generating lib/Automake/Config.pm --- project/srcgen.mk | 12 +++++++++++- project/tree.mk | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/project/srcgen.mk b/project/srcgen.mk index 26e8760..7008b67 100644 --- a/project/srcgen.mk +++ b/project/srcgen.mk @@ -30,7 +30,14 @@ BIN_SUBST_RULES = \ -e 's!@am_AUTOM4TE@!$(AM_AUTOM4TE)!g' \ -e 's!@datadir@!$(DATADIR)!g' -ALL_GEN_SRCS = $(M4_GEN_SRCS) $(BIN_GEN_SRCS) +LIB_GEN_SRCS = lib/Automake/Config.pm +LIB_CONFIGURE_INPUT = Generated via variable substitution from $(subst $(SOURCE_DIR)/lib/Automake/,,$<). +LIB_SUBST_RULES = \ + -e 's!@configure_input@!$(LIB_CONFIGURE_INPUT)!g' \ + $(BIN_SUBST_RULES) + + +ALL_GEN_SRCS = $(M4_GEN_SRCS) $(BIN_GEN_SRCS) $(LIB_GEN_SRCS) m4/amversion.m4: $(SOURCE_DIR)/m4/amversion.in tree.tag sed $(M4_SUBST_RULES) $< > $@ @@ -41,6 +48,9 @@ bin/aclocal-$(AUTOMAKE_VER): $(SOURCE_DIR)/bin/aclocal.in tree.tag bin/automake-$(AUTOMAKE_VER): $(SOURCE_DIR)/bin/automake.in tree.tag sed $(BIN_SUBST_RULES) $< > $@ && chmod +x $@ +lib/Automake/Config.pm: $(SOURCE_DIR)/lib/Automake/Config.in tree.tag + sed $(LIB_SUBST_RULES) $< > $@ + srcgen: $(ALL_GEN_SRCS) srcgen-clean: diff --git a/project/tree.mk b/project/tree.mk index 5785ef7..196178b 100644 --- a/project/tree.mk +++ b/project/tree.mk @@ -1,4 +1,4 @@ -TREE_DIRS = m4 bin +TREE_DIRS = m4 bin lib lib/Automake tree.tag: mkdir -p $(TREE_DIRS) -- cgit v1.2.3