# HG changeset patch # User Oleksandr Gavenko # Date 1311160215 -10800 # Node ID fd4cd9134e53a583e2bd3ac24115b85fc5951cf5 # Parent 6ee132e4cd5f3ff16c0d5088fd314d429cec4b69 Add chm output format. diff -r 6ee132e4cd5f -r fd4cd9134e53 Makefile --- a/Makefile Wed Jul 20 12:37:29 2011 +0300 +++ b/Makefile Wed Jul 20 14:10:15 2011 +0300 @@ -20,6 +20,8 @@ HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) $(HTML_DIR)/index.html $(HTML_DIR)/index-frame.html TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES)) +CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp) + DIRS := $(HTML_DIR) ################################################################ @@ -35,7 +37,7 @@ rst2html.py --stylesheet=rst.css $*.rst $@ $(HTML_DIR)/index.html: index.sh | $(HTML_DIR) - ./index.sh >$@ + ./index.sh frame >$@ $(HTML_DIR)/%.html: %.html | $(HTML_DIR) cp $< $@ @@ -43,6 +45,22 @@ $(HTML_DIR)/%.txt: %.txt | $(HTML_DIR) cp $< $@ +.PHONY: chm +chm: html $(CHM_FILES) $(HTML_DIR)/index-chm.html + cd $(HTML_DIR); for file in *.html; do sed -i '/<\?xml.*\?>/d' $$file; done + +$(HTML_DIR)/%.stp: %.stp | $(HTML_DIR) + cp $< $@ + +$(HTML_DIR)/chm.hhp: chm-hhp.sh | $(HTML_DIR) + ./chm-hhp.sh >$@ + +$(HTML_DIR)/chm.hhc: chm-hhc.sh | $(HTML_DIR) + ./chm-hhc.sh >$@ + +$(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR) + ./index.sh chm >$@ + ################################################################ # Init targets.