Make the --enable-sudo option work correctly again
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sun, 19 Apr 2009 14:51:51 +0100
changeset 4367 63c04791fae2
parent 4366 1c3138bce75e
child 4368 fc00cd53d37b
Make the --enable-sudo option work correctly again
wscript
--- a/wscript	Fri Apr 17 10:15:11 2009 -0700
+++ b/wscript	Sun Apr 19 14:51:51 2009 +0100
@@ -174,7 +174,7 @@
     try:
         retval = conf.run_c_code(code='#include <stdio.h>\nint main() { return 0; }\n',
                                  env=env, compile_filename='test.cc',
-                                 compile_mode='cxx',type='program', execute=False)
+                                 compile_mode='cxx',type='cprogram', execute=False)
     except Configure.ConfigurationError:
         ok = False
     else:
@@ -296,10 +296,11 @@
     after = 'cxx_link cc_link'
     maxjobs = 1
     def __init__(self, bld, program):
+        self.bld = bld
         self.m_display = 'build-suid'
         self.__program = program
         self.__env = bld.env.copy ()
-        super(SuidBuildTask, self).__init__()
+        super(SuidBuildTask, self).__init__(generator=self)
         try:
             program_obj = wutils.find_program(self.__program.target, self.__env)
         except ValueError, ex: