All pastes #164653 Raw Edit

Untitled

public text v1 · immutable
·published 2006-09-08 20:40 UTC
rendered paste body
Index: wafadmin/Configure.py
===================================================================
--- wafadmin/Configure.py       (Revision 582263)
+++ wafadmin/Configure.py       (Arbeitskopie)
@@ -34,13 +34,16 @@

                return m.digest()

-
+       def print_message_cached(self,retvalue):
+               pass

        def run(self):
                if not Params.g_options.nocache:
                        newhash = self.hash()
                        try:
-                               return self.conf.m_cache_table[newhash]
+                               ret = self.conf.m_cache_table[newhash]
+                               self.print_message_cached(ret)
+                               return ret
                        except KeyError:
                                pass

@@ -79,7 +82,12 @@
                self.name                       = ''
                self.paths                      = []
                self.mandatory_errormsg = 'The program cannot be found. Building cannot be performed without this program. Make sure it is installed and can be found.'
-
+
+
+       def print_message_cached(self,retvalue):
+               self.conf.checkMessage('program '+self.name+' (cached)', ret, ret, option='')
+
+
        def run_impl(self):
                ret = find_program_impl(self.conf.env, self.name, self.paths)
                self.conf.checkMessage('program', self.name, ret, ret)
@@ -102,6 +110,15 @@
                self.lib_paths          = []
                self.mandatory_errormsg = 'This function could not be found in the specified headers and libraries. Make sure you have the right headers & libraries installed.'

+
+       def print_message_cached(self,retvalue):
+               if retvalue:
+                       self.conf.checkMessage('function '+retvalue+' (cached)', '', 1, option='')
+               else:
+                       for funccall in self.function_calls:
+                               self.conf.checkMessage('function '+funccall[0]+' (cached)', '', 0, option='')
+
+
        def run_impl(self):
                env = self.env
                if not env: env = self.conf.env
@@ -196,6 +213,15 @@
                self.mandatory_errormsg = 'No matching library could be found. Make sure the library is installed and can be found.'


+       def print_message_cached(self,retvalue):
+               if retvalue:
+                       self.conf.checkMessage('library '+retvalue[0]+' (cached)', '', 1, option=retvalue[1])
+               else:
+                       for name in self.names:
+                               self.conf.checkMessage('library '+name+' (cached)', '', 0, option='')
+
+
+
        def update_hash(self,md5hash):
                enumerator_base.update_hash(self,md5hash)

@@ -287,7 +313,16 @@
                self.paths                      = []
                self.code                       = ''
                self.mandatory_errormsg = 'No matching header could be found. Make sure the header is installed and can be found.'
-
+
+
+       def print_message_cached(self,retvalue):
+               if retvalue:
+                       self.conf.checkMessage('library '+retvalue[0]+' (cached)', '', 1, option=retvalue[1])
+               else:
+                       for name in self.names:
+                               self.conf.checkMessage('header '+name+' (cached)', '', 0, option='')
+
+
        def run_impl(self):
                env = self.env
                if not env: env = self.conf.env
@@ -357,6 +392,14 @@
                self.libsparam          = '--libs'
                self.mandatory_errormsg = 'The config tool cannot be found. Most likely the software to which the tool belongs is not installed.'

+
+       def print_message_cached(self,retvalue):
+               if retvalue:
+                       self.conf.checkMessage('config-tool '+self.binary+' (cached)', '', 1, option='')
+               else:
+                       self.conf.checkMessage('config-tool '+self.binary+' (cached)', '', 0, option='')
+
+
        def run_impl(self):
                env = self.env
                if not env: env = self.conf.env
@@ -399,6 +442,14 @@
                self.variables          = []
                self.mandatory_errormsg = 'No matching pkg-config package could be found. It is likely that the software to which the package belongs is not installed.'

+
+       def print_message_cached(self,retvalue):
+               if retvalue:
+                       self.conf.checkMessage('package '+self.name+' (cached)', '', 1, option='')
+               else:
+                       self.conf.checkMessage('package '+self.name+' (cached)', '', 0, option='')
+
+
        def run_impl(self):
                pkgpath = self.path
                pkgbin = self.binary
@@ -467,7 +518,16 @@
                self.paths                      = []
                self.code                       = ''
                self.mandatory_errormsg = 'No matching library could be found. Make sure the library is installed and can be found.'
-
+
+
+       def print_message_cached(self,retvalue):
+               if retvalue:
+                       self.conf.checkMessage('library '+retvalue[0]+' (cached)', '', 1, option=retvalue[1])
+               else:
+                       for name in self.names:
+                               self.conf.checkMessage('library '+name+' (cached)', '', 0, option='')
+
+
        def run_impl(self):
                env = self.env
                if not env: env = self.conf.env
@@ -498,6 +558,15 @@
                self.code                       = ''
                self.mandatory_errormsg = 'No matching header could be found. Make sure the header is installed and can be found.'

+
+       def print_message_cached(self,retvalue):
+               if retvalue:
+                       self.conf.checkMessage('library '+retvalue[0]+' (cached)', '', 1, option=retvalue[1])
+               else:
+                       for name in self.names:
+                               self.conf.checkMessage('header '+name+' (cached)', '', 0, option='')
+
+
        def run_impl(self):
                env = self.env
                if not env: env = self.conf.env