summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-07-23 17:29:21 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-07-23 16:42:11 +0000
commit79eb63a0669842e2d8eff43f42683ed9ce28383a (patch)
tree92b853ce62430e88f59244fcc974e38806e10e51
parentfb2389d4915c7f17949a955b9e7780c40871180f (diff)
downloadmorph-79eb63a0669842e2d8eff43f42683ed9ce28383a.tar.gz
Don't provide default strip-commands for 'manual' build system
This makes more sense to me conceptually: the idea of the 'manual' build system is you specify *everything* manually. However, I made this change to work around a problem in the Yarn test suite. If the definitions used for testing are set to version 5 or newer, `morph build` will try to run 'strip' and 'objcopy', which fails because they don't exist in the test definitions. We could solve this by setting 'strip-commands: []' in the test chunk .morph files, but this triggers an error further down where `morph edit` fails with 'Field strip-commands not allowed in morphology test-chunk.morph'. This bug is caused by the conditional way that strip-commands are currently implemented in Morph. When we drop support for versions of the definitions format older than V5, the bug will go away, and the `morph edit` command is deprecated in any case, so I think it makes sense to work around it instead of trying to fix it. Change-Id: Ib5124d72466a77cf3f28ed3e14cc4c231bdce4c4
-rw-r--r--morphlib/buildsystem.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/morphlib/buildsystem.py b/morphlib/buildsystem.py
index f56dde79..9f001036 100644
--- a/morphlib/buildsystem.py
+++ b/morphlib/buildsystem.py
@@ -70,7 +70,7 @@ class BuildSystem(object):
self.install_commands = []
self.post_install_commands = []
self.pre_strip_commands = []
- self.strip_commands = [_STRIP_COMMAND]
+ self.strip_commands = []
self.post_strip_commands = []
def __getitem__(self, key):
@@ -147,6 +147,7 @@ class AutotoolsBuildSystem(BuildSystem):
self.install_commands = [
'make DESTDIR="$DESTDIR" install',
]
+ self.strip_commands = [_STRIP_COMMAND]
def used_by_project(self, file_list):
indicators = [
@@ -179,6 +180,7 @@ class PythonDistutilsBuildSystem(BuildSystem):
self.install_commands = [
'python setup.py install --prefix "$PREFIX" --root "$DESTDIR"',
]
+ self.strip_commands = [_STRIP_COMMAND]
def used_by_project(self, file_list):
indicators = [
@@ -213,6 +215,7 @@ class CPANBuildSystem(BuildSystem):
self.install_commands = [
'make DESTDIR="$DESTDIR" install',
]
+ self.strip_commands = [_STRIP_COMMAND]
def used_by_project(self, file_list):
indicators = [
@@ -240,6 +243,7 @@ class CMakeBuildSystem(BuildSystem):
self.install_commands = [
'make DESTDIR="$DESTDIR" install',
]
+ self.strip_commands = [_STRIP_COMMAND]
def used_by_project(self, file_list):
indicators = [
@@ -267,6 +271,7 @@ class QMakeBuildSystem(BuildSystem):
self.install_commands = [
'make INSTALL_ROOT="$DESTDIR" install',
]
+ self.strip_commands = [_STRIP_COMMAND]
def used_by_project(self, file_list):
indicator = '.pro'