]>
Commit | Line | Data |
---|---|---|
b32b8144 FG |
1 | # Copyright 2017 Rene Rivera |
2 | # Distributed under the Boost Software License, Version 1.0. | |
1e59de90 TL |
3 | # (See accompanying file LICENSE.txt or copy at |
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt) | |
b32b8144 FG |
5 | |
6 | # Here we automatically define any "feature" modules in this directory. | |
7 | ||
8 | local key = feature ; | |
9 | ||
10 | import os path modules ; | |
11 | ||
12 | .this-module's-file = [ modules.binding $(__name__) ] ; | |
13 | .this-module's-dir = [ path.parent [ path.make $(.this-module's-file) ] ] ; | |
14 | .to-load-jamfiles = [ path.glob $(.this-module's-dir) : *-$(key).jam ] ; | |
15 | .to-load-modules = [ MATCH ^(.*)\.jam$ : $(.to-load-jamfiles) ] ; | |
16 | ||
17 | # A loop over all matched modules in this directory | |
18 | for local m in $(.to-load-modules) | |
19 | { | |
20 | m = [ path.basename $(m) ] ; | |
21 | m = $(key)s/$(m) ; | |
22 | import $(m) ; | |
23 | } |