aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/lv2plug.in/ns/lv2core
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-12 00:41:44 +0000
committerDavid Robillard <d@drobilla.net>2012-02-12 00:41:44 +0000
commit640e1474db9cb614cc1c669e5c950682c9e8493d (patch)
tree98d441ee7d23e3e2b4e433946ad06f6b69c50e00 /lv2/lv2plug.in/ns/lv2core
parent44c2f0d9d3e72007ca378117dae0cea1276aae15 (diff)
downloadlv2-640e1474db9cb614cc1c669e5c950682c9e8493d.tar.xz
Make top-level 'waf dist' generate necessary files so rdflib is not a build requirement.
Diffstat (limited to 'lv2/lv2plug.in/ns/lv2core')
-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)