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


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

Header


Content

Posted by esr on August 22, 2008 - 00:48:
Author: esr
Date: Fri Aug 22 00:04:27 2008
New Revision: 28834

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28834&view=rev
Log:
The build variable now defaults to a 'base' value that builds in the
distribution root, restoring the old Emacs-friendly default behavior.
Next step: try to fake Emacs compile mode into coping gracefully with
the other variants.

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=28834&r1=28833&r2=28834&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Fri Aug 22 00:04:27 2008
@@ -33,7 +33,8 @@
 opts.AddOptions(
     ListOption('default_targets', 'Targets that will be built if no target 
is specified in command line.',
         "wesnoth,wesnothd,test", Split("wesnoth wesnothd wesnoth_editor 
campaignd cutter exploder test")),
-    EnumOption('build', 'Build variant: debug, release or profile', 
"release", ["release", "debug", "profile"]),
+    EnumOption('build', 'Build variant: base (no subdirectory), debug, 
release or profile', "base", ["base", "release", "debug", "profile"]),
+    ('extra_flags_base', 'Extra compiler and linker flags to use for release 
builds', ""),
     ('extra_flags_release', 'Extra compiler and linker flags to use for 
release builds', ""),
     ('extra_flags_debug', 'Extra compiler and linker flags to use for debug 
builds', ""),
     ('extra_flags_profile', 'Extra compiler and linker flags to use for 
profile builds', ""),
@@ -115,7 +116,9 @@
 Important switches include:
 
     prefix=/usr     probably what you want for production tools
-    build=release   build the release build variant with appropriante flags
+    build=base      build directly in the distribution root;
+                    you'll need this if you're trying to use Emacs compile 
mode.
+    build=release   build the release build variant with appropriate flags
                         in build/release and copy resulting binaries
                         into distribution/working copy root.
     build=debug     same for debug build variant, binaries will be copied 
with -debug suffix
@@ -309,6 +312,7 @@
 
 binaries = Split("wesnoth wesnoth_editor wesnothd cutter exploder campaignd 
test")
 builds = {
+    "base"    : dict(CXXFLAGS = "-O2"),        # Don't build in subdirectory
     "debug"   : dict(CXXFLAGS = Split("-O0 -DDEBUG -ggdb3")),
     "release" : dict(CXXFLAGS = "-O2"),
     "profile" : dict(CXXFLAGS = "-pg", LINKFLAGS = "-pg")
@@ -324,7 +328,12 @@
     test_env.Append(CPPDEFINES = "BOOST_TEST_DYN_LINK")
 Export("test_env")
 
-SConscript("src/SConscript", build_dir = os.path.join("build", build), 
exports = "env")
+if build == "base":
+    build_dir = ""
+else:
+    build_dir = os.path.join("build", build)
+
+SConscript("src/SConscript", build_dir = build_dir, exports = "env")
 Import(binaries + ["sources"])
 binary_nodes = map(eval, binaries)
 if build == "release" : build_suffix = "" + env["PROGSUFFIX"]




Related Messages


Powered by MHonArc, Updated Fri Aug 22 01:21:38 2008