Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-01-16 19:14:37 +0300
committerAndrei Vagin <avagin@gmail.com>2019-04-21 06:25:26 +0300
commit0493724c8eda31af84ddbb1817b2a99cccee51e3 (patch)
tree53afb3f7cd7210074a97747be0bb96b22295dc66 /test/others/bers
parentf73e5d181ba111098ccc59570122740e0b75de87 (diff)
Documentation: Allow to use asciidoctor for formatting man pages
Since asciidoc is based on Phyton 2, we want to move to alternative, and a promising one is asciidoctor. This patch allows to use asciidoctor for formatting man pages instead of asiidoc, by passing a make option, USE_ASCIIDOCTOR=yes. Although asciidoctor is almost compatible with asciidoc, it can produce a man page directly from a text file without XML, which is more efficiently. So in asciidoctor mode, we don't require xmlto. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Diffstat (limited to 'test/others/bers')
-rw-r--r--test/others/bers/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/others/bers/Makefile b/test/others/bers/Makefile
index a1d689c35..3034d46e3 100644
--- a/test/others/bers/Makefile
+++ b/test/others/bers/Makefile
@@ -8,8 +8,13 @@ endif
export E Q
+ifneq ($(USE_ASCIIDOCTOR),)
+ASCIIDOC := asciidoctor
+XMLTO :=
+else
ASCIIDOC := asciidoc
XMLTO := xmlto
+endif
SRC += bers.txt
XMLS := $(patsubst %.txt,%.xml,$(SRC))
@@ -17,8 +22,12 @@ MANS := $(patsubst %.txt,%.8,$(SRC))
%.8: %.txt
$(E) " GEN " $@
+ifneq ($(USE_ASCIIDOCTOR),)
+ $(Q) $(ASCIIDOC) -b manpage -d manpage -o $@ $<
+else
$(Q) $(ASCIIDOC) -b docbook -d manpage -o $(patsubst %.8,%.xml,$@) $<
$(Q) $(XMLTO) man --skip-validation $(patsubst %.8,%.xml,$@) 2>/dev/null
+endif
docs: $(MANS)
@true