# This is a makefile that builds the Northern Sami morphological parser # ***************************************************************** # The second goal is to build chm.save # This goal depends on chm-twol.bin and a bunch of lexicon files XFST = xfst -utf8 #XFST = fst -utf8 LEXC = lexc -utf8 ifeq (victorio.uit.no, $(shell hostname)) XFST = /opt/sami/xerox/c-fsm/ix86-linux2.6-gcc3.4/bin/fst -utf8 LEXC = /opt/sami/xerox/bin/lexc -utf8 TWOLC = /opt/sami/xerox/bin/twolc -utf8 endif chm.save: ../bin/chm.save ../bin/chm.save: ../bin/chm-twol.bin chm-lex.txt @echo @echo "*** Building chm.save ***" ; @echo printf "compile-source chm-lex.txt \n\ read-rules ../bin/chm-twol.bin \n\ compose-result \n\ save-result ../bin/chm.save \n\ quit \n" > ../../tmp/chm-save-script $(LEXC) < ../../tmp/chm-save-script @rm -f ../../tmp/chm-save-script # The forst goal is to build chm-twol.bin # This goal depends on chm-twol.txt chm-twol.bin: ../bin/twol.chm.bin ../bin/chm-twol.bin: chm-twol.txt @echo @echo "*** Building chm-twol.bin ***" ; @echo @printf "read-grammar chm-twol.txt \n\ compile \n\ save-binary ../bin/chm-twol.bin \n\ quit \n" > ../../tmp/chm-twol-script $(TWOLC) < ../../tmp/chm-twol-script @rm -f ../../tmp/chm-twol-script # "make clean" is there to remove the binary files at will. clean: @rm -f ../bin/*.fst ../bin/*.save ../bin/*.bin