Makefile
changeset 7 6a41484fd3a4
parent 5 3fce7236e888
child 8 d07c0496cdfe
equal deleted inserted replaced
6:24914893fd3c 7:6a41484fd3a4
     7 MAKEFLAGS += -R
     7 MAKEFLAGS += -R
     8 # Disable built in suffix rules.
     8 # Disable built in suffix rules.
     9 .SUFFIXES:
     9 .SUFFIXES:
    10 # Default target.
    10 # Default target.
    11 .DEFAULT_GOAL = all
    11 .DEFAULT_GOAL = all
       
    12 
       
    13 ################################################################
       
    14 # Platform definition.
       
    15 
       
    16 host_os := linux
       
    17 ifneq '' '$(WINDIR)'
       
    18   host_os := cygwin
       
    19 endif
       
    20 target_os := $(host_os)
       
    21 
       
    22 ################################################################
       
    23 # Build tool definition/switches.
       
    24 
       
    25 RST2HTML = rst2html
       
    26 ifeq '$(host_os)' 'cygwin'
       
    27   RST2HTML = rst2html.py
       
    28 endif
    12 
    29 
    13 ################################################################
    30 ################################################################
    14 # Proj dirs/files.
    31 # Proj dirs/files.
    15 
    32 
    16 RST_FILES := $(wildcard *.rst)
    33 RST_FILES := $(wildcard *.rst)
    32 
    49 
    33 .PHONY: html
    50 .PHONY: html
    34 html: $(HTML_FILES) $(TXT__FILES)
    51 html: $(HTML_FILES) $(TXT__FILES)
    35 
    52 
    36 $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
    53 $(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
    37 	rst2html.py --stylesheet=rst.css $*.rst $@
    54 	$(RST2HTML) --stylesheet=rst.css $*.rst $@
    38 
    55 
    39 $(HTML_DIR)/index.html: index.sh $(filter-out $(HTML_DIR)/index.html,$(HTML_FILES)) | $(HTML_DIR)
    56 $(HTML_DIR)/index.html: index.sh $(filter-out $(HTML_DIR)/index.html,$(HTML_FILES)) | $(HTML_DIR)
    40 	./index.sh frame >$@
    57 	./index.sh frame >$@
    41 
    58 
    42 $(HTML_DIR)/%.html: %.html | $(HTML_DIR)
    59 $(HTML_DIR)/%.html: %.html | $(HTML_DIR)