Makefile
changeset 108 1f1363141da7
parent 107 4cfb94e11b5d
child 109 5bb58b8d87a7
equal deleted inserted replaced
107:4cfb94e11b5d 108:1f1363141da7
    87 datadir = $(datarootdir)/dictd
    87 datadir = $(datarootdir)/dictd
    88 
    88 
    89 ################################################################
    89 ################################################################
    90 # Project dirs/files.
    90 # Project dirs/files.
    91 
    91 
    92 BUILD_SCRIPT := $(first-word $(MAKEFILE_LIST))
    92 BUILD_SCRIPT := $(firstword $(MAKEFILE_LIST))
    93 
    93 
    94 C5_FILES := $(wildcard *.dict-c5)
    94 C5_FILES := $(wildcard *.dict-c5)
    95 DICT_FILES := $(C5_FILES:.dict-c5=.dict)
    95 DICT_FILES := $(C5_FILES:.dict-c5=.dict)
    96 DICTDZ_FILES := $(C5_FILES:.dict-c5=.dict.dz)
    96 DICTDZ_FILES := $(C5_FILES:.dict-c5=.dict.dz)
    97 INDEX_FILES := $(C5_FILES:.dict-c5=.index)
    97 INDEX_FILES := $(C5_FILES:.dict-c5=.index)
   186 
   186 
   187 $(HTML_FILES): %.html: %.rst
   187 $(HTML_FILES): %.html: %.rst
   188 	$(RST2HTML) $(RST2HTML_FLAGS) --stylesheet=rst.css $*.rst $@
   188 	$(RST2HTML) $(RST2HTML_FLAGS) --stylesheet=rst.css $*.rst $@
   189 
   189 
   190 ################################################################
   190 ################################################################
   191 # Statistics targets.
   191 # Helpers targets.
       
   192 
       
   193 .PHONY: help
       
   194 help:
       
   195 	@echo
       
   196 	@echo vmajor=$(vmajor)
       
   197 	@echo vminor=$(vminor)
       
   198 	@echo
       
   199 	@echo Supported targets:
       
   200 	@sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*=  \1=;p;}' $(BUILD_SCRIPT)
   192 
   201 
   193 .PHONY: stat
   202 .PHONY: stat
   194 stat:
   203 stat:
   195 	total=0; \
   204 	total=0; \
   196 	for dic in *.dict-c5; do \
   205 	for dic in *.dict-c5; do \
   210 .PHONY: clean
   219 .PHONY: clean
   211 clean:
   220 clean:
   212 	rm -f $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES)
   221 	rm -f $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES)
   213 	rm -rf $(DIST_DIR) $(DISTSRC_DIR) $(DIST_TARBALLS) $(DISTSRC_TARBALLS)
   222 	rm -rf $(DIST_DIR) $(DISTSRC_DIR) $(DIST_TARBALLS) $(DISTSRC_TARBALLS)
   214 
   223 
   215 ################################################################
       
   216 # Helper target.
       
   217 
       
   218 .PHONY: help
       
   219 help:
       
   220 	@echo
       
   221 	@echo Supported targets:
       
   222 	@sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*=  \1=;p;}' $(MAKEFILE_LIST)
       
   223