summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-03-28 15:52:01 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-03-28 15:52:01 (GMT)
commit1b7ef5be1db7b751c0ee383a34b1f5d0006a2e5d (patch)
tree57a38b46858734e70f1b6176ebe3e4ce057ce4f6 /SwifTools/SConscript
parentf53a1ef582494458301b97bf6e546be52d7ff7e8 (diff)
downloadswift-contrib-1b7ef5be1db7b751c0ee383a34b1f5d0006a2e5d.zip
swift-contrib-1b7ef5be1db7b751c0ee383a34b1f5d0006a2e5d.tar.bz2
Fixed build.
Diffstat (limited to 'SwifTools/SConscript')
-rw-r--r--SwifTools/SConscript90
1 files changed, 50 insertions, 40 deletions
diff --git a/SwifTools/SConscript b/SwifTools/SConscript
index a1b3d18..3400e54 100644
--- a/SwifTools/SConscript
+++ b/SwifTools/SConscript
@@ -1,42 +1,52 @@
Import("env")
-env["SWIFTOOLS_FLAGS"] = {
- "LIBPATH": [Dir(".")],
- "LIBS": ["SwifTools"]
- }
-
-myenv = env.Clone()
-myenv.MergeFlags(myenv["BOOST_FLAGS"])
-
-sources = [
- "Idle/IdleDetector.cpp",
- "Idle/ActualIdleDetector.cpp",
- "Idle/IdleQuerier.cpp",
- "Idle/PlatformIdleQuerier.cpp",
- "AutoUpdater/AutoUpdater.cpp",
- "AutoUpdater/PlatformAutoUpdaterFactory.cpp",
- "Linkify.cpp",
- ]
-
-if myenv.get("HAVE_SPARKLE", 0) :
- myenv.MergeFlags(myenv["SPARKLE_FLAGS"])
- myenv.Append(CPPDEFINES = ["HAVE_SPARKLE"])
- sources += ["AutoUpdater/SparkleAutoUpdater.mm"]
-
-if myenv["PLATFORM"] == "win32" :
- sources += ["Idle/WindowsIdleQuerier.cpp"]
-elif myenv["PLATFORM"] == "darwin" :
- sources += ["Idle/MacOSXIdleQuerier.cpp"]
-elif myenv["HAVE_XSS"] :
- myenv.Append(CPPDEFINES = ["HAVE_XSS"])
- sources += ["Idle/XSSIdleQuerier.cpp"]
-else :
- sources += ["Idle/DummyIdleQuerier.cpp"]
-
-myenv.StaticLibrary("SwifTools", sources)
-
-SConscript(dirs = [
- "Idle/IdleQuerierTest",
- "Idle/UnitTest",
- "UnitTest"
- ])
+################################################################################
+# Flags
+################################################################################
+
+if env["SCONS_STAGE"] == "flags" :
+ env["SWIFTOOLS_FLAGS"] = {
+ "LIBPATH": [Dir(".")],
+ "LIBS": ["SwifTools"]
+ }
+
+################################################################################
+# Build
+################################################################################
+
+if env["SCONS_STAGE"] == "build" :
+ myenv = env.Clone()
+ myenv.MergeFlags(myenv["BOOST_FLAGS"])
+
+ sources = [
+ "Idle/IdleDetector.cpp",
+ "Idle/ActualIdleDetector.cpp",
+ "Idle/IdleQuerier.cpp",
+ "Idle/PlatformIdleQuerier.cpp",
+ "AutoUpdater/AutoUpdater.cpp",
+ "AutoUpdater/PlatformAutoUpdaterFactory.cpp",
+ "Linkify.cpp",
+ ]
+
+ if myenv.get("HAVE_SPARKLE", 0) :
+ myenv.MergeFlags(myenv["SPARKLE_FLAGS"])
+ myenv.Append(CPPDEFINES = ["HAVE_SPARKLE"])
+ sources += ["AutoUpdater/SparkleAutoUpdater.mm"]
+
+ if myenv["PLATFORM"] == "win32" :
+ sources += ["Idle/WindowsIdleQuerier.cpp"]
+ elif myenv["PLATFORM"] == "darwin" :
+ sources += ["Idle/MacOSXIdleQuerier.cpp"]
+ elif myenv["HAVE_XSS"] :
+ myenv.Append(CPPDEFINES = ["HAVE_XSS"])
+ sources += ["Idle/XSSIdleQuerier.cpp"]
+ else :
+ sources += ["Idle/DummyIdleQuerier.cpp"]
+
+ myenv.StaticLibrary("SwifTools", sources)
+
+ SConscript(dirs = [
+ "Idle/IdleQuerierTest",
+ "Idle/UnitTest",
+ "UnitTest"
+ ])