Generate single HTML build.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2016 13:12:06 +0200
changeset 72 6cc2c19c8995
parent 71 ca442493062e
child 73 7ed63a934571
Generate single HTML build.
Makefile
--- a/Makefile	Mon Feb 22 13:02:27 2016 +0200
+++ b/Makefile	Mon Feb 22 13:12:06 2016 +0200
@@ -98,8 +98,8 @@
 .PHONY: html
 html: $(HTML_FILES)
 
-$(HTML_DIR)/%.html: %.rst HEADER.rst rst.css rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR)
-	$(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css --template=rst.tmpl $*.rst $@
+$(HTML_DIR)/%.html: %.rst HEADER.rst rst.css rst-multi.css rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR)
+	$(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css,rst-multi.css --template=rst.tmpl $*.rst $@
 
 $(HTML_DIR)/iframe.html: $(RST_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
 	{ \
@@ -120,10 +120,6 @@
 
 HEADER.rst: $(MAKEFILE_LIST)
 	{ \
-echo '.. raw:: html'; \
-echo; \
-echo '  <div id="sidebar"><iframe src="iframe.html"></iframe></div>'; \
-echo; \
 echo '.. _About: README.html'; \
 echo '.. _`Contacts`: http://resume.defun.work/'; \
 echo '.. _`Oleksandr Gavenko`: http://resume.defun.work/'; \
@@ -160,6 +156,20 @@
 $(HTML_DIR)/chm.hhc: chm-hhc.sh $(MAKEFILE_LIST) | $(HTML_DIR)
 	./chm-hhc.sh >$@
 
+.PHONY: single-html
+single-html: $(HTML_DIR)/single.html
+
+$(HTML_DIR)/single.html: $(HTML_DIR)/single.rest rst.css rst-single.css $(RST_FILES)
+	$(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css,rst-single.css $(HTML_DIR)/single.rest $@
+
+$(HTML_DIR)/single.rest: $(RST_FILES) $(MAKEFILE_LIST)
+	{ \
+echo ".. contents::"; \
+echo "   :local:"; \
+echo; \
+for f in *.rst; do echo ".. include:: ../$$f"; done; \
+} >$@
+
 ################################################################
 # Init targets.