# HG changeset patch # User Oleksandr Gavenko # Date 1326403080 -7200 # Node ID 4cfb94e11b5d4a39c7f50565246988b28ef0c40c # Parent 092b25d032afecdbfad9d65e4b4bab51ada1138c Add warning flags to 'rst2html'. diff -r 092b25d032af -r 4cfb94e11b5d Makefile --- a/Makefile Thu Jan 12 23:04:59 2012 +0200 +++ b/Makefile Thu Jan 12 23:18:00 2012 +0200 @@ -53,16 +53,25 @@ ifneq '' '$(WINDIR)' # Probably under Windows. host_os = windows + ifneq '' '$(wildcard /etc/setup/*cygwin*)' + # Probably under Cygwin. + host_os = cygwin + endif endif endif ################################################################ -# Build tool definition/switches. +# Build tools definition/switches. + +RST_WARNING_FLAGS := --halt warning +RST_FLAGS := --strip-comments +RST_FLAGS += $(RST_WARNING_FLAGS) -RST2HTML = rst2html -ifeq '$(host_os)' 'windows' - RST2HTML = rst2html.py +RST2HTML := rst2html +ifeq '$(host_os)' 'cygwin' + RST2HTML := rst2html.py endif +RST2HTML_FLAGS := $(RST_FLAGS) ################################################################ # Install paths. @@ -80,6 +89,8 @@ ################################################################ # Project dirs/files. +BUILD_SCRIPT := $(first-word $(MAKEFILE_LIST)) + C5_FILES := $(wildcard *.dict-c5) DICT_FILES := $(C5_FILES:.dict-c5=.dict) DICTDZ_FILES := $(C5_FILES:.dict-c5=.dict.dz) @@ -174,7 +185,7 @@ html: $(HTML_FILES) $(HTML_FILES): %.html: %.rst - $(RST2HTML) --stylesheet=rst.css $*.rst $@ + $(RST2HTML) $(RST2HTML_FLAGS) --stylesheet=rst.css $*.rst $@ ################################################################ # Statistics targets.