summaryrefslogtreecommitdiff
path: root/Documentation/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/Makefile.in')
-rw-r--r--Documentation/Makefile.in29
1 files changed, 19 insertions, 10 deletions
diff --git a/Documentation/Makefile.in b/Documentation/Makefile.in
index bdc3dc3f..64947afb 100644
--- a/Documentation/Makefile.in
+++ b/Documentation/Makefile.in
@@ -46,8 +46,21 @@ man3dir = $(mandir)/man3
man5dir = $(mandir)/man5
man8dir = $(mandir)/man8
+ifeq (@ASCIIDOC_TOOL@,asciidoc)
ASCIIDOC = @ASCIIDOC@
-ASCIIDOC_EXTRA =
+ASCIIDOC_ARGS = -abtrfs_version=$(BTRFS_VERSION) -f asciidoc.conf
+ASCIIDOC_HTML = html
+ASCIIDOC_DOCBOOK = docbook
+ASCIIDOC_DEPS = asciidoc.conf
+endif
+ifeq (@ASCIIDOC_TOOL@,asciidoctor)
+ASCIIDOC = @ASCIIDOCTOR@
+ASCIIDOC_ARGS = -abtrfs_version=$(BTRFS_VERSION)
+ASCIIDOC_HTML = xhtml5
+ASCIIDOC_DOCBOOK = docbook45
+ASCIIDOC_DEPS =
+endif
+
MANPAGE_XSL = manpage-normal.xsl
XMLTO = @XMLTO@
XMLTO_EXTRA =
@@ -98,7 +111,7 @@ uninstall:
$(RMDIR) -p --ignore-fail-on-non-empty $(DESTDIR)$(man8dir)
clean:
- $(QUIET_RM)$(RM) -f *.xml *.xml+ *.5 *.5.gz *.8 *.8.gz *.html
+ $(QUIET_RM)$(RM) -f *.xml *.xml+ *.3 *.3.gz *.5 *.5.gz *.8 *.8.gz *.html
%.3.gz : %.3
$(QUIET_GZIP)$(GZIPCMD) -n -c $< > $@
@@ -121,16 +134,12 @@ clean:
$(QUIET_XMLTO)$(RM) -f $@ && \
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
-%.xml : %.asciidoc asciidoc.conf
+%.xml : %.asciidoc $(ASCIIDOC_DEPS)
$(QUIET_ASCIIDOC)$(RM) -f $@+ $@ && \
- $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
- $(ASCIIDOC_EXTRA) -abtrfs_version=$(BTRFS_VERSION) \
- -o $@+ $< && \
+ $(ASCIIDOC) $(ASCIIDOC_ARGS) -b $(ASCIIDOC_DOCBOOK) -d manpage -o $@+ $< && \
$(MV) $@+ $@
-%.html : %.asciidoc asciidoc.conf
+%.html : %.asciidoc $(ASCIIDOC_DEPS)
$(QUIET_ASCIIDOC)$(RM) -f $@+ $@ && \
- $(ASCIIDOC) -b html -d article -f asciidoc.conf \
- $(ASCIIDOC_EXTRA) -abtrfs_version=$(BTRFS_VERSION) \
- -o $@+ $< && \
+ $(ASCIIDOC) $(ASCIIDOC_ARGS) -b $(ASCIIDOC_HTML) -d article -o $@+ $< && \
$(MV) $@+ $@