From 6c21deb58390a95c2818ae3aa807ff130b04dd6c Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Tue, 3 May 2016 23:14:10 +0200 Subject: [PATCH] install_task -> install_tg --- TODO | 1 + waflib/TaskGen.py | 8 ++++---- waflib/Tools/c_osx.py | 4 ++-- waflib/Tools/ccroot.py | 10 +++++----- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/TODO b/TODO index ae5ad7a9..954cbfe9 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,6 @@ Waf 1.9 ------- +Refactor msvc.py Update the documentation diff --git a/waflib/TaskGen.py b/waflib/TaskGen.py index f03c0453..c0910829 100644 --- a/waflib/TaskGen.py +++ b/waflib/TaskGen.py @@ -352,7 +352,7 @@ def declare_chain(name='', rule=None, reentrant=None, color='BLUE', cnt += 1 if install_path: - self.bld.install_files(install_path, tsk.outputs) + self.install_tg = self.bld.install_files(install_path, tsk.outputs) return tsk for x in cls.ext_in: @@ -613,7 +613,7 @@ def process_rule(self): x.parent.mkdir() # if a node was given, create the required folders tsk.outputs.append(x) if getattr(self, 'install_path', None): - self.bld.install_files(self.install_path, tsk.outputs, chmod=getattr(self, 'chmod', Utils.O644)) + self.install_tg = self.bld.install_files(self.install_path, tsk.outputs, chmod=getattr(self, 'chmod', Utils.O644)) if getattr(self, 'source', None): tsk.inputs = self.to_nodes(self.source) @@ -767,7 +767,7 @@ def add_pcfile(self, node): bld(source='foo.pc.in', install_path='${LIBDIR}/pkgconfig/') """ tsk = self.create_task('subst_pc', node, node.change_ext('.pc', '.pc.in')) - self.bld.install_files(getattr(self, 'install_path', '${LIBDIR}/pkgconfig/'), tsk.outputs) + self.install_tg = self.bld.install_files(getattr(self, 'install_path', '${LIBDIR}/pkgconfig/'), tsk.outputs) class subst(subst_pc): pass @@ -843,7 +843,7 @@ def process_subst(self): inst_to = getattr(self, 'install_path', None) if inst_to: - self.bld.install_files(inst_to, b, chmod=getattr(self, 'chmod', Utils.O644)) + self.install_tg = self.bld.install_files(inst_to, b, chmod=getattr(self, 'chmod', Utils.O644)) self.source = [] diff --git a/waflib/Tools/c_osx.py b/waflib/Tools/c_osx.py index 12a0d7c7..14ad9db8 100644 --- a/waflib/Tools/c_osx.py +++ b/waflib/Tools/c_osx.py @@ -105,8 +105,8 @@ def create_task_macapp(self): self.bld.install_as(os.path.join(inst_to, relpath), node) if getattr(self.bld, 'is_install', None): - # disable the normal binary installation - self.install_task.hasrun = Task.SKIP_ME + # disable normal binary installation + self.install_tg.posted = True @feature('cprogram', 'cxxprogram') @after_method('apply_link') diff --git a/waflib/Tools/ccroot.py b/waflib/Tools/ccroot.py index 7d8833aa..14a3d005 100644 --- a/waflib/Tools/ccroot.py +++ b/waflib/Tools/ccroot.py @@ -229,7 +229,7 @@ def apply_link(self): inst_to = self.link_task.__class__.inst_to if inst_to: # install a copy of the node list we have at this moment (implib not added) - self.install_task = self.bld.install_files(inst_to, self.link_task.outputs[:], env=self.env, chmod=self.link_task.chmod, task=self.link_task) + self.install_tg = self.bld.install_files(inst_to, self.link_task.outputs[:], env=self.env, chmod=self.link_task.chmod, task=self.link_task) @taskgen_method def use_rec(self, name, **kw): @@ -485,7 +485,7 @@ def apply_implib(self): self.install_task.dest = '${BINDIR}' if not self.env.IMPLIBDIR: self.env.IMPLIBDIR = self.env.LIBDIR - self.implib_install_task = self.bld.install_files(inst_to, implib, env=self.env, chmod=self.link_task.chmod, task=self.link_task) + self.implib_install_tg = self.bld.install_files(inst_to, implib, env=self.env, chmod=self.link_task.chmod, task=self.link_task) # ============ the code above must not know anything about vnum processing on unix platforms ========= @@ -554,15 +554,15 @@ def apply_vnum(self): if self.env.DEST_OS == 'openbsd': libname = self.link_task.outputs[0].name t1 = bld.install_as('%s%s%s' % (path, os.sep, libname), node, env=self.env, chmod=self.link_task.chmod) - self.vnum_install_task = (t1,) + self.vnum_install_tg = (t1,) else: t1 = bld.install_as(path + os.sep + name3, node, env=self.env, chmod=self.link_task.chmod) t3 = bld.symlink_as(path + os.sep + libname, name3) if name2 != name3: t2 = bld.symlink_as(path + os.sep + name2, name3) - self.vnum_install_task = (t1, t2, t3) + self.vnum_install_tg = (t1, t2, t3) else: - self.vnum_install_task = (t1, t3) + self.vnum_install_tg = (t1, t3) if '-dynamiclib' in self.env['LINKFLAGS']: # this requires after(propagate_uselib_vars)