Makefile
changeset 83 41a9c64f3fb7
parent 82 79761f22308d
child 84 898facea8832
--- a/Makefile	Sat Aug 13 22:32:42 2016 +0300
+++ b/Makefile	Tue Aug 23 22:40:02 2016 +0300
@@ -44,8 +44,7 @@
 
 HTML_DIR := tips-html
 RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES))
-HTML_FILES := $(RST_HTML_FILES) \
-        $(HTML_DIR)/index.html $(HTML_DIR)/iframe.html
+HTML_FILES := $(RST_HTML_FILES)
 
 CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
 
@@ -105,29 +104,9 @@
 $(HTML_DIR)/%.html: %.rst www/rst.css www/rst-multi.css $(HTML_DIR)/rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR)
 	$(RST2HTML) $(RST_FLAGS) --stylesheet=www/rst.css,www/rst-multi.css --template=$(HTML_DIR)/rst.tmpl $*.rst $@
 
-$(HTML_DIR)/iframe.html: $(RST_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
-	{ \
-echo '<html><head>'; \
-echo '<meta charset="utf-8">'; \
-echo '<style>'; \
-echo 'a { text-decoration: none; color: hsl(240, 100%, 50%); }'; \
-echo 'a:hover { opacity: .5; }'; \
-echo '</style></head><body>'; \
-echo '<ul style="padding-left: 1em;">'; \
-for f in $(sort $(RST_FILES)); do \
-  n=$${f%.rst}; \
-  printf '<li><a target="_parent" href="%s.html">%s</a></li>\n' $$n $$n; \
-done; \
-echo '</ul>'; \
-echo '</body></html>'; \
-} >$@
-
 $(HTML_DIR)/rst.tmpl: www/rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR)
 	sed -e "s|{date}|$$(date +%F)|" -e "s|{rev}|$$(hg id -i)|"  <$< >$@
 
-$(HTML_DIR)/index.html: $(HTML_DIR)/README.html $(MAKEFILE_LIST) | $(HTML_DIR)
-	cp $< $@
-
 .PHONY: chm
 chm: html $(CHM_FILES) $(HTML_DIR)/iframe.html
 	cd $(HTML_DIR); for file in *.html; do sed -i '/<\?xml.*\?>/d' $$file; done
@@ -159,7 +138,7 @@
 	{ \
 echo '<?xml version="1.0" encoding="UTF-8"?>'; \
 echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; \
-for f in *.rst iframe; do \
+for f in $(RST_FILES); do \
   echo '<url>'; \
   echo "  <loc>http://$(WWW_SRV_NAME)/$${f%.rst}.html</loc>"; \
   echo '  <changefreq>weekly</changefreq>'; \