equal
deleted
inserted
replaced
18 |
18 |
19 HTML_DIR := tips-html |
19 HTML_DIR := tips-html |
20 HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) $(HTML_DIR)/index.html $(HTML_DIR)/index-frame.html |
20 HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) $(HTML_DIR)/index.html $(HTML_DIR)/index-frame.html |
21 TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES)) |
21 TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES)) |
22 |
22 |
|
23 CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp) |
|
24 |
23 DIRS := $(HTML_DIR) |
25 DIRS := $(HTML_DIR) |
24 |
26 |
25 ################################################################ |
27 ################################################################ |
26 # Build targets. |
28 # Build targets. |
27 |
29 |
33 |
35 |
34 $(HTML_DIR)/%.html: %.rst | $(HTML_DIR) |
36 $(HTML_DIR)/%.html: %.rst | $(HTML_DIR) |
35 rst2html.py --stylesheet=rst.css $*.rst $@ |
37 rst2html.py --stylesheet=rst.css $*.rst $@ |
36 |
38 |
37 $(HTML_DIR)/index.html: index.sh | $(HTML_DIR) |
39 $(HTML_DIR)/index.html: index.sh | $(HTML_DIR) |
38 ./index.sh >$@ |
40 ./index.sh frame >$@ |
39 |
41 |
40 $(HTML_DIR)/%.html: %.html | $(HTML_DIR) |
42 $(HTML_DIR)/%.html: %.html | $(HTML_DIR) |
41 cp $< $@ |
43 cp $< $@ |
42 |
44 |
43 $(HTML_DIR)/%.txt: %.txt | $(HTML_DIR) |
45 $(HTML_DIR)/%.txt: %.txt | $(HTML_DIR) |
44 cp $< $@ |
46 cp $< $@ |
|
47 |
|
48 .PHONY: chm |
|
49 chm: html $(CHM_FILES) $(HTML_DIR)/index-chm.html |
|
50 cd $(HTML_DIR); for file in *.html; do sed -i '/<\?xml.*\?>/d' $$file; done |
|
51 |
|
52 $(HTML_DIR)/%.stp: %.stp | $(HTML_DIR) |
|
53 cp $< $@ |
|
54 |
|
55 $(HTML_DIR)/chm.hhp: chm-hhp.sh | $(HTML_DIR) |
|
56 ./chm-hhp.sh >$@ |
|
57 |
|
58 $(HTML_DIR)/chm.hhc: chm-hhc.sh | $(HTML_DIR) |
|
59 ./chm-hhc.sh >$@ |
|
60 |
|
61 $(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR) |
|
62 ./index.sh chm >$@ |
45 |
63 |
46 ################################################################ |
64 ################################################################ |
47 # Init targets. |
65 # Init targets. |
48 |
66 |
49 $(DIRS): |
67 $(DIRS): |