Makefile
changeset 9 f40912333875
parent 8 d07c0496cdfe
child 10 992d7c458bbb
equal deleted inserted replaced
8:d07c0496cdfe 9:f40912333875
    33 RST_FILES := $(wildcard *.rst)
    33 RST_FILES := $(wildcard *.rst)
    34 TXT_FILES := $(wildcard *.txt)
    34 TXT_FILES := $(wildcard *.txt)
    35 
    35 
    36 HTML_DIR := tips-html
    36 HTML_DIR := tips-html
    37 RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES))
    37 RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES))
    38 HTML_FILES := $(RST_HTML_FILES) $(HTML_DIR)/index.html $(HTML_DIR)/index-frame.html
    38 HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) \
       
    39         $(HTML_DIR)/index.html $(HTML_DIR)/frame.html $(HTML_DIR)/frame-index.html
    39 TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES))
    40 TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES))
    40 
    41 
    41 CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
    42 CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
    42 
    43 
    43 DIRS := $(HTML_DIR)
    44 DIRS := $(HTML_DIR)
    52 html: $(HTML_FILES) $(TXT__FILES)
    53 html: $(HTML_FILES) $(TXT__FILES)
    53 
    54 
    54 $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
    55 $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
    55 	$(RST2HTML) --stylesheet=rst.css $*.rst $@
    56 	$(RST2HTML) --stylesheet=rst.css $*.rst $@
    56 
    57 
       
    58 $(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
       
    59 	./index.sh frame >$@
       
    60 
    57 $(HTML_DIR)/index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
    61 $(HTML_DIR)/index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
    58 	./index.sh frame >$@
    62 	./index.sh html >$@
    59 
    63 
    60 $(HTML_DIR)/%.html: %.html | $(HTML_DIR)
    64 $(HTML_DIR)/%.html: %.html | $(HTML_DIR)
    61 	cp $< $@
    65 	cp $< $@
    62 
    66 
    63 $(HTML_DIR)/%.txt: %.txt | $(HTML_DIR)
    67 $(HTML_DIR)/%.txt: %.txt | $(HTML_DIR)
    75 
    79 
    76 $(HTML_DIR)/chm.hhc: chm-hhc.sh | $(HTML_DIR)
    80 $(HTML_DIR)/chm.hhc: chm-hhc.sh | $(HTML_DIR)
    77 	./chm-hhc.sh >$@
    81 	./chm-hhc.sh >$@
    78 
    82 
    79 $(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR)
    83 $(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR)
    80 	./index.sh chm >$@
    84 	./index.sh html >$@
    81 
    85 
    82 ################################################################
    86 ################################################################
    83 # Init targets.
    87 # Init targets.
    84 
    88 
    85 $(DIRS):
    89 $(DIRS):