Makefile
changeset 206 407f2a82ef26
parent 204 f93358e8be5b
child 207 3c96103ced32
equal deleted inserted replaced
205:004fd4c6564c 206:407f2a82ef26
   126 DICT_FILES := $(C5_FILES:.dict-c5=.dict)
   126 DICT_FILES := $(C5_FILES:.dict-c5=.dict)
   127 DICTDZ_FILES := $(C5_FILES:.dict-c5=.dict.dz)
   127 DICTDZ_FILES := $(C5_FILES:.dict-c5=.dict.dz)
   128 INDEX_FILES := $(C5_FILES:.dict-c5=.index)
   128 INDEX_FILES := $(C5_FILES:.dict-c5=.index)
   129 
   129 
   130 RST_FILES := $(sort $(wildcard *.rst) STAT.rst VERSION.rst)
   130 RST_FILES := $(sort $(wildcard *.rst) STAT.rst VERSION.rst)
   131 HTML_FILES := $(RST_FILES:.rst=.html)
   131 HTML_FILES := $(filter-out VERSION.html header.html,$(RST_FILES:.rst=.html))
   132 
   132 
   133 pkgname = gadict
   133 pkgname = gadict
   134 fullpkgname = $(pkgname)-$(vmajor).$(vminor)
   134 fullpkgname = $(pkgname)-$(vmajor).$(vminor)
   135 
   135 
   136 DIST_DIR = $(fullpkgname)
   136 DIST_DIR = $(fullpkgname)
   273 # Documentation targets.
   273 # Documentation targets.
   274 
   274 
   275 .PHONY: html
   275 .PHONY: html
   276 html: $(HTML_FILES)
   276 html: $(HTML_FILES)
   277 
   277 
   278 $(HTML_FILES): %.html: %.rst rst.css VERSION.rst $(BUILD_SCRIPTS)
   278 $(HTML_FILES): %.html: %.rst header.rst rst.css VERSION.rst $(BUILD_SCRIPTS)
   279 	$(RST2HTML) $(RST2HTML_FLAGS) --stylesheet=rst.css $*.rst $@
   279 	$(RST2HTML) $(RST2HTML_FLAGS) --stylesheet=rst.css $*.rst $@
   280 
   280 
   281 VERSION.rst: VERSION $(BUILD_SCRIPTS)
   281 VERSION.rst: VERSION $(BUILD_SCRIPTS)
   282 	{ \
   282 	{ \
   283 	echo 'For ``$(pkgname)`` version: ``$(vmajor).$(vminor)``.'; \
   283 	echo 'For ``$(pkgname)`` version: ``$(vmajor).$(vminor)``.'; \
   318 sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*=  \1=;p;}' $(BUILD_SCRIPTS)
   318 sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*=  \1=;p;}' $(BUILD_SCRIPTS)
   319 
   319 
   320 .PHONY: stat
   320 .PHONY: stat
   321 stat: STAT.rst
   321 stat: STAT.rst
   322 
   322 
   323 STAT.rst: $(C5_FILES) VERSION.rst $(BUILD_SCRIPTS)
   323 STAT.rst: $(C5_FILES) header.rst VERSION.rst $(BUILD_SCRIPTS)
   324 	{ \
   324 	{ \
       
   325 echo '.. include:: header.rst'; \
       
   326 echo; \
   325 echo '============================'; \
   327 echo '============================'; \
   326 echo ' gadict project statistics.'; \
   328 echo ' gadict project statistics.'; \
   327 echo '============================'; \
   329 echo '============================'; \
   328 echo '.. contents::'; \
   330 echo '.. contents::'; \
   329 echo; \
   331 echo; \