summaryrefslogtreecommitdiff
path: root/morphlib/buildsystem.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-02-19 15:29:48 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-02-19 15:33:14 +0000
commitc7ad7b41011f4cfab14a21d0363a511b86969e86 (patch)
tree84bb2c13905fe8d3017ee1dc0eefef4d891f8a15 /morphlib/buildsystem.py
parent24866984ce4c1e2e444ea4aaf2d4860c60ac617f (diff)
downloadmorph-c7ad7b41011f4cfab14a21d0363a511b86969e86.tar.gz
Add pre- and post-commands for chunks
We already have configure-commands. Add pre-configure-commands and post-configure-commands. Likewise for build-command, test-commands, and install-commands. Added-to-pacify: Rob Kendrick
Diffstat (limited to 'morphlib/buildsystem.py')
-rw-r--r--morphlib/buildsystem.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/morphlib/buildsystem.py b/morphlib/buildsystem.py
index 6287063a..4d3f94c4 100644
--- a/morphlib/buildsystem.py
+++ b/morphlib/buildsystem.py
@@ -32,10 +32,18 @@ class BuildSystem(object):
'''
def __init__(self):
+ self.pre_configure_commands = []
self.configure_commands = []
+ self.post_configure_commands = []
+ self.pre_build_commands = []
self.build_commands = []
+ self.post_build_commands = []
+ self.pre_test_commands = []
self.test_commands = []
+ self.post_test_commands = []
+ self.pre_install_commands = []
self.install_commands = []
+ self.post_install_commands = []
def __getitem__(self, key):
key = '_'.join(key.split('-'))
@@ -82,6 +90,7 @@ class DummyBuildSystem(BuildSystem):
name = 'dummy'
def __init__(self):
+ BuildSystem.__init__(self)
self.configure_commands = ['echo dummy configure']
self.build_commands = ['echo dummy build']
self.test_commands = ['echo dummy test']
@@ -98,6 +107,7 @@ class AutotoolsBuildSystem(BuildSystem):
name = 'autotools'
def __init__(self):
+ BuildSystem.__init__(self)
self.configure_commands = [
'export NOCONFIGURE=1; ' +
'if [ -e autogen ]; then ./autogen; ' +
@@ -134,6 +144,7 @@ class PythonDistutilsBuildSystem(BuildSystem):
name = 'python-distutils'
def __init__(self):
+ BuildSystem.__init__(self)
self.configure_commands = [
]
self.build_commands = [
@@ -160,6 +171,7 @@ class CPANBuildSystem(BuildSystem):
name = 'cpan'
def __init__(self):
+ BuildSystem.__init__(self)
self.configure_commands = [
'perl Makefile.PL INSTALLDIRS=perl '
'INSTALLARCHLIB="$PREFIX/lib/perl" '