aboutsummaryrefslogtreecommitdiffstats
path: root/waflib/extras/buildcopy.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-17 18:43:09 +0100
committerDavid Robillard <d@drobilla.net>2019-03-17 19:02:31 +0100
commitca9f746af500be98f7c65b7f1bd0f50ad936a8b6 (patch)
tree789465df66ea327e642c3e80d690ed7e4a38b1a6 /waflib/extras/buildcopy.py
parenta7860f7e495583f536480a7cce2b6e0c55926f3a (diff)
parentb2ca9626b290e8ab5bfa6269dfc7afe64a012ce1 (diff)
downloadlv2-ca9f746af500be98f7c65b7f1bd0f50ad936a8b6.tar.xz
Update autowaf and adapt to new API
Diffstat (limited to 'waflib/extras/buildcopy.py')
-rw-r--r--waflib/extras/buildcopy.py7
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].