diff --git a/waflib/extras/gccdeps.py b/waflib/extras/gccdeps.py index b56dbf30..7304e335 100644 --- a/waflib/extras/gccdeps.py +++ b/waflib/extras/gccdeps.py @@ -75,9 +75,6 @@ def post_run(self): if not self.__class__.__name__ in self.env.ENABLE_GCCDEPS: return self.no_gccdeps_post_run() - if getattr(self, 'cached', None): - return Task.Task.post_run(self) - name = self.outputs[0].abspath() name = re_o.sub('.d', name) txt = Utils.readf(name) @@ -189,6 +186,10 @@ def configure(conf): # record that the configuration was executed properly conf.env.GCCDEPS = True + # in case someone provides a --enable-gccdeps command-line option + if not getattr(conf.options, 'enable_gccdeps', True): + return + global gccdeps_flags flags = conf.env.GCCDEPS_FLAGS or gccdeps_flags if conf.env.CC_NAME in supported_compilers: