зеркало из https://github.com/mozilla/kaldi.git
trunk/tools/: Makefile changes, partly merged from sandbox/sail (to update openfst to 1.3.4), partly new. Avoid unnecessary recompilation of OpenFST when we make.
git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@3799 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
This commit is contained in:
Коммит
22b9cb92a2
|
@ -19,6 +19,8 @@ tools/irstlm/
|
|||
tools/openfst
|
||||
tools/openfst-1.3.2.tar.gz
|
||||
tools/openfst-1.3.2/
|
||||
tools/openfst-1.3.4.tar.gz
|
||||
tools/openfst-1.3.4/
|
||||
tools/pa_stable_v19_20111121.tgz
|
||||
tools/portaudio/
|
||||
tools/sctk-2.4.0-20091110-0958.tar.bz2
|
||||
|
|
|
@ -92,7 +92,7 @@ ext: test_dependencies ext_depend $(SUBDIRS) $(EXT_SUBDIRS)
|
|||
# delete or comment out the lines below.
|
||||
OPENFST_VER = $(shell grep 'PACKAGE_VERSION' ../tools/openfst/Makefile | sed -e 's:.*= ::')
|
||||
test_dependencies:
|
||||
@[ "$(OPENFST_VER)" == '1.2.10' ] || [ "$(OPENFST_VER)" == '1.3.2' ] || { echo "You now need openfst-1.2.10. Do: cd ../tools; svn update; ./install.sh; cd ../src; make depend; make"; exit 1; };
|
||||
@[ "$(OPENFST_VER)" == '1.2.10' ] || [ "$(OPENFST_VER)" == '1.3.2' ] || [ "$(OPENFST_VER)" == '1.3.4' ] || { echo "You now need openfst-1.2.10. Do: cd ../tools; svn update; ./install.sh; cd ../src; make depend; make"; exit 1; };
|
||||
|
||||
check_portaudio:
|
||||
@[ -d ../tools/portaudio ] || ( cd ../tools; ./install_portaudio.sh )
|
||||
|
|
|
@ -11,7 +11,7 @@ ifeq ($(findstring clang,$(COMPILER)),clang)
|
|||
LDFLAGS += -stdlib=libstdc++
|
||||
endif
|
||||
|
||||
all: check_required_programs sph2pipe atlas irstlm_tgt sclite_tgt openfst_tgt
|
||||
all: check_required_programs sph2pipe atlas irstlm_tgt sclite openfst
|
||||
|
||||
|
||||
check_required_programs:
|
||||
|
@ -23,11 +23,12 @@ check_required_programs:
|
|||
which gcc
|
||||
which $(CXX)
|
||||
which patch
|
||||
which tar
|
||||
|
||||
clean: openfst_cleaned sclite_cleaned irstlm_cleaned
|
||||
|
||||
openfst_cleaned:
|
||||
$(MAKE) -C openfst-1.3.2 clean
|
||||
$(MAKE) -C openfst-1.3.4 clean
|
||||
|
||||
irstlm_cleaned:
|
||||
$(MAKE) -C irstlm clean
|
||||
|
@ -36,7 +37,7 @@ sclite_cleaned:
|
|||
$(MAKE) -C sctk-2.4.0 clean
|
||||
|
||||
distclean:
|
||||
rm -rf openfst-1.3.2/
|
||||
rm -rf openfst-1.3.4/
|
||||
rm -rf sctk-2.4.0/
|
||||
rm -rf ATLAS/
|
||||
rm -rf irstlm/
|
||||
|
@ -44,43 +45,45 @@ distclean:
|
|||
rm -rf sph2pipe_v2.5.tar.gz
|
||||
rm -rf atlas3.8.3.tar.gz
|
||||
rm -rf sctk-2.4.0-20091110-0958.tar.bz2
|
||||
rm -rf openfst-1.3.2.tar.gz
|
||||
rm -rf openfst-1.3.4.tar.gz
|
||||
rm -f openfst
|
||||
|
||||
openfst_tgt: openfst_compiled openfst/lib
|
||||
|
||||
.PHONY: openfst # so target will be made even though "openfst" exists.
|
||||
|
||||
openfst: openfst_compiled openfst-1.3.4/lib
|
||||
|
||||
.PHONY: openfst_compiled
|
||||
openfst_compiled: openfst-1.3.2/Makefile
|
||||
cd openfst-1.3.2/ && \
|
||||
openfst_compiled: openfst-1.3.4/Makefile
|
||||
cd openfst-1.3.4/ && \
|
||||
$(MAKE) install
|
||||
|
||||
openfst/lib:
|
||||
-cd openfst && [ -d lib64 ] && [ ! -d lib ] && ln -s lib64 lib
|
||||
openfst-1.3.4/lib: | openfst-1.3.4/Makefile
|
||||
-cd openfst-1.3.4 && [ -d lib64 ] && [ ! -d lib ] && ln -s lib64 lib
|
||||
|
||||
openfst-1.3.2/Makefile: openfst-1.3.2/.patched
|
||||
cd openfst-1.3.2/; \
|
||||
openfst-1.3.4/Makefile: openfst-1.3.4/.patched
|
||||
cd openfst-1.3.4/; \
|
||||
./configure --prefix=`pwd` --enable-static --enable-shared --enable-far --enable-ngram-fsts CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="-ldl"
|
||||
|
||||
|
||||
# patches for openfst. openfst_gcc41up.patch is a patch for openfst to \
|
||||
# support multi-threads when compile with g++ (gcc) version above 4.1
|
||||
.PHONY: openfst-1.3.2/.patched
|
||||
openfst-1.3.2/.patched: | openfst-1.3.2_tgt
|
||||
-cd openfst-1.3.2/src/include/fst; \
|
||||
openfst-1.3.4/.patched: | openfst-1.3.4
|
||||
-cd openfst-1.3.4/src/include/fst; \
|
||||
patch -p0 -N < ../../../../openfst.patch;
|
||||
$(CXX) -dumpversion | awk '{if(NR==1 && $$1>"4.1") print "cd openfst-1.3.2/src/include/fst; patch -p0 -N < ../../../../extras/openfst_gcc41up.patch"}' | sh -
|
||||
$(CXX) -dumpversion | awk '{if(NR==1 && $$1>"4.1") print "cd openfst-1.3.4/src/include/fst; patch -p0 -N < ../../../../extras/openfst_gcc41up.patch"}' | sh -
|
||||
touch $@
|
||||
|
||||
openfst-1.3.2_tgt: openfst-1.3.2.tar.gz
|
||||
tar xozf openfst-1.3.2.tar.gz
|
||||
openfst-1.3.4: openfst-1.3.4.tar.gz
|
||||
tar xozf openfst-1.3.4.tar.gz
|
||||
-rm openfst
|
||||
-ln -s openfst-1.3.2 openfst
|
||||
-ln -s openfst-1.3.4 openfst
|
||||
|
||||
openfst-1.3.2.tar.gz:
|
||||
wget http://openfst.cs.nyu.edu/twiki/pub/FST/FstDownload/openfst-1.3.2.tar.gz || \
|
||||
wget -T 10 -t 3 --no-check-certificate http://www.danielpovey.com/files/data/openfst-1.3.2.tar.gz
|
||||
openfst-1.3.4.tar.gz:
|
||||
wget http://openfst.cs.nyu.edu/twiki/pub/FST/FstDownload/openfst-1.3.4.tar.gz || \
|
||||
wget -T 10 -t 3 http://www.openslr.org/resources/2/openfst-1.3.4.tar.gz
|
||||
|
||||
sclite_tgt: sclite_compiled
|
||||
sclite: sclite_compiled
|
||||
|
||||
.PHONY: sclite_compiled
|
||||
sclite_compiled: sctk_patched
|
||||
|
@ -100,7 +103,7 @@ sctk-2.4.0: sctk-2.4.0-20091110-0958.tar.bz2
|
|||
|
||||
sctk-2.4.0-20091110-0958.tar.bz2:
|
||||
wget -T 10 -t 3 ftp://jaguar.ncsl.nist.gov/pub/sctk-2.4.0-20091110-0958.tar.bz2 || \
|
||||
wget --no-check-certificate -T 10 https://sourceforge.net/projects/kaldi/files/sctk-2.4.0-20091110-0958.tar.bz2
|
||||
wget --no-check-certificate -T 10 http://www.openslr.org/resources/4/sctk-2.4.0-20091110-0958.tar.bz2
|
||||
|
||||
irstlm_tgt: irstlm_compiled
|
||||
|
||||
|
@ -148,7 +151,7 @@ sph2pipe_v2.5: sph2pipe_v2.5.tar.gz
|
|||
|
||||
sph2pipe_v2.5.tar.gz:
|
||||
wget --no-check-certificate -T 10 https://sourceforge.net/projects/kaldi/files/sph2pipe_v2.5.tar.gz || \
|
||||
wget -T 10 -t 3 http://www.danielpovey.com/files/kaldi/sph2pipe_v2.5.tar.gz
|
||||
wget -T 10 -t 3 http://www.openslr.org/resources/3/sph2pipe_v2.5.tar.gz
|
||||
|
||||
openblas: openblas_compiled
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче