Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 6 additions & 21 deletions tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ else
endif
endif

all: check_required_programs sph2pipe atlas sclite openfst irstlm_tgt
all: check_required_programs sph2pipe atlas sclite openfst
@echo -e "\n\n"
@echo "Warning: IRSTLM is not installed by default anymore. If you need IRSTLM"
@echo "Warning: use the script extras/install_irstlm.sh"
@echo "All done OK."

check_required_programs:
extras/check_dependencies.sh

clean: openfst_cleaned sclite_cleaned irstlm_cleaned
clean: openfst_cleaned sclite_cleaned

openfst_cleaned:
$(MAKE) -C openfst-$(OPENFST_VERSION) clean

irstlm_cleaned:
$(MAKE) -C irstlm clean

sclite_cleaned:
$(MAKE) -C sctk clean
Expand All @@ -46,7 +48,6 @@ distclean:
rm -rf sctk-2.4.9/
rm -rf sctk
rm -rf ATLAS/
rm -rf irstlm/
rm -rf sph2pipe_v2.5/
rm -rf sph2pipe_v2.5.tar.gz
rm -rf atlas3.8.3.tar.gz
Expand Down Expand Up @@ -115,22 +116,6 @@ sctk-2.4.9-20141015-1634Z.tar.bz2:
wget -T 10 -t 3 ftp://jaguar.ncsl.nist.gov/pub/sctk-2.4.9-20141015-1634Z.tar.bz2|| \
wget --no-check-certificate -T 10 http://www.openslr.org/resources/4/sctk-2.4.9-20141015-1634Z.tar.bz2

irstlm_tgt: irstlm_compiled

.PHONY: irstlm_compiled
irstlm_compiled: irstlm/Makefile
cd irstlm/; \
make; $(MAKE) install

irstlm/Makefile: irstlm
cd irstlm; \
automake --version | grep 1.13.1 >/dev/null && \
sed s:AM_CONFIG_HEADER:AC_CONFIG_HEADERS: <configure.in >configure.ac; \
(./regenerate-makefiles.sh || ./regenerate-makefiles.sh) && \
./configure --prefix `pwd`

irstlm:
svn -r 618 co --non-interactive --trust-server-cert https://svn.code.sf.net/p/irstlm/code/trunk irstlm

atlas: ATLAS/include/cblas.h

Expand Down
59 changes: 59 additions & 0 deletions tools/extras/install_irstlm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash
# Copyright (c) 2015, Johns Hopkins University (Yenda Trmal <jtrmal@gmail.com>)
# License: Apache 2.0

# Begin configuration section.
# End configuration section
set -e -o pipefail

errcho() { echo "$@" 1>&2; }

errcho "****() Installing IRSTLM"

if [ ! -x ./irstlm ] ; then
svn=`which svn`
if [ $? != 0 ] ; then
errcho "****() You need to have svn (subversion) installed"
exit 1
fi
(
svn -r 618 co --non-interactive --trust-server-cert \
https://svn.code.sf.net/p/irstlm/code/trunk irstlm
) || {
errcho "****() Error getting the IRSTLM sources. The server hosting it"
errcho "****() might be down."
exit 1
}
else
echo "****() Assuming IRSTLM is already installed. Please delete"
echo "****() the directory ./irstlm if you need us to download"
echo "****() the sources again."
fi

(
cd irstlm || exit 1
automake --version | grep 1.13.1 >/dev/null && \
sed s:AM_CONFIG_HEADER:AC_CONFIG_HEADERS: <configure.in >configure.ac;

./regenerate-makefiles.sh || ./regenerate-makefiles.sh

./configure --prefix `pwd`

make; make install
) || {
errcho "***() Error compiling IRSTLM. The error messages could help you "
errcho "***() in figuring what went wrong."
}

(
. ./env.sh
[ ! -z ${IRSTLM} ] && exit

wd=`pwd`
wd=`readlink -f $wd`

echo "export IRSTLM=$wd/irstlm"
echo "export PATH=\${PATH}:\${IRSTLM}/bin"
) >> env.sh

errcho "***() Installation of IRSTLM finished successfully"