blob: 5200029fb2ffcfde62ab39ec1b5f2ccdcdf764ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
# -*- jam -*-
max-factors = [ option.get "max-factors" : 4 : 4 ] ;
path-constant FACTOR-LOG : bin/factor.log ;
update-if-changed $(FACTOR-LOG) $(max-factors) ;
max-factors = <define>MAX_NUM_FACTORS=$(max-factors) <dependency>$(FACTOR-LOG) ;
with-dlib = [ option.get "with-dlib" ] ;
if $(with-dlib) {
dlib = <define>WITH_DLIB <include>$(with-dlib) ;
} else {
dlib = ;
}
with-oxlm = [ option.get "with-oxlm" ] ;
if $(with-oxlm) {
oxlm = <cxxflags>-std=c++0x <define>LM_OXLM <include>$(with-oxlm)/src <include>$(with-oxlm)/third_party/eigen ;
} else {
oxlm = ;
}
local classifier = ;
if [ option.get "with-vw" ] {
classifier += ..//vw//classifier ;
}
alias headers : ../util//kenutil $(classifier) : : : $(max-factors) $(dlib) $(oxlm) ;
alias ThreadPool : ThreadPool.cpp ;
alias Util : Util.cpp Timer.cpp ;
if [ option.get "with-synlm" : no : yes ] = yes
{
lib m ;
obj SyntacticLanguageModel.o : SyntacticLanguageModel.cpp headers : <include>$(TOP)/synlm/hhmm/rvtl/include <include>$(TOP)/synlm/hhmm/wsjparse/include ;
alias synlm : SyntacticLanguageModel.o m : : : <define>HAVE_SYNLM ;
} else {
alias synlm ;
}
#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 mmlib : <dependency>$(LM-LOG) ;
# 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 ;
if [ xmlrpc ]
{
echo "BUILDING MOSES SERVER!" ;
alias mserver : [ glob server/*.cpp ] ;
}
else
{
echo "NOT BUILDING MOSES SERVER!" ;
alias mserver ;
}
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 ;
}
local with-vw = [ option.get "with-vw" ] ;
if $(with-vw) {
alias vwfiles : [ glob FF/VW/*.cpp ] ;
} else {
alias vwfiles ;
}
lib moses :
[ glob
*.cpp
parameters/*.cpp
Syntax/*.cpp
Syntax/F2S/*.cpp
Syntax/S2T/*.cpp
Syntax/S2T/Parsers/*.cpp
Syntax/S2T/Parsers/RecursiveCYKPlusParser/*.cpp
Syntax/S2T/Parsers/Scope3Parser/*.cpp
Syntax/T2S/*.cpp
TranslationModel/*.cpp
TranslationModel/fuzzy-match/*.cpp
TranslationModel/DynSAInclude/*.cpp
TranslationModel/RuleTable/*.cpp
TranslationModel/Scope3Parser/*.cpp
TranslationModel/CYKPlusParser/*.cpp
../phrase-extract/PhraseOrientation.cpp
FF/*.cpp
FF/bilingual-lm/*.cpp
FF/OSM-Feature/*.cpp
FF/Dsg-Feature/*.cpp
FF/LexicalReordering/*.cpp
PP/*.cpp
: #exceptions
ThreadPool.cpp
SyntacticLanguageModel.cpp
*Test.cpp Mock*.cpp FF/*Test.cpp
FF/Factory.cpp
]
vwfiles synlm mmlib mserver headers
FF_Factory.o
LM//LM
TranslationModel/CompactPT//CompactPT
ThreadPool
..//search
../util/double-conversion//double-conversion
../probingpt//probingpt
..//z
../OnDiskPt//OnDiskPt
$(TOP)//boost_filesystem
$(TOP)//boost_iostreams
:
<threading>single:<source>../util//rt
;
alias headers-to-install : [ glob-tree *.h ] ;
import testing ;
unit-test moses_test : [ glob *Test.cpp Mock*.cpp FF/*Test.cpp ] ..//boost_filesystem moses headers ..//z ../OnDiskPt//OnDiskPt ../probingpt//probingpt ..//boost_unit_test_framework ;
|