Makefile
changeset 1092 639665016a27
parent 1079 ef0805397b5b
child 1103 53b2adcc631e
--- a/Makefile	Fri Oct 14 23:48:24 2011 +0300
+++ b/Makefile	Sun Nov 20 20:14:48 2011 +0200
@@ -34,7 +34,9 @@
 TXT_FILES := $(wildcard *.txt)
 
 HTML_DIR := tips-html
-HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) $(HTML_DIR)/index.html $(HTML_DIR)/index-frame.html
+RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES))
+HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) \
+        $(HTML_DIR)/index.html $(HTML_DIR)/frame.html $(HTML_DIR)/frame-index.html
 TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES))
 
 CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
@@ -53,9 +55,12 @@
 $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
 	$(RST2HTML) --stylesheet=rst.css $*.rst $@
 
-$(HTML_DIR)/index.html: index.sh $(filter-out $(HTML_DIR)/index.html,$(HTML_FILES)) | $(HTML_DIR)
+$(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
 	./index.sh frame >$@
 
+$(HTML_DIR)/index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
+	./index.sh html >$@
+
 $(HTML_DIR)/%.html: %.html | $(HTML_DIR)
 	cp $< $@
 
@@ -76,7 +81,7 @@
 	./chm-hhc.sh >$@
 
 $(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR)
-	./index.sh chm >$@
+	./index.sh html >$@
 
 ################################################################
 # Init targets.