You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by mj...@apache.org on 2016/04/19 21:34:30 UTC

[42/51] [partial] incubator-joshua git commit: Converted KenLM into a submodule

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/kernel/errors.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/kernel/errors.jam b/ext/kenlm/jam-files/boost-build/kernel/errors.jam
deleted file mode 100644
index 9563396..0000000
--- a/ext/kenlm/jam-files/boost-build/kernel/errors.jam
+++ /dev/null
@@ -1,287 +0,0 @@
-# Copyright 2003 Dave Abrahams
-# Copyright 2004 Vladimir Prus
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-# Print a stack backtrace leading to this rule's caller. Each argument
-# represents a line of output to be printed after the first line of the
-# backtrace.
-#
-rule backtrace ( skip-frames prefix messages * : * )
-{
-    local frame-skips = 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 ;
-    local drop-elements = $(frame-skips[$(skip-frames)]) ;
-    if ! ( $(skip-frames) in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 )
-    {
-        ECHO "warning: backtrace doesn't support skipping $(skip-frames) "
-            "frames; using 1 instead." ;
-        drop-elements = 5 ;
-    }
-
-    local args = $(.args) ;
-    if $(.user-modules-only)
-    {
-        local bt = [ nearest-user-location ] ;
-        if $(bt)
-        {
-            ECHO $(prefix) at $(bt) ;
-        }
-        for local n in $(args)
-        {
-            if $($(n))-is-defined
-            {
-                ECHO $(prefix) $($(n)) ;
-            }
-        }
-    }
-    else
-    {
-        # Get the whole backtrace, then drop the initial quadruples
-        # corresponding to the frames that must be skipped.
-        local bt = [ BACKTRACE ] ;
-        bt = $(bt[$(drop-elements)-]) ;
-
-        while $(bt)
-        {
-            local m = [ MATCH ^(.+)\\.$ : $(bt[3]) ] ;
-            ECHO $(bt[1]):$(bt[2]): "in" $(bt[4]) "from module" $(m) ;
-
-            # The first time through, print each argument on a separate line.
-            for local n in $(args)
-            {
-                if $($(n))-is-defined
-                {
-                    ECHO $(prefix) $($(n)) ;
-                }
-            }
-            args = ;  # Kill args so that this never happens again.
-
-            # Move on to the next quadruple.
-            bt = $(bt[5-]) ;
-        }
-    }
-}
-
-.args ?= messages 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ;
-.disabled ?= ;
-.last-error-$(.args) ?= ;
-
-
-# try-catch --
-#
-# This is not really an exception-handling mechanism, but it does allow us to
-# perform some error-checking on our error-checking. Errors are suppressed after
-# a try, and the first one is recorded. Use catch to check that the error
-# message matched expectations.
-
-# Begin looking for error messages.
-#
-rule try ( )
-{
-    .disabled += true ;
-    .last-error-$(.args) = ;
-}
-
-
-# Stop looking for error messages; generate an error if an argument of messages
-# is not found in the corresponding argument in the error call.
-#
-rule catch ( messages * : * )
-{
-    .disabled = $(.disabled[2-]) ;  # Pop the stack.
-
-    import sequence ;
-
-    if ! $(.last-error-$(.args))-is-defined
-    {
-        error-skip-frames 3 expected an error, but none occurred ;
-    }
-    else
-    {
-        for local n in $(.args)
-        {
-            if ! $($(n)) in $(.last-error-$(n))
-            {
-                local v = [ sequence.join $($(n)) : " " ] ;
-                v ?= "" ;
-                local joined = [ sequence.join $(.last-error-$(n)) : " " ] ;
-
-                .last-error-$(.args) = ;
-                error-skip-frames 3 expected \"$(v)\" in argument $(n) of error
-                    : got \"$(joined)\" instead ;
-            }
-        }
-    }
-}
-
-
-rule error-skip-frames ( skip-frames messages * : * )
-{
-    if ! $(.disabled)
-    {
-        backtrace $(skip-frames) error: $(messages) : $(2) : $(3) : $(4) : $(5)
-            : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14)
-            : $(15) : $(16) : $(17) : $(18) : $(19) ;
-        EXIT ;
-    }
-    else if ! $(.last-error-$(.args))
-    {
-        for local n in $(.args)
-        {
-            # Add an extra empty string so that we always have something in the
-            # event of an error.
-            .last-error-$(n) = $($(n)) "" ;
-        }
-    }
-}
-
-if --no-error-backtrace in [ modules.peek : ARGV ]
-{
-    .no-error-backtrace = true ;
-}
-
-
-# Print an error message with a stack backtrace and exit.
-#
-rule error ( messages * : * )
-{
-    if $(.no-error-backtrace)
-    {
-        local first-printed ;
-        # Print each argument on a separate line.
-        for local n in $(.args)
-        {
-            if $($(n))-is-defined
-            {
-                if ! $(first-printed)
-                {
-                    ECHO error: $($(n)) ;
-                    first-printed = true ;
-                }
-                else
-                {
-                    ECHO $($(n)) ;
-                }
-            }
-        }
-        EXIT ;
-    }
-    else
-    {
-        error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) :
-            $(8) : $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16)
-            : $(17) : $(18) : $(19) ;
-    }
-}
-
-
-# Same as 'error', but the generated backtrace will include only user files.
-#
-rule user-error ( messages * : * )
-{
-    .user-modules-only = 1 ;
-    error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) :
-        $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) :
-        $(18) : $(19) ;
-}
-
-
-# Print a warning message with a stack backtrace and exit.
-#
-rule warning
-{
-    backtrace 2 warning: $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) :
-        $(9) : $(10) : $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) :
-        $(18) : $(19) ;
-}
-
-
-# Convert an arbitrary argument list into a list with ":" separators and quoted
-# elements representing the same information. This is mostly useful for
-# formatting descriptions of arguments with which a rule was called when
-# reporting an error.
-#
-rule lol->list ( * )
-{
-    local result ;
-    local remaining = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ;
-    while $($(remaining))
-    {
-        local n = $(remaining[1]) ;
-        remaining = $(remaining[2-]) ;
-
-        if $(n) != 1
-        {
-            result += ":" ;
-        }
-        result += \"$($(n))\" ;
-    }
-    return $(result) ;
-}
-
-
-# Return the file:line for the nearest entry in backtrace which correspond to a
-# user module.
-#
-rule nearest-user-location ( )
-{
-    local bt = [ BACKTRACE ] ;
-
-    local result ;
-    while $(bt) && ! $(result)
-    {
-        local m = [ MATCH ^(.+)\\.$ : $(bt[3]) ] ;
-        local user-modules = ([Jj]amroot(.jam|.v2|)|([Jj]amfile(.jam|.v2|)|user-config.jam|site-config.jam|project-config.jam|project-root.jam) ;
-
-        if [ MATCH $(user-modules) : $(bt[1]:D=) ]
-        {
-            result = $(bt[1]):$(bt[2]) ;
-        }
-        bt = $(bt[5-]) ;
-    }
-    return $(result) ;
-}
-
-
-# If optimized rule is available in Jam, use it.
-if NEAREST_USER_LOCATION in [ RULENAMES ]
-{
-    rule nearest-user-location ( )
-    {
-        local r = [ NEAREST_USER_LOCATION ] ;
-        return $(r[1]):$(r[2]) ;
-    }
-}
-
-
-rule __test__ ( )
-{
-    # Show that we can correctly catch an expected error.
-    try ;
-    {
-        error an error occurred : somewhere ;
-    }
-    catch an error occurred : somewhere ;
-
-    # Show that unexpected errors generate real errors.
-    try ;
-    {
-        try ;
-        {
-            error an error occurred : somewhere ;
-        }
-        catch an error occurred : nowhere ;
-    }
-    catch expected \"nowhere\" in argument 2 ;
-
-    # Show that not catching an error where one was expected is an error.
-    try ;
-    {
-        try ;
-        {
-        }
-        catch ;
-    }
-    catch expected an error, but none occurred ;
-}

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/kernel/modules.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/kernel/modules.jam b/ext/kenlm/jam-files/boost-build/kernel/modules.jam
deleted file mode 100644
index 4258225..0000000
--- a/ext/kenlm/jam-files/boost-build/kernel/modules.jam
+++ /dev/null
@@ -1,359 +0,0 @@
-# Copyright 2003 Dave Abrahams
-# Copyright 2003, 2005 Vladimir Prus
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-# Essentially an include guard; ensures that no module is loaded multiple times.
-.loaded ?= ;
-
-# A list of modules currently being loaded for error reporting of circular
-# dependencies.
-.loading ?= ;
-
-# A list of modules needing to be tested using their __test__ rule.
-.untested ?= ;
-
-# A list of modules which have been tested using their __test__ rule.
-.tested ?= ;
-
-
-# Runs internal Boost Build unit tests for the specified module. The module's
-# __test__ rule is executed in its own module to eliminate any inadvertent
-# effects of testing module dependencies (such as assert) on the module itself.
-#
-local rule run-module-test ( m )
-{
-    local tested-modules = [ modules.peek modules : .tested ] ;
-
-    if ( ! $(m) in $(tested-modules) )  # Avoid recursive test invocations.
-        && ( ( --debug in $(argv) ) || ( --debug-module=$(m) in $(argv) ) )
-    {
-        modules.poke modules : .tested : $(tested-modules) $(m) ;
-
-        if ! ( __test__ in [ RULENAMES $(m) ] )
-        {
-            local argv = [ peek : ARGV ] ;
-            if ! ( --quiet in $(argv) ) && ( --debug-tests in $(argv) )
-            {
-                ECHO warning: no __test__ rule defined in module $(m) ;
-            }
-        }
-        else
-        {
-            if ! ( --quiet in $(argv) )
-            {
-                ECHO testing module $(m)... ;
-            }
-
-            local test-module = __test-$(m)__ ;
-            IMPORT $(m) : [ RULENAMES $(m) ] : $(test-module) : [ RULENAMES $(m)
-                ] ;
-            IMPORT $(m) : __test__ : $(test-module) : __test__ : LOCALIZE ;
-            module $(test-module)
-            {
-                __test__ ;
-            }
-        }
-    }
-}
-
-
-# Return the binding of the given module.
-#
-rule binding ( module )
-{
-    return $($(module).__binding__) ;
-}
-
-
-# Sets the module-local value of a variable. This is the most reliable way to
-# set a module-local variable in a different module; it eliminates issues of
-# name shadowing due to dynamic scoping.
-#
-rule poke ( module-name ? : variables + : value * )
-{
-    module $(<)
-    {
-        $(>) = $(3) ;
-    }
-}
-
-
-# Returns the module-local value of a variable. This is the most reliable way to
-# examine a module-local variable in a different module; it eliminates issues of
-# name shadowing due to dynamic scoping.
-#
-rule peek ( module-name ? : variables + )
-{
-    module $(<)
-    {
-        return $($(>)) ;
-    }
-}
-
-
-# Call the given rule locally in the given module. Use this for rules accepting
-# rule names as arguments, so that the passed rule may be invoked in the context
-# of the rule's caller (for example, if the rule accesses module globals or is a
-# local rule). Note that rules called this way may accept at most 18 parameters.
-#
-rule call-in ( module-name ? : rule-name args * : * )
-{
-    module $(module-name)
-    {
-        return [ $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) :
-            $(11) : $(12) : $(13) : $(14) : $(15) : $(16) : $(17) : $(18) :
-            $(19) ] ;
-    }
-}
-
-
-# Given a possibly qualified rule name and arguments, remove any initial module
-# qualification from the rule and invoke it in that module. If there is no
-# module qualification, the rule is invoked in the global module. Note that
-# rules called this way may accept at most 18 parameters.
-#
-rule call-locally ( qualified-rule-name args * : * )
-{
-    local module-rule = [ MATCH (.*)\\.(.*) : $(qualified-rule-name) ] ;
-    local rule-name = $(module-rule[2]) ;
-    rule-name ?= $(qualified-rule-name) ;
-    #   We pass only 18 parameters here since Boost Jam allows at most 19 rule
-    # parameter positions and the call-in rule already uses up the initial
-    # position for the module name.
-    return [ call-in $(module-rule[1]) : $(rule-name) $(args) : $(2) : $(3) :
-        $(4) : $(5) : $(6) : $(7) : $(8) : $(9) : $(10) : $(11) : $(12) : $(13)
-        $(14) : $(15) : $(16) : $(17) : $(18) : $(19) ] ;
-}
-
-
-# Load the indicated module if it is not already loaded.
-#
-rule load (
-      module-name  # Name of module to load. Rules will be defined in this
-                   # module.
-    : filename ?   # (partial) path to file; Defaults to $(module-name).jam.
-    : search *     # Directories in which to search for filename. Defaults to
-                   # $(BOOST_BUILD_PATH).
-)
-{
-    # Avoid loading modules twice.
-    if ! ( $(module-name) in $(.loaded) )
-    {
-        filename ?= $(module-name).jam ;
-
-        # Mark the module loaded so we do not try to load it recursively.
-        .loaded += $(module-name) ;
-
-        # Suppress tests if any module loads are already in progress.
-        local suppress-test = $(.loading[1]) ;
-
-        # Push this module on the loading stack.
-        .loading += $(module-name) ;
-
-        # Remember that it is untested.
-        .untested += $(module-name) ;
-
-        # Insert the new module's __name__ and __file__ globals.
-        poke $(module-name) : __name__ : $(module-name) ;
-        poke $(module-name) : __file__ : $(filename) ;
-
-        module $(module-name)
-        {
-            # Add some grist so that the module will have a unique target name.
-            local module-target = $(__file__:G=module@) ;
-
-            local search = $(3) ;
-            search ?= [ modules.peek : BOOST_BUILD_PATH ] ;
-            SEARCH on $(module-target) = $(search) ;
-            BINDRULE on $(module-target) = modules.record-binding ;
-
-            include $(module-target) ;
-
-            # Allow the module to see its own names with full qualification.
-            local rules = [ RULENAMES $(__name__) ] ;
-            IMPORT $(__name__) : $(rules) : $(__name__) : $(__name__).$(rules) ;
-        }
-
-        if $(module-name) != modules && ! [ binding $(module-name) ]
-        {
-            import errors ;
-            errors.error "Could not find module" $(module-name) in $(search) ;
-        }
-
-        # Pop the loading stack. Must happen before testing or we will run into
-        # a circular loading dependency.
-        .loading = $(.loading[1--2]) ;
-
-        # Run any pending tests if this is an outer load.
-        if ! $(suppress-test)
-        {
-            local argv = [ peek : ARGV ] ;
-            for local m in $(.untested)
-            {
-                run-module-test $(m) ;
-            }
-            .untested = ;
-        }
-    }
-    else if $(module-name) in $(.loading)
-    {
-        import errors ;
-        errors.error loading \"$(module-name)\"
-            : circular module loading dependency:
-            : $(.loading)" ->" $(module-name) ;
-    }
-}
-
-
-# This helper is used by load (above) to record the binding (path) of each
-# loaded module.
-#
-rule record-binding ( module-target : binding )
-{
-    $(.loading[-1]).__binding__ = $(binding) ;
-}
-
-
-# Transform each path in the list, with all backslashes converted to forward
-# slashes and all detectable redundancy removed. Something like this is probably
-# needed in path.jam, but I am not sure of that, I do not understand it, and I
-# am not ready to move all of path.jam into the kernel.
-#
-local rule normalize-raw-paths ( paths * )
-{
-    local result ;
-    for p in $(paths:T)
-    {
-        result += [ NORMALIZE_PATH $(p) ] ;
-    }
-    return $(result) ;
-}
-
-
-.cwd = [ PWD ] ;
-
-
-# Load the indicated module and import rule names into the current module. Any
-# members of rules-opt will be available without qualification in the caller's
-# module. Any members of rename-opt will be taken as the names of the rules in
-# the caller's module, in place of the names they have in the imported module.
-# If rules-opt = '*', all rules from the indicated module are imported into the
-# caller's module. If rename-opt is supplied, it must have the same number of
-# elements as rules-opt.
-#
-rule import ( module-names + : rules-opt * : rename-opt * )
-{
-    if ( $(rules-opt) = * || ! $(rules-opt) ) && $(rename-opt)
-    {
-        import errors ;
-        errors.error "Rule aliasing is only available for explicit imports." ;
-    }
-
-    if $(module-names[2]) && ( $(rules-opt) || $(rename-opt) )
-    {
-        import errors ;
-        errors.error "When loading multiple modules, no specific rules or"
-            "renaming is allowed" ;
-    }
-
-    local caller = [ CALLER_MODULE ] ;
-
-    # Import each specified module
-    for local m in $(module-names)
-    {
-        if ! $(m) in $(.loaded)
-        {
-            # If the importing module is not already in the BOOST_BUILD_PATH,
-            # prepend it to the path.  We do not want to invert the search order
-            # of modules that are already there.
-
-            local caller-location ;
-            if $(caller)
-            {
-                caller-location = [ binding $(caller) ] ;
-                caller-location = $(caller-location:D) ;
-                caller-location = [ normalize-raw-paths
-                    $(caller-location:R=$(.cwd)) ] ;
-            }
-
-            local search = [ peek : BOOST_BUILD_PATH ] ;
-            search = [ normalize-raw-paths $(search:R=$(.cwd)) ] ;
-
-            if $(caller-location) && ! $(caller-location) in $(search)
-            {
-                search = $(caller-location) $(search) ;
-            }
-
-            load $(m) : : $(search) ;
-        }
-
-        IMPORT_MODULE $(m) : $(caller) ;
-
-        if $(rules-opt)
-        {
-            local source-names ;
-            if $(rules-opt) = *
-            {
-                local all-rules = [ RULENAMES $(m) ] ;
-                source-names = $(all-rules) ;
-            }
-            else
-            {
-                source-names = $(rules-opt) ;
-            }
-            local target-names = $(rename-opt) ;
-            target-names ?= $(source-names) ;
-            IMPORT $(m) : $(source-names) : $(caller) : $(target-names) ;
-        }
-    }
-}
-
-
-# Define exported copies in $(target-module) of all rules exported from
-# $(source-module). Also make them available in the global module with
-# qualification, so that it is just as though the rules were defined originally
-# in $(target-module).
-#
-rule clone-rules ( source-module target-module )
-{
-    local r = [ RULENAMES $(source-module) ] ;
-    IMPORT $(source-module) : $(r) : $(target-module) : $(r) : LOCALIZE ;
-    EXPORT $(target-module) : $(r) ;
-    IMPORT $(target-module) : $(r) : : $(target-module).$(r) ;
-}
-
-
-# These rules need to be available in all modules to implement module loading
-# itself and other fundamental operations.
-local globalize = peek poke record-binding ;
-IMPORT modules : $(globalize) : : modules.$(globalize) ;
-
-
-rule __test__ ( )
-{
-    import assert ;
-    import modules : normalize-raw-paths ;
-
-    module modules.__test__
-    {
-        foo = bar ;
-    }
-
-    assert.result bar : peek modules.__test__ : foo ;
-
-    poke modules.__test__ : foo : bar baz ;
-    assert.result bar baz : peek modules.__test__ : foo ;
-
-    assert.result c:/foo/bar : normalize-raw-paths c:/x/../foo/./xx/yy/../../bar ;
-    assert.result .          : normalize-raw-paths .                             ;
-    assert.result ..         : normalize-raw-paths ..                            ;
-    assert.result ../..      : normalize-raw-paths ../..                         ;
-    assert.result ..         : normalize-raw-paths ./..                          ;
-    assert.result / /        : normalize-raw-paths / \\                          ;
-    assert.result a          : normalize-raw-paths a                             ;
-    assert.result a          : normalize-raw-paths a/                            ;
-    assert.result /a         : normalize-raw-paths /a/                           ;
-    assert.result /          : normalize-raw-paths /a/..                         ;
-}

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/options/help.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/options/help.jam b/ext/kenlm/jam-files/boost-build/options/help.jam
deleted file mode 100644
index b507e1e..0000000
--- a/ext/kenlm/jam-files/boost-build/options/help.jam
+++ /dev/null
@@ -1,212 +0,0 @@
-# Copyright 2003 Dave Abrahams 
-# Copyright 2003, 2006 Rene Rivera 
-# Copyright 2003, 2006 Vladimir Prus 
-# Distributed under the Boost Software License, Version 1.0. 
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 
-
-# This module is the plug-in handler for the --help and --help-.*
-# command-line options
-import modules ;
-import assert ;
-import doc : do-scan set-option set-output set-output-file print-help-usage print-help-top ;
-import sequence ;
-import set ;
-import project ;
-import print ;
-import os ;
-import version ;
-import path ;
-
-# List of possible modules, but which really aren't.
-#
-.not-modules =
-    boost-build bootstrap site-config test user-config
-    -tools allyourbase boost-base features python stlport testing unit-tests ;
-
-# The help system options are parsed here and handed off to the doc
-# module to translate into documentation requests and actions. The
-# understood options are:
-#
-#    --help-disable-<option>
-#    --help-doc-options
-#    --help-enable-<option>
-#    --help-internal
-#    --help-options
-#    --help-usage
-#    --help-output <type>
-#    --help-output-file <file>
-#    --help [<module-or-class>]
-#
-rule process (
-    command # The option.
-    : values * # The values, starting after the "=".
-    )
-{
-    assert.result --help : MATCH ^(--help).* : $(command) ;
-    local did-help = ;
-    switch $(command)
-    {
-        case --help-internal :
-        local path-to-modules = [ modules.peek : BOOST_BUILD_PATH ] ;
-        path-to-modules ?= . ;
-        local possible-modules = [ GLOB $(path-to-modules) : *\\.jam ] ;
-        local not-modules = [ GLOB $(path-to-modules) : *$(.not-modules)\\.jam ] ;
-        local modules-to-list =
-            [ sequence.insertion-sort
-                [ set.difference $(possible-modules:D=:S=) : $(not-modules:D=:S=) ] ] ;
-        local modules-to-scan ;
-        for local m in $(modules-to-list)
-        {
-            local module-files = [ GLOB $(path-to-modules) : $(m)\\.jam ] ;
-            modules-to-scan += $(module-files[1]) ;
-        }
-        do-scan $(modules-to-scan) : print-help-all ;
-        did-help = true ;
-
-        case --help-enable-* :
-        local option = [ MATCH --help-enable-(.*) : $(command) ] ; option = $(option:L) ;
-        set-option $(option) : enabled ;
-        did-help = true ;
-
-        case --help-disable-* :
-        local option = [ MATCH --help-disable-(.*) : $(command) ] ; option = $(option:L) ;
-        set-option $(option) ;
-        did-help = true ;
-
-        case --help-output :
-        set-output $(values[1]) ;
-        did-help = true ;
-
-        case --help-output-file :
-        set-output-file $(values[1]) ;
-        did-help = true ;
-
-        case --help-doc-options :
-        local doc-module-spec = [ split-symbol doc ] ;
-        do-scan $(doc-module-spec[1]) : print-help-options ;
-        did-help = true ;
-
-        case --help-options :
-        print-help-usage ;
-        did-help = true ;
-
-        case --help :
-        local spec = $(values[1]) ;
-        if $(spec)
-        {
-            local spec-parts = [ split-symbol $(spec) ] ;
-            if $(spec-parts)
-            {
-                if $(spec-parts[2])
-                {
-                    do-scan $(spec-parts[1]) : print-help-classes $(spec-parts[2]) ;
-                    do-scan $(spec-parts[1]) : print-help-rules $(spec-parts[2]) ;
-                    do-scan $(spec-parts[1]) : print-help-variables $(spec-parts[2]) ;
-                }
-                else
-                {
-                    do-scan $(spec-parts[1]) : print-help-module ;
-                }
-            }
-            else
-            {
-                EXIT "Unrecognized help option '"$(command)" "$(spec)"'." ;
-            }
-        }
-        else
-        {
-            version.print ;
-            ECHO ;
-            # First print documentation from the current Jamfile, if any.            
-            # FIXME: Generally, this duplication of project.jam logic is bad.
-            local names = [ modules.peek project : JAMROOT ]
-              [ modules.peek project : JAMFILE ] ;
-            local project-file = [ path.glob . : $(names) ] ;
-            if ! $(project-file)
-            {
-                project-file = [ path.glob-in-parents . : $(names) ] ;
-            }
-            
-            for local p in $(project-file)
-            {
-                do-scan $(p) : print-help-project $(p) ;
-            }
-            
-            # Next any user-config help.
-            local user-path = [ os.home-directories ] [ os.environ BOOST_BUILD_PATH ] ;
-            local user-config = [ GLOB $(user-path) : user-config.jam ] ;
-            if $(user-config)
-            {
-                do-scan $(user-config[1]) : print-help-config user $(user-config[1]) ;
-            }
-            
-            # Next any site-config help.
-            local site-config = [ GLOB $(user-path) : site-config.jam ] ;
-            if $(site-config)
-            {
-                do-scan $(site-config[1]) : print-help-config site $(site-config[1]) ;
-            }
-
-            # Then the overall help.
-            print-help-top ;
-        }
-        did-help = true ;
-    }
-    if $(did-help)
-    {
-        UPDATE all ;
-        NOCARE all ;
-    }
-    return $(did-help) ;
-}
-
-# Split a reference to a symbol into module and symbol parts.
-#
-local rule split-symbol (
-    symbol # The symbol to split.
-    )
-{
-    local path-to-modules = [ modules.peek : BOOST_BUILD_PATH ] ;
-    path-to-modules ?= . ;
-    local module-name = $(symbol) ;
-    local symbol-name = ;
-    local result = ;
-    while ! $(result)
-    {
-        local module-path = [ GLOB $(path-to-modules) : $(module-name)\\.jam ] ;
-        if $(module-path)
-        {
-            # The 'module-name' in fact refers to module. Return the full
-            # module path and a symbol within it. If 'symbol' passed to this
-            # rule is already module, 'symbol-name' will be empty. Otherwise,
-            # it's initialized on the previous loop iteration.
-            # In case there are several modules by this name,
-            # use the first one.
-            result = $(module-path[1]) $(symbol-name) ;
-        }
-        else
-        {
-            if ! $(module-name:S)
-            {
-                result = - ;
-            }
-            else
-            {
-                local next-symbol-part = [ MATCH ^.(.*) : $(module-name:S) ] ;
-                if $(symbol-name)
-                {
-                    symbol-name = $(next-symbol-part).$(symbol-name) ;
-                }
-                else
-                {
-                    symbol-name = $(next-symbol-part) ;
-                }
-                module-name = $(module-name:B) ;
-            }
-        }
-    }
-    if $(result) != -
-    {
-        return $(result) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/site-config.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/site-config.jam b/ext/kenlm/jam-files/boost-build/site-config.jam
deleted file mode 100644
index 6afe526..0000000
--- a/ext/kenlm/jam-files/boost-build/site-config.jam
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the Boost Software License, Version 1.0. 
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 
-
-# Define two new variants to be used when building boost (or separate boost-libs)
-# on Gentoo. The two variants make use of Gentoo-specific optimization and debug-symbols
-# values "none" which are not part of the official boost distribution.
-# DO NOT RELY ON THE FOLLOWING VARIANTS TO BE PRESENT ON OTHER OS!
-variant gentoorelease : release : <optimization>none <debug-symbols>none <runtime-link>shared ;
-variant gentoodebug   : debug   : <optimization>none <debug-symbols>on   <runtime-link>shared ;
-

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/acc.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/tools/acc.jam b/ext/kenlm/jam-files/boost-build/tools/acc.jam
deleted file mode 100644
index f04c9dc..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/acc.jam
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright Vladimir Prus 2004.
-# Copyright Toon Knapen 2004.
-# Copyright Boris Gubenko 2007.
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt
-# or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#
-# Boost.Build V2 toolset for the HP aC++ compiler.
-#
-
-import toolset : flags ;
-import feature ;
-import generators ;
-import common ;
-
-feature.extend toolset : acc ;
-toolset.inherit acc : unix ;
-generators.override builtin.lib-generator : acc.prebuilt ;
-generators.override acc.searched-lib-generator : searched-lib-generator ;
-
-# Configures the acc toolset.
-rule init ( version ? : user-provided-command * : options * )
-{
-    local condition = [ common.check-init-parameters acc
-        : version $(version) ] ;
-
-    local command = [ common.get-invocation-command acc : aCC
-        : $(user-provided-command) ] ;
-
-    common.handle-options acc : $(condition) : $(command) : $(options) ;
-}
-
-
-# Declare generators
-generators.register-c-compiler acc.compile.c : C : OBJ : <toolset>acc ;
-generators.register-c-compiler acc.compile.c++ : CPP : OBJ : <toolset>acc ;
-
-# Declare flags.
-flags acc CFLAGS <optimization>off : ;
-flags acc CFLAGS <optimization>speed : -O3 ;
-flags acc CFLAGS <optimization>space : -O2 ;
-
-flags acc CFLAGS <inlining>off : +d ;
-flags acc CFLAGS <inlining>on : ;
-flags acc CFLAGS <inlining>full : ;
-
-flags acc C++FLAGS <exception-handling>off : ;
-flags acc C++FLAGS <exception-handling>on : ;
-
-flags acc C++FLAGS <rtti>off : ;
-flags acc C++FLAGS <rtti>on : ;
-
-# We want the full path to the sources in the debug symbols because otherwise
-# the debugger won't find the sources when we use boost.build.
-flags acc CFLAGS <debug-symbols>on : -g ;
-flags acc LINKFLAGS <debug-symbols>on : -g ;
-flags acc LINKFLAGS <debug-symbols>off : -s ;
-
-# V2 does not have <shared-linkable>, not sure what this meant in V1.
-# flags acc CFLAGS <shared-linkable>true : +Z ;
-
-flags acc CFLAGS <profiling>on : -pg ;
-flags acc LINKFLAGS <profiling>on : -pg ;
-
-flags acc CFLAGS <address-model>64 : +DD64 ;
-flags acc LINKFLAGS <address-model>64 : +DD64 ;
-
-# It is unknown if there's separate option for rpath used only
-# at link time, similar to -rpath-link in GNU. We'll use -L.
-flags acc RPATH_LINK : <xdll-path> ;
-
-flags acc CFLAGS <cflags> ;
-flags acc C++FLAGS <cxxflags> ;
-flags acc DEFINES <define> ;
-flags acc UNDEFS <undef> ;
-flags acc HDRS <include> ;
-flags acc STDHDRS <sysinclude> ;
-flags acc LINKFLAGS <linkflags> ;
-flags acc ARFLAGS <arflags> ;
-
-flags acc LIBPATH <library-path> ;
-flags acc NEEDLIBS <library-file> ;
-flags acc FINDLIBS <find-shared-library> ;
-flags acc FINDLIBS <find-static-library> ;
-
-# Select the compiler name according to the threading model.
-flags acc CFLAGS <threading>multi : -mt   ;
-flags acc LINKFLAGS <threading>multi : -mt ;
-
-flags acc.compile.c++ TEMPLATE_DEPTH <c++-template-depth> ;
-
-
-actions acc.link bind NEEDLIBS
-{
-    $(CONFIG_COMMAND) -AA $(LINKFLAGS) -o "$(<[1])" -L"$(RPATH_LINK)" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
-}
-
-SPACE = " " ;
-actions acc.link.dll bind NEEDLIBS
-{
-    $(CONFIG_COMMAND) -AA -b $(LINKFLAGS) -o "$(<[1])" -L"$(RPATH_LINK)" -Wl,+h$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
-}
-
-actions acc.compile.c
-{
-    cc -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" $(OPTIONS)
-}
-
-actions acc.compile.c++
-{
-    $(CONFIG_COMMAND) -AA -c -Wc,--pending_instantiations=$(TEMPLATE_DEPTH) -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" $(OPTIONS)
-}
-
-actions updated together piecemeal acc.archive
-{
-    ar ru$(ARFLAGS:E="") "$(<)" "$(>)"
-}

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/auto-index.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/tools/auto-index.jam b/ext/kenlm/jam-files/boost-build/tools/auto-index.jam
deleted file mode 100644
index 41d0482..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/auto-index.jam
+++ /dev/null
@@ -1,204 +0,0 @@
-
-import feature ;
-import generators ;
-import "class" ;
-import toolset ;
-import targets ;
-import "class" : new ;
-import project ;
-
-feature.feature auto-index : off "on" ;
-feature.feature auto-index-internal : off "on" ;
-feature.feature auto-index-verbose : off "on" ;
-feature.feature auto-index-no-duplicates : off "on" ;
-feature.feature auto-index-script : : free path ;
-feature.feature auto-index-prefix : : free path ;
-feature.feature auto-index-type : : free ;
-feature.feature auto-index-section-names : "on" off ;
-
-toolset.flags auto-index.auto-index FLAGS <auto-index-internal>on : --internal-index ;
-toolset.flags auto-index.auto-index SCRIPT <auto-index-script> ;
-toolset.flags auto-index.auto-index PREFIX <auto-index-prefix> ;
-toolset.flags auto-index.auto-index INDEX_TYPE <auto-index-type> ;
-toolset.flags auto-index.auto-index FLAGS <auto-index-verbose>on : --verbose ;
-toolset.flags auto-index.auto-index FLAGS <auto-index-no-duplicates>on : --no-duplicates ;
-toolset.flags auto-index.auto-index FLAGS <auto-index-section-names>off : --no-section-names ;
-
-# <auto-index-binary> shell command to run AutoIndex
-# <auto-index-binary-dependencies> targets to build AutoIndex from sources.
-feature.feature <auto-index-binary> : : free ;
-feature.feature <auto-index-binary-dependencies> : : free dependency ;
-
-class auto-index-generator : generator
-{
-    import common modules path targets build-system ;
-    rule run ( project name ? : property-set : sources * )
-    {
-        # AutoIndex invocation command and dependencies.
-        local auto-index-binary = [ modules.peek auto-index : .command ] ;
-        local auto-index-binary-dependencies ;
-
-        if $(auto-index-binary)
-        {
-            # Use user-supplied command.
-            auto-index-binary = [ common.get-invocation-command auto-index : auto-index : $(auto-index-binary) ] ;
-        }
-        else
-        {
-            # Search for AutoIndex sources in sensible places, like
-            #   $(BOOST_ROOT)/tools/auto_index
-            #   $(BOOST_BUILD_PATH)/../../auto_index
-
-            # And build auto-index executable from sources.
-
-            local boost-root = [ modules.peek : BOOST_ROOT ] ;
-            local boost-build-path = [ build-system.location ] ;
-            local boost-build-path2 = [ modules.peek : BOOST_BUILD_PATH ] ;
-
-            local auto-index-dir ;
-
-            if $(boost-root)
-            {
-                auto-index-dir += [ path.join $(boost-root) tools ] ;
-            }
-
-            if $(boost-build-path)
-            {
-                auto-index-dir += $(boost-build-path)/../.. ;
-            }
-            if $(boost-build-path2)
-            {
-                auto-index-dir += $(boost-build-path2)/.. ;
-            }
-
-            #ECHO $(auto-index-dir) ;
-            auto-index-dir = [ path.glob $(auto-index-dir) : auto_index ] ;
-            #ECHO $(auto-index-dir) ;
-
-            # If the AutoIndex source directory was found, mark its main target
-            # as a dependency for the current project. Otherwise, try to find
-            # 'auto-index' in user's PATH
-            if $(auto-index-dir)
-            {
-                auto-index-dir = [ path.make $(auto-index-dir[1]) ] ;
-                auto-index-dir = $(auto-index-dir)/build ;
-                
-                #ECHO $(auto-index-dir) ;
-
-                # Get the main-target in AutoIndex directory.
-                local auto-index-main-target = [ targets.resolve-reference $(auto-index-dir) : $(project) ] ;
-                
-                #ECHO $(auto-index-main-target) ;
-
-                # The first element are actual targets, the second are
-                # properties found in target-id. We do not care about these
-                # since we have passed the id ourselves.
-                auto-index-main-target =
-                    [ $(auto-index-main-target[1]).main-target auto_index ] ;
-
-                #ECHO $(auto-index-main-target) ;
-
-                auto-index-binary-dependencies =
-                    [ $(auto-index-main-target).generate [ $(property-set).propagated ] ] ;
-
-                # Ignore usage-requirements returned as first element.
-                auto-index-binary-dependencies = $(auto-index-binary-dependencies[2-]) ;
-
-                # Some toolsets generate extra targets (e.g. RSP). We must mark
-                # all targets as dependencies for the project, but we will only
-                # use the EXE target for auto-index-to-boostbook translation.
-                for local target in $(auto-index-binary-dependencies)
-                {
-                    if [ $(target).type ] = EXE
-                    {
-                        auto-index-binary = 
-                            [ path.native 
-                                [ path.join
-                                    [ $(target).path ]
-                                    [ $(target).name ]
-                                ]
-                            ] ;
-                    }
-                }
-            }
-            else
-            {
-                ECHO "AutoIndex warning: The path to the auto-index executable was" ;
-                ECHO "  not provided. Additionally, couldn't find AutoIndex" ;
-                ECHO "  sources searching in" ;
-                ECHO "    * BOOST_ROOT/tools/auto-index" ;
-                ECHO "    * BOOST_BUILD_PATH/../../auto-index" ;
-                ECHO "  Will now try to find a precompiled executable by searching" ;
-                ECHO "  the PATH for 'auto-index'." ;
-                ECHO "  To disable this warning in the future, or to completely" ;
-                ECHO "  avoid compilation of auto-index, you can explicitly set the" ;
-                ECHO "  path to a auto-index executable command in user-config.jam" ;
-                ECHO "  or site-config.jam with the call" ;
-                ECHO "    using auto-index : /path/to/auto-index ;" ;
-
-                # As a last resort, search for 'auto-index' command in path. Note
-                # that even if the 'auto-index' command is not found,
-                # get-invocation-command will still return 'auto-index' and might
-                # generate an error while generating the virtual-target.
-
-                auto-index-binary = [ common.get-invocation-command auto-index : auto-index ] ;
-            }
-        }
-
-        # Add $(auto-index-binary-dependencies) as a dependency of the current
-        # project and set it as the <auto-index-binary> feature for the
-        # auto-index-to-boostbook rule, below.
-        property-set = [ $(property-set).add-raw
-            <dependency>$(auto-index-binary-dependencies)
-            <auto-index-binary>$(auto-index-binary)
-            <auto-index-binary-dependencies>$(auto-index-binary-dependencies)
-        ] ;
-        
-        #ECHO "binary = " $(auto-index-binary) ;
-        #ECHO "dependencies = " $(auto-index-binary-dependencies) ;
-
-        return [ generator.run $(project) $(name) : $(property-set) : $(sources) ] ;
-    }
-}
-
-# Initialization of toolset.
-#
-# Parameters:
-#   command ?    -> path to AutoIndex executable.
-#
-# When command is not supplied toolset will search for AutoIndex directory and
-# compile the executable from source. If that fails we still search the path for
-# 'auto_index'.
-#
-rule init (
-        command ?   # path to the AutoIndex executable.
-    )
-{
-    if ! $(.initialized)
-    {
-        .initialized = true ;
-        .command = $(command) ;
-    }
-}
-
-toolset.flags auto-index.auto-index AI-COMMAND      <auto-index-binary> ;
-toolset.flags auto-index.auto-index AI-DEPENDENCIES <auto-index-binary-dependencies> ;
-
-generators.register [ class.new auto-index-generator auto-index.auto-index : DOCBOOK : DOCBOOK(%.auto_index) : <auto-index>on ] ;
-generators.override auto-index.auto-index : boostbook.boostbook-to-docbook ;
-
-rule auto-index ( target : source : properties * )
-{
-    # Signal dependency of auto-index sources on <auto-index-binary-dependencies>
-    # upon invocation of auto-index-to-boostbook.
-    #ECHO "AI-COMMAND= " $(AI-COMMAND) ;
-    DEPENDS $(target) : [ on $(target) return $(AI-DEPENDENCIES) ] ;
-    #DEPENDS $(target) : [ on $(target) return $(SCRIPT) ] ;
-}
-
-actions auto-index
-{
-    $(AI-COMMAND) $(FLAGS) "--prefix="$(PREFIX) "--script="$(SCRIPT) "--index-type="$(INDEX_TYPE) "--in="$(>) "--out="$(<)
-}
-
-

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/bison.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/tools/bison.jam b/ext/kenlm/jam-files/boost-build/tools/bison.jam
deleted file mode 100644
index 0689d4b..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/bison.jam
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2003 Vladimir Prus 
-# Distributed under the Boost Software License, Version 1.0. 
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 
-
-import generators ;
-import feature ;
-import type ;
-import property ;
-
-feature.feature bison.prefix : : free ;
-type.register Y : y ;
-type.register YY : yy ;
-generators.register-standard bison.bison : Y : C H ;
-generators.register-standard bison.bison : YY : CPP HPP ;
-
-rule init ( )
-{
-}
-
-rule bison ( dst dst_header : src : properties * )
-{
-    local r = [ property.select bison.prefix : $(properties) ] ;
-    if $(r)
-    {
-        PREFIX_OPT on $(<) = -p $(r:G=) ;
-    }
-}
-
-actions bison 
-{
-    bison $(PREFIX_OPT) -d -o $(<[1]) $(>)
-}

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/boostbook-config.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/tools/boostbook-config.jam b/ext/kenlm/jam-files/boost-build/tools/boostbook-config.jam
deleted file mode 100644
index 6e3f3dd..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/boostbook-config.jam
+++ /dev/null
@@ -1,13 +0,0 @@
-#~ Copyright 2005 Rene Rivera.
-#~ Distributed under the Boost Software License, Version 1.0.
-#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-
-# Automatic configuration for BoostBook tools. To use, just import this module.
-#
-# This module is deprecated.
-#   using boostbook ;
-# with no arguments now suffices.
-
-import toolset : using ;
-
-using boostbook ;

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/boostbook.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/tools/boostbook.jam b/ext/kenlm/jam-files/boost-build/tools/boostbook.jam
deleted file mode 100644
index de83dec..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/boostbook.jam
+++ /dev/null
@@ -1,773 +0,0 @@
-# Copyright 2003, 2004, 2005 Dave Abrahams
-# Copyright 2003, 2004, 2005 Douglas Gregor
-# Copyright 2005, 2006, 2007 Rene Rivera
-# Copyright 2003, 2004, 2005 Vladimir Prus
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-# This module defines rules to handle generation of documentation from BoostBook
-# sources.
-#
-# The type of output is controlled by the <format> feature which can have the
-# following values:
-#   * html: Generates html documentation. This is the default.
-#   * xhtml: Generates xhtml documentation.
-#   * htmlhelp: Generates html help output.
-#   * onehtml: Generates a single html page.
-#   * man: Generates man pages.
-#   * pdf: Generates pdf documentation.
-#   * ps: Generates postscript output.
-#   * docbook: Generates docbook XML.
-#   * fo: Generates XSL formating objects.
-#   * tests: Extracts test cases from the boostbook XML.
-#
-# <format> is an implicit feature, so for example, typing pdf on the command
-# line is a short-cut for format=pdf.
-
-import build-system ;
-import "class" : new ;
-import common ;
-import feature ;
-import generators ;
-import make ;
-import modules ;
-import os ;
-import path ;
-import print ;
-import project ;
-import property ;
-import property-set ;
-import regex ;
-import scanner ;
-import sequence ;
-import targets ;
-import type ;
-import virtual-target ;
-import xsltproc ;
-
-# Make this module into a project.
-project.initialize $(__name__) ;
-project boostbook ;
-
-.debug-configuration = [ MATCH ^(--debug-configuration)$ : [ modules.peek : ARGV
-    ] ] ;
-
-feature.feature format
-    : html xhtml htmlhelp onehtml man pdf ps docbook fo tests
-    : incidental implicit composite propagated ;
-
-type.register DTDXML : dtdxml ;
-type.register XML : xml ;
-type.register BOOSTBOOK : boostbook : XML ;
-type.register DOCBOOK : docbook : XML ;
-type.register FO : fo : XML ;
-type.register PDF : pdf ;
-type.register PS : ps ;
-type.register XSLT : xsl : XML ;
-type.register HTMLDIR ;
-type.register XHTMLDIR ;
-type.register HTMLHELP ;
-type.register MANPAGES ;
-type.register TESTS : tests ;
-
-
-# Initialize BoostBook support.
-#
-rule init (
-      docbook-xsl-dir ? # The DocBook XSL stylesheet directory. If not provided,
-                        # we use DOCBOOK_XSL_DIR from the environment (if
-                        # available) or look in standard locations. Otherwise,
-                        # we let the XML processor load the stylesheets
-                        # remotely.
-
-    : docbook-dtd-dir ? # The DocBook DTD directory. If not provided, we use
-                        # DOCBOOK_DTD_DIR From the environment (if available) or
-                        # look in standard locations. Otherwise, we let the XML
-                        # processor load the DTD remotely.
-
-    : boostbook-dir ?   # The BoostBook directory with the DTD and XSL subdirs.
-)
-{
-    if ! $(.initialized)
-    {
-        .initialized = true ;
-
-        check-boostbook-dir $(boostbook-dir) ;
-        find-tools $(docbook-xsl-dir) : $(docbook-dtd-dir) : $(boostbook-dir) ;
-
-        # Register generators only if we were called via "using boostbook ;"
-        local reg-gen = generators.register-standard ;
-        $(reg-gen) boostbook.dtdxml-to-boostbook  : DTDXML  : XML ;
-        $(reg-gen) boostbook.boostbook-to-docbook : XML     : DOCBOOK ;
-        $(reg-gen) boostbook.boostbook-to-tests   : XML     : TESTS ;
-        $(reg-gen) boostbook.docbook-to-onehtml   : DOCBOOK : HTML ;
-        $(reg-gen) boostbook.docbook-to-htmldir   : DOCBOOK : HTMLDIR ;
-        $(reg-gen) boostbook.docbook-to-xhtmldir  : DOCBOOK : XHTMLDIR ;
-        $(reg-gen) boostbook.docbook-to-htmlhelp  : DOCBOOK : HTMLHELP ;
-        $(reg-gen) boostbook.docbook-to-manpages  : DOCBOOK : MANPAGES ;
-        $(reg-gen) boostbook.docbook-to-fo        : DOCBOOK : FO ;
-
-        # The same about Jamfile main target rules.
-        IMPORT $(__name__) : boostbook : : boostbook ;
-    }
-    else
-    {
-        if $(docbook-xsl-dir)
-        {
-            modify-config ;
-            .docbook-xsl-dir = [ path.make $(docbook-xsl-dir) ] ;
-            check-docbook-xsl-dir ;
-        }
-        if $(docbook-dtd-dir)
-        {
-            modify-config ;
-            .docbook-dtd-dir = [ path.make $(docbook-dtd-dir) ] ;
-            check-docbook-dtd-dir ;
-        }
-        if $(boostbook-dir)
-        {
-            modify-config ;
-            check-boostbook-dir $(boostbook-dir) ;
-            local boostbook-xsl-dir = [ path.glob $(boostbook-dir) : xsl ] ;
-            local boostbook-dtd-dir = [ path.glob $(boostbook-dir) : dtd ] ;
-            .boostbook-xsl-dir = $(boostbook-xsl-dir[1]) ;
-            .boostbook-dtd-dir = $(boostbook-dtd-dir[1]) ;
-            check-boostbook-xsl-dir ;
-            check-boostbook-dtd-dir ;
-        }
-    }
-}
-
-
-local rule lock-config ( )
-{
-    if ! $(.initialized)
-    {
-        import errors ;
-        errors.user-error BoostBook has not been configured. ;
-    }
-    if ! $(.config-locked)
-    {
-        .config-locked = true ;
-
-        if $(.error-message)
-        {
-            print-error $(.error-message) ;
-        }
-    }
-}
-
-
-local rule modify-config ( )
-{
-    if $(.config-locked)
-    {
-        import errors ;
-        errors.user-error BoostBook configuration cannot be changed after it has
-            been used. ;
-    }
-}
-
-rule print-error ( location message * )
-{
-    ECHO error: at $(location) ;
-    ECHO error: $(message) ;
-    EXIT ;
-}
-
-rule make-error ( message * )
-{
-    return [ errors.nearest-user-location ] $(message) ;
-}
-
-
-rule find-boost-in-registry ( keys * )
-{
-    local boost-root ;
-    for local R in $(keys)
-    {
-        local installed-boost = [ W32_GETREG
-            "HKEY_LOCAL_MACHINE\\SOFTWARE\\$(R)" : "InstallRoot" ] ;
-        if $(installed-boost)
-        {
-            boost-root += [ path.make $(installed-boost) ] ;
-        }
-    }
-    return $(boost-root) ;
-}
-
-
-rule check-docbook-xsl-dir ( )
-{
-    if $(.docbook-xsl-dir)
-    {
-        if ! [ path.glob $(.docbook-xsl-dir) : common/common.xsl ]
-        {
-            import errors ;
-            .error-message = [ make-error BoostBook: could not find docbook XSL stylesheets
-                in: [ path.native $(.docbook-xsl-dir) ] ] ;
-        }
-        else if $(.debug-configuration)
-        {
-            ECHO notice: BoostBook: found docbook XSL stylesheets in: [
-                path.native $(.docbook-xsl-dir) ] ;
-        }
-    }
-}
-
-
-rule check-docbook-dtd-dir ( )
-{
-    if $(.docbook-dtd-dir)
-    {
-        if ! [ path.glob $(.docbook-dtd-dir) : docbookx.dtd ]
-        {
-            import errors ;
-            .error-message = [ make-error BoostBook: could not find docbook DTD in: [
-                path.native $(.docbook-dtd-dir) ] ] ;
-        }
-        else if $(.debug-configuration)
-        {
-            ECHO notice: BoostBook: found docbook DTD in: [ path.native
-                $(.docbook-dtd-dir) ] ;
-        }
-    }
-}
-
-
-rule check-boostbook-xsl-dir ( )
-{
-    if ! $(.boostbook-xsl-dir)
-    {
-        .error-message = [ make-error BoostBook: could not find boostbook XSL stylesheets. ] ;
-    }
-    else if ! [ path.glob $(.boostbook-xsl-dir) : docbook.xsl ]
-    {
-        .error-message = [ make-error  BoostBook: could not find docbook XSL stylesheets in:
-            [ path.native $(.boostbook-xsl-dir) ] ] ;
-    }
-    else if $(.debug-configuration)
-    {
-        ECHO notice: BoostBook: found boostbook XSL stylesheets in: [
-            path.native $(.boostbook-xsl-dir) ] ;
-    }
-}
-
-
-rule check-boostbook-dtd-dir ( )
-{
-    if ! $(.boostbook-dtd-dir)
-    {
-        .error-message = [ make-error BoostBook: could not find boostbook DTD. ] ;
-    }
-    else if ! [ path.glob $(.boostbook-dtd-dir) : boostbook.dtd ]
-    {
-        .error-message = [ make-error BoostBook: could not find boostbook DTD in: [
-            path.native $(.boostbook-dtd-dir) ] ] ;
-    }
-    else if $(.debug-configuration)
-    {
-        ECHO notice: BoostBook: found boostbook DTD in: [ path.native
-            $(.boostbook-dtd-dir) ] ;
-    }
-}
-
-
-rule check-boostbook-dir ( boostbook-dir ? )
-{
-    if $(boostbook-dir) && ! [ path.glob $(boostbook-dir) : xsl ]
-    {
-        import errors ;
-        .error-message = [ make-error BoostBook: could not find boostbook in: [ path.native
-            $(boostbook-dir) ] ] ;
-    }
-}
-
-
-rule find-tools ( docbook-xsl-dir ? : docbook-dtd-dir ? : boostbook-dir ? )
-{
-    docbook-xsl-dir ?= [ modules.peek : DOCBOOK_XSL_DIR ] ;
-    docbook-dtd-dir ?= [ modules.peek : DOCBOOK_DTD_DIR ] ;
-    boostbook-dir ?= [ modules.peek : BOOSTBOOK_DIR ] ;
-
-    # Look for the boostbook stylesheets relative to BOOST_ROOT and Boost.Build.
-    local boost-build-root = [ path.make [ build-system.location ] ] ;
-    local boostbook-search-dirs = [ path.join $(boost-build-root) .. .. ] ;
-
-    local boost-root = [ modules.peek : BOOST_ROOT ] ;
-    if $(boost-root)
-    {
-        boostbook-search-dirs += [ path.join [ path.make $(boost-root) ] tools ]
-            ;
-    }
-    boostbook-dir ?= [ path.glob $(boostbook-search-dirs) : boostbook* ] ;
-
-    # Try to find the tools in platform specific locations.
-    if [ os.name ] = NT
-    {
-        # If installed by the Boost installer.
-        local boost-root = ;
-
-        local boost-installer-versions = snapshot cvs 1.33.0 ;
-        local boost-consulting-installer-versions = 1.33.1 1.34.0 1.34.1 ;
-        local boostpro-installer-versions =
-            1.35.0 1.36.0 1.37.0 1.38.0 1.39.0 1.40.0 1.41.0 1.42.0
-            1.43.0 1.44.0 1.45.0 1.46.0 1.47.0 1.48.0 1.49.0 1.50.0 ;
-
-        local old-installer-root = [ find-boost-in-registry
-            Boost.org\\$(boost-installer-versions) ] ;
-
-        # Make sure that the most recent version is searched for first.
-        boost-root += [ sequence.reverse [ find-boost-in-registry
-            Boost-Consulting.com\\$(boost-consulting-installer-versions)
-            boostpro.com\\$(boostpro-installer-versions) ] ] ;
-
-        # Plausible locations.
-        local root = [ PWD ] ;
-        while $(root) != $(root:D) { root = $(root:D) ; }
-        root = [ path.make $(root) ] ;
-        local search-dirs ;
-        local docbook-search-dirs ;
-        for local p in $(boost-root)
-        {
-            search-dirs += [ path.join $(p) tools ] ;
-        }
-        for local p in $(old-installer-root)
-        {
-            search-dirs += [ path.join $(p) share ] ;
-            docbook-search-dirs += [ path.join $(p) share ] ;
-        }
-        search-dirs += [ path.join $(root) Boost tools ] ;
-        search-dirs += [ path.join $(root) Boost share ] ;
-        docbook-search-dirs += [ path.join $(root) Boost share ] ;
-
-        docbook-xsl-dir ?= [ path.glob $(docbook-search-dirs) : docbook-xsl* ] ;
-        docbook-dtd-dir ?= [ path.glob $(docbook-search-dirs) : docbook-xml* ] ;
-        boostbook-dir ?= [ path.glob $(search-dirs) : boostbook* ] ;
-    }
-    else
-    {
-        # Plausible locations.
-
-        local share = /usr/local/share /usr/share /opt/share /opt/local/share ;
-        local dtd-versions = 4.2 ;
-
-        docbook-xsl-dir ?= [ path.glob $(share) : docbook-xsl* ] ;
-        docbook-xsl-dir ?= [ path.glob $(share)/sgml/docbook : xsl-stylesheets ]
-            ;
-        docbook-xsl-dir ?= [ path.glob $(share)/xsl : docbook* ] ;
-
-        docbook-dtd-dir ?= [ path.glob $(share) : docbook-xml* ] ;
-        docbook-dtd-dir ?= [ path.glob $(share)/sgml/docbook :
-            xml-dtd-$(dtd-versions)* ] ;
-        docbook-dtd-dir ?= [ path.glob $(share)/xml/docbook : $(dtd-versions) ]
-            ;
-
-        boostbook-dir ?= [ path.glob $(share) : boostbook* ] ;
-
-        # Ubuntu Linux.
-        docbook-xsl-dir ?= [ path.glob /usr/share/xml/docbook/stylesheet :
-            nwalsh ] ;
-        docbook-dtd-dir ?= [ path.glob /usr/share/xml/docbook/schema/dtd :
-            $(dtd-versions) ] ;
-
-        # SUSE.
-        docbook-xsl-dir ?= [ path.glob /usr/share/xml/docbook/stylesheet/nwalsh
-            : current ] ;
-    }
-
-    if $(docbook-xsl-dir)
-    {
-        .docbook-xsl-dir = [ path.make $(docbook-xsl-dir[1]) ] ;
-    }
-    if $(docbook-dtd-dir)
-    {
-        .docbook-dtd-dir = [ path.make $(docbook-dtd-dir[1]) ] ;
-    }
-
-    if $(.debug-configuration)
-    {
-        ECHO notice: Boost.Book: searching XSL/DTD "in" ;
-        ECHO notice: [ sequence.transform path.native : $(boostbook-dir) ] ;
-    }
-    local boostbook-xsl-dir ;
-    for local dir in $(boostbook-dir)
-    {
-        boostbook-xsl-dir += [ path.glob $(dir) : xsl ] ;
-    }
-    local boostbook-dtd-dir ;
-    for local dir in $(boostbook-dir)
-    {
-        boostbook-dtd-dir += [ path.glob $(dir) : dtd ] ;
-    }
-    .boostbook-xsl-dir = $(boostbook-xsl-dir[1]) ;
-    .boostbook-dtd-dir = $(boostbook-dtd-dir[1]) ;
-
-    check-docbook-xsl-dir ;
-    check-docbook-dtd-dir ;
-    check-boostbook-xsl-dir ;
-    check-boostbook-dtd-dir ;
-}
-
-
-rule xsl-dir
-{
-    lock-config ;
-    return $(.boostbook-xsl-dir) ;
-}
-
-
-rule dtd-dir
-{
-    lock-config ;
-    return $(.boostbook-dtd-dir) ;
-}
-
-
-rule docbook-xsl-dir
-{
-    lock-config ;
-    return $(.docbook-xsl-dir) ;
-}
-
-
-rule docbook-dtd-dir
-{
-    lock-config ;
-    return $(.docbook-dtd-dir) ;
-}
-
-
-rule dtdxml-to-boostbook ( target : source : properties * )
-{
-    lock-config ;
-    xsltproc.xslt $(target) : $(source)
-        "$(.boostbook-xsl-dir)/dtd/dtd2boostbook.xsl" : $(properties) ;
-}
-
-
-rule boostbook-to-docbook ( target : source : properties * )
-{
-    lock-config ;
-    local stylesheet = [ path.native $(.boostbook-xsl-dir)/docbook.xsl ] ;
-    xsltproc.xslt $(target) : $(source) $(stylesheet) : $(properties) ;
-}
-
-
-rule docbook-to-onehtml ( target : source : properties * )
-{
-    lock-config ;
-    local stylesheet = [ path.native $(.boostbook-xsl-dir)/html-single.xsl ] ;
-    xsltproc.xslt $(target) : $(source) $(stylesheet) : $(properties) ;
-}
-
-
-rule docbook-to-htmldir ( target : source : properties * )
-{
-    lock-config ;
-    local stylesheet = [ path.native $(.boostbook-xsl-dir)/html.xsl ] ;
-    xsltproc.xslt-dir $(target) : $(source) $(stylesheet) : $(properties) : html
-        ;
-}
-
-
-rule docbook-to-xhtmldir ( target : source : properties * )
-{
-    lock-config ;
-    local stylesheet = [ path.native $(.boostbook-xsl-dir)/xhtml.xsl ] ;
-    xsltproc.xslt-dir $(target) : $(source) $(stylesheet) : $(properties) :
-        xhtml ;
-}
-
-
-rule docbook-to-htmlhelp ( target : source : properties * )
-{
-    lock-config ;
-    local stylesheet = [ path.native $(.boostbook-xsl-dir)/html-help.xsl ] ;
-    xsltproc.xslt-dir $(target) : $(source) $(stylesheet) : $(properties) :
-        htmlhelp ;
-}
-
-
-rule docbook-to-manpages ( target : source : properties * )
-{
-    lock-config ;
-    local stylesheet = [ path.native $(.boostbook-xsl-dir)/manpages.xsl ] ;
-    xsltproc.xslt-dir $(target) : $(source) $(stylesheet) : $(properties) : man
-        ;
-}
-
-
-rule docbook-to-fo ( target : source : properties * )
-{
-    lock-config ;
-    local stylesheet = [ path.native $(.boostbook-xsl-dir)/fo.xsl ] ;
-    xsltproc.xslt $(target) : $(source) $(stylesheet) : $(properties) ;
-}
-
-
-rule format-catalog-path ( path )
-{
-    local result = $(path) ;
-    if [ xsltproc.is-cygwin ]
-    {
-        if [ os.name ] = NT
-        {
-            drive = [ MATCH ^/(.):(.*)$ : $(path) ] ;
-            result = /cygdrive/$(drive[1])$(drive[2]) ;
-        }
-    }
-    else
-    {
-        if [ os.name ] = CYGWIN
-        {
-            local native-path = [ path.native $(path) ] ;
-            result = [ path.make $(native-path:W) ] ;
-        }
-    }
-    return [ regex.replace $(result) " " "%20" ] ;
-}
-
-
-rule generate-xml-catalog ( target : sources * : properties * )
-{
-    print.output $(target) ;
-
-    # BoostBook DTD catalog entry.
-    local boostbook-dtd-dir = [ boostbook.dtd-dir ] ;
-    if $(boostbook-dtd-dir)
-    {
-        boostbook-dtd-dir = [ format-catalog-path $(boostbook-dtd-dir) ] ;
-    }
-
-    print.text
-        "<?xml version=\"1.0\"?>"
-        "<!DOCTYPE catalog "
-        "  PUBLIC \"-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN\""
-        "  \"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd\">"
-        "<catalog xmlns=\"urn:oasis:names:tc:entity:xmlns:xml:catalog\">"
-        "  <rewriteURI uriStartString=\"http://www.boost.org/tools/boostbook/dtd/\" rewritePrefix=\"file://$(boostbook-dtd-dir)/\"/>"
-        : true ;
-
-    local docbook-xsl-dir = [ boostbook.docbook-xsl-dir ] ;
-    if ! $(docbook-xsl-dir)
-    {
-        ECHO "BoostBook warning: no DocBook XSL directory specified." ;
-        ECHO "  If you have the DocBook XSL stylesheets installed, please " ;
-        ECHO "  set DOCBOOK_XSL_DIR to the stylesheet directory on either " ;
-        ECHO "  the command line (via -sDOCBOOK_XSL_DIR=...) or in a " ;
-        ECHO "  Boost.Jam configuration file. The DocBook XSL stylesheets " ;
-        ECHO "  are available here: http://docbook.sourceforge.net/ " ;
-        ECHO "  Stylesheets will be downloaded on-the-fly (very slow!) " ;
-    }
-    else
-    {
-        docbook-xsl-dir = [ format-catalog-path $(docbook-xsl-dir) ] ;
-        print.text "  <rewriteURI uriStartString=\"http://docbook.sourceforge.net/release/xsl/current/\" rewritePrefix=\"file://$(docbook-xsl-dir)/\"/>" ;
-    }
-
-    local docbook-dtd-dir = [ boostbook.docbook-dtd-dir ] ;
-    if ! $(docbook-dtd-dir)
-    {
-        ECHO "BoostBook warning: no DocBook DTD directory specified." ;
-        ECHO "  If you have the DocBook DTD installed, please set " ;
-        ECHO "  DOCBOOK_DTD_DIR to the DTD directory on either " ;
-        ECHO "  the command line (via -sDOCBOOK_DTD_DIR=...) or in a " ;
-        ECHO "  Boost.Jam configuration file. The DocBook DTD is available " ;
-        ECHO "  here: http://www.oasis-open.org/docbook/xml/4.2/index.shtml" ;
-        ECHO "  The DTD will be downloaded on-the-fly (very slow!) " ;
-    }
-    else
-    {
-        docbook-dtd-dir = [ format-catalog-path $(docbook-dtd-dir) ] ;
-        print.text "  <rewriteURI uriStartString=\"http://www.oasis-open.org/docbook/xml/4.2/\" rewritePrefix=\"file://$(docbook-dtd-dir)/\"/>" ;
-    }
-
-    print.text "</catalog>" ;
-}
-
-
-# Returns information about the global XML catalog target, creating it lazily if
-# needed. To get the global catalog generated only once we do not create it in
-# every project that requests it but instead only create it based on the first
-# project requesting it and then reuse it from there for any later requests.
-#
-# To get 'as close as possible' to having the global catalog stored in the same
-# location independent of which folder our build was run from, we assign its
-# target to the given project's base Jamroot project. This works correctly as
-# long as we know the passed project is not standalone or one of Boost Build's
-# configuration module projects, as those to not have a Jamroot project in their
-# parent chain. Note also that we can still get our targets generated in
-# different folders in case when one build project references a target from
-# another build project with its own separate Jamroot.
-#
-# FIXME: Ideally the catalog target should be created as part of the boostbook
-# project and stored in some central location for all used standalone pojects,
-# shared between all builds made on that system. This however would require much
-# more though to add the necessary changes to Boost Build's internal design.
-#
-local rule xml-catalog ( project )
-{
-    if ! $(.xml-catalog)
-    {
-        local project-module = [ $(project).project-module ] ;
-        local root-module = [ project.get-jamroot-module $(project-module) ] ;
-        if ! $(root-module)
-        {
-            import errors ;
-            if [ project.is-config-module $(project-module) ]
-            {
-                errors.user-error boostbook targets can not be declared in Boost
-                    Build's configuration modules. ;
-            }
-            else
-            {
-                errors.user-error boostbook targets can not be declared in
-                    standalone projects. : use a Jamfile/Jamroot project
-                    instead. ;
-            }
-        }
-        local root-project = [ project.target $(root-module) ] ;
-
-        .xml-catalog = [ virtual-target.register [ new file-target
-            boostbook_catalog : XML : $(root-project) : [ new action :
-            boostbook.generate-xml-catalog ] ] ] ;
-        .xml-catalog-file = [ $(.xml-catalog).path ] [ $(.xml-catalog).name ] ;
-        .xml-catalog-file = $(.xml-catalog-file:J=/) ;
-    }
-    return $(.xml-catalog) $(.xml-catalog-file) ;
-}
-
-
-class boostbook-target-class : basic-target
-{
-    import generators ;
-    import property-set ;
-    import virtual-target ;
-
-    rule construct ( name : sources * : property-set )
-    {
-        # Generate the catalog, but only once.
-        IMPORT boostbook : xml-catalog : $(__name__) : boostbook.xml-catalog ;
-        local global-catalog = [ boostbook.xml-catalog [ project ] ] ;
-        local catalog = $(global-catalog[1]) ;
-        local catalog-file = $(global-catalog[2]) ;
-        local targets ;
-
-        # Add the catalog to the property set.
-        property-set = [ $(property-set).add-raw <catalog>$(catalog-file) ] ;
-
-        local type = none ;
-        local manifest ;
-        local format = [ $(property-set).get <format> ] ;
-        switch $(format)
-        {
-            case html     : type = HTMLDIR ; manifest = HTML.manifest ;
-            case xhtml    : type = XHTMLDIR ; manifest = HTML.manifest ;
-            case htmlhelp : type = HTMLHELP ; manifest = HTML.manifest ;
-            case onehtml  : type = HTML ;
-            case man      : type = MANPAGES ; manifest = man.manifest ;
-            case docbook  : type = DOCBOOK ;
-            case fo       : type = FO ;
-            case pdf      : type = PDF ;
-            case ps       : type = PS ;
-            case tests    : type = TESTS ;
-        }
-
-        local target ;
-        if $(manifest)
-        {
-            # Sources --> DOCBOOK.
-            local docbook-target = [ generators.construct [ project ] : DOCBOOK
-                : $(property-set) : $(sources) ] ;
-            docbook-target = $(docbook-target[2]) ;
-            $(docbook-target).depends $(catalog) ;
-
-            # DOCBOOK --> type.
-            target = [ generators.construct [ project ] $(name)_$(manifest) :
-                $(type) : [ $(property-set).add-raw
-                <xsl:param>manifest=$(name)_$(manifest) ] : $(docbook-target) ]
-                ;
-            target = $(target[2]) ;
-            local name = [ $(property-set).get <name> ] ;
-            name ?= $(format) ;
-            $(target).set-path $(name) ;
-        }
-        else
-        {
-            # Sources --> type.
-            target = [ generators.construct [ project ] : $(type) :
-                $(property-set) : $(sources) ] ;
-            target = $(target[2]) ;
-            if ! $(target)
-            {
-                import errors ;
-                errors.error Cannot build documentation type '$(format)'. ;
-            }
-        }
-        $(target).depends $(catalog) ;
-
-        return [ property-set.empty ] $(target) ;
-    }
-}
-
-
-# Declare a boostbook target.
-#
-rule boostbook ( target-name : sources * : requirements * : default-build * )
-{
-    return [ targets.create-metatarget boostbook-target-class :
-        [ project.current ] : $(target-name) : $(sources) : $(requirements) :
-        $(default-build) ] ;
-}
-
-
-rule boostbook-to-tests ( target : source : properties * )
-{
-    lock-config ;
-    local boost_root = [ modules.peek : BOOST_ROOT ] ;
-    local native-path = [ path.native [ path.join $(.boostbook-xsl-dir) testing
-        Jamfile ] ] ;
-    local stylesheet = $(native-path:S=.xsl) ;
-    xsltproc.xslt $(target) : $(source) $(stylesheet) : $(properties)
-        <xsl:param>boost.root=$(boost_root) ;
-}
-
-
-#############################################################################
-# Dependency scanners
-#############################################################################
-# XInclude scanner. Mostly stolen from c-scanner. :)
-# Note that this assumes an "xi" prefix for XIncludes. This is not always the
-# case for XML documents, but we assume it is true for anything we encounter.
-#
-class xinclude-scanner : scanner
-{
-    import scanner ;
-
-    rule __init__ ( includes * )
-    {
-        scanner.__init__ ;
-        self.includes = $(includes) ;
-    }
-
-    rule pattern ( )
-    {
-        return "xi:include[ ]*href=\"([^\"]*)\"" ;
-    }
-
-    rule process ( target : matches * : binding )
-    {
-        local target_path = [ NORMALIZE_PATH $(binding:D) ] ;
-
-        NOCARE $(matches) ;
-        INCLUDES $(target) : $(matches) ;
-        SEARCH on $(matches) = $(target_path) $(self.includes:G=) ;
-
-        scanner.propagate $(__name__) : $(matches) : $(target) ;
-    }
-}
-
-scanner.register xinclude-scanner : xsl:path ;
-type.set-scanner XML : xinclude-scanner ;

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/borland.jam
----------------------------------------------------------------------
diff --git a/ext/kenlm b/ext/kenlm
new file mode 160000
index 0000000..56fdb5c
--- /dev/null
+++ b/ext/kenlm
@@ -0,0 +1 @@
+Subproject commit 56fdb5c44fca34d5a2e07d96139c28fb163983c5
diff --git a/ext/kenlm/jam-files/boost-build/tools/borland.jam b/ext/kenlm/jam-files/boost-build/tools/borland.jam
deleted file mode 100644
index 6e43ca9..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/borland.jam
+++ /dev/null
@@ -1,220 +0,0 @@
-# Copyright 2005 Dave Abrahams 
-# Copyright 2003 Rene Rivera 
-# Copyright 2003, 2004, 2005 Vladimir Prus 
-# Distributed under the Boost Software License, Version 1.0. 
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 
-
-#  Support for the Borland's command line compiler
-
-import property ;
-import generators ;
-import os ;
-import toolset : flags ;
-import feature : get-values ;
-import type ;
-import common ;
-
-feature.extend toolset : borland ;
-
-rule init ( version ? : command * : options * )
-{
-    local condition = [ common.check-init-parameters borland :
-        version $(version) ] ;
-    
-    local command = [ common.get-invocation-command borland : bcc32.exe 
-        : $(command) ] ;
-     
-    common.handle-options borland : $(condition) : $(command) : $(options) ;    
-    
-    if $(command)
-    {
-        command = [ common.get-absolute-tool-path $(command[-1]) ] ;
-    }   
-    root = $(command:D) ;    
-    
-    flags borland.compile STDHDRS $(condition) : $(root)/include/ ;
-    flags borland.link STDLIBPATH $(condition) : $(root)/lib ;
-    flags borland.link RUN_PATH $(condition) : $(root)/bin ;
-    flags borland .root $(condition) : $(root)/bin/ ;    
-}
-
-
-# A borland-specific target type
-type.register BORLAND.TDS : tds ;
-
-# Declare generators
-
-generators.register-linker borland.link : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : EXE : <toolset>borland ;
-generators.register-linker borland.link.dll : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB : <toolset>borland ;
-
-generators.register-archiver borland.archive : OBJ : STATIC_LIB : <toolset>borland ;
-generators.register-c-compiler borland.compile.c++ : CPP : OBJ : <toolset>borland ;
-generators.register-c-compiler borland.compile.c : C : OBJ : <toolset>borland ;
-generators.register-standard borland.asm : ASM : OBJ : <toolset>borland ;
-
-# Declare flags 
-
-flags borland.compile OPTIONS <debug-symbols>on : -v ;
-flags borland.link OPTIONS <debug-symbols>on : -v ;
-
-flags borland.compile OPTIONS <optimization>off : -Od ;
-flags borland.compile OPTIONS <optimization>speed : -O2 ;
-flags borland.compile OPTIONS <optimization>space : -O1 ;
-
-if $(.BORLAND_HAS_FIXED_INLINING_BUGS)
-{
-    flags borland CFLAGS <inlining>off : -vi- ;
-    flags borland CFLAGS <inlining>on : -vi -w-inl ;
-    flags borland CFLAGS <inlining>full : -vi -w-inl ;
-}
-else
-{
-    flags borland CFLAGS : -vi- ;
-}
-
-flags borland.compile OPTIONS <warnings>off : -w- ;
-flags borland.compile OPTIONS <warnings>all : -w ;
-flags borland.compile OPTIONS <warnings-as-errors>on : -w! ;
-
-
-# Deal with various runtime configs...
-
-# This should be not for DLL
-flags borland OPTIONS <user-interface>console : -tWC ;
-
-# -tWR sets -tW as well, so we turn it off here and then turn it 
-# on again later if we need it:
-flags borland OPTIONS <runtime-link>shared : -tWR -tWC ;
-flags borland OPTIONS <user-interface>gui : -tW ;
-
-flags borland OPTIONS <main-target-type>LIB/<link>shared : -tWD ;
-# Hmm.. not sure what's going on here.
-flags borland OPTIONS : -WM- ;
-flags borland OPTIONS <threading>multi : -tWM ;
-
-
-
-flags borland.compile OPTIONS <cxxflags> ;
-flags borland.compile DEFINES <define> ;
-flags borland.compile INCLUDES <include> ;
-
-flags borland NEED_IMPLIB <main-target-type>LIB/<link>shared : "" ;
-
-#
-# for C++ compiles the following options are turned on by default:
-#
-# -j5    stops after 5 errors
-# -g255  allow an unlimited number of warnings
-# -q     no banner
-# -c     compile to object
-# -P     C++ code regardless of file extention
-# -a8    8 byte alignment, this option is on in the IDE by default 
-#        and effects binary compatibility.
-#
-
-# -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)"  -I"$(STDHDRS)" -o"$(<)" "$(>)"
-
-
-actions compile.c++
-{
-    "$(CONFIG_COMMAND)" -j5 -g255 -q -c -P -a8 -Vx- -Ve- -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
-}
-
-# For C, we don't pass -P flag
-actions compile.c
-{
-    "$(CONFIG_COMMAND)" -j5 -g255 -q -c -a8 -Vx- -Ve- -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
-}
-
-
-# Declare flags and action for linking
-toolset.flags borland.link OPTIONS <debug-symbols>on : -v ;
-toolset.flags borland.link LIBRARY_PATH <library-path> ;
-toolset.flags borland.link FINDLIBS_ST <find-static-library> ;
-toolset.flags borland.link FINDLIBS_SA <find-shared-library> ;
-toolset.flags borland.link LIBRARIES <library-file> ;
-
-flags borland.link OPTIONS <linkflags> ;
-flags borland.link OPTIONS <link>shared : -tWD ;
-
-flags borland.link LIBRARY_PATH_OPTION <toolset>borland : -L : unchecked ;
-flags borland.link LIBRARY_OPTION <toolset>borland : "" : unchecked ;
-
-
-
-# bcc32 needs to have ilink32 in the path in order to invoke it, so explicitly
-# specifying $(BCC_TOOL_PATH)bcc32 doesn't help. You need to add
-# $(BCC_TOOL_PATH) to the path
-# The NEED_IMPLIB variable controls whether we need to invoke implib.
-
-flags borland.archive AROPTIONS <archiveflags> ;
-
-# Declare action for archives. We don't use response file
-# since it's hard to get "+-" there.
-# The /P256 increases 'page' size -- with too low
-# values tlib fails when building large applications.
-# CONSIDER: don't know what 'together' is for...
-actions updated together piecemeal archive
-{ 
-    $(.set-path)$(.root:W)$(.old-path)
-    tlib $(AROPTIONS) /P256 /u /a /C "$(<:W)" +-"$(>:W)"
-}
-
-
-if [ os.name ] = CYGWIN
-{
-    .set-path = "cmd /S /C set \"PATH=" ;
-    .old-path = ";%PATH%\" \"&&\"" ;
-    
-
-    # Couldn't get TLIB to stop being confused about pathnames
-    # containing dashes (it seemed to treat them as option separators
-    # when passed through from bash), so we explicitly write the
-    # command into a .bat file and execute that.  TLIB is also finicky
-    # about pathname style! Forward slashes, too, are treated as
-    # options.
-    actions updated together piecemeal archive
-    { 
-       chdir $(<:D)
-       echo +-$(>:BS) > $(<:BS).rsp
-       $(.set-path)$(.root)$(.old-path) "tlib.exe" $(AROPTIONS) /P256 /C $(<:BS) @$(<:BS).rsp && $(RM) $(<:BS).rsp
-    }    
-}
-else if [ os.name ] = NT
-{
-    .set-path = "set \"PATH=" ;
-    .old-path = ";%PATH%\"
-      " ;
-}
-else
-{
-    .set-path = "PATH=\"" ;
-    .old-path = "\":$PATH
-      export PATH
-      " ;
-}
-
-RM = [ common.rm-command ] ;
-
-nl = "
-" ;
-
-actions link
-{
-    $(.set-path)$(.root:W)$(.old-path) "$(CONFIG_COMMAND)" -v -q $(OPTIONS) -L"$(LIBRARY_PATH:W)" -L"$(STDLIBPATH:W)" -e"$(<[1]:W)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
-}
-
-
-actions link.dll bind LIBRARIES RSP
-{
-    $(.set-path)$(.root:W)$(.old-path) "$(CONFIG_COMMAND)" -v -q $(OPTIONS) -L"$(LIBRARY_PATH:W)" -L"$(STDLIBPATH:W)" -e"$(<[1]:W)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"  && "$(.root)implib" "$(<[2]:W)" "$(<[1]:W)"
-}
-
-# It seems impossible to specify output file with directory when compiling
-# asm files using bcc32, so use tasm32 directly.
-# /ml makes all symbol names case-sensitive
-actions asm
-{
-    $(.set-path)$(.root:W)$(.old-path) tasm32.exe /ml "$(>)" "$(<)"
-}
-