aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/lv2plug.in
diff options
context:
space:
mode:
Diffstat (limited to 'lv2/lv2plug.in')
-rw-r--r--lv2/lv2plug.in/ns/lv2core/wscript42
1 files changed, 26 insertions, 16 deletions
diff --git a/lv2/lv2plug.in/ns/lv2core/wscript b/lv2/lv2plug.in/ns/lv2core/wscript
index e0bab75..b485d7d 100644
--- a/lv2/lv2plug.in/ns/lv2core/wscript
+++ b/lv2/lv2plug.in/ns/lv2core/wscript
@@ -3,6 +3,7 @@ import os
from waflib.extras import autowaf as autowaf
import waflib.Options as Options
+import waflib.Context as Context
import waflib.Scripting as Scripting
import glob
@@ -72,29 +73,38 @@ def build(bld):
os.path.relpath(bundle_dir, include_dir))
class Dist(Scripting.Dist):
- fun = 'dist'
- cmd = 'dist'
+ def execute(self):
+ "Execute but do not call archive() since dist() has already done so."
+ self.recurse([os.path.dirname(Context.g_module.root_path)])
def get_tar_path(self, node):
"Resolve symbolic links to avoid broken links in tarball."
return os.path.realpath(node.abspath())
+class DistCheck(Dist, Scripting.DistCheck):
+ def execute(self):
+ Dist.execute(self)
+ self.check()
+
def archive(self):
- # Write NEWS file
- news(self)
+ Dist.archive(self)
- # Build distribution
- Scripting.Dist.archive(self)
+def pre_dist(ctx):
+ # Write NEWS file in source directory
+ news(ctx)
- # Delete generated NEWS file
- try:
- os.remove('NEWS')
- except:
- pass
+def dist(ctx):
+ pre_dist(ctx)
+ ctx.archive()
+ post_dist(ctx)
-class DistCheck(Dist, Scripting.DistCheck):
- fun = 'distcheck'
- cmd = 'distcheck'
+def distcheck(ctx):
+ dist(ctx)
+
+def post_dist(ctx):
+ # Delete generated NEWS file
+ try:
+ os.remove(os.path.join(ctx.path.abspath(), 'NEWS'))
+ except:
+ pass
- def archive(self):
- Dist.archive(self)