diff options
author | Kenneth Heafield <github@kheafield.com> | 2011-11-25 19:11:18 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2011-11-25 19:11:18 +0400 |
commit | 67c79de6f9b17af23353d930ac97b98ef10749c2 (patch) | |
tree | 5ee0d79f9d0ca7aa0bddcc6a799b4d8d69c5d0f5 /scripts | |
parent | e8dd8f28539ac87604127b20601cf150435894c3 (diff) |
Substitute bindir
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Jamfile | 13 | ||||
-rw-r--r-- | scripts/training/Jamfile | 5 | ||||
-rwxr-xr-x | scripts/training/train-model.perl.missing_bin_dir (renamed from scripts/training/train-model.perl) | 0 |
3 files changed, 16 insertions, 2 deletions
diff --git a/scripts/Jamfile b/scripts/Jamfile index 505e8de0b..72bf0402e 100644 --- a/scripts/Jamfile +++ b/scripts/Jamfile @@ -1,6 +1,14 @@ +import option ; + build-project training ; -location = dist ; +location = [ option.get "install" : $(TOP)/scripts/dist ] ; + +constant BINDIR : [ option.get "bindir" ] ; + +if ! $(BINDIR) { + exit "Pass --bindir=/path/to/bindir to indicate where GIZA++, snt2cooc.out, and mkcls live." : 1 ; +} #These two used to live in a tools directory. install ghkm : training/phrase-extract/extract-ghkm//extract-ghkm : <location>$(location)/training/phrase-extract/extract-ghkm/tools ; @@ -10,6 +18,8 @@ install phrase-extract : training/phrase-extract//released-programs : <location> install lexical-reordering : training/lexical-reordering//score : <location>$(location)/training/lexical-reordering ; install symal : training/symal//symal : <location>$(location)/symal ; +install train-model : training//train-model.perl : <location>$(location)/training ; + install scripts : analysis/README analysis/sentence-by-sentence.pl @@ -96,7 +106,6 @@ install scripts : training/postprocess-lopar.perl training/reduce_combine.pl training/combine_factors.pl - training/train-model.perl training/symal/giza2bal.pl training/wrappers/parse-de-bitpar.perl training/wrappers/parse-en-collins.perl diff --git a/scripts/training/Jamfile b/scripts/training/Jamfile index 34834015d..0444af8d1 100644 --- a/scripts/training/Jamfile +++ b/scripts/training/Jamfile @@ -2,3 +2,8 @@ build-project compact-rule-table ; build-project phrase-extract ; build-project lexical-reordering ; build-project symal ; + +make train-model.perl : train-model.perl.missing_bin_dir : @missing_bin_dir ; +actions missing_bin_dir { + sed 's#^my \$BINDIR\s*=.*#my\ \$BINDIR=\"$(BINDIR)\";#' $(>) >$(<) +} diff --git a/scripts/training/train-model.perl b/scripts/training/train-model.perl.missing_bin_dir index 18eb80eb1..18eb80eb1 100755 --- a/scripts/training/train-model.perl +++ b/scripts/training/train-model.perl.missing_bin_dir |