From cb82e2c946bcef8135f11fe7be6d1ed0240cc15f Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 20 Jan 2020 05:50:23 +0000 Subject: project: added logic for generating documentation files. --- project/srcgen.mk | 18 +++++++++++++++++- project/tree.mk | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/project/srcgen.mk b/project/srcgen.mk index 7008b67..d1ab778 100644 --- a/project/srcgen.mk +++ b/project/srcgen.mk @@ -36,8 +36,10 @@ LIB_SUBST_RULES = \ -e 's!@configure_input@!$(LIB_CONFIGURE_INPUT)!g' \ $(BIN_SUBST_RULES) +MAN_GEN_SRCS = man/aclocal.1 man/aclocal-$(AUTOMAKE_VER).1 \ + man/automake.1 man/automake-$(AUTOMAKE_VER).1 -ALL_GEN_SRCS = $(M4_GEN_SRCS) $(BIN_GEN_SRCS) $(LIB_GEN_SRCS) +ALL_GEN_SRCS = $(M4_GEN_SRCS) $(BIN_GEN_SRCS) $(LIB_GEN_SRCS) $(MAN_GEN_SRCS) m4/amversion.m4: $(SOURCE_DIR)/m4/amversion.in tree.tag sed $(M4_SUBST_RULES) $< > $@ @@ -51,6 +53,20 @@ bin/automake-$(AUTOMAKE_VER): $(SOURCE_DIR)/bin/automake.in tree.tag lib/Automake/Config.pm: $(SOURCE_DIR)/lib/Automake/Config.in tree.tag sed $(LIB_SUBST_RULES) $< > $@ +man/aclocal.1: tree.tag + printf '.so man1/aclocal-%s.1\n' $(AUTOMAKE_VER) > $@ + +man/automake.1: tree.tag + printf '.so man1/automake-%s.1\n' $(AUTOMAKE_VER) > $@ + +man/aclocal-$(AUTOMAKE_VER).1: $(BIN_GEN_SRCS) $(LIB_GEN_SRCS) tree.tag + PERL5LIB=$(SOURCE_DIR)/lib:./lib PATH=./bin:$(PATH) \ + perl $(SOURCE_DIR)/doc/help2man --output=$@ aclocal-$(AUTOMAKE_VER) + +man/automake-$(AUTOMAKE_VER).1: $(BIN_GEN_SRCS) $(LIB_GEN_SRCS) tree.tag + PERL5LIB=$(SOURCE_DIR)/lib:./lib PATH=./bin/:$(PATH) \ + perl $(SOURCE_DIR)/doc/help2man --output=$@ automake-$(AUTOMAKE_VER) + srcgen: $(ALL_GEN_SRCS) srcgen-clean: diff --git a/project/tree.mk b/project/tree.mk index 196178b..820ee8a 100644 --- a/project/tree.mk +++ b/project/tree.mk @@ -1,4 +1,4 @@ -TREE_DIRS = m4 bin lib lib/Automake +TREE_DIRS = m4 bin man lib lib/Automake tree.tag: mkdir -p $(TREE_DIRS) -- cgit v1.2.3