2015-03-26 15:21:55 +03:00
|
|
|
# -*- jam -*-
|
2012-10-19 13:16:45 +04:00
|
|
|
max-factors = [ option.get "max-factors" : 4 : 4 ] ;
|
|
|
|
path-constant FACTOR-LOG : bin/factor.log ;
|
|
|
|
update-if-changed $(FACTOR-LOG) $(max-factors) ;
|
2012-10-31 18:48:29 +04:00
|
|
|
max-factors = <define>MAX_NUM_FACTORS=$(max-factors) <dependency>$(FACTOR-LOG) ;
|
2012-10-19 13:16:45 +04:00
|
|
|
|
2013-05-15 19:40:59 +04:00
|
|
|
with-dlib = [ option.get "with-dlib" ] ;
|
|
|
|
if $(with-dlib) {
|
|
|
|
dlib = <define>WITH_DLIB <include>$(with-dlib) ;
|
|
|
|
} else {
|
|
|
|
dlib = ;
|
|
|
|
}
|
|
|
|
|
2014-11-13 19:52:24 +03:00
|
|
|
with-oxlm = [ option.get "with-oxlm" ] ;
|
|
|
|
if $(with-oxlm) {
|
2014-09-26 18:18:14 +04:00
|
|
|
oxlm = <cxxflags>-std=c++0x <define>LM_OXLM <include>$(with-oxlm)/src <include>$(with-oxlm)/third_party/eigen ;
|
2014-11-13 19:52:24 +03:00
|
|
|
} else {
|
2014-09-26 18:18:14 +04:00
|
|
|
oxlm = ;
|
2014-11-13 19:52:24 +03:00
|
|
|
}
|
|
|
|
|
2015-01-06 20:15:53 +03:00
|
|
|
local classifier = ;
|
2015-01-05 20:23:55 +03:00
|
|
|
if [ option.get "with-vw" ] {
|
2015-01-06 20:15:53 +03:00
|
|
|
classifier += ..//vw//classifier ;
|
2015-01-05 20:23:55 +03:00
|
|
|
}
|
|
|
|
|
2015-01-06 20:15:53 +03:00
|
|
|
alias headers : ../util//kenutil $(classifier) : : : $(max-factors) $(dlib) $(oxlm) ;
|
2011-11-18 20:25:45 +04:00
|
|
|
alias ThreadPool : ThreadPool.cpp ;
|
2014-01-29 22:37:42 +04:00
|
|
|
alias Util : Util.cpp Timer.cpp ;
|
2011-11-18 20:25:45 +04:00
|
|
|
|
2011-11-18 19:07:59 +04:00
|
|
|
if [ option.get "with-synlm" : no : yes ] = yes
|
|
|
|
{
|
|
|
|
lib m ;
|
2011-11-18 19:40:56 +04:00
|
|
|
obj SyntacticLanguageModel.o : SyntacticLanguageModel.cpp headers : <include>$(TOP)/synlm/hhmm/rvtl/include <include>$(TOP)/synlm/hhmm/wsjparse/include ;
|
2011-11-18 19:07:59 +04:00
|
|
|
alias synlm : SyntacticLanguageModel.o m : : : <define>HAVE_SYNLM ;
|
|
|
|
} else {
|
|
|
|
alias synlm ;
|
|
|
|
}
|
|
|
|
|
2013-07-19 21:50:12 +04:00
|
|
|
#This is a kludge to force rebuilding if different --with options are passed.
|
|
|
|
#Could have used features like <srilm>on but getting these to apply only to
|
|
|
|
#linking was ugly and it still didn't trigger an install (since the install
|
|
|
|
#path doesn't encode features). It stores a file lm.log with the previous
|
|
|
|
#options and forces a rebuild if the current options differ.
|
|
|
|
local current = ;
|
|
|
|
for local i in srilm irstlm randlm {
|
|
|
|
local optval = [ option.get "with-$(i)" ] ;
|
|
|
|
if $(optval) {
|
|
|
|
current += "--with-$(i)=$(optval)" ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
current = $(current:J=" ") ;
|
|
|
|
current ?= "" ;
|
|
|
|
path-constant LM-LOG : bin/lm.log ;
|
|
|
|
update-if-changed $(LM-LOG) $(current) ;
|
|
|
|
|
2014-03-24 16:23:18 +04:00
|
|
|
obj FF_Factory.o : FF/Factory.cpp LM//macros headers ../lm//kenlm mmlib : <dependency>$(LM-LOG) ;
|
2013-07-19 01:54:52 +04:00
|
|
|
|
2015-03-20 21:51:49 +03:00
|
|
|
# check if we have xmlrpc-c's abyss server available
|
|
|
|
# if yes, include server capabilities in the moses executable
|
|
|
|
# include $(TOP)/jam-files/server.jam ;
|
|
|
|
|
2015-03-26 15:21:55 +03:00
|
|
|
if [ xmlrpc ]
|
2015-03-20 21:51:49 +03:00
|
|
|
{
|
2015-03-26 15:21:55 +03:00
|
|
|
echo "BUILDING MOSES SERVER!" ;
|
|
|
|
alias mserver : [ glob server/*.cpp ] ;
|
2015-03-20 21:51:49 +03:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-03-26 15:21:55 +03:00
|
|
|
echo "NOT BUILDING MOSES SERVER!" ;
|
|
|
|
alias mserver ;
|
|
|
|
}
|
2015-03-20 21:51:49 +03:00
|
|
|
|
2014-03-18 22:23:59 +04:00
|
|
|
if [ option.get "with-mm" : no : yes ] = yes
|
|
|
|
{
|
|
|
|
alias mmlib :
|
|
|
|
$(TOP)/moses/TranslationModel/UG//mmsapt
|
|
|
|
$(TOP)/moses/TranslationModel/UG/generic//generic
|
|
|
|
$(TOP)/moses/TranslationModel/UG/mm//mm
|
|
|
|
;
|
|
|
|
} else {
|
|
|
|
alias mmlib ;
|
|
|
|
}
|
2013-07-19 01:54:52 +04:00
|
|
|
|
2015-01-07 11:53:19 +03:00
|
|
|
local with-vw = [ option.get "with-vw" ] ;
|
|
|
|
if $(with-vw) {
|
|
|
|
alias vwfiles : [ glob FF/VW/*.cpp ] ;
|
|
|
|
} else {
|
|
|
|
alias vwfiles ;
|
|
|
|
}
|
|
|
|
|
2012-11-08 18:17:15 +04:00
|
|
|
lib moses :
|
|
|
|
[ glob
|
|
|
|
*.cpp
|
2015-05-11 02:34:24 +03:00
|
|
|
parameters/*.cpp
|
2014-11-04 16:13:56 +03:00
|
|
|
Syntax/*.cpp
|
2015-02-02 20:00:42 +03:00
|
|
|
Syntax/F2S/*.cpp
|
2014-11-04 16:13:56 +03:00
|
|
|
Syntax/S2T/*.cpp
|
|
|
|
Syntax/S2T/Parsers/*.cpp
|
|
|
|
Syntax/S2T/Parsers/RecursiveCYKPlusParser/*.cpp
|
|
|
|
Syntax/S2T/Parsers/Scope3Parser/*.cpp
|
2015-02-02 20:00:42 +03:00
|
|
|
Syntax/T2S/*.cpp
|
2012-11-27 19:08:31 +04:00
|
|
|
TranslationModel/*.cpp
|
2012-11-27 19:36:24 +04:00
|
|
|
TranslationModel/fuzzy-match/*.cpp
|
2012-11-27 20:16:30 +04:00
|
|
|
TranslationModel/DynSAInclude/*.cpp
|
2012-11-27 20:57:23 +04:00
|
|
|
TranslationModel/RuleTable/*.cpp
|
2012-11-27 21:09:23 +04:00
|
|
|
TranslationModel/Scope3Parser/*.cpp
|
2012-11-27 21:23:31 +04:00
|
|
|
TranslationModel/CYKPlusParser/*.cpp
|
2014-09-12 16:52:46 +04:00
|
|
|
../phrase-extract/extract-ghkm/PhraseOrientation.cpp
|
2013-05-24 21:02:49 +04:00
|
|
|
FF/*.cpp
|
2014-08-21 19:09:48 +04:00
|
|
|
FF/bilingual-lm/*.cpp
|
2013-07-01 16:10:58 +04:00
|
|
|
FF/OSM-Feature/*.cpp
|
2013-08-30 20:45:56 +04:00
|
|
|
FF/LexicalReordering/*.cpp
|
2014-05-20 00:54:08 +04:00
|
|
|
PP/*.cpp
|
2012-11-08 18:17:15 +04:00
|
|
|
: #exceptions
|
|
|
|
ThreadPool.cpp
|
|
|
|
SyntacticLanguageModel.cpp
|
2013-09-19 00:58:38 +04:00
|
|
|
*Test.cpp Mock*.cpp FF/*Test.cpp
|
2013-07-24 15:13:11 +04:00
|
|
|
FF/Factory.cpp
|
2015-03-20 21:51:49 +03:00
|
|
|
]
|
|
|
|
vwfiles synlm mmlib mserver headers
|
|
|
|
FF_Factory.o
|
|
|
|
LM//LM
|
|
|
|
TranslationModel/CompactPT//CompactPT
|
|
|
|
TranslationModel/ProbingPT//ProbingPT
|
|
|
|
ThreadPool
|
|
|
|
..//search
|
|
|
|
../util/double-conversion//double-conversion
|
|
|
|
..//z
|
|
|
|
../OnDiskPt//OnDiskPt
|
|
|
|
$(TOP)//boost_filesystem
|
|
|
|
$(TOP)//boost_iostreams
|
2014-03-13 03:13:44 +04:00
|
|
|
:
|
|
|
|
<threading>single:<source>../util//rt
|
|
|
|
;
|
2013-09-26 13:10:12 +04:00
|
|
|
|
2012-02-13 23:31:37 +04:00
|
|
|
|
|
|
|
alias headers-to-install : [ glob-tree *.h ] ;
|
2011-12-15 16:36:07 +04:00
|
|
|
|
|
|
|
import testing ;
|
|
|
|
|
2014-12-06 00:33:59 +03:00
|
|
|
unit-test moses_test : [ glob *Test.cpp Mock*.cpp FF/*Test.cpp ] ..//boost_filesystem moses headers ..//z ../OnDiskPt//OnDiskPt ..//boost_unit_test_framework ;
|
2012-10-12 00:33:11 +04:00
|
|
|
|