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:23 UTC

[35/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/tools/qt4.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/qt4.jam b/ext/kenlm/jam-files/boost-build/tools/qt4.jam
deleted file mode 100644
index a3aac61..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/qt4.jam
+++ /dev/null
@@ -1,755 +0,0 @@
-# Copyright 2002-2006 Vladimir Prus
-# Copyright 2005 Alo Sarv
-# Copyright 2005-2009 Juergen Hunold
-#
-# 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)
-
-# Qt4 library support module
-#
-# The module attempts to auto-detect QT installation location from QTDIR
-# environment variable; failing that, installation location can be passed as
-# argument:
-#
-# toolset.using qt4 : /usr/local/Trolltech/Qt-4.0.0 ;
-#
-# The module supports code generation from .ui and .qrc files, as well as
-# running the moc preprocessor on headers. Note that you must list all your
-# moc-able headers in sources.
-#
-# Example:
-#
-#     exe myapp : myapp.cpp myapp.h myapp.ui myapp.qrc
-#                 /qt4//QtGui /qt4//QtNetwork ;
-#
-# It's also possible to run moc on cpp sources:
-#
-#   import cast ;
-#
-#   exe myapp : myapp.cpp [ cast _ moccable-cpp : myapp.cpp ] /qt4//QtGui ;
-#
-# When moccing source file myapp.cpp you need to include "myapp.moc" from
-# myapp.cpp. When moccing .h files, the output of moc will be automatically
-# compiled and linked in, you don't need any includes.
-#
-# This is consistent with Qt guidelines:
-# http://qt-project.org/doc/qt-4.8/moc.html
-#
-# The .qrc processing utility supports various command line option (see
-# http://qt-project.org/doc/qt-4.8/rcc.html for a complete list). The
-# module provides default arguments for the "output file" and
-# "initialization function name" options. Other options can be set through
-# the <rccflags> build property. E.g. if you wish the compression settings
-# to be more aggressive than the defaults, you can apply them too all .qrc
-# files like this:
-#
-#   project my-qt-project :
-#               requirements
-#               <rccflags>"-compress 9 -threshold 10"
-#           ;
-#
-# Of course, this property can also be specified on individual targets.
-
-
-import modules ;
-import feature ;
-import errors ;
-import type ;
-import "class" : new ;
-import generators ;
-import project ;
-import toolset : flags ;
-import os ;
-import virtual-target ;
-import scanner ;
-
-# Qt3Support control feature
-#
-# Qt4 configure defaults to build Qt4 libraries with Qt3Support.
-# The autodetection is missing, so we default to disable Qt3Support.
-# This prevents the user from inadvertedly using a deprecated API.
-#
-# The Qt3Support library can be activated by adding
-# "<qt3support>on" to requirements
-#
-# Use "<qt3support>on:<define>QT3_SUPPORT_WARNINGS"
-# to get warnings about deprecated Qt3 support funtions and classes.
-# Files ported by the "qt3to4" conversion tool contain _tons_ of
-# warnings, so this define is not set as default.
-#
-# Todo: Detect Qt3Support from Qt's configure data.
-#       Or add more auto-configuration (like python).
-feature.feature qt3support : off on : propagated link-incompatible ;
-
-# The Qt version used for requirements
-# Valid are <qt>4.4 or <qt>4.5.0
-# Auto-detection via qmake sets '<qt>major.minor.patch'
-feature.feature qt : : propagated ;
-
-# Extra flags for rcc
-feature.feature rccflags : : free ;
-
-project.initialize $(__name__) ;
-project qt ;
-
-# Save the project so that we tolerate 'import + using' combo.
-.project = [ project.current ] ;
-
-# Helper utils for easy debug output
-if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
-{
-    .debug-configuration = TRUE ;
-}
-
-local rule debug-message ( message * )
-{
-    if $(.debug-configuration) = TRUE
-    {
-        ECHO notice: [qt4-cfg] $(message) ;
-    }
-}
-
-# Capture qmake output line by line
-local rule read-output ( content )
-{
-    local lines ;
-    local nl = "
-" ;
-    local << = "([^$(nl)]*)[$(nl)](.*)" ;
-    local line+ = [ MATCH "$(<<)" : "$(content)" ] ;
-    while $(line+)
-    {
-        lines += $(line+[1]) ;
-        line+ = [ MATCH "$(<<)" : "$(line+[2])" ] ;
-    }
-    return $(lines) ;
-}
-
-# Capture Qt version from qmake
-local rule check-version ( bin_prefix )
-{
-    full-cmd = $(bin_prefix)"/qmake -v" ;
-    debug-message Running '$(full-cmd)' ;
-    local output = [ SHELL $(full-cmd) ] ;
-    for line in [ read-output $(output) ]
-    {
-        # Parse the output to get all the results.
-        if [ MATCH "QMake" : $(line) ]
-        {
-            # Skip first line of output
-        }
-        else
-        {
-            temp = [ MATCH "([0-9]*)\\.([0-9]*)\\.([0-9]*)" : $(line) ] ;
-        }
-    }
-    return $(temp) ;
-}
-
-# Validate the version string and extract the major/minor part we care about.
-#
-local rule split-version ( version )
-{
-    local major-minor = [ MATCH ^([0-9]+)\.([0-9]+)(.*)$ : $(version) : 1 2 3 ] ;
-    if ! $(major-minor[2]) || $(major-minor[3])
-    {
-        ECHO "Warning: 'using qt' expects a two part (major, minor) version number; got" $(version) instead ;
-
-        # Add a zero to account for the missing digit if necessary.
-        major-minor += 0 ;
-    }
-
-    return $(major-minor[1]) $(major-minor[2]) ;
-}
-
-# Initialize the QT support module.
-# Parameters:
-# - 'prefix'    parameter tells where Qt is installed.
-# - 'full_bin'  optional full path to Qt binaries (qmake,moc,uic,rcc)
-# - 'full_inc'  optional full path to Qt top-level include directory
-# - 'full_lib'  optional full path to Qt library directory
-# - 'version'   optional version of Qt, else autodetected via 'qmake -v'
-# - 'condition' optional requirements
-rule init ( prefix : full_bin ? : full_inc ? : full_lib ? : version ? : condition * )
-{
-    project.push-current $(.project) ;
-
-    debug-message "==== Configuring Qt ... ====" ;
-    for local v in version cmd-or-prefix includes libraries condition
-    {
-        if $($(v))
-        {
-            debug-message "  user-specified "$(v): '$($(v))' ;
-        }
-    }
-
-    # Needed as default value
-    .prefix = $(prefix) ;
-
-    # pre-build paths to detect reinitializations changes
-    local inc_prefix lib_prefix bin_prefix ;
-    if $(full_inc)
-    {
-        inc_prefix = $(full_inc) ;
-    }
-    else
-    {
-        inc_prefix = $(prefix)/include ;
-    }
-    if $(full_lib)
-    {
-        lib_prefix = $(full_lib) ;
-    }
-    else
-    {
-        lib_prefix = $(prefix)/lib ;
-    }
-    if $(full_bin)
-    {
-        bin_prefix = $(full_bin) ;
-    }
-    else
-    {
-        bin_prefix = $(prefix)/bin ;
-    }
-
-    # Globally needed variables
-    .incprefix = $(inc_prefix) ;
-    .libprefix = $(lib_prefix) ;
-    .binprefix = $(bin_prefix) ;
-
-    if ! $(.initialized)
-    {
-        # Make sure this is initialised only once
-        .initialized = true ;
-
-        # Generates cpp files from header files using "moc" tool
-        generators.register-standard qt4.moc : H : CPP(moc_%) : <allow>qt4 ;
-
-        # The OBJ result type is a fake, 'H' will be really produced. See
-        # comments on the generator class, defined below the 'init' function.
-        generators.register [ new uic-generator qt4.uic : UI : OBJ :
-            <allow>qt4  ] ;
-
-        # The OBJ result type is a fake here too.
-        generators.register [ new moc-h-generator
-            qt4.moc.inc : MOCCABLE_CPP : OBJ : <allow>qt4 ] ;
-
-        generators.register [ new moc-inc-generator
-            qt4.moc.inc : MOCCABLE_H : OBJ : <allow>qt4 ] ;
-
-        # Generates .cpp files from .qrc files.
-        generators.register-standard qt4.rcc : QRC : CPP(qrc_%) : <allow>qt4 ;
-
-        # dependency scanner for wrapped files.
-        type.set-scanner QRC : qrc-scanner ;
-
-        # Save value of first occuring prefix
-        .PREFIX = $(prefix) ;
-    }
-
-    if $(version)
-    {
-        major-minor = [ split-version $(version) ] ;
-        version = $(major-minor:J=.) ;
-    }
-    else
-    {
-        version = [ check-version $(bin_prefix) ] ;
-        if $(version)
-        {
-            version = $(version:J=.) ;
-        }
-        debug-message Detected version '$(version)' ;
-    }
-
-    local target-requirements = $(condition) ;
-
-    # Add the version, if any, to the target requirements.
-    if $(version)
-    {
-        if ! $(version) in [ feature.values qt ]
-        {
-            feature.extend qt : $(version) ;
-        }
-        target-requirements += <qt>$(version:E=default) ;
-    }
-
-    local target-os = [ feature.get-values target-os : $(condition) ] ;
-    if ! $(target-os)
-    {
-        target-os ?= [ feature.defaults target-os ] ;
-        target-os = $(target-os:G=) ;
-        target-requirements += <target-os>$(target-os) ;
-    }
-
-    # Build exact requirements for the tools
-    local tools-requirements = $(target-requirements:J=/) ;
-
-    debug-message "Details of this Qt configuration:" ;
-    debug-message "  prefix:      " '$(prefix:E=<empty>)' ;
-    debug-message "  binary path: " '$(bin_prefix:E=<empty>)' ;
-    debug-message "  include path:" '$(inc_prefix:E=<empty>)' ;
-    debug-message "  library path:" '$(lib_prefix:E=<empty>)' ;
-    debug-message "  target requirements:" '$(target-requirements)' ;
-    debug-message "  tool requirements:  " '$(tools-requirements)' ;
-
-    # setup the paths for the tools
-    toolset.flags qt4.moc .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
-    toolset.flags qt4.rcc .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
-    toolset.flags qt4.uic .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
-
-    # TODO: 2009-02-12: Better support for directories
-    # Most likely needed are separate getters for: include,libraries,binaries and sources.
-    toolset.flags qt4.directory .PREFIX $(tools-requirements) : $(prefix) ;
-
-    # Test for a buildable Qt.
-    if [ glob $(.prefix)/Jamroot ]
-    {
-       .bjam-qt = true
-
-       # this will declare QtCore (and qtmain on <target-os>windows)
-       add-shared-library QtCore ;
-   }
-   else
-   # Setup common pre-built Qt.
-   # Special setup for QtCore on which everything depends
-   {
-       local link = [ feature.get-values link : $(condition) ] ;
-
-       local usage-requirements =
-           <include>$(.incprefix)
-           <library-path>$(.libprefix)
-           <threading>multi
-           <allow>qt4 ;
-
-       if $(link) in shared
-       {
-           usage-requirements += <dll-path>$(.libprefix) ;
-       }
-
-       local suffix ;
-
-       # Since Qt-4.2, debug versions on unix have to be built
-       # separately and therefore have no suffix.
-       .suffix_version = "" ;
-       .suffix_debug = "" ;
-
-       # Control flag for auto-configuration of the debug libraries.
-       # This setup requires Qt 'configure -debug-and-release'.
-       # Only available on some platforms.
-       # ToDo: 2009-02-12: Maybe throw this away and
-       # require separate setup with <variant>debug as condition.
-       .have_separate_debug = FALSE ;
-
-       # Setup other platforms
-       if $(target-os) in windows cygwin
-       {
-           .have_separate_debug = TRUE ;
-
-           # On NT, the shared libs have "4" suffix, and "d" suffix in debug builds.
-           if $(link) in shared
-           {
-                .suffix_version = "4" ;
-           }
-           .suffix_debug = "d" ;
-
-           # On Windows we must link against the qtmain library
-           lib qtmain
-               : # sources
-               : # requirements
-                  <name>qtmain$(.suffix_debug)
-                  <variant>debug
-                  $(target-requirements)
-               ;
-
-           lib qtmain
-               : # sources
-               : # requirements
-                   <name>qtmain
-                   $(target-requirements)
-               ;
-       }
-       else if $(target-os) = darwin
-       {
-           # On MacOS X, both debug and release libraries are available.
-           .suffix_debug = "_debug" ;
-
-           .have_separate_debug = TRUE ;
-
-           alias qtmain ;
-       }
-       else
-       {
-           alias qtmain : : $(target-requirements) ;
-       }
-
-       lib QtCore : qtmain
-           : # requirements
-             <name>QtCore$(.suffix_version)
-             $(target-requirements)
-           : # default-build
-           : # usage-requirements
-             <define>QT_CORE_LIB
-             <define>QT_NO_DEBUG
-             <include>$(.incprefix)/QtCore
-             $(usage-requirements)
-           ;
-
-       if $(.have_separate_debug) = TRUE
-       {
-           debug-message Configure debug libraries with suffix '$(.suffix_debug)' ;
-
-           lib QtCore : $(main)
-               : # requirements
-                 <name>QtCore$(.suffix_debug)$(.suffix_version)
-                 <variant>debug
-                 $(target-requirements)
-               : # default-build
-               : # usage-requirements
-                 <define>QT_CORE_LIB
-                 <include>$(.incprefix)/QtCore
-                 $(usage-requirements)
-               ;
-        }
-    }
-
-    # Initialising the remaining libraries is canonical
-    # parameters 'module' : 'depends-on' : 'usage-define' : 'requirements' : 'include'
-    # 'include' only for non-canonical include paths.
-    add-shared-library QtGui     : QtCore : QT_GUI_LIB     : $(target-requirements) ;
-    add-shared-library QtNetwork : QtCore : QT_NETWORK_LIB : $(target-requirements) ;
-    add-shared-library QtSql     : QtCore : QT_SQL_LIB     : $(target-requirements) ;
-    add-shared-library QtXml     : QtCore : QT_XML_LIB     : $(target-requirements) ;
-
-    add-shared-library Qt3Support : QtGui QtNetwork QtXml QtSql
-                                  : QT_QT3SUPPORT_LIB QT3_SUPPORT
-                                  : <qt3support>on $(target-requirements) ;
-
-    # Dummy target to enable "<qt3support>off" and
-    # "<library>/qt//Qt3Support" at the same time. This enables quick
-    # switching from one to the other for test/porting purposes.
-    alias Qt3Support : : <qt3support>off $(target-requirements) ;
-
-    # OpenGl Support
-    add-shared-library QtOpenGL : QtGui : QT_OPENGL_LIB : $(target-requirements) ;
-
-    # SVG-Support (Qt 4.1)
-    add-shared-library QtSvg : QtXml QtOpenGL : QT_SVG_LIB : $(target-requirements) ;
-
-    # Test-Support (Qt 4.1)
-    add-shared-library QtTest : QtCore : : $(target-requirements) ;
-
-    # Qt designer library
-    add-shared-library QtDesigner : QtGui QtXml : : $(target-requirements) ;
-    add-shared-library QtDesignerComponents : QtGui QtXml : : $(target-requirements) ;
-
-    # Support for dynamic Widgets (Qt 4.1)
-    add-static-library  QtUiTools : QtGui QtXml : $(target-requirements) ;
-
-    # DBus-Support (Qt 4.2)
-    add-shared-library QtDBus : QtXml : : $(target-requirements) ;
-
-    # Script-Engine (Qt 4.3)
-    add-shared-library QtScript : QtGui QtXml : QT_SCRIPT_LIB : $(target-requirements) ;
-
-    # Tools for the Script-Engine (Qt 4.5)
-    add-shared-library QtScriptTools : QtScript : QT_SCRIPTTOOLS_LIB : $(target-requirements) ;
-
-    # WebKit (Qt 4.4)
-    add-shared-library QtWebKit : QtGui : QT_WEBKIT_LIB : $(target-requirements) ;
-
-    # Phonon Multimedia (Qt 4.4)
-    add-shared-library phonon : QtGui QtXml : QT_PHONON_LIB : $(target-requirements) ;
-
-    # Multimedia engine (Qt 4.6)
-    add-shared-library QtMultimedia : QtGui : QT_MULTIMEDIA_LIB : $(target-requirements) ;
-
-    # XmlPatterns-Engine (Qt 4.4)
-    add-shared-library QtXmlPatterns : QtNetwork : QT_XMLPATTERNS_LIB : $(target-requirements) ;
-
-    # Help-Engine (Qt 4.4)
-    add-shared-library QtHelp    : QtGui QtSql QtXml : : $(target-requirements) ;
-    add-shared-library QtCLucene : QCore QtSql QtXml : : $(target-requirements) ;
-
-    # QML-Engine (Qt 4.7)
-    add-shared-library QtDeclarative : QtGui QtXml : : $(target-requirements) ;
-
-    # AssistantClient Support
-    # Compat library removed in 4.7.0
-    # Pre-4.4 help system, use QtHelp for new programs
-    if $(version) < "4.7"
-    {
-       add-shared-library QtAssistantClient : QtGui : : $(target-requirements) : QtAssistant ;
-    }
-    debug-message "==== Configured Qt-$(version) ====" ;
-
-    project.pop-current ;
-}
-
-rule initialized ( )
-{
-    return $(.initialized) ;
-}
-
-
-
-# This custom generator is needed because in QT4, UI files are translated only
-# into H files, and no C++ files are created. Further, the H files need not be
-# passed via MOC. The header is used only via inclusion. If we define a standard
-# UI -> H generator, Boost.Build will run MOC on H, and then compile the
-# resulting cpp. It will give a warning, since output from moc will be empty.
-#
-# This generator is declared with a UI -> OBJ signature, so it gets invoked when
-# linking generator tries to convert sources to OBJ, but it produces target of
-# type H. This is non-standard, but allowed. That header won't be mocced.
-#
-class uic-generator : generator
-{
-    rule __init__ ( * : * )
-    {
-        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
-    }
-
-    rule run ( project name ? : property-set : sources * )
-    {
-        if ! $(name)
-        {
-            name = [ $(sources[0]).name ] ;
-            name = $(name:B) ;
-        }
-
-        local a = [ new action $(sources[1]) : qt4.uic : $(property-set) ] ;
-
-        # The 'ui_' prefix is to match qmake's default behavior.
-        local target = [ new file-target ui_$(name) : H : $(project) : $(a) ] ;
-
-        local r = [ virtual-target.register $(target) ] ;
-
-        # Since this generator will return a H target, the linking generator
-        # won't use it at all, and won't set any dependency on it. However, we
-        # need the target to be seen by bjam, so that dependency from sources to
-        # this generated header is detected -- if jam does not know about this
-        # target, it won't do anything.
-        DEPENDS all : [ $(r).actualize ] ;
-
-        return $(r) ;
-    }
-}
-
-
-class moc-h-generator : generator
-{
-    rule __init__ ( * : * )
-    {
-        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
-    }
-
-    rule run ( project name ? : property-set : sources * )
-    {
-        if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE_CPP
-        {
-            name = [ $(sources[0]).name ] ;
-            name = $(name:B) ;
-
-            local a = [ new action $(sources[1]) : qt4.moc.inc :
-                $(property-set) ] ;
-
-            local target = [ new file-target $(name) : MOC : $(project) : $(a)
-                ] ;
-
-            local r = [ virtual-target.register $(target) ] ;
-
-            # Since this generator will return a H target, the linking generator
-            # won't use it at all, and won't set any dependency on it. However,
-            # we need the target to be seen by bjam, so that dependency from
-            # sources to this generated header is detected -- if jam does not
-            # know about this target, it won't do anything.
-            DEPENDS all : [ $(r).actualize ] ;
-
-            return $(r) ;
-        }
-    }
-}
-
-
-class moc-inc-generator : generator
-{
-    rule __init__ ( * : * )
-    {
-        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
-    }
-
-    rule run ( project name ? : property-set : sources * )
-    {
-        if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE_H
-        {
-            name = [ $(sources[0]).name ] ;
-            name = $(name:B) ;
-
-            local a = [ new action $(sources[1]) : qt4.moc.inc :
-                $(property-set) ] ;
-
-            local target = [ new file-target moc_$(name) : CPP : $(project) :
-                $(a) ] ;
-
-            # Since this generator will return a H target, the linking generator
-            # won't use it at all, and won't set any dependency on it. However,
-            # we need the target to be seen by bjam, so that dependency from
-            # sources to this generated header is detected -- if jam does not
-            # know about this target, it won't do anything.
-            DEPENDS all : [ $(target).actualize ] ;
-
-            return [ virtual-target.register $(target) ] ;
-        }
-    }
-}
-
-
-# Query the installation directory. This is needed in at least two scenarios.
-# First, when re-using sources from the Qt-Tree. Second, to "install" custom Qt
-# plugins to the Qt-Tree.
-#
-rule directory
-{
-    return $(.PREFIX) ;
-}
-
-# Add a shared Qt library.
-rule add-shared-library ( lib-name : depends-on * : usage-defines * : requirements * :  include ? )
-{
-     add-library $(lib-name) : $(.suffix_version) : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;
-}
-
-# Add a static Qt library.
-rule add-static-library ( lib-name : depends-on * : usage-defines * : requirements * : include ? )
-{
-     add-library $(lib-name) : : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;
-}
-
-# Add a Qt library.
-# Static libs are unversioned, whereas shared libs have the major number as suffix.
-# Creates both release and debug versions on platforms where both are enabled by Qt configure.
-# Flags:
-# - lib-name Qt library Name
-# - version  Qt major number used as shared library suffix (QtCore4.so)
-# - depends-on other Qt libraries
-# - usage-defines those are set by qmake, so set them when using this library
-# - requirements addional requirements
-# - include non-canonical include path. The canonical path is $(.incprefix)/$(lib-name).
-rule add-library ( lib-name : version ? : depends-on * : usage-defines * : requirements * : include ? )
-{
-    if $(.bjam-qt)
-    {
-        # Import Qt module
-        # Eveything will be setup there
-        alias $(lib-name)
-           : $(.prefix)//$(lib-name)
-           :
-           :
-           : <allow>qt4 ;
-    }
-    else
-    {
-        local real_include ;
-        real_include ?= $(include) ;
-        real_include ?= $(lib-name) ;
-
-        lib $(lib-name)
-           : # sources
-             $(depends-on)
-           : # requirements
-             <name>$(lib-name)$(version)
-             $(requirements)
-           : # default-build
-           : # usage-requirements
-             <define>$(usage-defines)
-             <include>$(.incprefix)/$(real_include)
-           ;
-
-        if $(.have_separate_debug) = TRUE
-        {
-            lib $(lib-name)
-               : # sources
-                 $(depends-on)
-               : # requirements
-                 <name>$(lib-name)$(.suffix_debug)$(version)
-                 $(requirements)
-                 <variant>debug
-               : # default-build
-               : # usage-requirements
-                 <define>$(usage-defines)
-                 <include>$(.incprefix)/$(real_include)
-               ;
-        }
-    }
-
-    # Make library explicit so that a simple <use>qt4 will not bring in everything.
-    # And some components like QtDBus/Phonon may not be available on all platforms.
-    explicit $(lib-name) ;
-}
-
-# Use $(.BINPREFIX[-1]) for the paths as several tools-requirements can match.
-# The exact match is the last one.
-
-# Get <include> and <defines> from current toolset.
-flags qt4.moc INCLUDES <include> ;
-flags qt4.moc DEFINES <define> ;
-
-# need a newline for expansion of DEFINES and INCLUDES in the response file.
-.nl  = "
-" ;
-
-# Processes headers to create Qt MetaObject information. Qt4-moc has its
-# c++-parser, so pass INCLUDES and DEFINES.
-# We use response file with one INCLUDE/DEFINE per line
-#
-actions moc
-{
-    $(.BINPREFIX[-1])/moc -f $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
-}
-
-# When moccing files for include only, we don't need -f, otherwise the generated
-# code will include the .cpp and we'll get duplicated symbols.
-#
-actions moc.inc
-{
-    $(.BINPREFIX[-1])/moc $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
-}
-
-
-# Get extra options for RCC
-flags qt4.rcc RCC_OPTIONS <rccflags> ;
-
-# Generates source files from resource files.
-#
-actions rcc
-{
-    $(.BINPREFIX[-1])/rcc $(>) -name $(>:B) $(RCC_OPTIONS) -o $(<)
-}
-
-
-# Generates user-interface source from .ui files.
-#
-actions uic
-{
-    $(.BINPREFIX[-1])/uic $(>) -o $(<)
-}
-
-
-# Scanner for .qrc files. Look for the CDATA section of the <file> tag. Ignore
-# the "alias" attribute. See http://doc.trolltech.com/qt/resources.html for
-# detailed documentation of the Qt Resource System.
-#
-class qrc-scanner : common-scanner
-{
-    rule pattern ( )
-    {
-        return "<file.*>(.*)</file>" ;
-    }
-}
-
-
-# Wrapped files are "included".
-scanner.register qrc-scanner : include ;

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/qt5.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/qt5.jam b/ext/kenlm/jam-files/boost-build/tools/qt5.jam
deleted file mode 100644
index a5fdf71..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/qt5.jam
+++ /dev/null
@@ -1,728 +0,0 @@
-# Copyright 2002-2006 Vladimir Prus
-# Copyright 2005 Alo Sarv
-# Copyright 2005-2012 Juergen Hunold
-#
-# 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)
-
-# Qt5 library support module
-#
-# The module attempts to auto-detect QT installation location from QTDIR
-# environment variable; failing that, installation location can be passed as
-# argument:
-#
-# toolset.using qt5 : /usr/local/Trolltech/Qt-5.0.0 ;
-#
-# The module supports code generation from .ui and .qrc files, as well as
-# running the moc preprocessor on headers. Note that you must list all your
-# moc-able headers in sources.
-#
-# Example:
-#
-#     exe myapp : myapp.cpp myapp.h myapp.ui myapp.qrc
-#                 /qt5//QtGui /qt5//QtNetwork ;
-#
-# It's also possible to run moc on cpp sources:
-#
-#   import cast ;
-#
-#   exe myapp : myapp.cpp [ cast _ moccable-cpp : myapp.cpp ] /qt5//QtGui ;
-#
-# When moccing source file myapp.cpp you need to include "myapp.moc" from
-# myapp.cpp. When moccing .h files, the output of moc will be automatically
-# compiled and linked in, you don't need any includes.
-#
-# This is consistent with Qt guidelines:
-# http://qt-project.org/doc/qt-5.0/moc.html
-
-# The .qrc processing utility supports various command line option (see
-# http://qt-project.org/doc/qt-5.0/rcc.html for a complete list). The
-# module provides default arguments for the "output file" and
-# "initialization function name" options. Other options can be set through
-# the <rccflags> build property. E.g. if you wish the compression settings
-# to be more aggressive than the defaults, you can apply them too all .qrc
-# files like this:
-#
-#   project my-qt-project :
-#               requirements
-#               <rccflags>"-compress 9 -threshold 10"
-#           ;
-#
-# Of course, this property can also be specified on individual targets.
-
-
-import modules ;
-import feature ;
-import errors ;
-import type ;
-import "class" : new ;
-import generators ;
-import project ;
-import toolset : flags ;
-import os ;
-import virtual-target ;
-import scanner ;
-
-# The Qt version used for requirements
-# Valid are <qt>5.0 or <qt>5.1.0
-# Auto-detection via qmake sets '<qt>major.minor.patch'
-feature.feature qt5 : : propagated ;
-
-# Extra flags for rcc
-# $TODO: figure out how to declare this only once
-# feature.feature rccflags : : free ;
-
-project.initialize $(__name__) ;
-project qt5 ;
-
-# Save the project so that we tolerate 'import + using' combo.
-.project = [ project.current ] ;
-
-# Helper utils for easy debug output
-if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
-{
-    .debug-configuration = TRUE ;
-}
-
-local rule debug-message ( message * )
-{
-    if $(.debug-configuration) = TRUE
-    {
-        ECHO notice: [qt5-cfg] $(message) ;
-    }
-}
-
-# Capture qmake output line by line
-local rule read-output ( content )
-{
-    local lines ;
-    local nl = "
-" ;
-    local << = "([^$(nl)]*)[$(nl)](.*)" ;
-    local line+ = [ MATCH "$(<<)" : "$(content)" ] ;
-    while $(line+)
-    {
-        lines += $(line+[1]) ;
-        line+ = [ MATCH "$(<<)" : "$(line+[2])" ] ;
-    }
-    return $(lines) ;
-}
-
-# Capture Qt version from qmake
-local rule check-version ( bin_prefix )
-{
-    full-cmd = $(bin_prefix)"/qmake -v" ;
-    debug-message Running '$(full-cmd)' ;
-    local output = [ SHELL $(full-cmd) ] ;
-    for line in [ read-output $(output) ]
-    {
-        # Parse the output to get all the results.
-        if [ MATCH "QMake" : $(line) ]
-        {
-            # Skip first line of output
-        }
-        else
-        {
-            temp = [ MATCH "([0-9]*)\\.([0-9]*)\\.([0-9]*)" : $(line) ] ;
-        }
-    }
-    return $(temp) ;
-}
-
-# Validate the version string and extract the major/minor part we care about.
-#
-local rule split-version ( version )
-{
-    local major-minor = [ MATCH ^([0-9]+)\.([0-9]+)(.*)$ : $(version) : 1 2 3 ] ;
-    if ! $(major-minor[2]) || $(major-minor[3])
-    {
-        ECHO "Warning: 'using qt' expects a two part (major, minor) version number; got" $(version) instead ;
-
-        # Add a zero to account for the missing digit if necessary.
-        major-minor += 0 ;
-    }
-
-    return $(major-minor[1]) $(major-minor[2]) ;
-}
-
-# Initialize the QT support module.
-# Parameters:
-# - 'prefix'    parameter tells where Qt is installed.
-# - 'version'   optional version of Qt, else autodetected via 'qmake -v'
-# - 'condition' optional requirements
-# - 'namespace' optional support for configure -qtnamespace
-# - 'infix'     optional support for configure -qtlibinfix
-# - 'full_bin'  optional full path to Qt binaries (qmake,moc,uic,rcc)
-# - 'full_inc'  optional full path to Qt top-level include directory
-# - 'full_lib'  optional full path to Qt library directory
-rule init ( prefix : version ? : condition * : namespace ? : infix ? : full_bin ? : full_inc ? : full_lib ? )
-{
-    project.push-current $(.project) ;
-
-    debug-message "==== Configuring Qt ... ====" ;
-    for local v in version prefix condition namespace infix full_bin full_inc full_lib
-    {
-        if $($(v))
-        {
-            debug-message "  user-specified "$(v): '$($(v))' ;
-        }
-    }
-
-    # Needed as default value
-    .prefix = $(prefix) ;
-
-    # pre-build paths to detect reinitializations changes
-    local inc_prefix lib_prefix bin_prefix ;
-    if $(full_inc)
-    {
-        inc_prefix = $(full_inc) ;
-    }
-    else
-    {
-        inc_prefix = $(prefix)/include ;
-    }
-    if $(full_lib)
-    {
-        lib_prefix = $(full_lib) ;
-    }
-    else
-    {
-        lib_prefix = $(prefix)/lib ;
-    }
-    if $(full_bin)
-    {
-        bin_prefix = $(full_bin) ;
-    }
-    else
-    {
-        bin_prefix = $(prefix)/bin ;
-    }
-
-    # Globally needed variables
-    .incprefix = $(inc_prefix) ;
-    .libprefix = $(lib_prefix) ;
-    .binprefix = $(bin_prefix) ;
-
-    if ! $(.initialized)
-    {
-        # Make sure this is initialised only once
-        .initialized = true ;
-
-        # Generates cpp files from header files using "moc" tool
-        generators.register-standard qt5.moc : H : CPP(moc_%) : <allow>qt5 ;
-
-        # The OBJ result type is a fake, 'H' will be really produced. See
-        # comments on the generator class, defined below the 'init' function.
-        generators.register [ new uic-5-generator qt5.uic : UI : OBJ :
-            <allow>qt5  ] ;
-
-        # The OBJ result type is a fake here too.
-        generators.register [ new moc-h-5-generator
-            qt5.moc.inc : MOCCABLE5_CPP : OBJ : <allow>qt5 ] ;
-
-        generators.register [ new moc-inc-5-generator
-            qt5.moc.inc : MOCCABLE5_H : OBJ : <allow>qt5 ] ;
-
-        # Generates .cpp files from .qrc files.
-        generators.register-standard qt5.rcc : QRC : CPP(qrc_%) : <allow>qt5 ;
-
-        # dependency scanner for wrapped files.
-        type.set-scanner QRC : qrc-5-scanner ;
-
-        # Save value of first occuring prefix
-        .PREFIX = $(prefix) ;
-    }
-
-    if $(version)
-    {
-        major-minor = [ split-version $(version) ] ;
-        version = $(major-minor:J=.) ;
-    }
-    else
-    {
-        version = [ check-version $(bin_prefix) ] ;
-        if $(version)
-        {
-            version = $(version:J=.) ;
-        }
-        debug-message Detected version '$(version)' ;
-    }
-
-    local target-requirements = $(condition) ;
-
-    # Add the version, if any, to the target requirements.
-    if $(version)
-    {
-        if ! $(version) in [ feature.values qt5 ]
-        {
-            feature.extend qt5 : $(version) ;
-        }
-        target-requirements += <qt5>$(version:E=default) ;
-    }
-
-    local target-os = [ feature.get-values target-os : $(condition) ] ;
-    if ! $(target-os)
-    {
-        target-os ?= [ feature.defaults target-os ] ;
-        target-os = $(target-os:G=) ;
-        target-requirements += <target-os>$(target-os) ;
-    }
-
-    # Build exact requirements for the tools
-    local tools-requirements = $(target-requirements:J=/) ;
-
-    debug-message "Details of this Qt configuration:" ;
-    debug-message "  prefix:      " '$(prefix:E=<empty>)' ;
-    debug-message "  binary path: " '$(bin_prefix:E=<empty>)' ;
-    debug-message "  include path:" '$(inc_prefix:E=<empty>)' ;
-    debug-message "  library path:" '$(lib_prefix:E=<empty>)' ;
-    debug-message "  target requirements:" '$(target-requirements)' ;
-    debug-message "  tool requirements:  " '$(tools-requirements)' ;
-
-    # setup the paths for the tools
-    toolset.flags qt5.moc .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
-    toolset.flags qt5.rcc .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
-    toolset.flags qt5.uic .BINPREFIX $(tools-requirements) : $(bin_prefix) ;
-
-    # TODO: 2009-02-12: Better support for directories
-    # Most likely needed are separate getters for: include,libraries,binaries and sources.
-    toolset.flags qt5.directory .PREFIX $(tools-requirements) : $(prefix) ;
-
-    # Test for a buildable Qt.
-    if [ glob $(.prefix)/Jamroot ]
-    {
-       .bjam-qt = true
-
-       # this will declare QtCore (and qtmain on <target-os>windows)
-       add-shared-library QtCore ;
-   }
-   else
-   # Setup common pre-built Qt.
-   # Special setup for QtCore on which everything depends
-   {
-       local link = [ feature.get-values link : $(condition) ] ;
-
-       local usage-requirements =
-           <include>$(.incprefix)
-           <library-path>$(.libprefix)
-           <threading>multi
-           <allow>qt5 ;
-
-       if $(link) in shared
-       {
-           usage-requirements += <dll-path>$(.libprefix) ;
-       }
-
-       local suffix ;
-
-       # debug versions on unix have to be built
-       # separately and therefore have no suffix.
-       .infix_version = "" ;
-       .suffix_debug = "" ;
-
-       # Control flag for auto-configuration of the debug libraries.
-       # This setup requires Qt 'configure -debug-and-release'.
-       # Only available on some platforms.
-       # ToDo: 2009-02-12: Maybe throw this away and
-       # require separate setup with <variant>debug as condition.
-       .have_separate_debug = FALSE ;
-
-       # Setup other platforms
-       if $(target-os) in windows cygwin
-       {
-           .have_separate_debug = TRUE ;
-
-           # On NT, the libs have "d" suffix in debug builds.
-           .suffix_debug = "d" ;
-
-           .infix_version = "5" ;
-
-           # On Windows we must link against the qtmain library
-           lib qtmain
-               : # sources
-               : # requirements
-                  <name>qtmain$(.suffix_debug)
-                  <variant>debug
-                  $(target-requirements)
-               ;
-
-           lib qtmain
-               : # sources
-               : # requirements
-                   <name>qtmain
-                   $(target-requirements)
-               ;
-       }
-       else if $(target-os) = darwin
-       {
-           # On MacOS X, both debug and release libraries are available.
-           .suffix_debug = "_debug" ;
-
-           .have_separate_debug = TRUE ;
-
-           alias qtmain ;
-       }
-       else
-       {
-           alias qtmain : : $(target-requirements) ;
-           .infix_version = "5" ;
-       }
-
-       lib QtCore : qtmain
-           : # requirements
-             <name>Qt$(.infix_version)Core
-             $(target-requirements)
-           : # default-build
-           : # usage-requirements
-             <define>QT_CORE_LIB
-             <define>QT_NO_DEBUG
-             <include>$(.incprefix)/QtCore
-             $(usage-requirements)
-           ;
-
-       if $(.have_separate_debug) = TRUE
-       {
-           debug-message Configure debug libraries with suffix '$(.suffix_debug)' ;
-
-           lib QtCore : $(main)
-               : # requirements
-                 <name>Qt$(.infix_version)Core$(.suffix_debug)
-                 <variant>debug
-                 $(target-requirements)
-               : # default-build
-               : # usage-requirements
-                 <define>QT_CORE_LIB
-                 <include>$(.incprefix)/QtCore
-                 $(usage-requirements)
-               ;
-        }
-    }
-
-    # Initialising the remaining libraries is canonical
-    # parameters 'module' : 'depends-on' : 'usage-define' : 'requirements' : 'include'
-    # 'include' only for non-canonical include paths.
-    add-shared-library QtGui     : QtCore : QT_GUI_LIB     : $(target-requirements) ;
-    add-shared-library QtWidgets : QtGui  : QT_WIDGETS_LIB : $(target-requirements) ;
-    add-shared-library QtNetwork : QtCore : QT_NETWORK_LIB : $(target-requirements) ;
-    add-shared-library QtSql     : QtCore : QT_SQL_LIB     : $(target-requirements) ;
-    add-shared-library QtXml     : QtCore : QT_XML_LIB     : $(target-requirements) ;
-    add-shared-library QtPrintSupport : QtGui : QT_PRINTSUPPORT_LIB : $(target-requirements) ;
-    add-shared-library QtConcurrent : QtCore : QT_CONCURRENT_LIB : $(target-requirements) ;
-
-    add-shared-library QtOpenGL : QtGui : QT_OPENGL_LIB : $(target-requirements) ;
-    add-shared-library QtSvg : QtXml QtOpenGL : QT_SVG_LIB : $(target-requirements) ;
-
-    add-shared-library QtTest : QtCore : : $(target-requirements) ;
-
-    # Qt designer library et. al.
-    add-shared-library QtDesigner : QtGui QtXml : : $(target-requirements) ;
-    add-shared-library QtDesignerComponents : QtGui QtXml : : $(target-requirements) ;
-    add-static-library QtUiTools : QtGui QtXml : $(target-requirements) ;
-
-    # DBus-Support
-    add-shared-library QtDBus : QtXml : : $(target-requirements) ;
-
-    # Script-Engine and Tools
-    add-shared-library QtScript : QtGui QtXml : QT_SCRIPT_LIB : $(target-requirements) ;
-    add-shared-library QtScriptTools : QtScript : QT_SCRIPTTOOLS_LIB : $(target-requirements) ;
-
-    # WebKit
-    add-shared-library QtWebKit        : QtGui : QT_WEBKIT_LIB : $(target-requirements) ;
-    add-shared-library QtWebKitWidgets : QtGui : QT_WEBKITWIDGETS_LIB : $(target-requirements) ;
-
-    # Multimedia engine
-    add-shared-library QtMultimedia : QtGui : QT_MULTIMEDIA_LIB : $(target-requirements) ;
-    add-shared-library QtMultimediaWidgets : QtMultimedia : QT_MULTIMEDIAWIDGETS_LIB : $(target-requirements) ;
-
-    # 
-    add-shared-library QtXmlPatterns : QtNetwork : QT_XMLPATTERNS_LIB : $(target-requirements) ;
-
-    # Help-Engine
-    add-shared-library QtHelp    : QtGui QtSql QtXml : : $(target-requirements) ;
-    add-shared-library QtCLucene : QCore QtSql QtXml : : $(target-requirements) ;
-
-    # QtQuick
-    add-shared-library QtQml            : QtCore QtNetwork QtGui : QT_QML_LIB : $(target-requirements) ;
-    add-shared-library QtQuick          : QtQml : QT_QUICK_LIB : $(target-requirements) ;
-    add-shared-library QtQuickParticles : QtQml : : $(target-requirements) ;
-    add-shared-library QtQuickTest      : QtQml : : $(target-requirements) ;
-
-    # Regular expression support
-    add-shared-library QtV8 : QtCore : : $(target-requirements) ;
-
-    # QML-Engine version1
-    add-shared-library QtDeclarative : QtXml : : $(target-requirements) ;
-
-    debug-message "==== Configured Qt-$(version) ====" ;
-
-    project.pop-current ;
-}
-
-rule initialized ( )
-{
-    return $(.initialized) ;
-}
-
-
-
-# This custom generator is needed because in QT5, UI files are translated only
-# into H files, and no C++ files are created. Further, the H files need not be
-# passed via MOC. The header is used only via inclusion. If we define a standard
-# UI -> H generator, Boost.Build will run MOC on H, and then compile the
-# resulting cpp. It will give a warning, since output from moc will be empty.
-#
-# This generator is declared with a UI -> OBJ signature, so it gets invoked when
-# linking generator tries to convert sources to OBJ, but it produces target of
-# type H. This is non-standard, but allowed. That header won't be mocced.
-#
-class uic-5-generator : generator
-{
-    rule __init__ ( * : * )
-    {
-        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
-    }
-
-    rule run ( project name ? : property-set : sources * )
-    {
-        if ! $(name)
-        {
-            name = [ $(sources[0]).name ] ;
-            name = $(name:B) ;
-        }
-
-        local a = [ new action $(sources[1]) : qt5.uic : $(property-set) ] ;
-
-        # The 'ui_' prefix is to match qmake's default behavior.
-        local target = [ new file-target ui_$(name) : H : $(project) : $(a) ] ;
-
-        local r = [ virtual-target.register $(target) ] ;
-
-        # Since this generator will return a H target, the linking generator
-        # won't use it at all, and won't set any dependency on it. However, we
-        # need the target to be seen by bjam, so that dependency from sources to
-        # this generated header is detected -- if jam does not know about this
-        # target, it won't do anything.
-        DEPENDS all : [ $(r).actualize ] ;
-
-        return $(r) ;
-    }
-}
-
-
-class moc-h-5-generator : generator
-{
-    rule __init__ ( * : * )
-    {
-        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
-    }
-
-    rule run ( project name ? : property-set : sources * )
-    {
-        if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE5_CPP
-        {
-            name = [ $(sources[0]).name ] ;
-            name = $(name:B) ;
-
-            local a = [ new action $(sources[1]) : qt5.moc.inc :
-                $(property-set) ] ;
-
-            local target = [ new file-target $(name) : MOC : $(project) : $(a)
-                ] ;
-
-            local r = [ virtual-target.register $(target) ] ;
-
-            # Since this generator will return a H target, the linking generator
-            # won't use it at all, and won't set any dependency on it. However,
-            # we need the target to be seen by bjam, so that dependency from
-            # sources to this generated header is detected -- if jam does not
-            # know about this target, it won't do anything.
-            DEPENDS all : [ $(r).actualize ] ;
-
-            return $(r) ;
-        }
-    }
-}
-
-
-class moc-inc-5-generator : generator
-{
-    rule __init__ ( * : * )
-    {
-        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
-    }
-
-    rule run ( project name ? : property-set : sources * )
-    {
-        if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE5_H
-        {
-            name = [ $(sources[0]).name ] ;
-            name = $(name:B) ;
-
-            local a = [ new action $(sources[1]) : qt5.moc.inc :
-                $(property-set) ] ;
-
-            local target = [ new file-target moc_$(name) : CPP : $(project) :
-                $(a) ] ;
-
-            # Since this generator will return a H target, the linking generator
-            # won't use it at all, and won't set any dependency on it. However,
-            # we need the target to be seen by bjam, so that dependency from
-            # sources to this generated header is detected -- if jam does not
-            # know about this target, it won't do anything.
-            DEPENDS all : [ $(target).actualize ] ;
-
-            return [ virtual-target.register $(target) ] ;
-        }
-    }
-}
-
-
-# Query the installation directory. This is needed in at least two scenarios.
-# First, when re-using sources from the Qt-Tree. Second, to "install" custom Qt
-# plugins to the Qt-Tree.
-#
-rule directory
-{
-    return $(.PREFIX) ;
-}
-
-# Add a shared Qt library.
-rule add-shared-library ( lib-name : depends-on * : usage-defines * : requirements * :  include ? )
-{
-     add-library $(lib-name) : $(.infix_version) : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;
-}
-
-# Add a static Qt library.
-rule add-static-library ( lib-name : depends-on * : usage-defines * : requirements * : include ? )
-{
-     add-library $(lib-name) : $(.infix_version) : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;
-}
-
-# Add a Qt library.
-# Static libs are unversioned, whereas shared libs have the major number as suffix.
-# Creates both release and debug versions on platforms where both are enabled by Qt configure.
-# Flags:
-# - lib-name Qt library Name
-# - version  Qt major number used as shared library suffix (QtCore5.so)
-# - depends-on other Qt libraries
-# - usage-defines those are set by qmake, so set them when using this library
-# - requirements addional requirements
-# - include non-canonical include path. The canonical path is $(.incprefix)/$(lib-name).
-rule add-library ( lib-name : version ? : depends-on * : usage-defines * : requirements * : include ? )
-{
-    if $(.bjam-qt)
-    {
-        # Import Qt module
-        # Eveything will be setup there
-        alias $(lib-name)
-           : $(.prefix)//$(lib-name)
-           :
-           :
-           : <allow>qt5 ;
-    }
-    else
-    {
-        local real_include ;
-        real_include ?= $(include) ;
-        real_include ?= $(lib-name) ;
-
-        local real_name = [ MATCH ^Qt(.*) : $(lib-name) ] ;
-
-        lib $(lib-name)
-           : # sources
-             $(depends-on)
-           : # requirements
-             <name>Qt$(version)$(real_name)
-             $(requirements)
-           : # default-build
-           : # usage-requirements
-             <define>$(usage-defines)
-             <include>$(.incprefix)/$(real_include)
-           ;
-
-        if $(.have_separate_debug) = TRUE
-        {
-            lib $(lib-name)
-               : # sources
-                 $(depends-on)
-               : # requirements
-                 <name>Qt$(version)$(real_name)$(.suffix_debug)
-                 $(requirements)
-                 <variant>debug
-               : # default-build
-               : # usage-requirements
-                 <define>$(usage-defines)
-                 <include>$(.incprefix)/$(real_include)
-               ;
-        }
-    }
-
-    # Make library explicit so that a simple <use>qt5 will not bring in everything.
-    # And some components like QtDBus/Phonon may not be available on all platforms.
-    explicit $(lib-name) ;
-}
-
-# Use $(.BINPREFIX[-1]) for the paths as several tools-requirements can match.
-# The exact match is the last one.
-
-# Get <include> and <defines> from current toolset.
-flags qt5.moc INCLUDES <include> ;
-flags qt5.moc DEFINES <define> ;
-
-# need a newline for expansion of DEFINES and INCLUDES in the response file.
-.nl  = "
-" ;
-
-# Processes headers to create Qt MetaObject information. Qt5-moc has its
-# c++-parser, so pass INCLUDES and DEFINES.
-# We use response file with one INCLUDE/DEFINE per line
-#
-actions moc
-{
-    $(.BINPREFIX[-1])/moc -f $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
-}
-
-# When moccing files for include only, we don't need -f, otherwise the generated
-# code will include the .cpp and we'll get duplicated symbols.
-#
-actions moc.inc
-{
-    $(.BINPREFIX[-1])/moc $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
-}
-
-
-# Get extra options for RCC
-flags qt5.rcc RCC_OPTIONS <rccflags> ;
-
-# Generates source files from resource files.
-#
-actions rcc
-{
-    $(.BINPREFIX[-1])/rcc $(>) -name $(>:B) $(RCC_OPTIONS) -o $(<)
-}
-
-
-# Generates user-interface source from .ui files.
-#
-actions uic
-{
-    $(.BINPREFIX[-1])/uic $(>) -o $(<)
-}
-
-
-# Scanner for .qrc files. Look for the CDATA section of the <file> tag. Ignore
-# the "alias" attribute. See http://doc.trolltech.com/qt/resources.html for
-# detailed documentation of the Qt Resource System.
-#
-class qrc-5-scanner : common-scanner
-{
-    rule pattern ( )
-    {
-        return "<file.*>(.*)</file>" ;
-    }
-}
-
-
-# Wrapped files are "included".
-scanner.register qrc-5-scanner : include ;

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/quickbook-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/quickbook-config.jam b/ext/kenlm/jam-files/boost-build/tools/quickbook-config.jam
deleted file mode 100644
index e983a78..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/quickbook-config.jam
+++ /dev/null
@@ -1,44 +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.
-
-import os ;
-import toolset : using ;
-
-if [ os.name ] = NT
-{
-    local boost-dir = ;
-    for local R in snapshot cvs 1.33.0
-    {
-        boost-dir += [ W32_GETREG
-            "HKEY_LOCAL_MACHINE\\SOFTWARE\\Boost.org\\$(R)"
-            : "InstallRoot" ] ;
-    }
-    local quickbook-path = [ GLOB "$(boost-dir)\\bin" "\\Boost\\bin" : quickbook.exe ] ;
-    quickbook-path = $(quickbook-path[1]) ;
-    
-    if $(quickbook-path)
-    {
-        if --debug-configuration in [ modules.peek : ARGV ]
-        {
-            ECHO "notice:" using quickbook ":" $(quickbook-path) ;
-        }
-        using quickbook : $(quickbook-path) ;
-    }
-}
-else
-{
-    local quickbook-path = [ GLOB "/usr/local/bin" "/usr/bin" "/opt/bin" : quickbook ] ;
-    quickbook-path = $(quickbook-path[1]) ;
-    
-    if $(quickbook-path)
-    {
-        if --debug-configuration in [ modules.peek : ARGV ]
-        {
-            ECHO "notice:" using quickbook ":" $(quickbook-path) ;
-        }
-        using quickbook : $(quickbook-path) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/quickbook.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/quickbook.jam b/ext/kenlm/jam-files/boost-build/tools/quickbook.jam
deleted file mode 100644
index 6de2d42..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/quickbook.jam
+++ /dev/null
@@ -1,361 +0,0 @@
-#
-#   Copyright (c) 2005 Jo�o Abecasis
-#   Copyright (c) 2005 Vladimir Prus
-#   Copyright (c) 2006 Rene Rivera
-#
-#   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 toolset defines a generator to translate QuickBook to BoostBook. It can
-# be used to generate nice (!) user documentation in different formats
-# (pdf/html/...), from a single text file with simple markup.
-#
-# The toolset defines the QUICKBOOK type (file extension 'qbk') and
-# a QUICKBOOK to XML (BOOSTBOOK) generator.
-#
-#
-#   ===========================================================================
-#   Q & A
-#   ===========================================================================
-#
-#   If you don't know what this is all about, some Q & A will hopefully get you
-#   up to speed with QuickBook and this toolset.
-#
-#
-#   What is QuickBook ?
-#
-#       QuickBook is a WikiWiki style documentation tool geared towards C++
-#       documentation using simple rules and markup for simple formatting tasks.
-#       QuickBook extends the WikiWiki concept. Like the WikiWiki, QuickBook
-#       documents are simple text files. A single QuickBook document can
-#       generate a fully linked set of nice HTML and PostScript/PDF documents
-#       complete with images and syntax-colorized source code.
-#
-#
-#   Where can I get QuickBook ?
-#
-#       Quickbook can be found in Boost's repository, under the tools/quickbook
-#       directory it was added there on Jan 2005, some time after the release of
-#       Boost v1.32.0 and has been an integral part of the Boost distribution
-#       since v1.33.
-#
-#       Here's a link to the SVN repository:
-#           https://svn.boost.org/svn/boost/trunk/tools/quickbook
-#
-#       And to QuickBook's QuickBook-generated docs:
-#           http://www.boost.org/doc/libs/release/tools/quickbook/index.html
-#
-#
-#   How do I use QuickBook and this toolset in my projects ?
-#
-#       The minimal example is:
-#
-#           using boostbook ;
-#           import quickbook ;
-#
-#           boostbook my_docs : my_docs_source.qbk ;
-#
-#       where my_docs is a target name and my_docs_source.qbk is a QuickBook
-#       file. The documentation format to be generated is determined by the
-#       boostbook toolset. By default html documentation should be generated,
-#       but you should check BoostBook's docs to be sure.
-#
-#
-#   What do I need ?
-#
-#       You should start by setting up the BoostBook toolset. Please refer to
-#       boostbook.jam and the BoostBook documentation for information on how to
-#       do this.
-#
-#       A QuickBook executable is also needed. The toolset will generate this
-#       executable if it can find the QuickBook sources. The following
-#       directories will be searched:
-#
-#           BOOST_ROOT/tools/quickbook/
-#           BOOST_BUILD_PATH/../../quickbook/
-#
-#       (BOOST_ROOT and BOOST_BUILD_PATH are environment variables)
-#
-#       If QuickBook sources are not found the toolset will then try to use
-#       the shell command 'quickbook'.
-#
-#
-#   How do I provide a custom QuickBook executable ?
-#
-#       You may put the following in your user-config.jam or site-config.jam:
-#
-#           using quickbook : /path/to/quickbook ;
-#
-#       or, if 'quickbook' can be found in your PATH,
-#
-#           using quickbook : quickbook ;
-#
-#
-#   For convenience three alternatives are tried to get a QuickBook executable:
-#
-#       1.  If the user points us to the a QuickBook executable, that is used.
-#
-#       2.  Otherwise, we search for the QuickBook sources and compile QuickBook
-#           using the default toolset.
-#
-#       3.  As a last resort, we rely on the shell for finding 'quickbook'.
-#
-
-import boostbook ;
-import "class" : new ;
-import feature ;
-import generators ;
-import toolset ;
-import type ;
-import scanner ;
-import project ;
-import targets ;
-import build-system ;
-import path ;
-import common ;
-import errors ;
-
-# The one and only QUICKBOOK type!
-type.register QUICKBOOK : qbk ;
-
-# <quickbook-binary> shell command to run QuickBook
-# <quickbook-binary-dependencies> targets to build QuickBook from sources.
-feature.feature <quickbook-binary> : : free ;
-feature.feature <quickbook-binary-dependencies> : : free dependency ;
-feature.feature <quickbook-define> : : free ;
-feature.feature <quickbook-indent> : : free ;
-feature.feature <quickbook-line-width> : : free ;
-
-
-# quickbook-binary-generator handles generation of the QuickBook executable, by
-# marking it as a dependency for QuickBook docs.
-#
-# If the user supplied the QuickBook command that will be used.
-#
-# Otherwise we search some sensible places for the QuickBook sources and compile
-# from scratch using the default toolset.
-#
-# As a last resort we rely on the shell to find 'quickbook'.
-#
-class quickbook-binary-generator : generator
-{
-    import modules path targets quickbook ;
-
-    rule run ( project name ? : property-set : sources * : multiple ? )
-    {
-        quickbook.freeze-config ;
-        # QuickBook invocation command and dependencies.
-        local quickbook-binary = [ modules.peek quickbook : .quickbook-binary ] ;
-        local quickbook-binary-dependencies ;
-
-        if ! $(quickbook-binary)
-        {
-            # If the QuickBook source directory was found, mark its main target
-            # as a dependency for the current project. Otherwise, try to find
-            # 'quickbook' in user's PATH
-            local quickbook-dir = [ modules.peek quickbook : .quickbook-dir ] ;
-            if $(quickbook-dir)
-            {
-                # Get the main-target in QuickBook directory.
-                local quickbook-main-target = [ targets.resolve-reference $(quickbook-dir) : $(project) ] ;
-
-                # 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.
-                quickbook-main-target =
-                    [ $(quickbook-main-target[1]).main-target quickbook ] ;
-
-                quickbook-binary-dependencies =
-                    [ $(quickbook-main-target).generate [ $(property-set).propagated ] ] ;
-
-                # Ignore usage-requirements returned as first element.
-                quickbook-binary-dependencies = $(quickbook-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 quickbook-to-boostbook translation.
-                for local target in $(quickbook-binary-dependencies)
-                {
-                    if [ $(target).type ] = EXE
-                    {
-                        quickbook-binary = 
-                            [ path.native 
-                                [ path.join
-                                    [ $(target).path ]
-                                    [ $(target).name ]
-                                ]
-                            ] ;
-                    }
-                }
-            }
-        }
-
-        # Add $(quickbook-binary-dependencies) as a dependency of the current
-        # project and set it as the <quickbook-binary> feature for the
-        # quickbook-to-boostbook rule, below.
-        property-set = [ $(property-set).add-raw
-            <dependency>$(quickbook-binary-dependencies)
-            <quickbook-binary>$(quickbook-binary)
-            <quickbook-binary-dependencies>$(quickbook-binary-dependencies)
-        ] ;
-
-        return [ generator.run $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
-    }
-}
-
-
-# Define a scanner for tracking QBK include dependencies.
-#
-class qbk-scanner : common-scanner
-{
-    rule pattern ( )
-    {
-        return "\\[[ ]*include[ ]+([^]]+)\\]" 
-        "\\[[ ]*include:[a-zA-Z0-9_]+[ ]+([^]]+)\\]" 
-        "\\[[ ]*import[ ]+([^]]+)\\]" ;
-    }
-}
-
-
-scanner.register qbk-scanner : include ;
-
-type.set-scanner QUICKBOOK : qbk-scanner ;
-
-
-# Initialization of toolset.
-#
-# Parameters:
-#   command ?    -> path to QuickBook executable.
-#
-# When command is not supplied toolset will search for QuickBook directory and
-# compile the executable from source. If that fails we still search the path for
-# 'quickbook'.
-#
-rule init (
-        command ?   # path to the QuickBook executable.
-    )
-{
-    if $(command)
-    {
-        if $(.config-frozen)
-        {
-            errors.user-error "quickbook: configuration cannot be changed after it has been used." ;
-        }
-        .command = $(command) ;
-    }
-}
-
-rule freeze-config ( )
-{
-    if ! $(.config-frozen)
-    {
-        .config-frozen = true ;
-
-        # QuickBook invocation command and dependencies.
-
-        .quickbook-binary = $(.command) ;
-
-        if $(.quickbook-binary)
-        {
-            # Use user-supplied command.
-            .quickbook-binary = [ common.get-invocation-command quickbook : quickbook : $(.quickbook-binary) ] ;
-        }
-        else
-        {
-            # Search for QuickBook sources in sensible places, like
-            #   $(BOOST_ROOT)/tools/quickbook
-            #   $(BOOST_BUILD_PATH)/../../quickbook
-
-            # And build quickbook executable from sources.
-
-            local boost-root = [ modules.peek : BOOST_ROOT ] ;
-            local boost-build-path = [ build-system.location ] ;
-
-            if $(boost-root)
-            {
-                .quickbook-dir += [ path.join $(boost-root) tools ] ;
-            }
-
-            if $(boost-build-path)
-            {
-                .quickbook-dir += $(boost-build-path)/../.. ;
-            }
-
-            .quickbook-dir = [ path.glob $(.quickbook-dir) : quickbook ] ;
-
-            # If the QuickBook source directory was found, mark its main target
-            # as a dependency for the current project. Otherwise, try to find
-            # 'quickbook' in user's PATH
-            if $(.quickbook-dir)
-            {
-                .quickbook-dir = [ path.make $(.quickbook-dir[1]) ] ;
-            }
-            else
-            {
-                ECHO "QuickBook warning: The path to the quickbook executable was" ;
-                ECHO "  not provided. Additionally, couldn't find QuickBook" ;
-                ECHO "  sources searching in" ;
-                ECHO "    * BOOST_ROOT/tools/quickbook" ;
-                ECHO "    * BOOST_BUILD_PATH/../../quickbook" ;
-                ECHO "  Will now try to find a precompiled executable by searching" ;
-                ECHO "  the PATH for 'quickbook'." ;
-                ECHO "  To disable this warning in the future, or to completely" ;
-                ECHO "  avoid compilation of quickbook, you can explicitly set the" ;
-                ECHO "  path to a quickbook executable command in user-config.jam" ;
-                ECHO "  or site-config.jam with the call" ;
-                ECHO "    using quickbook : /path/to/quickbook ;" ;
-
-                # As a last resort, search for 'quickbook' command in path. Note
-                # that even if the 'quickbook' command is not found,
-                # get-invocation-command will still return 'quickbook' and might
-                # generate an error while generating the virtual-target.
-
-                .quickbook-binary = [ common.get-invocation-command quickbook : quickbook ] ;
-            }
-        }
-    }
-}
-
-
-generators.register [ new quickbook-binary-generator quickbook.quickbook-to-boostbook : QUICKBOOK : XML ] ;
-
-
-# <quickbook-binary> shell command to run QuickBook
-# <quickbook-binary-dependencies> targets to build QuickBook from sources.
-toolset.flags quickbook.quickbook-to-boostbook QB-COMMAND      <quickbook-binary> ;
-toolset.flags quickbook.quickbook-to-boostbook QB-DEPENDENCIES <quickbook-binary-dependencies> ;
-toolset.flags quickbook.quickbook-to-boostbook INCLUDES        <include> ;
-toolset.flags quickbook.quickbook-to-boostbook QB-DEFINES      <quickbook-define> ;
-toolset.flags quickbook.quickbook-to-boostbook QB-INDENT       <quickbook-indent> ;
-toolset.flags quickbook.quickbook-to-boostbook QB-LINE-WIDTH   <quickbook-line-width> ;
-
-
-rule quickbook-to-boostbook ( target : source : properties * )
-{
-    # Signal dependency of quickbook sources on <quickbook-binary-dependencies>
-    # upon invocation of quickbook-to-boostbook.
-    DEPENDS $(target) : [ on $(target) return $(QB-DEPENDENCIES) ] ;
-}
-
-
-actions quickbook-to-boostbook
-{
-    "$(QB-COMMAND)" -I"$(INCLUDES)" -D"$(QB-DEFINES)" --indent="$(QB-INDENT)" --linewidth="$(QB-LINE-WIDTH)" --output-file="$(1)" "$(2)"
-}
-
-
-# Declare a main target to convert a quickbook source into a boostbook XML file.
-#
-rule to-boostbook ( target-name : sources * : requirements * : default-build * )
-{ 
-  local project = [ project.current ] ;
-    
-  targets.main-target-alternative 
-    [ new typed-target $(target-name) : $(project) : XML
-        : [ targets.main-target-sources $(sources) : $(target-name) ] 
-        : [ targets.main-target-requirements $(requirements) : $(project) ]
-        : [ targets.main-target-default-build $(default-build) : $(project) ] 
-    ] ;
-}

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6da3961b/ext/kenlm/jam-files/boost-build/tools/rc.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/rc.jam b/ext/kenlm/jam-files/boost-build/tools/rc.jam
deleted file mode 100644
index de4071f..0000000
--- a/ext/kenlm/jam-files/boost-build/tools/rc.jam
+++ /dev/null
@@ -1,155 +0,0 @@
-#  Copyright (C) Andre Hentz 2003. Permission to copy, use, modify, sell and
-#  distribute this software is granted provided this copyright notice appears in
-#  all copies. This software is provided "as is" without express or implied
-#  warranty, and with no claim as to its suitability for any purpose.
-#
-#  Copyright (c) 2006 Rene Rivera.
-#
-#  Use, modification and distribution is subject to 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 scanner ;
-import toolset : flags ;
-import type ;
-
-if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
-{
-    .debug-configuration = true ;
-}
-
-type.register RC : rc ;
-
-rule init ( )
-{
-}
-
-# Configures a new resource compilation command specific to a condition,
-# usually a toolset selection condition. The possible options are:
-#
-#     * <rc-type>(rc|windres) - Indicates the type of options the command
-#       accepts.
-#
-# Even though the arguments are all optional, only when a command, condition,
-# and at minimum the rc-type option are given will the command be configured.
-# This is so that callers don't have to check auto-configuration values before
-# calling this. And still get the functionality of build failures when the
-# resource compiler can not be found.
-#
-rule configure ( command ? : condition ? : options * )
-{
-    local rc-type = [ feature.get-values <rc-type> : $(options) ] ;
-
-    if $(command) && $(condition) && $(rc-type)
-    {
-        flags rc.compile.resource .RC $(condition) : $(command) ;
-        flags rc.compile.resource .RC_TYPE $(condition) : $(rc-type:L) ;
-        flags rc.compile.resource DEFINES <define> ;
-        flags rc.compile.resource INCLUDES <include> ;
-        if $(.debug-configuration)
-        {
-            ECHO notice: using rc compiler :: $(condition) :: $(command) ;
-        }
-    }
-}
-
-rule compile.resource ( target : sources * : properties * )
-{
-    local rc-type = [ on $(target) return $(.RC_TYPE) ] ;
-    rc-type ?= null ;
-    compile.resource.$(rc-type) $(target) : $(sources[1]) ;
-}
-
-actions compile.resource.rc
-{
-    "$(.RC)" -l 0x409 "-U$(UNDEFS)" "-D$(DEFINES)" -I"$(>:D)" -I"$(<:D)" -I"$(INCLUDES)" -fo "$(<)" "$(>)"
-}
-
-actions compile.resource.windres
-{
-    "$(.RC)" "-U$(UNDEFS)" "-D$(DEFINES)" -I"$(>:D)" -I"$(<:D)" -I"$(INCLUDES)" -o "$(<)" -i "$(>)"
-}
-
-actions quietly compile.resource.null
-{
-    as /dev/null -o "$(<)"
-}
-
-# Since it is common practice to write
-#   exe hello : hello.cpp hello.rc
-# we change the name of object created from RC file, to avoid conflict with
-# hello.cpp. The reason we generate OBJ and not RES, is that gcc does not seem
-# to like RES files, but works OK with OBJ (see
-# http://article.gmane.org/gmane.comp.lib.boost.build/5643).
-#
-# Using 'register-c-compiler' adds the build directory to INCLUDES
-generators.register-c-compiler rc.compile.resource : RC : OBJ(%_res) ;
-
-# Register scanner for resources
-class res-scanner : scanner
-{
-    import path ;
-    import regex ;
-    import scanner ;
-    import virtual-target ;
-
-    rule __init__ ( includes * )
-    {
-        scanner.__init__ ;
-        self.includes = $(includes) ;
-    }
-
-    rule pattern ( )
-    {
-        return "(([^ ]+[ ]+(BITMAP|CURSOR|FONT|ICON|MESSAGETABLE|RT_MANIFEST)[ ]+([^ \"]+|\"[^\"]+\"))|(#include[ ]*(<[^<]+>|\"[^\"]+\")))" ;
-    }
-
-    rule process ( target : matches * : binding )
-    {
-        local angle = [ regex.transform $(matches) : "#include[ ]*<([^<]+)>" ] ;
-        local quoted = [ regex.transform $(matches) : "#include[ ]*\"([^\"]+)\"" ] ;
-        local res = [ regex.transform $(matches) : "[^ ]+[ ]+(BITMAP|CURSOR|FONT|ICON|MESSAGETABLE|RT_MANIFEST)[ ]+(([^ \"]+)|\"([^\"]+)\")" : 3 4 ] ;
-
-        # Icons and other includes may be referenced as
-        #
-        # IDR_MAINFRAME ICON "res\\icon.ico"
-        #
-        # so we have to replace double backslashes with single ones.
-        res = [ regex.replace-list $(res) : "\\\\\\\\" : "/" ] ;
-
-        # CONSIDER: the new scoping rules seem to defeat "on target" variables.
-        local g = [ on $(target) return $(HDRGRIST) ] ;
-        local b = [ NORMALIZE_PATH $(binding:D) ] ;
-
-        # Attach binding of including file to included targets. When a target is
-        # directly created from a virtual target this extra information is
-        # unnecessary. But in other cases, it allows us to distinguish between
-        # two headers of the same name included from different places. We do not
-        # need this extra information for angle includes, since they should not
-        # depend on the including file (we can not get literal "." in the
-        # include path).
-        local g2 = $(g)"#"$(b) ;
-
-        angle = $(angle:G=$(g)) ;
-        quoted = $(quoted:G=$(g2)) ;
-        res = $(res:G=$(g2)) ;
-
-        local all = $(angle) $(quoted) $(res) ;
-
-        INCLUDES $(target) : $(all) ;
-        NOCARE $(all) ;
-        SEARCH on $(angle) = $(self.includes:G=) ;
-        SEARCH on $(quoted) $(res) = $(b) $(self.includes:G=) ;
-
-        # Just propagate the current scanner to includes, in hope that includes
-        # do not change scanners.
-        scanner.propagate $(__name__) : $(angle) $(quoted) : $(target) ;
-
-        ISFILE $(all) ;
-    }
-}
-
-scanner.register res-scanner : include ;
-type.set-scanner RC : res-scanner ;