From 6fe502dc8006496e8280f2d7be5e8507df7b2c12 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 16 Mar 2016 18:26:00 +0300 Subject: [PATCH] build: docs -- Use autogenerated footer We can generate footer dynamically and provide criu.8 version the same as the program has. Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- Documentation/Makefile | 13 ++++++++++++- Documentation/criu.txt | 5 +---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 77e3a26bb..76666d859 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -5,6 +5,7 @@ ASCIIDOC := asciidoc A2X := a2x XMLTO := xmlto +FOOTER := footer.txt SRC += criu.txt XMLS := $(patsubst %.txt,%.xml,$(SRC)) MANS := $(patsubst %.txt,%.8,$(SRC)) @@ -26,6 +27,16 @@ check: $$B --version > /dev/null || exit 1; \ done +$(FOOTER): ../Makefile.versions + $(call msg-gen, $@) + $(Q) echo ":doctype: manpage" > $@ + $(Q) echo ":man source: criu" >> $@ + $(Q) echo ":man version: $(CRIU_VERSION)" >> $@ + $(Q) echo ":man manual: CRIU Manual" >> $@ + +$(SRC): $(FOOTER) + @true + %.8: %.txt $(call msg-gen, $@) $(Q) $(ASCIIDOC) -b docbook -d manpage -o $(patsubst %.8,%.xml,$@) $< @@ -41,7 +52,7 @@ check: clean: $(call msg-clean, "Documentation") - $(Q) rm -f $(XMLS) $(MANS) $(PSS) $(PDFS) + $(Q) rm -f $(XMLS) $(MANS) $(PSS) $(PDFS) $(FOOTER) install: $(MANS) $(E) " INSTALL " $(MANS) diff --git a/Documentation/criu.txt b/Documentation/criu.txt index e7ba6ddb6..9d97ec81c 100644 --- a/Documentation/criu.txt +++ b/Documentation/criu.txt @@ -1,9 +1,6 @@ CRIU(8) ======= -:doctype: manpage -:man source: criu -:man version: 0.0.3 -:man manual: CRIU Manual +include::footer.txt[] NAME ----