Bugs in build and installation process fixed, lem.bin and gram.dgp built while compilation

This commit is contained in:
Tomasz Obrebski 2013-12-20 01:30:39 +01:00
parent d6a59cafdf
commit f600a028c0
11 changed files with 43 additions and 1022 deletions

View File

@ -35,12 +35,16 @@ libraries:
.PHONY: share .PHONY: share
share: share:
@for lang in $(LANGUAGES); do\
cd $(CUR_DIR)/share/$$lang && make; cd $(CUR_DIR); \
done
cd $(CUR_DIR)/share && make; cd $(CUR_DIR)
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# cleanup section # cleanup section
# ------------------------------------------------------------------ # ------------------------------------------------------------------
.PHONY: clean .PHONY: clean
clean: clean_components clean_documentation clean_config clean_config_mak clean: clean_components clean_share clean_documentation clean_config clean_config_mak
@echo "All files cleaned successfully!" @echo "All files cleaned successfully!"
.PHONY: clean_components .PHONY: clean_components
@ -54,6 +58,13 @@ clean_components:
clean_documentation: clean_documentation:
cd $(CUR_DIR)/doc && make clean; cd $(CUR_DIR) cd $(CUR_DIR)/doc && make clean; cd $(CUR_DIR)
.PHONY: clean_share
clean_share:
@for lang in $(LANGUAGES); do\
cd $(CUR_DIR)/share/$$lang && make clean; cd $(CUR_DIR); \
done
cd $(CUR_DIR)/share && make clean; cd $(CUR_DIR)
.PHONY: clean_config .PHONY: clean_config
clean_config: clean_config:
cd $(CUR_DIR)/conf && make clean; cd $(CUR_DIR) cd $(CUR_DIR)/conf && make clean; cd $(CUR_DIR)
@ -99,8 +110,9 @@ install_documentation: documentation
.PHONY: install_share .PHONY: install_share
install_share: share install_share: share
cd $(CUR_DIR)/share && make install; cd $(CUR_DIR) cd $(CUR_DIR)/share && make install; cd $(CUR_DIR)
#dictionaries compilation...
#compdic
#grammar compilation... #grammar compilation...
dgc
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# uninstall section # uninstall section

View File

@ -11,8 +11,5 @@
# parameter_name [=] value # parameter_name [=] value
# #
categories = LANG_DIR/LANGUAGE/lem.cats categories = LANG_DIR/LANGUAGE/lem.cats
# categories = /home/to/dane/pmdbf/lem.cats
grammar = LANG_DIR/gram.dgc grammar = LANG_DIR/gram.dgc
# grammar = /home/to/dane/grammar/gram.dgc
outputfile = LANG_DIR/gram.dgp outputfile = LANG_DIR/gram.dgp
# outputfile = /home/to/dane/grammar/gram.dgp

View File

@ -12,7 +12,6 @@
# #
grammar = LANG_DIR/gram.dgp grammar = LANG_DIR/gram.dgp
# grammar = /home/to/dane/grammar/gram.dgp
process = W process = W
process = BOS process = BOS
process = EOS process = EOS

3
configure vendored
View File

