a6e708f37f
Revert "Replacing old implementation with working implementation"
This reverts commit 1e121f45e2
.
Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.
Committer: tom <tom@lim.(none)>
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: _old/app/Makefile
deleted: _old/app/conf/Makefile
deleted: _old/app/conf/compiledic.conf
deleted: _old/app/conf/cor.conf
deleted: _old/app/conf/dgc.conf
deleted: _old/app/conf/dgp.conf
deleted: _old/app/conf/gph.conf
deleted: _old/app/conf/grp.conf
deleted: _old/app/conf/gue.conf
deleted: _old/app/conf/kor.conf
deleted: _old/app/conf/lem.conf
deleted: _old/app/conf/mar.conf
deleted: _old/app/conf/ser.conf
deleted: _old/app/conf/utt.conf
modified: _old/app/src/common/Makefile
modified: _old/app/src/compiledic/Makefile
modified: _old/app/src/compiledic/aut2fsa.cc
modified: _old/app/src/cor/Makefile
modified: _old/app/src/dgp/Makefile
new file: _old/app/src/dgp/canonize
new file: _old/app/src/dgp/dgc
modified: _old/app/src/dgp/grammar.hh
modified: _old/app/src/dgp/mgraph.hh
modified: _old/app/src/dgp/sgraph.hh
modified: _old/app/src/dgp/thesymbols.hh
new file: _old/app/src/dgp/tre
modified: _old/app/src/gue/Makefile
modified: _old/app/src/gue/guess.cc
modified: _old/app/src/kor/Makefile
modified: _old/app/src/kor/corlist.cc
modified: _old/app/src/kor/corr.cc
new file: _old/app/src/kor/corr.hh
modified: _old/app/src/kor/main.cc
modified: _old/app/src/lem/Makefile
modified: _old/app/src/lem/lem.cc
modified: _old/app/src/lib/Makefile
modified: _old/app/src/lib/auttools.cc
modified: _old/app/src/lib/symtab.cc
modified: _old/app/src/lib/tft.h
modified: _old/app/src/lib/tfti.h
modified: _old/app/src/lib/ttrans.h
modified: _old/app/src/lib/word.cc
modified: _old/app/src/lib/word.h
modified: _old/app/src/tok.c/Makefile
modified: _old/app/src/tok.c/cmdline_tok.ggo
modified: _old/app/src/tok.c/common_tok.cc
modified: _old/app/src/tok/Makefile
modified: _old/nawszelkiwypadek/tools/aut2fsa
modified: _old/nawszelkiwypadek/tools/cor_dic/makeLabels.pl
modified: _old/nawszelkiwypadek/tools/cor_dic/prep.pl
modified: _old/nawszelkiwypadek/tools/fsm2aut
modified: _old/nawszelkiwypadek/tools/gue_dic/canon.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/compile_user_dict.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/count_prefs.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/cut_prefs.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/makeLabels.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/prep.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/prep_user_dict.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/rmDup.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/stat.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/stat_pre.pl
modified: _old/nawszelkiwypadek/tools/lem_dic/makeLabels.pl
modified: _old/nawszelkiwypadek/tools/lem_dic/prep.pl
modified: auto/defaults
modified: auto/options
modified: auto/output/Makefile
modified: auto/output/config_h
modified: auto/summary
modified: configure
152 lines
4.2 KiB
Makefile
152 lines
4.2 KiB
Makefile
# main makefile
|
|
|
|
# ******************************
|
|
# * Local variables
|
|
# ******************************
|
|
CUR_DIR=$(shell pwd)
|
|
SRC_DIR=$(CUR_DIR)/src
|
|
OUTPUT_DIR=$(CUR_DIR)/output
|
|
|
|
# ******************************
|
|
# * Global for make globals
|
|
# ******************************
|
|
|
|
export UTT_DIR=${OUTPUT_DIR}
|
|
|
|
# executables
|
|
export UTT_BIN_DIR=${UTT_DIR}/bin
|
|
# configuration files
|
|
export UTT_CONF_DIR=${UTT_DIR}/etc/utt
|
|
# language/encoding specific stuff
|
|
# any extra files for some programs, like: weights.kor, cats.dgc, gram.dgc, etc.
|
|
export UTT_LANG_DIR=${UTT_DIR}/share/utt
|
|
# some files like ser.l.template, terms.m4
|
|
export UTT_LIB_DIR=${UTT_DIR}/lib/utt
|
|
# stuff like documantation (man, info), docs: FAQ, COPYRIGHT, NEWS, README
|
|
export UTT_SHARE_DIR=${UTT_DIR}/share
|
|
|
|
##############################
|
|
|
|
# list of components to be included in the distribution
|
|
COMPONENTS = compiledic cor dgp fla gph grp gue kon kor kot lem mar rm12 rs12 sen-l sen-nl ser tags tok.l unfla
|
|
|
|
##############################
|
|
|
|
# ------------------------------------------------------------------
|
|
# sekcja kompilacji (kompiluje i wgrywa do OUTPUT_DIR)
|
|
# ------------------------------------------------------------------
|
|
.PHONY: compile
|
|
compile: dirs components
|
|
@echo "Make compiled successfully!"
|
|
|
|
.PHONY: dirs
|
|
dirs:
|
|
if [ -d ${UTT_DIR} ]; then rm -r ${UTT_DIR}; fi
|
|
mkdir -p ${UTT_DIR}
|
|
mkdir -p ${UTT_BIN_DIR}
|
|
mkdir -p ${UTT_CONF_DIR}
|
|
mkdir -p ${UTT_LANG_DIR}
|
|
mkdir -p ${UTT_LIB_DIR}
|
|
mkdir -p ${UTT_SHARE_DIR}/utt
|
|
mkdir -p ${UTT_SHARE_DIR}/doc/utt
|
|
mkdir -p ${UTT_SHARE_DIR}/info
|
|
mkdir -p ${UTT_SHARE_DIR}/man/man3
|
|
|
|
.PHONY: components
|
|
components:
|
|
cd $(SRC_DIR)/lib && make; cd $(CUR_DIR)
|
|
|
|
@for cmp in $(COMPONENTS); do\
|
|
cd $(SRC_DIR)/$$cmp && make && make copy; cd $(CUR_DIR); \
|
|
done
|
|
|
|
|
|
# ------------------------------------------------------------------
|
|
# sekcja sprzatania (kasuje binaria z katalogow SRC/COMPONENTS)
|
|
# ------------------------------------------------------------------
|
|
.PHONY: clean
|
|
clean: clean_components clean_doc clean_dist
|
|
@echo "All files cleaned successfully!"
|
|
|
|
.PHONY: clean_components
|
|
clean_components:
|
|
@for cmp in $(COMPONENTS); do \
|
|
cd $(SRC_DIR)/$$cmp && make clean ; cd $(CUR_DIR); \
|
|
done
|
|
cd $(SRC_DIR)/lib && make clean; cd $(CUR_DIR);
|
|
|
|
.PHONY: clean_doc
|
|
clean_doc:
|
|
cd $(CUR_DIR)/doc && make clean; cd $(CUR_DIR)
|
|
|
|
.PHONY: clean_dist
|
|
clean_dist:
|
|
|
|
|
|
# ------------------------------------------------------------------
|
|
# sekcja przygotowania paczki (programow wraz z dodatkowymi plikami)
|
|
# ------------------------------------------------------------------
|
|
.PHONY: build
|
|
build: compile build_conf build_share build_lib build_doc
|
|
@echo "All files builded successfully!"
|
|
|
|
.PHONY: build_conf
|
|
build_conf:
|
|
cp $(CUR_DIR)/conf/*.conf $(UTT_CONF_DIR)/
|
|
|
|
.PHONY: build_lib
|
|
build_lib:
|
|
cp $(CUR_DIR)/lib/* $(UTT_LIB_DIR)/
|
|
|
|
.PHONY: build_doc
|
|
build_doc:
|
|
cd $(CUR_DIR)/doc && make && make copy; cd $(CUR_DIR)
|
|
|
|
.PHONY: build_share
|
|
build_share:
|
|
cp $(CUR_DIR)/share/* $(UTT_LANG_DIR)/
|
|
|
|
|
|
# ------------------------------------------------------------------
|
|
# sekcja tworzenia dystrybucji (tarballa, rpm, deb)
|
|
# ------------------------------------------------------------------
|
|
.PHONY: distribute
|
|
distribute: build dist_tarball dist_rpm
|
|
@echo "All distributions created successfully!"
|
|
|
|
.PHONY: dist_tarball
|
|
dist_tarball: build
|
|
cd $(CUR_DIR)/dist && make tarball; cd $(CUR_DIR)
|
|
|
|
.PHONY: dist_rpm
|
|
dist_rpm: build
|
|
cd $(CUR_DIR)/dist && make rpm; cd $(CUR_DIR)
|
|
|
|
.PHONY: dist_deb
|
|
dist_deb: build
|
|
cd $(CUR_DIR)/dist && make deb; cd $(CUR_DIR)
|
|
|
|
|
|
# ------------------------------------------------------------------
|
|
# sekcja testowania (kasuje tarballa z TARBALL_TEST_DIR,
|
|
# kompiluje, robi paczke,
|
|
# tworzy tarballa i wgrywa go do TARBALL_TEST_DIR)
|
|
# ------------------------------------------------------------------
|
|
#install: all
|
|
# cd ${UTT_DIR} && make install; cd ${CUR_DIR}
|
|
|
|
#uninstall:
|
|
# cd ${UTT_DIR} && make uninstall; cd ${DIR}
|
|
|
|
#reinstall:
|
|
# cd ${UTT_DIR} && make reinstall; cd ${DIR}
|
|
|
|
#dist: all
|
|
# tar -czvf $(UTT_DIST_NAME).tgz $(UTT_DIR)
|
|
|
|
|
|
#clean_dist:
|
|
# if [ -d $(UTT_DIST_DIR) ]; then rm -r $(UTT_DIST_DIR); else true; fi
|
|
# if [ -f $(UTT_DIST_FILE).tar.bz2 ]; then rm $(UTT_DIST_FILE).tar.bz2; else true; fi
|
|
# if [ -f $(UTT_DIST_PMDB_FILE).tar.bz2 ]; then rm $(UTT_DIST_PMDB_FILE).tar.bz2; else true; fi
|