diff --git a/waflib/Build.py b/waflib/Build.py index 23db1df9..f98a51ba 100644 --- a/waflib/Build.py +++ b/waflib/Build.py @@ -1251,22 +1251,6 @@ class UninstallContext(InstallContext): super(UninstallContext, self).__init__(**kw) self.is_install = UNINSTALL - def execute(self): - """ - See :py:func:`waflib.Build.BuildContext.execute`. - """ - # TODO just mark the tasks are already run with hasrun=Task.SKIPPED? - try: - # do not execute any tasks - def runnable_status(self): - return Task.SKIP_ME - setattr(Task.Task, 'runnable_status_back', Task.Task.runnable_status) - setattr(Task.Task, 'runnable_status', runnable_status) - - super(UninstallContext, self).execute() - finally: - setattr(Task.Task, 'runnable_status', Task.Task.runnable_status_back) - class CleanContext(BuildContext): '''cleans the project''' cmd = 'clean' diff --git a/waflib/Task.py b/waflib/Task.py index a62c32b6..58e5fbb1 100644 --- a/waflib/Task.py +++ b/waflib/Task.py @@ -656,6 +656,10 @@ class Task(TaskBase): """ See :py:meth:`waflib.Task.TaskBase.runnable_status` """ + bld = self.generator.bld + if bld.is_install < 0: + return SKIP_ME + for t in self.run_after: if not t.hasrun: return ASK_LATER @@ -670,7 +674,6 @@ class Task(TaskBase): return ASK_LATER # compare the signature to a signature computed previously - bld = self.generator.bld key = self.uid() try: prev_sig = bld.task_sigs[key]