Linux/scons: throw exception when curl configure or make fails

This commit is contained in:
Timothee TTimo Besset
2011-12-04 11:53:02 -06:00
parent 847dc3b752
commit f1f80640fb

View File

@@ -3,7 +3,7 @@
# TTimo <ttimo@idsoftware.com> # TTimo <ttimo@idsoftware.com>
# http://scons.sourceforge.net # http://scons.sourceforge.net
import os import subprocess
import scons_utils import scons_utils
@@ -19,12 +19,12 @@ class idBuildCurl( scons_utils.idSetupBase ):
cmd += '--enable-debug' cmd += '--enable-debug'
else: else:
cmd += '--disable-debug' cmd += '--disable-debug'
os.system( cmd ) subprocess.check_call( cmd, shell = True )
os.system( 'cd curl ; make' ) subprocess.check_call( 'cd curl ; make', shell = True )
if ( self.debug ): if ( self.debug ):
os.system( 'cd curl ; mv ./lib/.libs/libcurl.a ./lib/.libs/libcurl-debug.a' ) subprocess.check_call( 'cd curl ; mv ./lib/.libs/libcurl.a ./lib/.libs/libcurl-debug.a', shell = True )
else: else:
os.system( 'cd curl ; mv ./lib/.libs/libcurl.a ./lib/.libs/libcurl-release.a' ) subprocess.check_call( 'cd curl ; mv ./lib/.libs/libcurl.a ./lib/.libs/libcurl-release.a', shell = True )
return 0 return 0
build = idBuildCurl() build = idBuildCurl()