summaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-01-20 05:01:57 +0000
committermidipix <writeonce@midipix.org>2020-01-24 21:14:10 +0000
commit90dd090d4a72a05bbfeaa37fa840032d84ec06b6 (patch)
treeb4114998200de8559da18e2791c05139cd836c0a /project
parent10bc1cd20004adf302065dc6dc5c9f40270f70a3 (diff)
downloadbautomake-90dd090d4a72a05bbfeaa37fa840032d84ec06b6.tar.bz2
bautomake-90dd090d4a72a05bbfeaa37fa840032d84ec06b6.tar.xz
project: added logic for generating lib/Automake/Config.pm
Diffstat (limited to 'project')
-rw-r--r--project/srcgen.mk12
-rw-r--r--project/tree.mk2
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)