move portable copyfile function into tools/autowaf.py and use it in both gtk2_ardour...
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 19 Dec 2013 17:55:52 +0000 (12:55 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 19 Dec 2013 17:55:52 +0000 (12:55 -0500)
gtk2_ardour/wscript
libs/taglib/wscript
tools/autowaf.py
waf

index cd606029eb8cddb9d6a63164d86d4c26d71f9ac5..f5ff15e9c672c0249653d819a40243884ff705e3 100644 (file)
@@ -365,11 +365,6 @@ def build_color_scheme(path, prefix):
     f.close()
     return color_scheme
 
-def copyfile (task):
-    src = task.inputs[0].abspath()
-    tgt = task.outputs[0].abspath()
-    shutil.copy2 (src, tgt)
-
 def build(bld):
 
     VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
@@ -644,7 +639,7 @@ def build(bld):
     obj.install_path = None
     set_subst_dict(obj, light_rc_subst_dict)
 
-    obj              = bld(rule = copyfile) 
+    obj              = bld(rule = autowaf.copyfile) 
     obj.source       = [ 'ardour3_widget_list.rc' ]
     obj.target       = 'ardour3_widgets.rc'
     obj.install_path = None
index 219cbd3f081d1a100abf94ae018251bc226291ef..709eb0fd9064f0ee76ec160949a0308a01f3234c 100644 (file)
@@ -103,7 +103,7 @@ def build(bld):
     for h in headers:
         tgt = bld.path.get_bld().make_node (os.path.join ('taglib', os.path.basename (h)))
         if not os.path.exists (tgt.bldpath()):
-            bld (rule = "cp ${SRC} ${TGT}",
+            bld (rule = autowaf.copyfile,
                  source = bld.path.make_node (os.path.join ('taglib', h)),
                  target = tgt)
 
index 46c563519ffc255fa434bb821f91d02428bfe82b..7d4da7b061528c453ee4271eb62e0255aa2f35b8 100644 (file)
@@ -10,6 +10,7 @@ import glob
 import os
 import subprocess
 import sys
+import shutil
 
 from waflib import Configure, Context, Logs, Node, Options, Task, Utils
 from waflib.TaskGen import feature, before, after
@@ -91,6 +92,12 @@ def set_options(opt, debug_by_default=False):
                             help="LV2 bundles [Default: LIBDIR/lv2]")
     g_step = 1
 
+def copyfile (task):
+    # a cross-platform utility for copying files as part of tasks
+    src = task.inputs[0].abspath()
+    tgt = task.outputs[0].abspath()
+    shutil.copy2 (src, tgt)
+
 def check_header(conf, lang, name, define='', mandatory=True):
     "Check for a header"
     includes = '' # search default system include paths
diff --git a/waf b/waf
index 927b8ae126b192c0d8e9f1918122b5d590d6ca35..c29d226aff5dbe5b624ec83ccefdfb955308e9cf 100755 (executable)
Binary files a/waf and b/waf differ