about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorTodd Zullinger2018-02-20 20:36:03 -0500
committerJason A. Donenfeld2018-02-21 03:12:57 +0100
commit33414d7869aa55aaccd45cdb82268d454cb79863 (patch)
tree2be5d6faa22089f8d1b0c1d7e14f283550130370 /Makefile
parentcgit: prepare repo before error pages (diff)
downloadcgit-33414d7869aa55aaccd45cdb82268d454cb79863.tar.gz
cgit-33414d7869aa55aaccd45cdb82268d454cb79863.zip
doc: use consistent id's when generating html files
The html documentation is generated using a2x which calls docbook tools
to do the work.  The generate.consistent.ids parameter ensures that when
the docbook stylesheet assigns an id value to an output element it is
consistent as long as the document structure has not changed.

Having consistent html files reduces frivolous changes between builds.
Distributions can more easily deploy multiple architecture builds and
compare changes between package versions.  End-users avoid needless
changes in files deployed or backed up.

The generate.consistent.ids parameter was added in docbook-xsl-1.77.0.
Older versions gracefully ignore the parameter, so we can pass the
parameter unconditionally.  Most distributions contain docbook-xsl newer
than 1.77.0.  This includes Fedora, Debian, Ubuntu, and RHEL/CentOS 7.
RHEL/CentOS 6 and Debian Wheezy (old stable) ship with an older version,
unsurprisingly.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile index 8321ecc..687069f 100644 --- a/Makefile +++ b/Makefile
@@ -134,7 +134,7 @@ doc-pdf: $(DOC_PDF)
134 a2x -f manpage $< 134 a2x -f manpage $<
135 135
136$(DOC_HTML): %.html : %.txt 136$(DOC_HTML): %.html : %.txt
137 a2x -f xhtml --stylesheet=cgit-doc.css $< 137 a2x -f xhtml --stylesheet=cgit-doc.css --xsltproc-opts="--param generate.consistent.ids 1" $<
138 138
139$(DOC_PDF): %.pdf : %.txt 139$(DOC_PDF): %.pdf : %.txt
140 a2x -f pdf cgitrc.5.txt 140 a2x -f pdf cgitrc.5.txt