diff options
author | David Robillard <d@drobilla.net> | 2019-03-17 17:31:04 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-03-17 18:14:27 +0100 |
commit | a26e6c73275d07c4f7bf80745ce26eb7aa8d941a (patch) | |
tree | e8d433fff41983c96ed15b631e84f71cc0e8cae2 /waflib/extras/buildcopy.py | |
parent | b69a38d171758c6e979d74541fc21d12b7e6abda (diff) | |
parent | 8798f33f1a7f0ed33a847b23ea5f8cbc63bb294b (diff) | |
download | patchage-a26e6c73275d07c4f7bf80745ce26eb7aa8d941a.tar.gz patchage-a26e6c73275d07c4f7bf80745ce26eb7aa8d941a.tar.bz2 patchage-a26e6c73275d07c4f7bf80745ce26eb7aa8d941a.zip |
Update autowaf and adapt to new API
Diffstat (limited to 'waflib/extras/buildcopy.py')
-rw-r--r-- | waflib/extras/buildcopy.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/waflib/extras/buildcopy.py b/waflib/extras/buildcopy.py index a6d9ac8..eaff7e6 100644 --- a/waflib/extras/buildcopy.py +++ b/waflib/extras/buildcopy.py @@ -22,7 +22,7 @@ Examples:: """ import os, shutil -from waflib import Errors, Task, TaskGen, Utils, Node +from waflib import Errors, Task, TaskGen, Utils, Node, Logs @TaskGen.before_method('process_source') @TaskGen.feature('buildcopy') @@ -58,10 +58,13 @@ def make_buildcopy(self): raise Errors.WafError('buildcopy: File not found in src: %s'%os.path.join(*lst)) nodes = [ to_src_nodes(n) for n in getattr(self, 'buildcopy_source', getattr(self, 'source', [])) ] + if not nodes: + Logs.warn('buildcopy: No source files provided to buildcopy in %s (set `buildcopy_source` or `source`)', + self) + return node_pairs = [(n, n.get_bld()) for n in nodes] self.create_task('buildcopy', [n[0] for n in node_pairs], [n[1] for n in node_pairs], node_pairs=node_pairs) - class buildcopy(Task.Task): """ Copy for each pair `n` in `node_pairs`: n[0] -> n[1]. |