summaryrefslogtreecommitdiffstats
path: root/0001-Makefile-drive-asciidoc-directly-for-HTML-output.patch
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2018-06-15 23:11:50 -0400
committerTodd Zullinger <tmz@pobox.com>2018-06-16 22:36:06 -0400
commitbd1a10187c7885064d6af691c58f429f0fbd7f2c (patch)
tree8ff6b68af8f132ac531af3c4924c67d634905119 /0001-Makefile-drive-asciidoc-directly-for-HTML-output.patch
parent70a14e8b3690d0a6d000c502cad6b38b3c9af433 (diff)
downloadcgit_EL6-bd1a10187c7885064d6af691c58f429f0fbd7f2c.tar.gz
fix parallel make issues in docs
Diffstat (limited to '0001-Makefile-drive-asciidoc-directly-for-HTML-output.patch')
-rw-r--r--0001-Makefile-drive-asciidoc-directly-for-HTML-output.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/0001-Makefile-drive-asciidoc-directly-for-HTML-output.patch b/0001-Makefile-drive-asciidoc-directly-for-HTML-output.patch
new file mode 100644
index 0000000..ed8e67f
--- /dev/null
+++ b/0001-Makefile-drive-asciidoc-directly-for-HTML-output.patch
@@ -0,0 +1,61 @@
+From 717418aab9314931fcfb3dfd7d31000321d854b1 Mon Sep 17 00:00:00 2001
+From: John Keeping <john@keeping.me.uk>
+Date: Sat, 16 Jun 2018 13:11:09 +0100
+Subject: [PATCH] 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>
+---
+ Makefile | 9 ++++++++-
+ cgit-doc.css | 3 ---
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+ delete mode 100644 cgit-doc.css
+
+diff --git a/Makefile b/Makefile
+index 1ab2905..a678a14 100644
+--- a/Makefile
++++ b/Makefile
+@@ -24,6 +24,12 @@ DOC_MAN5 = $(patsubst %.txt,%,$(MAN5_TXT))
+ DOC_HTML = $(patsubst %.txt,%.html,$(MAN_TXT))
+ DOC_PDF = $(patsubst %.txt,%.pdf,$(MAN_TXT))
+
++ASCIIDOC = asciidoc
++ASCIIDOC_EXTRA =
++ASCIIDOC_HTML = xhtml11
++ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA)
++TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
++
+ # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.)
+ # do not support the 'size specifiers' introduced by C99, namely ll, hh,
+ # j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t).
+@@ -134,7 +140,8 @@ doc-pdf: $(DOC_PDF)
+ a2x -f manpage $<
+
+ $(DOC_HTML): %.html : %.txt
+- a2x -f xhtml --stylesheet=cgit-doc.css $<
++ $(TXT_TO_HTML) -o $@+ $< && \
++ mv $@+ $@
+
+ $(DOC_PDF): %.pdf : %.txt
+ a2x -f pdf cgitrc.5.txt
+diff --git a/cgit-doc.css b/cgit-doc.css
+deleted file mode 100644
+index 5a399b6..0000000
+--- a/cgit-doc.css
++++ /dev/null
+@@ -1,3 +0,0 @@
+-div.variablelist dt {
+- margin-top: 1em;
+-}
+--
+2.18.0.rc2
+