diff doc/manual/Makefile.generic @ 71:edc2afc17aa0

- more html doc work
author cslag
date Mon, 07 Mar 2016 01:45:36 +0100
parents 33c333ec5ad2
children 2b89d8497aad
line wrap: on
line diff
--- a/doc/manual/Makefile.generic	Sun Mar 06 23:30:44 2016 +0100
+++ b/doc/manual/Makefile.generic	Mon Mar 07 01:45:36 2016 +0100
@@ -6,7 +6,10 @@
 	# run twice for toc on some tex installs
 	cd "${VPATH}" && for i in 1 2; do pdflatex -output-directory="${PWD}" manual.tex; done
 
-html/manual.html: manual_tex4ht.cfg sources
+manual_website_menu.html:
+	curl -s http://www.dyncall.org | sed '/<body>/,/<div class="mainDiv">/p;d' | sed 's/^.*<body>//;s/<div class="mainDiv">.*$$//' > $@
+
+html/manual.html: manual_tex4ht.cfg manual_website_menu.html sources
 	# Create tex4ht.env from default one, but with better bitmaps
 	cd "${VPATH}" &&  ( \
 		cp $$(dirname $$(which tex4ht))/../share/texmf-dist/tex4ht/base/unix/tex4ht.env ./custom_tex4ht.env; \
@@ -15,6 +18,10 @@
 		htlatex manual.tex manual_tex4ht " -cunihtf -e./custom_tex4ht.env -utf8" -d./html/; \
 		rm ./html/*.css; \
 	)
+	# Inject menu into output html pages.
+	for f in "${VPATH}/html/"*.html; do \
+		sed -i '' '/^<body>/r manual_website_menu.html' "$$f"; \
+	done
 
 pdf: manual.pdf