[PATCH 3/6] waf: Fix freebsd-to-rtems.py.

Christian Mauderer christian.mauderer at embedded-brains.de
Fri Apr 6 12:26:45 UTC 2018


Update #3351
---
 builder.py          | 3 +++
 freebsd-to-rtems.py | 3 ++-
 waf_libbsd.py       | 7 +++++--
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/builder.py b/builder.py
index 2faf98d0..ac199a9b 100755
--- a/builder.py
+++ b/builder.py
@@ -677,3 +677,6 @@ class ModuleManager(object):
     def generateBuild(self):
         for m in self.getEnabledModules():
             self.modules[m].generate()
+
+    def setGenerators(self):
+        pass
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index c2f00f86..ec0fcc9a 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -43,6 +43,7 @@ import getopt
 
 import builder
 import libbsd
+import waf_libbsd
 
 isForward = True
 isEarlyExit = False
@@ -142,7 +143,7 @@ if isEarlyExit == True:
     sys.exit(0)
 
 try:
-    build = builder.ModuleManager()
+    build = waf_libbsd.Builder()
     libbsd.load(build)
     build.generateBuild()
     build.processSource(isForward)
diff --git a/waf_libbsd.py b/waf_libbsd.py
index eddfaf99..ae8a1ea0 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -40,8 +40,6 @@ import tempfile
 
 import builder
 
-import rtems_waf.rtems as rtems
-
 windows = os.name == 'nt'
 
 if windows:
@@ -316,6 +314,11 @@ class Builder(builder.ModuleManager):
         pass
 
     def build(self, bld):
+        # This is only necessary for build. But it depends on the waflib which
+        # is only available in a waf context. But we need the module manager for
+        # freebsd_to_rtems.py too.
+        import rtems_waf.rtems as rtems
+
         #
         # Localize the config.
         #
-- 
2.13.6




More information about the devel mailing list