Version for code review.
authordaniel
Thu, 25 Oct 2012 15:20:55 +0200
changeset 113 bbe081376846
parent 112 7d1a0938bb80
child 114 fa936b799925
Version for code review.
bake/Bake.py
bake/Module.py
bake/ModuleBuild.py
bakeconf.xml
--- a/bake/Bake.py	Wed Oct 24 19:59:54 2012 +0200
+++ b/bake/Bake.py	Thu Oct 25 15:20:55 2012 +0200
@@ -70,8 +70,8 @@
                           " get the updated modules file to use. Default: %default.")
         parser.add_option("--objdir", action="store", type="string",
                           dest="objdir", default=None,
-                          help="The per-module directory where the object files of each module "
-                          "will be compiled.")
+                          help="The per-module directory where the object"
+                          " files of each module will be compiled.")
         parser.add_option("--sourcedir", action="store", type="string",
                           dest="sourcedir", default=None,
                           help="The directory where the source code of all modules "
@@ -274,8 +274,8 @@
             name, value = data[1].split("=")
             module = configuration.lookup(data[0])
             if not module:
-                self._error('non-existing module %s in variable specification %s' % \
-                                (name, string))
+                self._error('non-existing module %s in variable'
+                            ' specification %s' % (name, string))
             if not module.get_build().attribute(name):
                 self._error('non-existing variable %s in module %s' % 
                             (name, module._name))
@@ -661,8 +661,8 @@
         
         def _do_check(configuration, module, env):
             if not module.check_build_version(env):
-                env._logger.commands.write('Could not find build tool for'
-                                            ' module "%s"\n' % module.name())
+                env._logger.commands.write('Unavailable building tool for'
+                                            ' module "%s"' % module.name())
                 return False
             return True
         self._do_operation(config, options, _do_check)
@@ -672,18 +672,18 @@
          
         def _do_check(configuration, module, env):
             if not module.check_source_version(env):
-                env._logger.commands.write('Could not find source tool'
+                env._logger.commands.write('Unavailable source tool'
                                             ' for module %s' % module.name())
                 return False
             return True
         self._do_operation(config, options, _do_check)
 
     def _check_source_code(self, config, options, directory=None):
-        """ Checks if  we have already downloaded the matching source code."""
+        """ Checks if we have already downloaded the matching source code."""
         
         def _do_check(configuration, module, env):
             if not module.is_downloaded(env):
-                env._logger.commands.write('Could not find source code for'
+                env._logger.commands.write('Unavailable source code for'
                                             ' module %s. Try %s download first.'
                                              %(module.name(), sys.argv[0]))
                 return False
@@ -712,7 +712,7 @@
                     module.update_libpath(env)
                 return retval
             else:
-                raise TaskError('Could not find build tool for'
+                raise TaskError('Unavailable building tool for'
                                 ' module "%s". Try to call \"%s check\"\n' % 
                                 (module.name(), os.path.basename(sys.argv[0])))
 
--- a/bake/Module.py	Wed Oct 24 19:59:54 2012 +0200
+++ b/bake/Module.py	Thu Oct 25 15:20:55 2012 +0200
@@ -177,6 +177,10 @@
     def build(self, env, jobs, force_clean):
         """ Main build function. """
         
+        # if there is no build we do not need to proceed 
+        if self._build.name() == 'none':
+            return True
+        
         # delete in case this is a new build configuration
         # and there are old files around
         if force_clean:
@@ -190,7 +194,7 @@
             
         env.start_build(self._name, srcDirTmp,
                         self._build.supports_objdir)
-
+        
         # setup the monitor
         monitor = FilesystemMonitor(env.installdir)
         monitor.start()
--- a/bake/ModuleBuild.py	Wed Oct 24 19:59:54 2012 +0200
+++ b/bake/ModuleBuild.py	Thu Oct 25 15:20:55 2012 +0200
@@ -476,7 +476,7 @@
             if not "error 1" in e._reason :
                 raise TaskError(e._reason)
 
-        env.run(['cmake', env.srcdir, '-DCMAKE_INSTALL_PREFIX=' + env.objdir] + 
+        env.run(['cmake', env.srcdir, '-DCMAKE_INSTALL_PREFIX:PATH=' + env.objdir] + 
                 self._variables() + options,
                 directory=env.objdir)
         env.run(['make', '-j', str(jobs)], directory=env.objdir)
--- a/bakeconf.xml	Wed Oct 24 19:59:54 2012 +0200
+++ b/bakeconf.xml	Thu Oct 25 15:20:55 2012 +0200
@@ -96,7 +96,7 @@
 
       </source>
       <build type="autotools" objdir="yes">
-	<attribute name="configure_arguments" value="../configure --enable-userlevel --disable-linuxmodule --enable-nsclick --enable-wifi"/>
+	<attribute name="configure_arguments" value="../configure --prefix=$INSTALLDIR --exec-prefix=$INSTALLDIR -enable-userlevel --disable-linuxmodule --enable-nsclick --enable-wifi"/>
       </build>
     </module>
 
@@ -152,6 +152,7 @@
 	<attribute name="build_arguments" value="--generate-version"/>
       </build>
       <depends_on name="pygccxml" optional="True"/>
+      <depends_on name="gccxml-ns3" optional="False"/>
     </module>