From c62955e1ffb10b8eb723b22ddd9ed22991ce33b4 Mon Sep 17 00:00:00 2001 From: Pavel Charvat Date: Sun, 10 Aug 2014 14:15:03 +0000 Subject: [PATCH] Doc: Generalized makefile rules for all categories of manpages. --- build/Makebottom | 7 ++++--- ucw/doc/Makefile | 4 ++-- ucw/doc/{ucw-tableprinter.txt => ucw-tableprinter.1.txt} | 0 3 files changed, 6 insertions(+), 5 deletions(-) rename ucw/doc/{ucw-tableprinter.txt => ucw-tableprinter.1.txt} (100%) diff --git a/build/Makebottom b/build/Makebottom index 7e2fea64..bb8c67d0 100644 --- a/build/Makebottom +++ b/build/Makebottom @@ -210,10 +210,11 @@ $(o)/%.html: $(o)/%.txt $(BUILDSYS)/asciidoc.conf $(BUILDSYS)/asciidoc-xhtml.con $(Q)asciidoc -e -f $(BUILDSYS)/asciidoc.conf -f $(BUILDSYS)/asciidoc-xhtml.conf -f $(HOST_PREFIX)/etc/asciidoc/asciidoc.conf -f $(HOST_PREFIX)/etc/asciidoc/xhtml11.conf $< $(Q)$(call symlink,$@,run/$(DOCDIR)/$(DOC_MODULE)) -$(MANPAGES): $(o)/%.1: $(s)/%.txt run/$(DOCDIR)/man/man1/.dir-stamp - $(M)"DOC-MANPAGE $<" +$(MANPAGES): $(o)/%: $(s)/%.txt + $(M)"DOC-MAN $<" $(Q)a2x -d manpage -f manpage -D $(dir $@) $< - $(Q)$(call symlink,$@,run/$(DOCDIR)/man/man1) + $(Q)mkdir -p run/$(DOCDIR)/man/man$(subst .,,$(suffix $@)) + $(Q)$(call symlink,$@,run/$(DOCDIR)/man/man$(subst .,,$(suffix $@))) # In reality, we do not depend on the .txt files, but on the corresponding .deflist's. # However, the Makefile language cannot express that doc-extract generates both .txt diff --git a/ucw/doc/Makefile b/ucw/doc/Makefile index d5420930..6cd6ce49 100644 --- a/ucw/doc/Makefile +++ b/ucw/doc/Makefile @@ -6,8 +6,8 @@ UCW_DOCS=basics log fastbuf index config configure install basecode hash docsys UCW_INDEX=$(o)/ucw/doc/def_index.html UCW_DOCS_HTML=$(addprefix $(o)/ucw/doc/,$(addsuffix .html,$(UCW_DOCS))) -UCW_MANPAGES=ucw-tableprinter -UCW_MANPAGES_NROFF=$(addprefix $(o)/ucw/doc/,$(addsuffix .1,$(UCW_MANPAGES))) +UCW_MANPAGES=ucw-tableprinter.1 +UCW_MANPAGES_NROFF=$(addprefix $(o)/ucw/doc/,$(UCW_MANPAGES)) MANPAGES+=$(UCW_MANPAGES_NROFF) $(UCW_INDEX): DOC_HEAD=$(s)/ucw/doc/def_index.txt diff --git a/ucw/doc/ucw-tableprinter.txt b/ucw/doc/ucw-tableprinter.1.txt similarity index 100% rename from ucw/doc/ucw-tableprinter.txt rename to ucw/doc/ucw-tableprinter.1.txt -- 2.39.2