summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-11-03 15:33:12 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-11-03 15:33:12 +0000
commit95467d448655d42998e5a418c75a6e7cc8317361 (patch)
treede3c83b301179bf4529fffdb15dc03b16af5bd76 /morphlib
parent15e2c96e24f56228c57be4af2d6a601a93695506 (diff)
downloadmorph-95467d448655d42998e5a418c75a6e7cc8317361.tar.gz
Fix build system magic
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/builder.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index 69204253..2ddb209b 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -74,6 +74,23 @@ class BinaryBlob(object):
class Chunk(BinaryBlob):
+ build_system = {
+ 'autotools': {
+ 'configure-commands': [
+ 'if [ -e autogen.sh ]; then ./autogen.sh; fi',
+ './configure --prefix=/usr',
+ ],
+ 'build-commands': [
+ 'make',
+ ],
+ 'test-commands': [
+ ],
+ 'install-commands': [
+ 'make DESTDIR="$DESTDIR" install',
+ ],
+ },
+ }
+
def build(self):
self.ex = morphlib.execute.Execute(self.builddir, self.msg)
self.ex.env['WORKAREA'] = self.tempdir.dirname
@@ -102,7 +119,7 @@ class Chunk(BinaryBlob):
os.mkdir(self.destdir)
if self.morph.build_system:
- bs = self.build_system[morph.build_system]
+ bs = self.build_system[self.morph.build_system]
self.ex.run(bs['configure-commands'])
self.ex.run(bs['build-commands'])
self.ex.run(bs['test-commands'])
@@ -120,23 +137,6 @@ class Chunk(BinaryBlob):
class Stratum(BinaryBlob):
-
- build_system = {
- 'autotools': {
- 'configure-commands': [
- 'if [ -e autogen.sh ]; then ./autogen.sh; fi',
- './configure --prefix=/usr',
- ],
- 'build-commands': [
- 'make',
- ],
- 'test-commands': [
- ],
- 'install-commands': [
- 'make DESTDIR="$DESTDIR" install',
- ],
- },
- }
def needs_built(self):
for chunk_name, source in self.morph.sources.iteritems():