summaryrefslogtreecommitdiff
path: root/morphlib/builder.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-02-15 15:27:12 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-02-15 15:27:12 +0000
commit1587e1a66564c29ee206758e27a1fbddf8c1f5d5 (patch)
tree791e70f005e49fd853382316639d110ce7abf2b8 /morphlib/builder.py
parentbf7710faa23f104d8c7030fcaf5c8beca787b6a7 (diff)
downloadmorph-1587e1a66564c29ee206758e27a1fbddf8c1f5d5.tar.gz
Fix overriding of build system commands
This time, with testing. For a five line method, this was surprisingly tricky to get right. Should sleep properly at night...
Diffstat (limited to 'morphlib/builder.py')
-rw-r--r--morphlib/builder.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index a14fb86e..53b330d0 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -198,6 +198,20 @@ class BlobBuilder(object):
class ChunkBuilder(BlobBuilder):
build_system = {
+ 'dummy': {
+ 'configure-commands': [
+ 'echo dummy configure',
+ ],
+ 'build-commands': [
+ 'echo dummy build',
+ ],
+ 'test-commands': [
+ 'echo dummy test',
+ ],
+ 'install-commands': [
+ 'echo dummy install',
+ ],
+ },
'autotools': {
'configure-commands': [
'if [ -e autogen.sh ]; then ./autogen.sh; fi',
@@ -337,7 +351,7 @@ class ChunkBuilder(BlobBuilder):
key = '%s-commands' % what
attr = '%s_commands' % what
cmds = bs.get(key, [])
- cmds = getattr(self.blob.morph, attr, cmds)
+ cmds = getattr(self.blob.morph, attr, []) or cmds
runner(what, cmds)
run_them(self.run_sequentially, 'configure')