From baf429f17d664bbc6d141c13ce6ed52091803c3b Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 27 Sep 2018 00:22:59 +0200 Subject: [PATCH] man: Add asciidoc configuration file This adds a short command to link to other man pages Signed-off-by: Michael Tremer --- Makefile.am | 12 ++++++++---- man/asciidoc.conf | 12 ++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 man/asciidoc.conf diff --git a/Makefile.am b/Makefile.am index c4f8b453..ebf3be7a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -508,14 +508,18 @@ XSLTPROC_COMMAND_MAN = \ $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< -man/%.xml: man/%.txt - $(AM_V_ASCIIDOC)$(ASCIIDOC) -d manpage -b docbook -o $@ $< +man/%.xml: man/%.txt man/asciidoc.conf + $(AM_V_ASCIIDOC)$(ASCIIDOC) \ + -f man/asciidoc.conf \ + -d manpage -b docbook -o $@ $< man/%.8: man/%.xml $(XSLTPROC_COMMAND_MAN) -man/%.html: man/%.txt - $(AM_V_ASCIIDOC)$(ASCIIDOC) -b html5 -a icons -a theme=flask -o $@ $< +man/%.html: man/%.txt man/asciidoc.conf + $(AM_V_ASCIIDOC)$(ASCIIDOC) \ + -f man/asciidoc.conf \ + -b html5 -a icons -a theme=flask -o $@ $< # ------------------------------------------------------------------------------ diff --git a/man/asciidoc.conf b/man/asciidoc.conf new file mode 100644 index 00000000..243f81f3 --- /dev/null +++ b/man/asciidoc.conf @@ -0,0 +1,12 @@ +ifdef::backend-docbook[] +[link-inlinemacro] +{0%{target}} +{0#} +{0#{target}{0}} +{0#} +endif::backend-docbook[] + +ifdef::backend-html5[] +[link-inlinemacro] +{target}{0?({0})} +endif::backend-html5[] -- 2.39.2