@ -89,6 +89,7 @@ docdir="${PREFIX}/share/doc/utt"
langdir="${PREFIX}/share/utt" langdir="${PREFIX}/share/utt"
libdir="${PREFIX}/lib/utt" libdir="${PREFIX}/lib/utt"
languages="pl_PL.ISO-8859-2"
language="pl_PL.ISO-8859-2" language="pl_PL.ISO-8859-2"
cc_default="gcc" cc_default="gcc"
@ -242,6 +243,7 @@ echo "SHARE_DIR=$sharedir" >> config.mak
echo "DOC_DIR=$docdir" >> config.mak echo "DOC_DIR=$docdir" >> config.mak
echo "LANG_DIR=$langdir" >> config.mak echo "LANG_DIR=$langdir" >> config.mak
echo "LIB_DIR=$libdir" >> config.mak echo "LIB_DIR=$libdir" >> config.mak
echo "LANGUAGES=$languages" >> config.mak
echo "LANGUAGE=$language" >> config.mak echo "LANGUAGE=$language" >> config.mak
echo "CC=$cc" >> config.mak echo "CC=$cc" >> config.mak
echo "CXX=$cxx" >> config.mak echo "CXX=$cxx" >> config.mak
@ -283,6 +285,7 @@ echo "sharedir: $sharedir"
echo "docdir: $docdir" echo "docdir: $docdir"
echo "langdir: $langdir" echo "langdir: $langdir"
echo "libdir: $libdir" echo "libdir: $libdir"
echo "languages: $languages"
echo "language: $language" echo "language: $language"
enabled doc && { enabled doc && {
echo "makeinfo: $makeinfo" echo "makeinfo: $makeinfo"

View File

@ -1,5 +1,19 @@
include ../config.mak include ../config.mak
TARGETS = gram.dgp
.PHONY: all
all: $(TARGETS)
# ------------------------------------------------------------------
# main section
# ------------------------------------------------------------------
gram.dgp: gram.dgc
dgc --grammar=gram.dgc --categories=$(LANGUAGE)/lem.cats --outputfile=gram.dgp
.PHONY: install .PHONY: install
install: install:
ifdef LANG_DIR ifdef LANG_DIR
@ -12,7 +26,7 @@ ifdef LANG_DIR
install -m 0644 pl_PL.ISO-8859-2/lem.cats $(LANG_DIR)/pl_PL.ISO-8859-2 install -m 0644 pl_PL.ISO-8859-2/lem.cats $(LANG_DIR)/pl_PL.ISO-8859-2
install -m 0644 pl_PL.ISO-8859-2/pl_PL.ISO-8859-2.sym $(LANG_DIR)/pl_PL.ISO-8859-2 install -m 0644 pl_PL.ISO-8859-2/pl_PL.ISO-8859-2.sym $(LANG_DIR)/pl_PL.ISO-8859-2
install -m 0644 pl_PL.UTF-8/lem.bin $(LANG_DIR)/pl_PL.UTF-8 install -m 0644 pl_PL.UTF-8/lem.bin $(LANG_DIR)/pl_PL.UTF-8
install -m 0644 gram.dgc $(LANG_DIR) install -m 0644 gram.dgp $(LANG_DIR)
install -m 0644 weights.kor $(LANG_DIR) install -m 0644 weights.kor $(LANG_DIR)
endif endif
@ -31,3 +45,9 @@ ifdef LANG_DIR
rmdir $(LANG_DIR)/pl_PL.ISO-8859-2 rmdir $(LANG_DIR)/pl_PL.ISO-8859-2
rmdir $(LANG_DIR)/pl_PL.UTF-8 rmdir $(LANG_DIR)/pl_PL.UTF-8
endif endif
.PHONY: clean
clean:
rm -f gram.dgp

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -19,6 +19,7 @@ ifdef BIN_DIR
install -m 0755 compdic-update-fst $(BIN_DIR) install -m 0755 compdic-update-fst $(BIN_DIR)
install -m 0755 compdic-update-cats $(BIN_DIR) install -m 0755 compdic-update-cats $(BIN_DIR)
install -m 0755 compdic-dic-to-fst $(BIN_DIR) install -m 0755 compdic-dic-to-fst $(BIN_DIR)
install -m 0755 compdic-dic-to-cats $(BIN_DIR)
install -m 0755 compdic-fst-to-bin $(BIN_DIR) install -m 0755 compdic-fst-to-bin $(BIN_DIR)
install -m 0755 fsm2aut $(BIN_DIR) install -m 0755 fsm2aut $(BIN_DIR)
@ -34,6 +35,7 @@ ifdef BIN_DIR
rm $(BIN_DIR)/compdic-update-fst rm $(BIN_DIR)/compdic-update-fst
rm $(BIN_DIR)/compdic-update-cats rm $(BIN_DIR)/compdic-update-cats
rm $(BIN_DIR)/compdic-dic-to-fst rm $(BIN_DIR)/compdic-dic-to-fst
rm $(BIN_DIR)/compdic-dic-to-cats
rm $(BIN_DIR)/compdic-fst-to-bin rm $(BIN_DIR)/compdic-fst-to-bin
rm $(BIN_DIR)/fsm2aut rm $(BIN_DIR)/fsm2aut

View File

@ -138,6 +138,7 @@ _ 85
/ 92 / 92
* 93 * 93
+ 94 + 94
<EFBFBD> 95
EOF EOF

View File

@ -143,6 +143,7 @@ _ 85
/ 92 / 92
* 93 * 93
+ 94 + 94
<EFBFBD> 95
EOF EOF

View File

@ -110,6 +110,7 @@ _ 85
/ 92 / 92
* 93 * 93
+ 94 + 94
<EFBFBD> 95
EOF EOF
cat $1 | fstrmepsilon | fstdeterminize | fstminimize | fstprint --acceptor --isymbols=$alphabet | fsm2aut | aut2fsa > $2 cat $1 | fstrmepsilon | fstdeterminize | fstminimize | fstprint --acceptor --isymbols=$alphabet | fsm2aut | aut2fsa > $2