From c99e7e8abe1e22f504173a976a82e1a72551bdc1 Mon Sep 17 00:00:00 2001
From: Peter Krempa <pkrempa@redhat.com>
Date: Mon, 3 Aug 2020 07:32:29 +0200
Subject: [PATCH] docs: build: Don't include stylesheet in intermediate html
 files generated from RST
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

'docutils' add a stylesheet to the output html file for direct
consumption. Since we use the html files just as an intermediate step
which is post-processed to add our own stylesheet and drop the docutils
one in the process we can ask 'rst2html' to not add any for an
intermediate file with less garbage.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: rpm-build <rpm-build>
---
 docs/Makefile.am | 4 ++--
 docs/Makefile.in | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index 61862c4..4c44504 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -420,11 +420,11 @@ manpages/%.html.in: manpages/%.rst
 	 grep -v '^:Manual ' < $< | \
 	  sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
 	     -e 's|RUNSTATEDIR|$(runstatedir)|g' | \
-	  $(RST2HTML) --strict > $@ || { rm $@ && exit 1; }
+	  $(RST2HTML) --stylesheet= --strict > $@ || { rm $@ && exit 1; }
 
 %.html.in: %.rst
 	$(AM_V_GEN)$(MKDIR_P) `dirname $@` && \
-	  $(RST2HTML) --strict $< > $@ || { rm $@ && exit 1; }
+	  $(RST2HTML) --stylesheet= --strict $< > $@ || { rm $@ && exit 1; }
 
 %.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
 		$(acl_generated)
diff --git a/docs/Makefile.in b/docs/Makefile.in
index 61eac52..1836655 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -1469,11 +1469,11 @@ manpages/%.html.in: manpages/%.rst
 	 grep -v '^:Manual ' < $< | \
 	  sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
 	     -e 's|RUNSTATEDIR|$(runstatedir)|g' | \
-	  $(RST2HTML) --strict > $@ || { rm $@ && exit 1; }
+	  $(RST2HTML) --stylesheet= --strict > $@ || { rm $@ && exit 1; }
 
 %.html.in: %.rst
 	$(AM_V_GEN)$(MKDIR_P) `dirname $@` && \
-	  $(RST2HTML) --strict $< > $@ || { rm $@ && exit 1; }
+	  $(RST2HTML) --stylesheet= --strict $< > $@ || { rm $@ && exit 1; }
 
 %.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
 		$(acl_generated)
-- 
2.27.0

