--- a/bake/Bake.py Sun Mar 24 21:37:30 2013 +0900
+++ b/bake/Bake.py Mon Mar 25 09:01:13 2013 +0100
@@ -848,6 +848,10 @@
env = self._get_dummy_env(options)
+ sys.stdout.write ("Path searched for tools:")
+ for item in env.path_list():
+ sys.stdout.write (' ' + item)
+ print
colorTool = ColorTool()
for element in checkPrograms:
if env.check_program(element[0]):
--- a/bake/ModuleEnvironment.py Sun Mar 24 21:37:30 2013 +0900
+++ b/bake/ModuleEnvironment.py Mon Mar 25 09:01:13 2013 +0100
@@ -198,6 +198,10 @@
return os.path.exists(file)
+ def path_list(self):
+ ''' Return path that will be searched for executables '''
+ return os.environ["PATH"].split(os.pathsep) + [self._bin_path()]
+
def _program_location(self, program):
''' Finds where the executable is located in the user's path.'''
@@ -212,7 +216,7 @@
return program
else:
# for all the directories in the path search for the executable
- for path in os.environ["PATH"].split(os.pathsep) + [self._bin_path()]:
+ for path in self.path_list():
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file
@@ -387,6 +391,32 @@
found = m.groups()
return self._check_version(found, version_required, match_type)
+
+ def append_to_path(self, env_vars):
+ """Sets the library and binary paths."""
+
+ for libpath in self._libpaths:
+ self._append_path(env_vars, self._lib_var(), libpath, os.pathsep)
+ if self.debug:
+ print(" -> " + self._lib_var() + " " + libpath + " ")
+
+ self._append_path(env_vars, self._lib_var(), self._lib_path(), os.pathsep)
+ for libpath in self._binpaths:
+ self._append_path(env_vars, self._bin_var(), libpath, os.pathsep)
+ if self.debug:
+ print(" -> " + self._bin_var() + " " + libpath + " ")
+
+ self._append_path(env_vars, self._bin_var(), self._bin_path(), os.pathsep)
+ for libpath in self._pkgpaths:
+ self._append_path(env_vars, self._pkgconfig_var(), libpath, os.pathsep)
+ if self.debug:
+ print(" -> " + self._pkgconfig_var() + " " + libpath + " ")
+
+ self._append_path(env_vars, self._pkgconfig_var(), self._pkgconfig_path(), os.pathsep)
+ self._append_path(env_vars, self._py_var(), self._py_path(), os.pathsep)
+
+ return env_vars
+
def run(self, args, directory = None, env = dict(), interactive = False):
'''Executes a system program adding the libraries and over the correct
directories.
@@ -410,33 +440,12 @@
else:
stdin = sys.stdin
stdout = sys.stdout
- stderr = sys.stderr
+ stderr = sys.stderr
+
tmp = dict(os.environ.items() + env.items())
# sets the library and binary paths
- for libpath in self._libpaths:
- self._append_path(tmp, self._lib_var(), libpath, os.pathsep)
- if self.debug:
- print(" -> " + self._lib_var() + " " + libpath + " ")
-
- self._append_path(tmp, self._lib_var(), self._lib_path(), os.pathsep)
-
- for libpath in self._binpaths:
- self._append_path(tmp, self._bin_var(), libpath, os.pathsep)
- if self.debug:
- print(" -> " + self._bin_var() + " " + libpath + " ")
-
- self._append_path(tmp, self._bin_var(), self._bin_path(), os.pathsep)
-
- for libpath in self._pkgpaths:
- self._append_path(tmp, self._pkgconfig_var(), libpath, os.pathsep)
- if self.debug:
- print(" -> " + self._pkgconfig_var() + " " + libpath + " ")
-
- self._append_path(tmp, self._pkgconfig_var(), self._pkgconfig_path(),
- os.pathsep)
-
- self._append_path(tmp, self._py_var(), self._py_path(), os.pathsep)
+ tmp = self.append_to_path(tmp)
# Calls the third party executable with the whole context
try:
--- a/bakeconf.xml Sun Mar 24 21:37:30 2013 +0900
+++ b/bakeconf.xml Mon Mar 25 09:01:13 2013 +0100
@@ -244,6 +244,7 @@
<attribute name="configure_arguments" value="../configure --prefix=$INSTALLDIR --exec-prefix=$INSTALLDIR -enable-userlevel --disable-linuxmodule --enable-nsclick --enable-wifi"/>
<attribute name="post_installation" value="mkdir $INSTALLDIR/lib; cp -r $OBJDIR/include $INSTALLDIR/lib/."/>
</build>
+
</module>
<module name="libxml2-dev">
@@ -339,7 +340,7 @@
<module name="qt4">
<source type="system_dependency">
- <attribute name="dependency_test" value="(qmake or qmake-qt4)"/>
+ <attribute name="dependency_test" value="(qmakea or qmake-qt4a)"/>
<attribute name="try_to_install" value="True"/>
<attribute name="name_yum" value="qt4-devel"/>
<attribute name="name_apt-get" value="qt4-dev-tools"/>
@@ -392,42 +393,6 @@
</build>
</module>
-
- <module name="test1">
- <source type="mercurial">
- <attribute name="url" value="http://code.nsnam.org/bake"/>
- </source>
- <build type="waf" objdir="yes">
- <attribute name="configure_arguments" value="configure --prefix=$INSTALLDIR --enable-examples --enable-tests"/>
- </build>
- </module>
-
- <module name="test2">
- <source type="bazaar">
- <attribute name="url" value="https://launchpad.net/pybindgen"/>
- <attribute name="revision" value="revno:809"/>
- </source>
- <build type="waf" objdir="yes">
- <attribute name="configure_arguments" value="configure --prefix=$INSTALLDIR"/>
- <attribute name="build_arguments" value="--generate-version"/>
- </build>
- <depends_on name="test1" optional="False"/>
- </module>
-
- <module name="test3">
- <source type="bazaar">
- <attribute name="url" value="https://launchpad.net/pybindgen"/>
- <attribute name="revision" value="revno:809"/>
- </source>
- <build type="waf" objdir="yes">
- <attribute name="configure_arguments" value="configure --prefix=$INSTALLDIR"/>
- <attribute name="build_arguments" value="--generate-version"/>
- </build>
- <depends_on name="test2" optional="True"/>
- <depends_on name="pygccxml" optional="True"/>
- </module>
-
-
<!--
<module name="ns-3-16">
<source type="mercurial">