Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Jamfile « server « contrib - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 06624514b60919885f458c69534e6992cd229b76 (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
# If you get compilation errors here, make sure you have xmlrpc-c
# installed properly, including the abyss server option.

import option ;
import path ;
if [ option.get "no-xmlrpc-c" : : "yes" ] 
{
  echo "Not building mosesserver." ;
}
else
{
with-xmlrpc-c = [ option.get "with-xmlrpc-c" ] ;
if $(with-xmlrpc-c) {
  echo Bulding mosesserver. ;
  echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ;
  echo "!!! You are linking the XMLRPC-C library; Do NOT use v.1.25.29            !!!" ;
  echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ;

  build-moses-server = true ;
  xmlrpc-command = $(with-xmlrpc-c)/bin/xmlrpc-c-config ;
  if ! [ path.exists $(xmlrpc-command) ] {
    exit Could not find $(xmlrpc-command) : 1 ;
  }
} else {
  xmlrpc-check = [ _shell "xmlrpc-c-config --features 2>/dev/null" : exit-status ] ;
  if $(xmlrpc-check[2]) = 0 {
    if [ MATCH "(abyss-server)" : $(xmlrpc-check[1]) ] {
      build-moses-server = true ;
    } else {
      echo "Found xmlrpc-c but it does not have abyss-server.  Skipping mosesserver." ;
    } 
  }
  xmlrpc-command = "xmlrpc-c-config" ;
}
}

rule shell_or_die ( cmd ) {
  local ret = [ _shell $(cmd) : exit-status ] ;
  if $(ret[2]) != 0 {
    exit "Failed to run $(cmd)" : 1 ;
  }
  return $(ret[1]) ;
}


if $(build-moses-server) = true
{
  xmlrpc-linkflags = [ shell_or_die "$(xmlrpc-command) c++2 abyss-server --libs" ] ;
  xmlrpc-cxxflags = [ shell_or_die "$(xmlrpc-command) c++2 abyss-server --cflags" ] ;

  exe mosesserver :
  mosesserver.cpp 
  ../../moses//moses 
  ../../OnDiskPt//OnDiskPt 
  ../..//boost_filesystem  
  : <linkflags>$(xmlrpc-linkflags) <cxxflags>$(xmlrpc-cxxflags) ;

} 
else 
{
  alias mosesserver ;
}