summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools')
-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"
+ ])