## Process this file with automake to produce Makefile.in ## Copyright (C) 2011 Samediggi ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . ####### Source file defs: ######## # The file used by tex installations: GT_TEX_HYPHENATOR=$(GTLANG2)_hyph.tex # The file used by OOo/LO and others: GT_DIC_HYPHENATOR=hyph_$(GTLANG2).dic # Only build if enabled at configure time: if WANT_PATTERN_HYPHENATORS # Build targets: hfstdatadir=$(datadir)/giella/$(GTLANG) hfstdata_DATA=$(GT_TEX_HYPHENATOR) $(GT_DIC_HYPHENATOR) endif # WANT_PATTERN_HYPHENATORS ####### Build rules: ######## # 0. make list of hyphenated words, either from corpus or from fst (fallback) # From fst: hyphenated-fst-wordlist.txt: ../fstbased/hyphenator-gt-desc-no_fallback.hfst \ $(top_builddir)/src/filters/remove-non_hyphenated-strings.hfst \ $(top_builddir)/src/filters/replace-hyphenation-chars.hfst $(AM_V_HXFST)$(PRINTF) "read regex \ @\"$<\" \ .o. @\"$(top_builddir)/src/filters/remove-non_hyphenated-strings.hfst\"\ .o. @\"$(top_builddir)/src/filters/replace-hyphenation-chars.hfst\" \ ; \n\ lower-side net\n\ print random-words $(PATTERN_WORD_LIST) > $@\n\ quit\n" | $(HFST_XFST) -p $(MORE_VERBOSITY) # 1. build tex pattern file $(GT_TEX_HYPHENATOR): hyphenated-fst-wordlist.txt $(AM_V_at)touch $@ $(AM_V_CP)cp -f $@ $(GTLANG2).pat # patgen dictionary pattern output translate $(AM_V_GEN)$(PATGEN) $< $(GTLANG2).pat $@ $(srcdir)/$(GTLANG2).tra # 2. convert tex pattern file to OOo pattern file $(GT_DIC_HYPHENATOR): $(GT_TEX_HYPHENATOR) $(AM_V_GEN)$(PERL) $(GIELLA_CORE)/scripts/substrings.pl \ $(VERBOSITY) $< $@ UTF-8 2 2 ####### Other targets: ########### clean-local: -rm -f *.hfst hyphenated-fst-wordlist.txt pattmp* *.pat # Only delete generated dic and tex files if you really want to start anew: maintainer-clean-local: -rm -f *.tex *.dic include $(top_srcdir)/am-shared/silent_build-include.am include $(top_srcdir)/am-shared/lookup-include.am