man: Add test page for asciidoc
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 26 Sep 2018 20:42:36 +0000 (22:42 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 31 Mar 2019 12:47:04 +0000 (14:47 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
man/.gitignore
man/test.txt [new file with mode: 0644]

index ce587b7..d01e223 100644 (file)
@@ -89,6 +89,10 @@ INSTALL_EXEC_HOOKS += \
 
 # ------------------------------------------------------------------------------
 
+AM_V_ASCIIDOC   = $(AM_V_ASCIIDOC_$(V))
+AM_V_ASCIIDOC_  = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY))
+AM_V_ASCIIDOC_0 = @echo "  ASCIIDOC" $@;
+
 AM_V_DOWNLOAD   = $(AM_V_DOWNLOAD_$(V))
 AM_V_DOWNLOAD_  = $(AM_V_DOWNLOAD_$(AM_DEFAULT_VERBOSITY))
 AM_V_DOWNLOAD_0 = @echo "  LOAD    " $@;
@@ -449,6 +453,7 @@ INSTALL_DIRS += \
 # ------------------------------------------------------------------------------
 
 MANPAGES = \
+       man/test.8 \
        man/firewall-settings.8 \
        man/network.8 \
        man/network-color.8 \
@@ -472,8 +477,8 @@ MANPAGES = \
        man/network-zone-pppoe.8 \
        man/network-zone-wireless.8
 
-MANPAGES_XML  = $(patsubst %.8,%.xml,$(MANPAGES))
-MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
+MANPAGES_TXT  = $(patsubst %.8,%.txt,$(MANPAGES))
+MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES))
 
 .PHONY: man
 man: $(MANPAGES) $(MANPAGES_HTML)
@@ -489,7 +494,7 @@ CLEANFILES += \
        $(MANPAGES_HTML)
 
 EXTRA_DIST += \
-       $(MANPAGES_XML) \
+       $(MANPAGES_TXT) \
        man/custom-html.xsl
 
 XSLTPROC_FLAGS = \
@@ -507,6 +512,9 @@ XSLTPROC_COMMAND_MAN = \
 XSLTPROC_COMMAND_HTML = \
        $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
 
+man/%.xml: man/%.txt
+       $(AM_V_ASCIIDOC)$(ASCIIDOC) -d manpage -b docbook -o $@ $<
+
 man/%.8: man/%.xml
        $(XSLTPROC_COMMAND_MAN)
 
index 237049a..f891826 100644 (file)
@@ -1,2 +1,3 @@
 /*.[13578]
 /*.html
+/*.xml
diff --git a/man/test.txt b/man/test.txt
new file mode 100644 (file)
index 0000000..4c9d35d
--- /dev/null
@@ -0,0 +1,11 @@
+test(8)
+=======
+
+NAME
+----
+test - Hello World!
+
+SYNOPSIS
+--------
+[verse]
+'hello world' [<options>] <file>