Makefile
changeset 1092 639665016a27
parent 1079 ef0805397b5b
child 1103 53b2adcc631e
equal deleted inserted replaced
1037:49735af70121 1092:639665016a27
    32 
    32 
    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 HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) $(HTML_DIR)/index.html $(HTML_DIR)/index-frame.html
    37 RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES))
       
    38 HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) \
       
    39         $(HTML_DIR)/index.html $(HTML_DIR)/frame.html $(HTML_DIR)/frame-index.html
    38 TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES))
    40 TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES))
    39 
    41 
    40 CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
    42 CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
    41 
    43 
    42 DIRS := $(HTML_DIR)
    44 DIRS := $(HTML_DIR)
    51 html: $(HTML_FILES) $(TXT__FILES)
    53 html: $(HTML_FILES) $(TXT__FILES)
    52 
    54 
    53 $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
    55 $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
    54 	$(RST2HTML) --stylesheet=rst.css $*.rst $@
    56 	$(RST2HTML) --stylesheet=rst.css $*.rst $@
    55 
    57 
    56 $(HTML_DIR)/index.html: index.sh $(filter-out $(HTML_DIR)/index.html,$(HTML_FILES)) | $(HTML_DIR)
    58 $(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
    57 	./index.sh frame >$@
    59 	./index.sh frame >$@
       
    60 
       
    61 $(HTML_DIR)/index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
       
    62 	./index.sh html >$@
    58 
    63 
    59 $(HTML_DIR)/%.html: %.html | $(HTML_DIR)
    64 $(HTML_DIR)/%.html: %.html | $(HTML_DIR)
    60 	cp $< $@
    65 	cp $< $@
    61 
    66 
    62 $(HTML_DIR)/%.txt: %.txt | $(HTML_DIR)
    67 $(HTML_DIR)/%.txt: %.txt | $(HTML_DIR)
    74 
    79 
    75 $(HTML_DIR)/chm.hhc: chm-hhc.sh | $(HTML_DIR)
    80 $(HTML_DIR)/chm.hhc: chm-hhc.sh | $(HTML_DIR)
    76 	./chm-hhc.sh >$@
    81 	./chm-hhc.sh >$@
    77 
    82 
    78 $(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR)
    83 $(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR)
    79 	./index.sh chm >$@
    84 	./index.sh html >$@
    80 
    85 
    81 ################################################################
    86 ################################################################
    82 # Init targets.
    87 # Init targets.
    83 
    88 
    84 $(DIRS):
    89 $(DIRS):