Makefile
changeset 128 ca6ceff4941c
parent 127 2fc0561f80ca
child 132 236e638526a5
equal deleted inserted replaced
127:2fc0561f80ca 128:ca6ceff4941c
   316 echo Supported targets:; \
   316 echo Supported targets:; \
   317 echo; \
   317 echo; \
   318 sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*=  \1=;p;}' $(BUILD_SCRIPT)
   318 sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*=  \1=;p;}' $(BUILD_SCRIPT)
   319 
   319 
   320 .PHONY: stat
   320 .PHONY: stat
   321 stat:
   321 stat: STAT.rst
   322 	total=0; \
   322 
   323 	for dic in *.dict-c5; do \
   323 STAT.rst: $(C5_FILES) $(BUILD_SCRIPT)
   324 		cnt=`grep '^_____' $$dic | wc -l`; \
   324 	{ \
   325 		echo $$dic 'has  ' $$cnt words.; \
   325 echo '============================'; \
   326 		total=$$(($$total + $$cnt)); \
   326 echo ' gadict project statistics.'; \
   327 	done; \
   327 echo '============================'; \
   328 	echo Total words count is $$total.
   328 echo '.. contents::'; \
       
   329 echo; \
       
   330 echo 'gadict article count.'; \
       
   331 echo '====================='; \
       
   332 echo; \
       
   333 echo '======================================== ====='; \
       
   334 echo '             Dictionary                  Count'; \
       
   335 echo '======================================== ====='; \
       
   336 total=0; \
       
   337 for dic in $(C5_FILES); do \
       
   338   cnt=`grep '^_____' $$dic | wc -l`; \
       
   339   printf '%40s %5s\n' $$dic $$cnt; \
       
   340   total=$$(($$total + $$cnt)); \
       
   341 done; \
       
   342 printf '%40s %5s\n' '**Total**' $$total; \
       
   343 echo '======================================== ====='; \
       
   344 } >$@
   329 
   345 
   330 ################################################################
   346 ################################################################
   331 # Clean targets.
   347 # Clean targets.
   332 
   348 
   333 .PHONY: distclean
   349 .PHONY: distclean
   334 distclean: clean
   350 distclean: clean
   335 	rm -f VERSION
   351 	rm -f VERSION
   336 
   352 
   337 .PHONY: clean
   353 .PHONY: clean
   338 clean:
   354 clean:
   339 	rm -f $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES)
   355 	rm -f $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES) STAT.rst
   340 	rm -rf $(DIST_DIR) $(DIST_TARBALLS)
   356 	rm -rf $(DIST_DIR) $(DIST_TARBALLS)
   341 	rm -rf $(DISTSRC_DIR) $(DISTSRC_TARBALLS)
   357 	rm -rf $(DISTSRC_DIR) $(DISTSRC_TARBALLS)
   342 
   358