| 1 | .PHONY: test error clean update firefox lo |
| 2 | |
| 3 | error: |
| 4 | @echo "Please choose one of the following target: update, test, firefox, lo" |
| 5 | |
| 6 | all: update test firefox lo |
| 7 | |
| 8 | update: |
| 9 | @echo "Update bo.dic with tibetan-spellchecker data" |
| 10 | rm -rf tmp-tibetan-spellchecker-git |
| 11 | git clone [email protected]:eroux/tibetan-spellchecker.git tmp-tibetan-spellchecker-git |
| 12 | wc -l tmp-tibetan-spellchecker-git/syllables/*.txt |grep total | cut -d' ' -f2 > bo.dic |
| 13 | cat tmp-tibetan-spellchecker-git/syllables/*.txt >> bo.dic |
| 14 | rm -rf tmp-tibetan-spellchecker-git |
| 15 | |
| 16 | test: |
| 17 | @echo "All the following lines should be stars:\n" |
| 18 | hunspell -d bo -a tests/pass.txt |
| 19 | @echo "\nNone the following lines should be stars:\n" |
| 20 | hunspell -d bo -a tests/fail.txt |
| 21 | |
| 22 | firefox: |
| 23 | $(MAKE) -C firefox |
| 24 | |
| 25 | lo: |
| 26 | $(MAKE) -C lo |
| 27 | |
| 28 | clean: |
| 29 | rm -rf tmp-tibetan-spellchecker-git |
| 30 | $(MAKE) -C firefox clean |
| 31 | $(MAKE) -C lo clean |
| 32 | $(MAKE) -C debian clean |