diff options
author | John Keeping | 2018-06-16 13:11:09 +0100 |
---|---|---|
committer | John Keeping | 2018-06-16 14:06:03 +0100 |
commit | 48f175083ae9ee03aa5ed7cddfbf74edf6d75774 (patch) | |
tree | 700136d8739def1eed90bc69d768e8aa2ec4a641 /Makefile | |
parent | 33414d7869aa55aaccd45cdb82268d454cb79863 (diff) | |
download | cgit-48f175083ae9ee03aa5ed7cddfbf74edf6d75774.tar.gz cgit-48f175083ae9ee03aa5ed7cddfbf74edf6d75774.tar.bz2 cgit-48f175083ae9ee03aa5ed7cddfbf74edf6d75774.zip |
Makefile: drive asciidoc directly for HTML output
This is mostly taken from Git's doc/Makefile, although simplified for
our use. The output now uses Asciidoc's default CSS which I think looks
a bit nicer than the Docbook formatting; as a result of this we no
longer need our custom .css file.
A side effect of this change is that temporary files generated from the
HTML output no longer conflict with the manpage output format (because
any temporary HTML output files use names derived from the output
filename which includes .html).
Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -24,6 +24,12 @@ DOC_MAN5 = $(patsubst %.txt,%,$(MAN5_TXT)) | |||
24 | DOC_HTML = $(patsubst %.txt,%.html,$(MAN_TXT)) | 24 | DOC_HTML = $(patsubst %.txt,%.html,$(MAN_TXT)) |
25 | DOC_PDF = $(patsubst %.txt,%.pdf,$(MAN_TXT)) | 25 | DOC_PDF = $(patsubst %.txt,%.pdf,$(MAN_TXT)) |
26 | 26 | ||
27 | ASCIIDOC = asciidoc | ||
28 | ASCIIDOC_EXTRA = | ||
29 | ASCIIDOC_HTML = xhtml11 | ||
30 | ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) | ||
31 | TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML) | ||
32 | |||
27 | # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.) | 33 | # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.) |
28 | # do not support the 'size specifiers' introduced by C99, namely ll, hh, | 34 | # do not support the 'size specifiers' introduced by C99, namely ll, hh, |
29 | # j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t). | 35 | # j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t). |
@@ -134,7 +140,8 @@ doc-pdf: $(DOC_PDF) | |||
134 | a2x -f manpage $< | 140 | a2x -f manpage $< |
135 | 141 | ||
136 | $(DOC_HTML): %.html : %.txt | 142 | $(DOC_HTML): %.html : %.txt |
137 | a2x -f xhtml --stylesheet=cgit-doc.css --xsltproc-opts="--param generate.consistent.ids 1" $< | 143 | $(TXT_TO_HTML) -o $@+ $< && \ |
144 | mv $@+ $@ | ||
138 | 145 | ||
139 | $(DOC_PDF): %.pdf : %.txt | 146 | $(DOC_PDF): %.pdf : %.txt |
140 | a2x -f pdf cgitrc.5.txt | 147 | a2x -f pdf cgitrc.5.txt |