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 = ;
|
|
|
|
}
|
|
|
|
|
|
|
|
alias headers : ../util//kenutil : : : $(max-factors) $(dlib) ;
|
2011-11-18 20:25:45 +04:00
|
|
|
alias ThreadPool : ThreadPool.cpp ;
|
|
|
|
|
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 ;
|
|
|
|
}
|
|
|
|
|
2012-09-25 18:20:23 +04:00
|
|
|
local have-clock = [ SHELL "bash -c \"g++ -dM -x c++ -E /dev/null -include time.h 2>/dev/null |grep CLOCK_MONOTONIC\"" : exit-status ] ;
|
|
|
|
if $(have-clock[2]) = 0 {
|
|
|
|
#required for clock_gettime. Threads already have rt.
|
|
|
|
lib rt : : <runtime-link>static:<link>static <runtime-link>shared:<link>shared ;
|
|
|
|
} else {
|
|
|
|
alias rt ;
|
|
|
|
}
|
2012-08-03 18:38:45 +04:00
|
|
|
|
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) ;
|
|
|
|
|
2013-07-19 01:54:52 +04:00
|
|
|
obj FF_Factory.o : FF/Factory.cpp LM//macros headers ../lm//kenlm : <dependency>$(LM-LOG) ;
|
|
|
|
|
2012-11-08 18:17:15 +04:00
|
|
|
lib moses :
|
|
|
|
[ glob
|
|
|
|
*.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
|
2013-05-24 21:02:49 +04:00
|
|
|
FF/*.cpp
|
2013-07-01 16:10:58 +04:00
|
|
|
FF/OSM-Feature/*.cpp
|
2013-08-30 20:45:56 +04:00
|
|
|
FF/LexicalReordering/*.cpp
|
2012-11-08 18:17:15 +04:00
|
|
|
: #exceptions
|
|
|
|
ThreadPool.cpp
|
|
|
|
SyntacticLanguageModel.cpp
|
|
|
|
*Test.cpp Mock*.cpp
|
2013-07-24 15:13:11 +04:00
|
|
|
FF/Factory.cpp
|
2012-11-08 18:17:15 +04:00
|
|
|
]
|
2013-09-25 03:43:16 +04:00
|
|
|
headers FF_Factory.o LM//LM TranslationModel/CompactPT//CompactPT synlm ThreadPool rt
|
|
|
|
..//search ../util/double-conversion//double-conversion ..//z ../OnDiskPt//OnDiskPt
|
2013-09-26 13:10:12 +04:00
|
|
|
$(TOP)//boost_iostreams ;
|
|
|
|
|
|
|
|
#generic//generic mm//mm
|
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 ;
|
|
|
|
|
2013-09-14 20:15:41 +04:00
|
|
|
unit-test moses_test : [ glob *Test.cpp Mock*.cpp ] moses headers ..//z ../OnDiskPt//OnDiskPt ..//boost_unit_test_framework ;
|
2012-10-12 00:33:11 +04:00
|
|
|
|