# Copyright 2017 Rene Rivera
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at
# https://www.bfgroup.xyz/b2/LICENSE.txt)

# Here we automatically define any "feature" modules in this directory.

local key = feature ;

import os path modules ;

.this-module's-file = [ modules.binding $(__name__) ] ;
.this-module's-dir = [ path.parent [ path.make $(.this-module's-file) ] ] ;
.to-load-jamfiles =  [ path.glob $(.this-module's-dir) : *-$(key).jam ] ;
.to-load-modules = [ MATCH ^(.*)\.jam$ : $(.to-load-jamfiles) ] ;

# A loop over all matched modules in this directory
for local m in $(.to-load-modules)
{
    m = [ path.basename $(m) ] ;
    m = $(key)s/$(m) ;
    import $(m) ;
}
