mosesdecoder/Jamroot

117 lines
3.9 KiB
Plaintext
Raw Normal View History

2011-11-25 21:30:36 +04:00
#BUILDING MOSES
#
2011-11-25 21:30:36 +04:00
#PACKAGES
#Language models (optional):
2011-11-25 15:55:36 +04:00
#--with-irstlm=/path/to/irstlm
#--with-srilm=/path/to/srilm See moses/src/LM/Jamfile for more options.
#--with-randlm=/path/to/randlm
#KenLM is always compiled.
#
2011-11-25 15:55:36 +04:00
#--with-boost=/path/to/boost
#If Boost is in a non-standard location, specify it here. This directory is
#expected to contain include and lib or lib64.
#
2011-11-21 21:19:24 +04:00
#--with-xmlrpc-c=/path/to/xmlrpc-c for libxmlrpc-c (used by server)
#Note that, like language models, this is the --prefix where the library was
#installed, not some executable within the library.
#
#Thread-caching malloc (optional):
#--with-tcmalloc
2011-11-21 21:19:24 +04:00
#
#REGRESSION TESTING
#--with-regtest=/path/to/moses-reg-test-data
#
2012-08-03 21:29:21 +04:00
#Compact phrase table and lexical reordering table
#--with-cmph=/path/to/cmph
#
2011-11-25 20:53:02 +04:00
#INSTALLATION
2012-05-31 15:55:05 +04:00
#--prefix=/path/to/prefix sets the install prefix [default is source root].
2011-11-28 16:01:33 +04:00
#--bindir=/path/to/prefix/bin sets the bin directory [PREFIX/bin]
#--libdir=/path/to/prefix/lib sets the lib directory [PREFIX/lib]
2012-02-13 23:31:37 +04:00
#--includedir=/path/to/prefix/include installs headers.
# Does not install if missing. No argument defaults to PREFIX/include .
2011-11-25 20:53:02 +04:00
#--install-scripts=/path/to/scripts copies scripts into a directory.
2011-11-28 16:01:33 +04:00
#--git appends the git revision to the prefix directory.
2011-11-21 21:19:24 +04:00
#
2011-11-25 21:30:36 +04:00
#
#BUILD OPTIONS
2011-11-23 15:29:42 +04:00
# By default, the build is multi-threaded, optimized, and statically linked.
# Pass these to change the build:
#
2011-11-23 15:29:42 +04:00
# threading=single|multi controls threading (default multi)
#
2011-11-23 15:29:42 +04:00
# variant=release|debug|profile builds optimized (default), for debug, or for
# profiling
#
# link=static|shared controls linking (default static)
#
# debug-symbols=on|off include (default) or exclude debugging
# information also known as -g
#
2011-11-25 22:09:07 +04:00
# --notrace compiles without TRACE macros
2011-11-25 21:30:36 +04:00
#
2011-11-27 20:53:40 +04:00
# --enable-boost-pool uses Boost pools for the memory SCFG table
#
2011-11-23 15:29:42 +04:00
#
2011-11-25 21:30:36 +04:00
#CONTROLLING THE BUILD
2011-11-21 21:19:24 +04:00
#-a to build from scratch
#-j$NCPUS to compile in parallel
2011-11-23 15:29:42 +04:00
#--clean to clean
2011-12-05 15:09:48 +04:00
import option ;
import modules ;
2012-03-31 03:57:05 +04:00
import path ;
path-constant TOP : . ;
include $(TOP)/jam-files/sanity.jam ;
2011-12-05 15:09:48 +04:00
boost 103600 ;
external-lib z ;
if [ option.get "with-tcmalloc" : : "yes" ] {
external-lib tcmalloc ;
requirements += <library>tcmalloc ;
}
requirements += [ option.get "notrace" : <define>TRACE_ENABLE=1 ] ;
requirements += [ option.get "enable-boost-pool" : : <define>USE_BOOST_POOL ] ;
2012-08-04 17:39:30 +04:00
if [ option.get "with-cmph" ] {
requirements += <define>HAVE_CMPH ;
}
project : default-build
<threading>multi
<warnings>on
<debug-symbols>on
<variant>release
<link>static
;
project : requirements
<threading>multi:<define>WITH_THREADS
<threading>multi:<library>boost_thread
<define>_FILE_OFFSET_BITS=64 <define>_LARGE_FILES
$(requirements)
;
#Add directories here if you want their incidental targets too (i.e. tests).
build-projects util lm mert moses-cmd/src moses-chart-cmd/src scripts regression-testing ;
2012-06-01 02:32:24 +04:00
alias programs : lm//query lm//build_binary moses-chart-cmd/src//moses_chart moses-cmd/src//programs OnDiskPt//CreateOnDiskPt OnDiskPt//queryOnDiskPt mert//programs contrib/server//mosesserver misc//programs symal phrase-extract phrase-extract//lexical-reordering phrase-extract//extract-ghkm phrase-extract//pcfg-extract phrase-extract//pcfg-score biconcor ;
2011-11-28 16:01:33 +04:00
install-bin-libs programs ;
install-headers headers-base : [ path.glob-tree biconcor contrib lm mert misc moses-chart-cmd moses-cmd OnDiskPt phrase-extract symal util : *.hh *.h ] : . ;
install-headers headers-moses : moses/src//headers-to-install : moses/src ;
2012-02-13 23:31:37 +04:00
alias install : prefix-bin prefix-lib headers-base headers-moses ;
2012-03-31 03:57:05 +04:00
if ! [ option.get "includedir" : : $(prefix)/include ] {
explicit install headers-base headers-moses ;
}
2012-06-01 03:13:01 +04:00
if [ path.exists $(TOP)/dist ] && $(prefix) != dist {
echo "You have a $(TOP)/dist directory, but the build system now places files directly in the root i.e. $(TOP)/bin ." ;
echo "To disable this message, delete $(TOP)/dist ." ;
echo ;
}