diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-11-12 22:07:53 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-11-12 22:07:53 +0400 |
commit | d4f433c7f43d5341586e8f6107c50ad137e72980 (patch) | |
tree | 202f5b255b344d4f5f84b66d51124b6428fc7906 | |
parent | 8c785cff2b1be3cccd76ea9026f71b649762dfc3 (diff) |
Put core Moses into one library libmoses.
-rw-r--r-- | OnDiskPt/Jamfile | 2 | ||||
-rw-r--r-- | jam-files/sanity.jam | 18 | ||||
-rw-r--r-- | lm/Jamfile | 2 | ||||
-rw-r--r-- | moses/src/CompactPT/Jamfile | 2 | ||||
-rw-r--r-- | moses/src/DynSAInclude/Jamfile | 2 | ||||
-rw-r--r-- | search/Jamfile | 2 | ||||
-rw-r--r-- | util/Jamfile | 2 |
7 files changed, 24 insertions, 6 deletions
diff --git a/OnDiskPt/Jamfile b/OnDiskPt/Jamfile index 4a6662453..604c2737e 100644 --- a/OnDiskPt/Jamfile +++ b/OnDiskPt/Jamfile @@ -1,4 +1,4 @@ -lib OnDiskPt : OnDiskWrapper.cpp SourcePhrase.cpp TargetPhrase.cpp Word.cpp Phrase.cpp PhraseNode.cpp TargetPhraseCollection.cpp Vocab.cpp ../moses/src//headers ; +fakelib OnDiskPt : OnDiskWrapper.cpp SourcePhrase.cpp TargetPhrase.cpp Word.cpp Phrase.cpp PhraseNode.cpp TargetPhraseCollection.cpp Vocab.cpp ../moses/src//headers ; exe CreateOnDiskPt : Main.cpp ../moses/src//moses OnDiskPt ; exe queryOnDiskPt : queryOnDiskPt.cpp ../moses/src//moses OnDiskPt ; diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam index e15bfb2b7..86bb78253 100644 --- a/jam-files/sanity.jam +++ b/jam-files/sanity.jam @@ -265,4 +265,22 @@ if [ option.get "sanity-test" : : "yes" ] { } } +#Hack to act like alias in the sense that no lib is built, but only build cpp files once. +import type ; +rule fakelib ( name : deps * : requirements * : default-build * : usage-requirements * ) { + local c-files = ; + local real-deps = ; + for local c in $(deps) { + if [ type.type $(c) ] = CPP { + c-files += $(c) ; + } else { + real-deps += $(c) ; + } + } + for local c in $(c-files) { + obj $(c:B).o : $(c) $(real-deps) : $(requirements) : $(default-build) : $(usage_requirements) ; + } + alias $(name) : $(c-files:B).o $(real-deps) : $(requirements) : $(default-build) : $(usage-requirements) ; +} + use-project /top : . ; diff --git a/lm/Jamfile b/lm/Jamfile index 7423db444..a4ec75002 100644 --- a/lm/Jamfile +++ b/lm/Jamfile @@ -13,7 +13,7 @@ update-if-changed $(ORDER-LOG) $(max-order) ; max-order += <dependency>$(ORDER-LOG) ; -lib kenlm : bhiksha.cc binary_format.cc config.cc lm_exception.cc model.cc quantize.cc read_arpa.cc search_hashed.cc search_trie.cc trie.cc trie_sort.cc value_build.cc virtual_interface.cc vocab.cc ../util//kenutil : <include>.. $(max-order) : : <include>.. <library>../util//kenutil $(max-order) ; +fakelib kenlm : bhiksha.cc binary_format.cc config.cc lm_exception.cc model.cc quantize.cc read_arpa.cc search_hashed.cc search_trie.cc trie.cc trie_sort.cc value_build.cc virtual_interface.cc vocab.cc ../util//kenutil : <include>.. $(max-order) : : <include>.. $(max-order) ; import testing ; diff --git a/moses/src/CompactPT/Jamfile b/moses/src/CompactPT/Jamfile index ebc6e9c12..702f9e542 100644 --- a/moses/src/CompactPT/Jamfile +++ b/moses/src/CompactPT/Jamfile @@ -13,4 +13,4 @@ else { path-constant PT-LOG : bin/pt.log ; update-if-changed $(PT-LOG) $(current) ; -lib CompactPT : [ glob *.cpp ] ..//headers cmph : $(includes) <dependency>$(PT-LOG) : : $(includes) ; +fakelib CompactPT : [ glob *.cpp ] ..//headers cmph : $(includes) <dependency>$(PT-LOG) : : $(includes) ; diff --git a/moses/src/DynSAInclude/Jamfile b/moses/src/DynSAInclude/Jamfile index 616d19bb6..aaf5633e4 100644 --- a/moses/src/DynSAInclude/Jamfile +++ b/moses/src/DynSAInclude/Jamfile @@ -1 +1 @@ -lib dynsa : [ glob *.cpp ] ../../../util//kenutil ..//headers : : : <include>. ; +alias dynsa : ../../../util//kenutil ..//headers : : : <include>. ; diff --git a/search/Jamfile b/search/Jamfile index bc95c53af..c00d23828 100644 --- a/search/Jamfile +++ b/search/Jamfile @@ -1,4 +1,4 @@ -lib search : weights.cc vertex.cc vertex_generator.cc edge_generator.cc rule.cc ../lm//kenlm ../util//kenutil /top//boost_system : : : <include>.. ; +fakelib search : weights.cc vertex.cc vertex_generator.cc edge_generator.cc rule.cc ../lm//kenlm ../util//kenutil /top//boost_system : : : <include>.. ; import testing ; diff --git a/util/Jamfile b/util/Jamfile index 9209708b0..35cc06d04 100644 --- a/util/Jamfile +++ b/util/Jamfile @@ -16,7 +16,7 @@ alias read_compressed : read_compressed.o $(compressed_deps) ; obj read_compressed_test.o : read_compressed_test.cc /top//boost_unit_test_framework : $(compressed_flags) ; obj file_piece_test.o : file_piece_test.cc /top//boost_unit_test_framework : $(compressed_flags) ; -lib kenutil : bit_packing.cc ersatz_progress.cc exception.cc file.cc file_piece.cc mmap.cc murmur_hash.cc pool.cc read_compressed string_piece.cc usage.cc : <include>.. : : <include>.. ; +fakelib kenutil : bit_packing.cc ersatz_progress.cc exception.cc file.cc file_piece.cc mmap.cc murmur_hash.cc pool.cc read_compressed string_piece.cc usage.cc : <include>.. : : <include>.. ; import testing ; |