summaryrefslogtreecommitdiffstats
path: root/rtems.py
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2018-04-06 08:54:34 +0200
committerChris Johns <chrisj@rtems.org>2018-04-06 16:58:15 +1000
commit4ef2f41eb7a6b0fd84791eafff9062da1a9d94c4 (patch)
treea187276cdd26960c86b60b5b479163a73554f687 /rtems.py
parentAdd a rootfd module to make it easier for users. (diff)
downloadrtems_waf-4ef2f41eb7a6b0fd84791eafff9062da1a9d94c4.tar.bz2
Add bsp_init hook.
Diffstat (limited to 'rtems.py')
-rw-r--r--rtems.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/rtems.py b/rtems.py
index be44edc..713066d 100644
--- a/rtems.py
+++ b/rtems.py
@@ -69,7 +69,7 @@ def options(opt):
dest = 'show_commands',
help = 'Print the commands as strings.')
-def init(ctx, filters = None, version = None, long_commands = False):
+def init(ctx, filters = None, version = None, long_commands = False, bsp_init = None):
global rtems_filters
global rtems_default_version
global rtems_long_commands
@@ -112,16 +112,18 @@ def init(ctx, filters = None, version = None, long_commands = False):
env.options['rtems_bsps'])
#
- # Update the contextes for all the bsps.
+ # Update the contexts for all the bsps.
#
from waflib.Build import BuildContext, CleanContext, \
InstallContext, UninstallContext
+ contexts = []
for x in arch_bsps:
for y in (BuildContext, CleanContext, InstallContext, UninstallContext):
name = y.__name__.replace('Context','').lower()
class context(y):
cmd = name + '-' + x
variant = x
+ contexts += [context]
#
# Transform the command to per BSP commands.
@@ -137,6 +139,9 @@ def init(ctx, filters = None, version = None, long_commands = False):
except:
pass
+ if bsp_init:
+ bsp_init(ctx, env, contexts)
+
def configure(conf, bsp_configure = None):
#
# Check the environment for any flags.