#COMPILER = twolc #-utf8 RULESRC = $(TARGET)/src/morphophonology-$(TARGET).txt RULEBIN = $(TARGET)/bin/morphophonology-$(TARGET).bin DESCBIN = $(TARGET)/bin/morphophonology-$(TARGET)-descriptive.bin HYPHBIN = $(TARGET)/bin/morphophonology-$(TARGET)-hyph.bin # The second goal is to build morphophonology-smX.bin # This goal depends on morphophonology-smX.txt morphophonology: $(RULEBIN) $(RULEBIN): $(RULESRC) @echo @echo "*** Building $(RULEBIN) ***" ; @echo $(M4) $(M4FLAGS) $< > tmp/morphophonology-$(TARGET)-tmp.txt ifeq ($(MORPHOPHONTOOL), xfst) @printf "source tmp/morphophonology-$(TARGET)-tmp.txt \n\ save stack $@ \n\ quit \n" > tmp/morphophonology-$(TARGET)-script else @printf "read-grammar tmp/morphophonology-$(TARGET)-tmp.txt \n\ compile \n\ save-binary $@ \n\ quit \n" > tmp/morphophonology-$(TARGET)-script endif $(COMPILER) < tmp/morphophonology-$(TARGET)-script @rm -f tmp/morphophonology-$(TARGET)-script # Removing the flag -DSHORTCOMP, as a test. Old line: # $(M4) $(M4FLAGS) -DSHORTCOMP -DDIPHSIMPL $< > tmp/morphophonology-$(TARGET)-tmp.txt morphophonology-descriptive: $(DESCBIN) $(DESCBIN): $(RULESRC) @echo @echo "*** Building $(DESCBIN) ***" ; @echo $(M4) $(M4FLAGS) -DDIPHSIMPL $< > tmp/morphophonology-$(TARGET)-tmp.txt ifeq ($(MORPHOPHONTOOL), xfst) @printf "source tmp/morphophonology-$(TARGET)-tmp.txt \n\ save stack $@ \n\ quit \n" > tmp/morphophonology-$(TARGET)-script else @printf "read-grammar tmp/morphophonology-$(TARGET)-tmp.txt \n\ compile \n\ save-binary $@ \n\ quit \n" > tmp/morphophonology-$(TARGET)-script endif $(COMPILER) < tmp/morphophonology-$(TARGET)-script @rm -f tmp/morphophonology-$(TARGET)-script morphophonology-hyph: $(HYPHBIN) $(HYPHBIN): $(RULESRC) @echo @echo "*** Building $(HYPHBIN) ***" ; @echo $(M4) $(M4FLAGS) -DHYPHENATE $< > tmp/morphophonology-hyph-$(TARGET)-tmp.txt ifeq ($(MORPHOPHONTOOL), xfst) @printf "source tmp/morphophonology-$(TARGET)-tmp.txt \n\ save stack $@ \n\ quit \n" > tmp/morphophonology-$(TARGET)-script else @printf "read-grammar tmp/morphophonology-$(TARGET)-tmp.txt \n\ compile \n\ save-binary $@ \n\ quit \n" > tmp/morphophonology-$(TARGET)-script endif $(COMPILER) < tmp/morphophonology-$(TARGET)-hyph-script @rm -f tmp/morphophonology-$(TARGET)-hyph-script