Author: esr
Date: Mon Mar 24 04:23:49 2008
New Revision: 25044
URL: http://svn.gna.org/viewcvs/wesnoth?rev=25044&view=rev
Log:
Move the implementation of some scons switches.
Modified:
trunk/SConstruct
trunk/src/SConstruct
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=25044&r1=25043&r2=25044&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Mon Mar 24 04:23:49 2008
@@ -21,15 +21,7 @@
opts.Add(PathOption('prefix', 'autotools-style installation prefix',
"/usr/local"))
opts.Add(PathOption('datadir', 'read-only architecture-independent game data',
"wesnoth", PathOption.PathAccept))
opts.Add(PathOption('prefsdir', 'user preferences directory', ".wesnoth",
PathOption.PathAccept))
-opts.Add(BoolOption('debug', 'Set to build for debugging', False))
-opts.Add(BoolOption('profile', 'Set to build for debugging', False))
-opts.Add(BoolOption('strict', 'Set to strict compilation', False))
-opts.Add(BoolOption('static', 'Set to enable static building of Wesnoth',
False))
opts.Add(BoolOption('lite', 'Set to build lite version of wesnoth (no music or
large images)', False))
-opts.Add(BoolOption('smallgui', 'Set for GUI reductions for resolutions down
to 800x480 (eeePC, Nokia 8x0), resize images before installing', False))
-opts.Add(BoolOption('tinygui', 'Set for GUI reductions for resolutions down to
320x240 (PDAs), resize images before installing', False))
-opts.Add(BoolOption('lowmem', 'Set to reduce memory usage by removing extra
functionality', False))
-opts.Add(BoolOption('fribidi','Clear to disable bidirectional-language
support', True))
opts.Add(BoolOption('dummy_locales','Set to enable Wesnoth private locales',
False))
opts.Add(PathOption('fifodir', 'directory for the wesnothd fifo socket file',
"/var/run/wesnothd", PathOption.PathAccept))
opts.Add('server_uid', 'user id of the user who runs wesnothd', "")
@@ -41,6 +33,16 @@
opts.Add(PathOption('icondir', 'sets the icons directory to a non-default
location', "icons", PathOption.PathAccept))
opts.Add(PathOption('desktopdir', 'sets the desktop entry directory to a
non-default location', "applications", PathOption.PathAccept))
+# These are implemented in src/SConstruct
+opts.Add(BoolOption('debug', 'Set to build for debugging', False))
+opts.Add(BoolOption('profile', 'Set to build for debugging', False))
+opts.Add(BoolOption('strict', 'Set to strict compilation', False))
+opts.Add(BoolOption('static', 'Set to enable static building of Wesnoth',
False))
+opts.Add(BoolOption('smallgui', 'Set for GUI reductions for resolutions down
to 800x480 (eeePC, Nokia 8x0), resize images before installing', False))
+opts.Add(BoolOption('tinygui', 'Set for GUI reductions for resolutions down to
320x240 (PDAs), resize images before installing', False))
+opts.Add(BoolOption('lowmem', 'Set to reduce memory usage by removing extra
functionality', False))
+opts.Add(BoolOption('fribidi','Clear to disable bidirectional-language
support', True))
+
#
# Setup
#
@@ -49,6 +51,8 @@
svnrev = commands.getoutput("svnversion -n 2>/dev/null")
env = Environment(options = opts)
+
+env["CXXFLAGS"].append('-DSVNREV=\'"%s"\'' % svnrev)
SConscript('src/SConstruct', exports='env')
@@ -80,44 +84,6 @@
#
# Check some preconditions
#
-
-cc_version = env["CCVERSION"]
-
-if env["debug"] == "yes":
- env["CXXFLAGS"] = Split("-O0 -DDEBUG -ggdb3 -W -Wall -ansi")
-else:
- env["CXXFLAGS"] = Split("-O2 -ansi")
-
-if env['static']:
- env["LDFLAGS"].append("-all-static")
-
-if env['profile']:
- env["CXXFLAGS"].append("-pg")
-
-if env['strict']:
- env["CXXFLAGS"].append("-Werror -Wno-unused -Wno-sign-compare")
-
-if env['tinygui']:
- env["CXXFLAGS"].append("-DUSE_TINY_GUI")
-
-if env['smallgui']:
- env["CXXFLAGS"].append("-DUSE_SMALL_GUI")
-
-if env['lowmem']:
- env["CXXFLAGS"].append("-DLOW_MEM")
-
-if env['raw_sockets']:
- env["CXXFLAGS"].append("-DNETWORK_USE_RAW_SOCKETS")
-
-env["CXXFLAGS"].append('-DSVNREV=\'"%s"\'' % svnrev)
-
-#print "%s version %s, flags %s" % (env["CC"], cc_version, "
".join(env["CXXFLAGS"]))
-if env["CC"] == "gcc":
- (major, minor, rev) = map(int, cc_version.split("."))
-
- if major*10+minor < 33:
- print "Your compiler version is too old"
- Exit(1)
targets = map(str, BUILD_TARGETS)
Modified: trunk/src/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/SConstruct?rev=25044&r1=25043&r2=25044&view=diff
==============================================================================
--- trunk/src/SConstruct (original)
+++ trunk/src/SConstruct Mon Mar 24 04:23:49 2008
@@ -5,6 +5,51 @@
all = env.Alias("all", ["wesnoth", "wesnoth_editor", "wesnothd", "campaignd",
"cutter", "exploder"])
env.Default("all")
+
+#
+# Implement configuration switches
+#
+
+if env["debug"]:
+ env["CXXFLAGS"] = Split("-O0 -DDEBUG -ggdb3 -W -Wall -ansi")
+else:
+ env["CXXFLAGS"] = Split("-O2 -ansi")
+
+if env['static']:
+ env["LDFLAGS"].append("-all-static")
+
+if env['profile']:
+ env["CXXFLAGS"].append("-pg")
+
+if env['strict']:
+ env["CXXFLAGS"].append("-Werror -Wno-unused -Wno-sign-compare")
+
+if env['tinygui']:
+ env["CXXFLAGS"].append("-DUSE_TINY_GUI")
+
+if env['smallgui']:
+ env["CXXFLAGS"].append("-DUSE_SMALL_GUI")
+
+if env['lowmem']:
+ env["CXXFLAGS"].append("-DLOW_MEM")
+
+# FIXME: Need to figure out how
+#if env['fribidi']:
+# if conf.CheckLib('fribidi'):
+# env["CXXFLAGS"].append("-DHAVE_FRIBIDI")
+# env.Append(LIBS="fribidi")
+# else:
+# print "*** libfribidi is not available, turning off bidi support."
+
+if env['raw_sockets']:
+ env["CXXFLAGS"].append("-DNETWORK_USE_RAW_SOCKETS")
+
+cc_version = env["CCVERSION"]
+if env["CC"] == "gcc":
+ (major, minor, rev) = map(int, cc_version.split("."))
+ if major*10+minor < 33:
+ print "Your compiler version is too old"
+ Exit(1)
#
# Libraries and source groups
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits