2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2025-01-25 09:50:05 +01:00

Add dprogram/dshlib to the example

This commit is contained in:
Thomas Nagy 2016-08-13 18:55:12 +02:00
parent e2b415f974
commit cd9cfb4716
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA

View File

@ -35,16 +35,17 @@ def wrap_compiled_task(classname):
# override the class to add a new 'run' method
# such an implementation guarantees that the absence of race conditions
#
cls1 = Task.classes[classname]
cls2 = type(classname, (cls1,), {'run_str': '${STRIP} ${TGT[0].abspath()}'})
cls3 = type(classname, (cls2,), {})
def run_all(self):
if self.env.NO_STRIPPING:
return cls1.run(self)
return cls1.run(self) or cls2.run(self)
cls3.run = run_all
cls1 = Task.classes[classname]
cls2 = type(classname, (cls1,), {'run_str': '${STRIP} ${TGT[0].abspath()}'})
cls3 = type(classname, (cls2,), {'run': run_all})
for k in 'cprogram cshlib cxxprogram cxxshlib fcprogram fcshlib'.split():
for k in 'cprogram cshlib cxxprogram cxxshlib fcprogram fcshlib dprogram dshlib'.split():
if k in Task.classes:
wrap_compiled_task(k)