Makefile
changeset 829 f5c7e513cbff
parent 801 04397698b6be
child 830 9631386b2ec2
equal deleted inserted replaced
828:366b32e9993e 829:f5c7e513cbff
   505 	@echo ===== BSL =====
   505 	@echo ===== BSL =====
   506 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:wordlist/bsl.var
   506 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:wordlist/bsl.var
   507 	@echo ===== TSL =====
   507 	@echo ===== TSL =====
   508 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:wordlist/tsl.var
   508 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:wordlist/tsl.var
   509 
   509 
   510 .PHONY: missing-stat
   510 define stat-cmd
   511 missing-stat: dist/wordlist/gadict.list $(FREQ_DEP) $(BUILD_SCRIPTS)
   511 { \
   512 	@ { \
       
   513 stat() { \
   512 stat() { \
   514   lack=`python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list $$2:$$3 | wc -l`; \
   513   lack=`python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list $$2:$$3 | wc -l`; \
   515   total=`grep -v '^[ 	]' $$3 | wc -l`; \
   514   total=`grep -v '^[ 	]' $$3 | wc -l`; \
   516   cover=$$((total - lack)); \
   515   cover=$$((total - lack)); \
   517   printf "   %4s %5s %5s %4s\n" $$1 $$cover $$total $$lack; \
   516   printf "   %4s %5s %5s %4s\n" $$1 $$cover $$total $$lack; \
   525 stat NGSL +f wordlist/ngsl.freq; \
   524 stat NGSL +f wordlist/ngsl.freq; \
   526 stat NAWL +f wordlist/nawl.freq; \
   525 stat NAWL +f wordlist/nawl.freq; \
   527 stat BSL +b wordlist/bsl.var; \
   526 stat BSL +b wordlist/bsl.var; \
   528 stat TSL +b wordlist/tsl.var; \
   527 stat TSL +b wordlist/tsl.var; \
   529 echo "   ==== ===== ===== ===="; \
   528 echo "   ==== ===== ===== ===="; \
   530 } $(REDIR)
   529 }
       
   530 endef
       
   531 
       
   532 .PHONY: missing-stat
       
   533 missing-stat: dist/wordlist/gadict.list $(FREQ_DEP) $(BUILD_SCRIPTS)
       
   534 	@${stat-cmd}
   531 
   535 
   532 dist/wordlist/%.list: %.gadict py/gadict_headwords.py $(BUILD_SCRIPTS) | dist/wordlist/
   536 dist/wordlist/%.list: %.gadict py/gadict_headwords.py $(BUILD_SCRIPTS) | dist/wordlist/
   533 	python3 -B py/gadict_headwords.py  $< $@
   537 	python3 -B py/gadict_headwords.py  $< $@
   534 
   538 
   535 dist/wordlist/gsl.var: $(GSL_BASEWORD) | dist/wordlist/
   539 dist/wordlist/gsl.var: $(GSL_BASEWORD) | dist/wordlist/
   705 echo '   :class: right'; \
   709 echo '   :class: right'; \
   706 echo; \
   710 echo; \
   707 cat  $(STAT_MISSING_FILE); \
   711 cat  $(STAT_MISSING_FILE); \
   708 } >$@
   712 } >$@
   709 
   713 
   710 $(STAT_MISSING_FILE): REDIR := >$(STAT_MISSING_FILE)
   714 $(STAT_MISSING_FILE): $(BUILD_SCRIPTS) | $(dir $(STAT_MISSING_FILE))
   711 $(STAT_MISSING_FILE): missing-stat | $(dir $(STAT_MISSING_FILE))
   715 	@echo '*' make stat
       
   716 	@${stat-cmd} >$(STAT_MISSING_FILE)
   712 
   717 
   713 dist/misc/:
   718 dist/misc/:
   714 	mkdir -p $@
   719 	mkdir -p $@
   715 
   720 
   716 ################################################################
   721 ################################################################