mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-20 07:42:21 +03:00
Merge branch 'master' of github.com:moses-smt/mosesdecoder
This commit is contained in:
commit
4a4b1a168d
@ -30,6 +30,23 @@ if $(have-clock[2]) = 0 {
|
||||
alias rt ;
|
||||
}
|
||||
|
||||
#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) ;
|
||||
|
||||
obj FF_Factory.o : FF/Factory.cpp LM//macros headers ../lm//kenlm : <dependency>$(LM-LOG) ;
|
||||
|
||||
lib moses :
|
||||
|
@ -7,24 +7,6 @@
|
||||
|
||||
import option path ;
|
||||
|
||||
#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) ;
|
||||
|
||||
local dependencies = ;
|
||||
local lmmacros = ;
|
||||
|
||||
@ -96,7 +78,4 @@ obj ORLM.o : ORLM.cpp ..//headers ../TranslationModel/DynSAInclude//dynsa : : :
|
||||
alias LM : Base.cpp Implementation.cpp Joint.cpp Ken.cpp MultiFactor.cpp Remote.cpp SingleFactor.cpp ORLM.o
|
||||
../../lm//kenlm ..//headers $(dependencies) ;
|
||||
|
||||
rule lm-log ( ) {
|
||||
return $(LM-LOG) ;
|
||||
}
|
||||
alias macros : : : : <define>$(lmmacros) <dependency>$(LM-LOG) ;
|
||||
alias macros : : : : <define>$(lmmacros) ;
|
||||
|
Loading…
Reference in New Issue
Block a user