mail[Wesnoth-commits] r25290 - /trunk/SConstruct


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by loonycyborg on March 29, 2008 - 15:57:
Author: loonycyborg
Date: Sat Mar 29 15:57:16 2008
New Revision: 25290

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25290&view=rev
Log:
Made scons recipe disable "wesnoth" target if python is not found.

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=25290&r1=25289&r2=25290&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Sat Mar 29 15:57:16 2008
@@ -293,6 +293,7 @@
 
 def Warning(message):
     print message
+    return False
 
 conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
                                        'CheckPKG' : CheckPKG,
@@ -312,8 +313,6 @@
         conf.CheckOgg() and \
         conf.CheckPNG() or Warning("Client prerequisites are not met. 
wesnoth, wesnoth_editor, cutter and exploder cannot be built.")
 
-    have_python_24 = float(sys.version[:3]) < 2.4
-
     have_X = conf.CheckLib('X11') or Warning("wesnoth_editor cannot be 
built.")
     have_fribidi = False
     if env['fribidi']:
@@ -321,14 +320,13 @@
 
     have_server_prereqs = conf.CheckSDL('SDL_net') or Warning("Server 
prerequisites are not met. wesnothd and campaignd cannot be built.")
 
-    have_python_lib = conf.CheckLib('python'+sys.version[:3])
+    have_python = (float(sys.version[:3]) >= 2.4) and 
conf.CheckLib('python'+sys.version[:3]) or Warning("Python >= 2.4 not found. 
The game cannot be built.")
 else:
     have_client_prereqs = True
-    have_python_24 = True
+    have_python = True
     have_X = True
     have_fribidi = True
     have_server_prereqs = True
-    have_python_lib = True
 
 boost_test_dyn_link = boost_auto_test = False
 if 'test' in COMMAND_LINE_TARGETS:
@@ -619,7 +617,7 @@
 # Target declarations
 #
 
-if have_client_prereqs:
+if have_client_prereqs and have_python:
     wesnoth = env.Program("wesnoth", ["src/game.cpp"] + wesnoth_sources,
             CPPPATH = commonpath + ['src/server'],
             LIBS = ['wesnoth_core', 'wesnoth_sdl', 'wesnoth', 'campaignd'] + 
commonlibs + extralibs,




Related Messages


Powered by MHonArc, Updated Sat Mar 29 16:21:35 2008