diff options
author | midipix <writeonce@midipix.org> | 2020-01-18 12:49:25 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2020-01-24 21:14:10 +0000 |
commit | 10bc1cd20004adf302065dc6dc5c9f40270f70a3 (patch) | |
tree | e9c9c2a5eaea136b7895a2cff941951b086459ee /project | |
parent | ed206c62c9a9a1ed9b70245921fdf82aa2ff67f3 (diff) | |
download | bautomake-10bc1cd20004adf302065dc6dc5c9f40270f70a3.tar.bz2 bautomake-10bc1cd20004adf302065dc6dc5c9f40270f70a3.tar.xz |
project: added logic for generating bin/aclocal-x.y.z and bin/automake-x.y.z.
Diffstat (limited to 'project')
-rw-r--r-- | project/srcgen.mk | 29 | ||||
-rw-r--r-- | project/tree.mk | 2 |
2 files changed, 29 insertions, 2 deletions
diff --git a/project/srcgen.mk b/project/srcgen.mk index ef689ce..26e8760 100644 --- a/project/srcgen.mk +++ b/project/srcgen.mk @@ -1,6 +1,10 @@ # srcgen.mk: rules for source-file generation. # this file is covered by COPYING.BAUTOMAKE. +AM_AUTOM4TE = autom4te +AM_AUTOCONF = autoconf +AM_SHELL = /bin/sh + M4_GEN_SRCS = m4/amversion.m4 M4_CONFIGURE_INPUT = Generated via variable substitution from $(subst $(SOURCE_DIR)/m4/,,$<). @@ -9,11 +13,34 @@ M4_SUBST_RULES = \ -e 's!@VERSION@!$(AUTOMAKE_VER)!g' \ -e 's!@APIVERSION@!$(AUTOMAKE_VER)!g' -ALL_GEN_SRCS = $(M4_GEN_SRCS) +BIN_GEN_SRCS = bin/aclocal-$(AUTOMAKE_VER) bin/automake-$(AUTOMAKE_VER) +BIN_CONFIGURE_INPUT = Generated via variable substitution from $(subst $(SOURCE_DIR)/bin/,,$<). + +BIN_SUBST_RULES = \ + -e 's!@configure_input@!$(BIN_CONFIGURE_INPUT)!g' \ + -e 's!@PACKAGE@!$(PACKAGE)!g' \ + -e 's!@VERSION@!$(AUTOMAKE_VER)!g' \ + -e 's!@APIVERSION@!$(AUTOMAKE_VER)!g' \ + -e 's!@RELEASE_YEAR@!$(AUTOMAKE_YEAR)!g' \ + -e 's!@PACKAGE_BUGREPORT@!$(PKGBUGS)!g' \ + -e 's!@PACKAGE_URL@!$(PKGHOME)!g' \ + -e 's!@PERL@!$(HOST_PERL)!g' \ + -e 's!@SHELL@!$(AM_SHELL)!g' \ + -e 's!@am_AUTOCONF@!$(AM_AUTOCONF)!g' \ + -e 's!@am_AUTOM4TE@!$(AM_AUTOM4TE)!g' \ + -e 's!@datadir@!$(DATADIR)!g' + +ALL_GEN_SRCS = $(M4_GEN_SRCS) $(BIN_GEN_SRCS) m4/amversion.m4: $(SOURCE_DIR)/m4/amversion.in tree.tag sed $(M4_SUBST_RULES) $< > $@ +bin/aclocal-$(AUTOMAKE_VER): $(SOURCE_DIR)/bin/aclocal.in tree.tag + sed $(BIN_SUBST_RULES) $< > $@ && chmod +x $@ + +bin/automake-$(AUTOMAKE_VER): $(SOURCE_DIR)/bin/automake.in tree.tag + sed $(BIN_SUBST_RULES) $< > $@ && chmod +x $@ + srcgen: $(ALL_GEN_SRCS) srcgen-clean: diff --git a/project/tree.mk b/project/tree.mk index b7a5ff8..5785ef7 100644 --- a/project/tree.mk +++ b/project/tree.mk @@ -1,4 +1,4 @@ -TREE_DIRS = m4 +TREE_DIRS = m4 bin tree.tag: mkdir -p $(TREE_DIRS) |