make: allow controlling asciidoc implementation via variables

ASCIIDOC and ASCIIDOC_MAN have been added, which default to the
(Python-based) reference implementation, but may be changed to
asciidoctor simply.

The manpages have been modified to use single-line section headings
for AsciiDoctor compatibility.
This commit is contained in:
Mike Swanson 2019-09-12 10:59:47 -07:00
parent 14280d32e2
commit db2d48a8ce
3 changed files with 11 additions and 13 deletions

View file

@ -2,6 +2,8 @@
VERSION=$(shell git describe --abbrev=8 --dirty 2>/dev/null || echo 0.11.3)
WADS=wads
ASCIIDOC=asciidoc
ASCIIDOC_MAN=a2x -f manpage
CPP=scripts/simplecpp
DEUTEX=deutex
DEUTEX_BASIC_ARGS=-v0 -rate accept
@ -71,7 +73,7 @@ $(FREEDOOM2): wadinfo_phase2.txt subdirs
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_phase2.txt $@
%.html: %.adoc
TZ=UTC asciidoc $<
TZ=UTC $(ASCIIDOC) $<
doc: $(patsubst %.adoc,%.html,$(wildcard *.adoc))
@ -265,7 +267,7 @@ fix-map-names:
scripts/fix-map-names levels
%.6:
$(MAKE) -C dist $@
$(MAKE) ASCIIDOC_MAN="$(ASCIIDOC_MAN)" -C dist $@
%.png:
$(MAKE) -C dist $@