@@ -14,6 +14,16 @@ options.Add( EnumOption('platform',
1414
1515try :
1616 platform = ARGUMENTS ['platform' ]
17+ if platform == 'linux-gcc' :
18+ CXX = 'g++' # not quite right, but env is not yet available.
19+ import commands
20+ version = commands .getoutput ('%s -dumpversion' % CXX )
21+ platform = 'linux-gcc-%s' % version
22+ print "Using platform '%s'" % platform
23+ LD_LIBRARY_PATH = os .environ .get ('LD_LIBRARY_PATH' , '' )
24+ LD_LIBRARY_PATH = "%s:libs/%s" % (LD_LIBRARY_PATH , platform )
25+ os .environ ['LD_LIBRARY_PATH' ] = LD_LIBRARY_PATH
26+ print "LD_LIBRARY_PATH =" , LD_LIBRARY_PATH
1727except KeyError :
1828 print 'You must specify a "platform"'
1929 sys .exit (2 )
@@ -74,11 +84,9 @@ elif platform == 'msvc80':
7484elif platform == 'mingw' :
7585 env .Tool ( 'mingw' )
7686 env .Append ( CPPDEFINES = [ "WIN32" , "NDEBUG" , "_MT" ] )
77- elif platform == 'linux-gcc' :
87+ elif platform . startswith ( 'linux-gcc' ) :
7888 env .Tool ( 'default' )
7989 env .Append ( LIBS = ['pthread' ], CCFLAGS = "-Wall" )
80- LD_LIBRARY_PATH = os .environ .get ('LD_LIBRARY_PATH' , '' )
81- os .environ ['LD_LIBRARY_PATH' ] = "%s:libs/linux-gcc" % LD_LIBRARY_PATH
8290else :
8391 print "UNSUPPORTED PLATFORM."
8492 env .Exit (1 )
@@ -174,3 +182,9 @@ env.Alias( 'src-dist', srcdist_cmd )
174182buildProjectInDirectory ( 'src/jsontestrunner' )
175183buildProjectInDirectory ( 'src/lib_json' )
176184buildProjectInDirectory ( 'doc' )
185+
186+ # libs was happening before bin by chance, I think. When I added
187+ # the compiler version to linux-gcc, the order changed. This
188+ # fixes it (I believe).
189+ env .Depends ('bin' , 'libs' )
190+ env .Depends ('check' , 'bin' )
0 commit comments