summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2007-07-14 21:35:26 -0400
committerSteve Reinhardt <stever@eecs.umich.edu>2007-07-14 21:35:26 -0400
commit658eeee50715d9fd334ae3fd3e0e21b6db6de0c4 (patch)
tree45e0f9b882de4c45a4f136bca2ee120796169853 /SConstruct
parente5ecfa27455a8be97429e9f88e8e6582b9819c6f (diff)
downloadgem5-658eeee50715d9fd334ae3fd3e0e21b6db6de0c4.tar.xz
Handle broken swig version that prints version info on stderr.
--HG-- extra : convert_revision : 83021779c40972fa56893d21713c6115cd481bc4
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct3
1 files changed, 2 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index fa2366963..ffcd84706 100644
--- a/SConstruct
+++ b/SConstruct
@@ -259,7 +259,8 @@ if not env.has_key('SWIG'):
# Check for appropriate SWIG version
swig_version = os.popen('swig -version').read().split()
# First 3 words should be "SWIG Version x.y.z"
-if swig_version[0] != 'SWIG' or swig_version[1] != 'Version':
+if len(swig_version) < 3 or \
+ swig_version[0] != 'SWIG' or swig_version[1] != 'Version':
print 'Error determining SWIG version.'
Exit(1)