From 141861842d975c5b878206926ddf3b91f58e182b Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Mon, 30 Jul 2012 15:50:30 -0400 Subject: [PATCH 1/3] Change header file glob from an opt-out to an opt-in for Ondrej Bojar --- Jamroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jamroot b/Jamroot index 0f1b2a965..bf1cc9833 100644 --- a/Jamroot +++ b/Jamroot @@ -94,7 +94,7 @@ build-projects util lm mert moses-cmd/src moses-chart-cmd/src scripts regression 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 ; install-bin-libs programs ; -install-headers headers-base : [ glob-tree *.h *.hh : jam-files dist bin lib include kenlm moses ] : . ; +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 ; alias install : prefix-bin prefix-lib headers-base headers-moses ; From 1d6fa9178a473171e22d9d678c343e4f5fa79aae Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Mon, 30 Jul 2012 15:58:10 -0400 Subject: [PATCH 2/3] Promote moses to a lib instead of an alias so people can link against it --- moses/src/Jamfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moses/src/Jamfile b/moses/src/Jamfile index d558313d9..4c49d51d5 100644 --- a/moses/src/Jamfile +++ b/moses/src/Jamfile @@ -16,6 +16,6 @@ lib moses_internal : [ glob *.cpp DynSAInclude/*.cpp : PhraseDictionary.cpp ThreadPool.cpp SyntacticLanguageModel.cpp ] synlm ThreadPool headers ; -alias moses : PhraseDictionary.cpp moses_internal CYKPlusParser//CYKPlusParser LM//LM RuleTable//RuleTable Scope3Parser//Scope3Parser headers ../..//z ../../OnDiskPt//OnDiskPt ; +lib moses : PhraseDictionary.cpp moses_internal CYKPlusParser//CYKPlusParser LM//LM RuleTable//RuleTable Scope3Parser//Scope3Parser headers ../..//z ../../OnDiskPt//OnDiskPt ; alias headers-to-install : [ glob-tree *.h ] ; From edf34e9d35425ca627ed19e1415172258ca82cc5 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Mon, 30 Jul 2012 16:47:30 -0400 Subject: [PATCH 3/3] Loosen requirements for system bjam versions / Tom Hoar --- bjam | 3 +-- jam-files/sanity.jam | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bjam b/bjam index 1cea4fb15..eda8970dc 100755 --- a/bjam +++ b/bjam @@ -4,8 +4,7 @@ if bjam="$(which bjam 2>/dev/null)" && #exists [ ${#bjam} != 0 ] && #paranoia about which printing nothing then returning true ! grep UFIHGUFIHBDJKNCFZXAEVA "${bjam}" /dev/null && #bjam in path isn't this script - "${bjam}" --version |grep "Boost.Build 201" >/dev/null 2>/dev/null && #It's recent enough. - "${bjam}" --help >/dev/null 2>/dev/null #bjam in path isn't broken (i.e. has boost-build) + "${bjam}" --sanity-test 2>/dev/null |grep Sane >/dev/null #The test in jam-files/sanity.jam passes then #Delegate to system bjam exec "${bjam}" "$@" diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam index c846bec6c..817e52689 100644 --- a/jam-files/sanity.jam +++ b/jam-files/sanity.jam @@ -4,6 +4,7 @@ import os ; import path ; import project ; import build-system ; +import version ; #Shell with trailing line removed http://lists.boost.org/boost-build/2007/08/17051.php rule trim-nl ( str extras * ) { @@ -244,3 +245,12 @@ rule always-if-changed ( file current : targets * ) { } } } + +if [ option.get "sanity-test" : : "yes" ] { + local current_version = [ modules.peek : JAM_VERSION ] ; + if ( $(current_version[0]) < 2000 && [ version.check-jam-version 3 1 16 ] ) || [ version.check-jam-version 2011 0 0 ] { + EXIT "Sane" : 0 ; + } else { + EXIT "Bad" : 1 ; + } +}