From: Steve Reinhardt Date: Sun, 15 Jul 2007 01:35:26 +0000 (-0400) Subject: Handle broken swig version that prints version info on stderr. X-Git-Tag: m5_2.0_beta4~298 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=658eeee50715d9fd334ae3fd3e0e21b6db6de0c4;p=gem5.git Handle broken swig version that prints version info on stderr. --HG-- extra : convert_revision : 83021779c40972fa56893d21713c6115cd481bc4 --- 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)