# include phonrules.mk NORMFILES = $(patsubst $(TARGET)/src/%.txt,$(TARGET)/int/%.norm,$(LEXICALSRCS)) NONRECFILES = $(patsubst $(TARGET)/src/%.txt,$(TARGET)/int/%.nonrec,$(LEXICALSRCS)) RESTRFILES = $(patsubst $(TARGET)/src/%.txt,$../(TARGET)/int/%.restr,$(LEXICALSRCS)) LEXICALSRCS += $(TARGET)/src/$(TARGET)-lex.txt \ $(TARGET)/src/verb-$(TARGET)-lex.txt \ $(TARGET)/src/noun-$(TARGET)-lex.txt \ $(TARGET)/src/numeral-$(TARGET)-lex.txt \ $(TARGET)/src/punct-$(TARGET)-lex.txt # CFST = xfst -utf8 # ======================================================= # # Building different versions of the basic fst tagger # # ======================================================= # # Target for building a temporary propernoun lexicon # that combines north sámi lexicon with the lule sámi one. propernoun-$(TARGET)-lex-tmp.txt: $(TARGET)/src/propernoun-$(TARGET)-lex-tmp.txt $(TARGET)/src/propernoun-$(TARGET)-lex-tmp.txt: \ $(TARGET)/src/propernoun-$(TARGET)-lex.txt \ $(TARGET)/src/propernoun-$(TARGET)-morph.txt \ sme/src/propernoun-sme-lex.txt @echo @echo "*** Building tmp/propernoun-$(TARGET)-lex-tmp.txt ***" ; @echo @cat $(word 2,$^) $< > $@ ifneq ($(TARGET), sme) @echo "! <--- Dump from sme -->" >> $@ script/smesmjdump.pl sme/src/propernoun-sme-lex.txt >> $@ endif # The first goal is to build smX.save # This goal depends on morphophonology-smX.bin and a bunch of lexicon files save: $(TARGET)/bin/$(TARGET).save $(TARGET)/bin/$(TARGET).save: \ $(TARGET)/bin/morphophonology-$(TARGET)-descriptive.bin \ $(SRCS) @echo @echo "*** Building $(TARGET).save ***" ; @echo printf "compile-source $(SRCS) \n\ read-rules $< \n\ compose-result \n\ save-result $@ \n\ quit \n" > tmp/save-script $(LEXC) < tmp/save-script #rm -f tmp/save-script # The second goal is to build a normative smX.save save-norm: $(TARGET)/bin/$(TARGET)-norm.save $(TARGET)/bin/$(TARGET)-norm.save: \ $(TARGET)/bin/morphophonology-$(TARGET).bin \ $(NORMFILES) @echo @echo "*** Building $(TARGET)-norm.save ***" ; @echo printf "compile-source $(NORMFILES) \n\ read-rules $< \n\ compose-result \n\ save-result $@ \n\ quit \n" > tmp/save-script $(LEXC) < tmp/save-script rm -f tmp/save-script # This goal is to build a restrictive smX.save save-restr: $(TARGET)/bin/$(TARGET)-restr.save $(TARGET)/bin/$(TARGET)-restr.save: \ $(TARGET)/bin/morphophonology-$(TARGET).bin \ $(RESTRFILES) @echo @echo "*** Building $(TARGET)-restr.save ***" ; @echo printf "compile-source $(RESTRFILES) \n\ read-rules $< \n\ compose-result \n\ save-result $@ \n\ quit \n" > tmp/save-script $(LEXC) < tmp/save-script rm -f tmp/save-script # We need a variant of this third goal, to build a non-recursive sme.save # This goal depends on morphophonology-XXX.bin and a bunch of lexicon files nonrec.save: $(TARGET)/bin/nonrec-$(TARGET).save $(TARGET)/bin/nonrec-$(TARGET).save: \ $(TARGET)/bin/morphophonology-$(TARGET).bin \ $(NONRECFILES) @echo @echo "*** Building nonrec-$(TARGET).save ***" ; @echo @printf "compile-source $(NONRECFILES) \n\ read-rules $< \n\ compose-result \n\ save-result $@ \n\ quit \n" > tmp/nonrec-script $(LEXC) < tmp/nonrec-script @rm -f tmp/nonrec-script # The nonrec-$TARGET.fst file combines the *.save file with a filter to # remove unwanted derivational patterns. nonrec: $(TARGET)/bin/nonrec-$(TARGET).fst $(TARGET)/bin/nonrec-$(TARGET).fst: \ $(TARGET)/bin/nonrec-$(TARGET).save \ $(TARGET)/bin/derivation-filter.fst \ common/bin/downcase.fst @echo @echo "*** Building nonrec-$(TARGET).fst ***" ; @echo @printf "$(NONREC)" > tmp/nonrec-fst-script @printf "save stack $@ \n\ quit \n" >> tmp/nonrec-fst-script $(CFST) < tmp/nonrec-fst-script @rm -f tmp/nonrec-fst-script # ======================================================= # # Building different versions of the basic fst tagger # # ======================================================= # # We want an analyzer with POS tags only. It takes the linguistic # fst as input and gives us an alternate pos.fst. pos.fst: $(TARGET)/bin/pos-$(TARGET).fst $(TARGET)/bin/pos-$(TARGET).fst: \ common/bin/tag-pos.fst \ $(TARGET)/bin/$(TARGET).fst @echo @echo "*** Building pos-$(TARGET).fst, $(TARGET).fst with POS tags ***" @echo @printf "read regex [[@\"$<\"] .o. \ [@\"$(TARGET)/bin/$(TARGET).fst\"]] ; \n\ save stack $@ \n\ quit \n" > tmp/pos-fst-script $(CFST) < tmp/pos-fst-script @rm -f tmp/pos-fst-script # In order to make pos.fst we need a binary tag-pos.fst # This goal depends on tag-pos.regex. The way it # is done is that all tags except the POS one are deleted. tag-pos.fst: common/bin/tag-pos.fst common/bin/tag-pos.fst: common/src/tag-pos.regex @echo @echo "*** Building tag-pos.fst ***" ; @echo @printf "read regex < $< \n\ save stack $@ \n\ quit \n" > tmp/tag-pos-script $(XFST) < tmp/tag-pos-script @rm -f tmp/tag-pos-script # We want to delete the +TV +IV tags for the generator (and other # tags later on. For that we need our tag-deleter. tag-not-save.fst: common/bin/tag-not-save.fst common/bin/tag-not-save.fst: common/src/tag-not-save.regex @echo @echo "*** Building tag-not-save.fst ***" ; @echo @printf "read regex < $< \n\ save stack $@ \n\ quit \n" > tmp/tag-not-save-script $(XFST) < tmp/tag-not-save-script @rm -f tmp/tag-not-save-script tag-inclusion-filter.fst: common/bin/tag-inclusion-filter.fst common/bin/tag-inclusion-filter.fst: common/src/tag-inclusion-filter.regex @echo @echo "*** Building tag-inclusion-filter.fst ***" ; @echo @printf "read regex < $< \n\ save stack $@ \n\ quit \n" > tmp/tag-inclusion-filter-script $(XFST) < tmp/tag-inclusion-filter-script @rm -f tmp/tag-inclusion-filter-script # We want an analyzer with Norwegian tags. It takes the linguistic # fst as input and gives us an alternate n-$(TARGET).fst n-$(TARGET).fst: $(TARGET)/bin/n-$(TARGET).fst $(TARGET)/bin/n-$(TARGET).fst: \ common/bin/tag-no.fst \ $(TARGET)/bin/$(TARGET).fst @echo @echo "*** Building n-$(TARGET).fst, $(TARGET).fst with Norwegian tags ***" @echo @printf "read regex [[@\"$<\"] .o. \ [@\"$(TARGET)/bin/$(TARGET).fst\"]] ; \n\ save stack $@ \n\ quit \n" > tmp/n-fst-script $(CFST) < tmp/n-fst-script @rm -f tmp/n-fst-script # In order to make n-$(TARGET).fst we need a binary tag-no.fst # This goal depends on tag-no.regex tag-no.fst: common/bin/tag-no.fst common/bin/tag-no.fst: common/src/tag-no.regex @echo @echo "*** Building tag-no.fst ***" ; @echo @printf "read regex < $< \n\ save stack $@ \n\ quit \n" > tmp/tag-no-script $(XFST) < tmp/tag-no-script @rm -f tmp/tag-no-script # We also want an analyzer with Sami tags. It takes the linguistic # sme.fst as input and gives us an alternate s-sme.fst s-$(TARGET).fst: $(TARGET)/bin/s-$(TARGET).fst $(TARGET)/bin/s-$(TARGET).fst: \ common/bin/tag-$(TARGET).fst \ $(TARGET)/bin/$(TARGET).fst @echo @echo "*** Building s-$(TARGET).fst, $(TARGET).fst with Sami tags ***" @echo @printf "read regex [[@\"$<\"] .o. \ [@\"$(TARGET)/bin/$(TARGET).fst\"]] ; \n\ save stack $@ \n\ quit \n" > tmp/s-fst-script $(CFST) < tmp/s-fst-script @rm -f tmp/s-fst-script # In order to make s-$(TARGET).fst we need a binary tag-$(TARGET).fst # This goal depends on tag-sme.regex tag-$(TARGET).fst: common/bin/tag-$(TARGET).fst common/bin/tag-$(TARGET).fst: common/src/tag-$(TARGET).regex @echo @echo "*** Building tag-$(TARGET).fst ***" ; @echo @printf "read regex < $< \n\ save stack $@ \n\ quit \n" > tmp/tag-script $(XFST) < tmp/tag-script @rm -f tmp/tag-script # This goal is to build the final analyser. It depends on all the files. fst: $(TARGET)/bin/$(TARGET).fst $(TARGET)/bin/$(TARGET).fst: \ common/bin/nohardhyphen.fst \ common/bin/caseconv.fst \ common/bin/spellrelax.fst \ common/bin/downcase.fst \ common/bin/webadr.fst \ $(TARGET)/bin/$(TARGET).save #\ #$(TARGET)/bin/$(TARGET)-num.fst @echo @echo "*** Building $(TARGET).fst ***" ; @echo @printf "read regex $(FST) ; \n" > tmp/fst-script @printf "save stack $@ \n\ quit \n" >> tmp/fst-script $(CFST) < tmp/fst-script #@rm -f tmp/fst-script fst-norm: $(TARGET)/bin/$(TARGET)-norm.fst $(TARGET)/bin/$(TARGET)-norm.fst: \ common/bin/nohardhyphen.fst \ common/bin/downcase.fst \ $(TARGET)/bin/$(TARGET)-norm.save @echo @echo "*** Building $(TARGET)-norm.fst ***" ; @echo @printf "read regex $(FSTNORM) ; \n" > tmp/fst-script @printf "save stack $@ \n\ quit \n" >> tmp/fst-script $(CFST) < tmp/fst-script @rm -f tmp/fst-script fst-restr: $(TARGET)/bin/$(TARGET)-restr.fst $(TARGET)/bin/$(TARGET)-restr.fst: \ common/bin/nohardhyphen.fst \ common/bin/downcase.fst \ $(TARGET)/bin/$(TARGET)-restr.save @echo @echo "*** Building $(TARGET)-restr.fst ***" ; @echo @printf "$(FSTRESTR)" > tmp/fst-script @printf "save stack $@ \n\ quit \n" >> tmp/fst-script $(CFST) < tmp/fst-script @rm -f tmp/fst-script # This goal is to make a regex for filenames, urls and mail addresses webadr: webadr.fst webadr.fst: common/bin/webadr.fst common/bin/webadr.fst: common/src/webadr.txt @echo @echo "*** Building webadr.fst ***" ; @echo printf "source $< \n\ save stack $@ \n\ quit \n" > tmp/webadr-script $(XFST) < tmp/webadr-script rm -f tmp/webadr-script # This goal is to make a regex for dates num: num.fst num.fst: common/bin/num.fst common/bin/num.fst: common/src/num.txt @echo @echo "*** Building num.fst ***" ; @echo printf "compile-source $< \n\ source-to-result \n\ save-result $@ \n\ quit \n" > tmp/num-script $(LEXC) < tmp/num-script rm -f tmp/num-script # This goal is to allow for Scandinavian ä/æ and ö/ø mix spellrelax: spellrelax.fst spellrelax.fst: common/bin/spellrelax.fst common/bin/spellrelax.fst: common/src/spellrelax.regex @echo @echo "*** Building spellrelax.fst ***" ; @echo @printf "read regex < $< \n\ save stack $@ \n\ quit \n" > tmp/spellrelax-script $(XFST) < tmp/spellrelax-script @rm -f tmp/spellrelax-script # The second goal is to build the caseconv.fst file # This goal depends on case.regex # The resulting transducer allows for viessu / Viessu, i.e. initial # casing of all the words in the lexicon caseconv: caseconv.fst caseconv.fst: common/bin/caseconv.fst common/bin/caseconv.fst: common/src/case.regex @echo @echo "*** Building caseconv.fst ***" ; @echo @printf "read regex < $< \n\ save stack $@ \n\ quit \n" > tmp/caseconv-script $(XFST) < tmp/caseconv-script @rm -f tmp/caseconv-script # This goal builds downcasing.fst # The resulting transducer allows for downcasing of derived names, # such as oslolaš < Oslo downcase: downcase.fst downcase.fst: common/bin/downcase.fst common/bin/downcase.fst: common/src/downcase.regex @echo @echo "*** Building downcase.fst ***" ; @echo @printf "source $< \n\ save stack $@ \n\ quit \n" > tmp/downcase-script $(XFST) < tmp/downcase-script @rm -f tmp/downcase-script # This goal depends on allcaps.regex # The resulting transducer allows for all-caps words, such as VIESSU, OSLO # but not for e.g. VieSu, OslO # It is used in an xfst script (bin/cap-sme), but seldomly so, since it is slow. allcaps: allcaps.fst allcaps.fst: common/bin/allcaps.fst common/bin/allcaps.fst: common/src/allcaps.regex \ $(TARGET)/bin/cap-$(TARGET) @echo @echo "*** Building allcaps.fst ***" ; @echo @printf "source $< \n\ save stack $@ \n\ quit \n" > tmp/allcaps-script $(XFST) < tmp/allcaps-script @rm -f tmp/allcaps-script digraph-infl.fst: common/bin/digraph-infl.fst common/bin/digraph-infl.fst: common/src/digraph-infl.regex @echo @echo "*** Building digraph-infl.fst ***" ; @echo @printf "source $< \n\ save stack $@ \n\ quit \n" > tmp/digraph-infl-script $(XFST) < tmp/digraph-infl-script @rm -f tmp/digraph-infl-script # Target for clock simulator iclock.fst: $(TARGET)/bin/iclock-$(TARGET).fst $(TARGET)/bin/iclock-$(TARGET).fst: $(TARGET)/bin/clock-$(TARGET).fst @echo "*** iclock-$(TARGET).fst ***" @printf "load < $(TARGET)/bin/clock-$(TARGET).fst \n\ invert net \n\ save stack $@ \n\ quit \n" >> tmp/iclock-script $(XFST) < tmp/iclock-script @rm -f tmp/iclock-script clock.fst: $(TARGET)/bin/clock-$(TARGET).fst $(TARGET)/bin/clock-$(TARGET).fst: $(TARGET)/src/clock-$(TARGET).lexc @echo "*** clock-$(TARGET).fst ***" @printf "compile-source $< \n\ source-to-result \n\ save-result $@ \n\ quit \n" > tmp/generate-clock-script $(LEXC) < tmp/generate-clock-script @rm -f generate-clock-script num.fst: $(TARGET)/bin/$(TARGET)-num.fst $(TARGET)/bin/$(TARGET)-num.fst: \ $(TARGET)/src/$(TARGET)-num.txt \ $(TARGET)/polderland/generated_nums-plx.txt @printf "compile-source $< \n\ source-to-result \n\ save-result $@ \n\ quit \n" > tmp/generate-num-script $(LEXC) < tmp/generate-num-script @rm -f generate-num-script # Here we build the final generator, an inverted transducer of the analyzer. # It is dependent upon sm*.save ifst: inverse.fst inverse.fst: $(TARGET)/bin/i$(TARGET).fst $(TARGET)/bin/i$(TARGET).fst: \ common/bin/tag-not-save.fst \ common/bin/downcase.fst \ $(TARGET)/bin/$(TARGET).save @echo @echo "*** Building the inverse i$(TARGET).fst ***" @echo @printf "$(INVERTNET)" > tmp/ifst-script @printf "invert net \n\ save stack $@ \n\ quit \n" >> tmp/ifst-script $(XFST) < tmp/ifst-script @rm -f tmp/ifst-script # Here we build a normative generator, an inverted transducer of the normative # analyzer. It is dependent upon sm*-norm.save ifst-norm: inverse-norm.fst inverse-norm.fst: $(TARGET)/bin/i$(TARGET)-norm.fst $(TARGET)/bin/i$(TARGET)-norm.fst: \ common/bin/tag-not-save.fst \ common/bin/downcase.fst \ $(TARGET)/bin/$(TARGET)-norm.save \ $(TARGET)/bin/derivation-filter.fst @echo @echo "*** Building the normative, inverse i$(TARGET)-norm.fst ***" @echo @printf "$(INVERTNORM)" > tmp/ifst-script @printf "invert net \n\ save stack $@ \n\ quit \n" >> tmp/ifst-script $(XFST) < tmp/ifst-script @rm -f tmp/ifst-script # Here we build a restrictive generator, an inverted transducer of the restrictive # analyzer, which gives only ONE form for each analysis. The philosophy is that this # shall be used for speech generation. It is dependent upon sm*-restr.save # This file will be parametrized later on, for $VARIANT. ifst-restr: inverse-restr.fst inverse-restr.fst: $(TARGET)/bin/i$(TARGET)-restr.fst $(TARGET)/bin/i$(TARGET)-restr.fst: \ common/bin/tag-not-save.fst \ common/bin/downcase.fst \ $(TARGET)/bin/$(TARGET)-restr.save \ $(TARGET)/bin/derivation-filter.fst @echo @echo "*** Building the restrictive, inverse i$(TARGET)-restr.fst ***" @echo @printf "$(INVERTRESTR)" > tmp/ifst-script @printf "invert net \n\ save stack $@ \n\ quit \n" >> tmp/ifst-script $(XFST) < tmp/ifst-script @rm -f tmp/ifst-script # Here we build a normative generator with hyphenation, an inverted transducer # of the normative analyzer, used for paradigm generation. hi-norm: hi-norm.fst hi-norm.fst: h-inverse-norm.fst hifst-norm: h-inverse-norm.fst hi$(TARGET)-norm: h-inverse-norm.fst hi$(TARGET)-norm.fst: h-inverse-norm.fst h-inverse-norm.fst: $(TARGET)/bin/hi$(TARGET)-norm.fst $(TARGET)/bin/hi$(TARGET)-norm.fst: \ common/bin/tag-not-save.fst \ common/bin/downcase.fst \ $(TARGET)/bin/hyph-$(TARGET).save \ $(TARGET)/bin/derivation-filter.fst \ $(TARGET)/bin/hyphrules-$(TARGET).fst @echo @echo "*** Building the normative, inverse, hyphenated ***" @echo "*** hi$(TARGET)-norm.fst ***" @echo @printf "read regex [ [@\"common/bin/tag-not-save.fst\" ] .o. \n\ [@\"$(TARGET)/bin/derivation-filter.fst\"] .o. \n\ [@\"$(TARGET)/bin/hyph-$(TARGET).save\" ] .o. \n\ [@\"common/bin/downcase.fst\" ] \n\ ] ; \n" >tmp/hi-norm-script @printf "set flag-is-epsilon ON \n" >> tmp/hi-norm-script @printf "read regex [@\"$(TARGET)/bin/hyphrules-$(TARGET).fst\".i ] ; \n"\ >> tmp/hi-norm-script printf "turn stack \n\ compose net \n\ invert net \n\ save stack $@ \n\ quit \n" >> tmp/hi-norm-script $(XFST) < tmp/hi-norm-script @rm -f tmp/hi-norm-script # This goal builds derivation-filter.fst # The resulting transducer will only allow derivations following # a certain pattern as described in $(TARGET)-lex.txt derivation-filter: derivation-filter.fst derivation-filter.fst: $(TARGET)/bin/derivation-filter.fst $(TARGET)/bin/derivation-filter.fst: $(TARGET)/src/derivation-filter.regex @echo @echo "*** Building derivation-filter.fst ***" ; @echo @printf "source $< \n\ save stack $@ \n\ quit \n" > tmp/derivation-filter-script $(XFST) < tmp/derivation-filter-script @rm -f tmp/derivation-filter-script # This goal is to remove hyphens to make the spellers work remove-hyphen.fst: common/bin/remove-hyphen.fst common/bin/remove-hyphen.fst: common/src/remove-hyphen.regex @echo @echo "*** Building $@ ***" ; @echo @printf "read regex < $< \n\ save stack $@ \n\ quit \n" > tmp/remove-hyphen-script $(XFST) < tmp/remove-hyphen-script @rm -f tmp/remove-hyphen-script # =========================== # # Building preprocessor files # # =========================== # foreign.fst: common/bin/foreign.fst common/bin/foreign.fst: script/old-foreign.txt script/new-foreign.txt @echo @echo "*** Building a transducer for foreign words ***" ; @echo @printf "read text script/old-foreign.txt \n\ read text script/new-foreign.txt \n\ union net \n\ save stack $@ \n\ quit \n" > tmp/foreign-script $(XFST) < tmp/foreign-script @rm -f tmp/foreign-script newforeign.fst: common/bin/new-foreign.fst common/bin/new-foreign.fst: script/new-foreign.txt @echo @echo "*** Our transducer for new foreign words ***" ; @echo @printf "read text < $< \n\ save stack $@ \n\ quit \n" > tmp/new-foreign-script $(XFST) < tmp/new-foreign-script @rm -f tmp/new-foreign-script oldforeign.fst: common/bin/old-foreign.fst common/bin/old-foreign.fst: script/old-foreign.txt @echo @echo "*** Our ready-built transducer for foreign words ***" ; @echo @printf "read text < $< \n\ save stack $@ \n\ quit \n" > tmp/old-foreign-script $(XFST) < tmp/old-foreign-script @rm -f tmp/old-foreign-script typos: typos.fst typos.fst: common/bin/typos.fst common/bin/typos.fst: common/bin/typoslist.txt @echo @echo "*** Our transducer for typographical errors ***" ; @echo @printf "read text < $< \n\ save stack $@ \n\ quit \n" > tmp/typos-script $(XFST) < tmp/typos-script @rm -f tmp/typos-script # Here we build a phonetic transducer phon.fst: $(TARGET)/bin/phon-$(TARGET).fst $(TARGET)/bin/phon-$(TARGET).fst: $(TARGET)/src/phon-$(TARGET).xfst @echo @echo "*** Building phon-$(TARGET).fst ***" ; @echo @printf "source $< \n\ save stack $@ \n\ quit \n" > tmp/phon-script $(XFST) < tmp/phon-script @rm -f phon-script # This target removes all !SUB-marked entries $(NORMFILES): $(SRCS) @echo @echo "*** Removing non-orthographic entries - norm ***" ; @echo @egrep -v '(SUB|\^NG\^)' $(patsubst $(TARGET)/int/%.norm,$(TARGET)/src/%.txt,$@) > $@ # takes source txt files from src/, removed NG lines, put in int with a norm suffix # % is a symbol varying over the file name list in SRCS # patsubst (string, regexp, [replacement]) -- according to documentation # SRCS = sme/src/sme.txt # NORMFILES = sme/int/sme.norm # This target removes all recursive lines, or lines leading to recursive # lexicons. It also removes all !SUB-marked entries $(NONRECFILES): $(SRCS) @echo @echo "*** Removing circular and non-orthographic entries ***" ; @echo @grep -v '\^[C]\^' \ $(patsubst $(TARGET)/int/%.nonrec,$(TARGET)/src/%.txt,$@) \ | grep -v 'SUB' | script/multiword-split.pl > $@ # Improving multiword expressions by splitting them into separate entries # in xfst. All non-last parts should be given the PLX code WI. This is # accomplished by giving the word +N+Multi tag, so it will be caught in # speller transducers. # This target includes compounding restriction comment tags in the entries. $(TAGINCL): $(NONRECFILES) @echo @echo "*** Modifying entries to include restriction tags ***" @echo @script/tag-inclusion.pl \ $(patsubst $(TARGET)/int/%.spel,$(TARGET)/int/%.nonrec,$@) \ | grep -v '\!MARG' > $@ @cp -f $@ $(patsubst $(TARGET)/int/%.spel,$(TARGET)/int/%.nonrec,$@) # This target removes all ^NG^ and !SUB-marked entries # TODO: Split this RESTRFILES chain into a parametrized one for different dialects $VARIANT $(RESTRFILES): $(SRCS) @echo @echo "*** Removing non-orthographic entries - restr ***" ; @echo @egrep -v '(SUB|\^NG\^)' $(patsubst $(TARGET)/int/%.restr,$(TARGET)/src/%.txt,$@) > $@