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 $@

3
dist/Makefile vendored
View file

@ -1,10 +1,11 @@
ASCIIDOC_MAN=a2x -f manpage
.SUFFIXES: .adoc .6
all: freedm.6 freedoom1.6 freedoom2.6 freedm.png freedoom1.png freedoom2.png
%.6: freedoom.adoc
sed -e s/freedoom/$*/ $< > $*.adoc
a2x -f manpage $*.adoc
$(ASCIIDOC_MAN) $*.adoc
freedm.png: ../graphics/titlepic/freedm_title2.png
./pillow-resize $< $@ 64 64

15
dist/freedoom.adoc vendored
View file

@ -1,17 +1,13 @@
freedoom(6)
===========
= freedoom(6)
:doctype: manpage
NAME
----
== NAME
freedoom - Automatically launch Freedoom with an engine
SYNOPSIS
--------
== SYNOPSIS
*freedoom* [_-p_ _DOOMPORT_|_--_] [_ARGS_]
DESCRIPTION
-----------
== DESCRIPTION
Freedoom is a project to create a complete free-content game based on
the _Doom_ engine (often called “source ports” or simply “ports”),
which itself is free software. In addition, it maintains
@ -36,8 +32,7 @@ as the first option, will be passed to the engine being called. This
can allow you to use options such as _-file_ to load mods or anything
else available with the engine of choice.
COPYRIGHT
---------
== COPYRIGHT
Freedoom is licensed under a permissive three-clause BSD license. For
details, see the source tree or the +COPYING+/+COPYRIGHT+ file that
was installed by distribution packaging.