summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-25 19:43:29 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-25 19:43:29 (GMT)
commit857791adda753a0f94da8317bbc019378b1f09bd (patch)
tree96aa2e4d863d50888a16527f9fbb38712e97d8ee /Sluift
parentb58ad7f4b01623a8807b8c268208bd9c8496f4e2 (diff)
downloadswift-857791adda753a0f94da8317bbc019378b1f09bd.zip
swift-857791adda753a0f94da8317bbc019378b1f09bd.tar.bz2
Convert hard tabs to four spaces in all our SConscript/*.py files
Test-Information: Test that it still builds and unit test pass on OS X 10.11.4. Change-Id: I2eb4a0b707991aee553db36a8cd1ae28b813acab
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/ElementConvertors/SConscript96
-rw-r--r--Sluift/SConscript148
-rw-r--r--Sluift/SConscript.variant56
3 files changed, 150 insertions, 150 deletions
diff --git a/Sluift/ElementConvertors/SConscript b/Sluift/ElementConvertors/SConscript
index 265017b..b67c65b 100644
--- a/Sluift/ElementConvertors/SConscript
+++ b/Sluift/ElementConvertors/SConscript
@@ -2,53 +2,53 @@
Import('env')
convertors = [
- env.File("PubSubRetractConvertor.cpp"),
- env.File("PubSubAffiliationsConvertor.cpp"),
- env.File("PubSubPublishConvertor.cpp"),
- env.File("PubSubItemsConvertor.cpp"),
- env.File("PubSubOwnerRedirectConvertor.cpp"),
- env.File("PubSubEventRedirectConvertor.cpp"),
- env.File("UserTuneConvertor.cpp"),
- env.File("PubSubConfigureConvertor.cpp"),
- env.File("PubSubEventDisassociateConvertor.cpp"),
- env.File("PubSubOwnerAffiliationsConvertor.cpp"),
- env.File("PubSubOwnerConfigureConvertor.cpp"),
- env.File("UserLocationConvertor.cpp"),
- env.File("PubSubSubscribeOptionsConvertor.cpp"),
- env.File("PubSubOwnerSubscriptionsConvertor.cpp"),
- env.File("PubSubDefaultConvertor.cpp"),
- env.File("PubSubEventCollectionConvertor.cpp"),
- env.File("PubSubEventSubscriptionConvertor.cpp"),
- env.File("PubSubEventRetractConvertor.cpp"),
- env.File("PubSubItemConvertor.cpp"),
- env.File("PubSubUnsubscribeConvertor.cpp"),
- env.File("PubSubEventDeleteConvertor.cpp"),
- env.File("PubSubCreateConvertor.cpp"),
- env.File("PubSubOwnerPurgeConvertor.cpp"),
- env.File("PubSubEventItemsConvertor.cpp"),
- env.File("PubSubOptionsConvertor.cpp"),
- env.File("PubSubEventItemConvertor.cpp"),
- env.File("PubSubOwnerSubscriptionConvertor.cpp"),
- env.File("PubSubOwnerAffiliationConvertor.cpp"),
- env.File("PubSubEventPurgeConvertor.cpp"),
- env.File("PubSubAffiliationConvertor.cpp"),
- env.File("PubSubSubscribeConvertor.cpp"),
- env.File("PubSubOwnerDeleteConvertor.cpp"),
- env.File("PubSubOwnerDefaultConvertor.cpp"),
- env.File("PubSubSubscriptionsConvertor.cpp"),
- env.File("PubSubEventAssociateConvertor.cpp"),
- env.File("PubSubSubscriptionConvertor.cpp"),
- env.File("SecurityLabelConvertor.cpp"),
- env.File("PubSubEventConfigurationConvertor.cpp"),
- env.File("IQConvertor.cpp"),
- env.File("PresenceConvertor.cpp"),
- env.File("MessageConvertor.cpp"),
- env.File("ResultSetConvertor.cpp"),
- env.File("ForwardedConvertor.cpp"),
- env.File("MAMResultConvertor.cpp"),
- env.File("MAMQueryConvertor.cpp"),
- env.File("MAMFinConvertor.cpp"),
- env.File("SubjectConvertor.cpp"),
- env.File("IsodeIQDelegationConvertor.cpp")
+ env.File("PubSubRetractConvertor.cpp"),
+ env.File("PubSubAffiliationsConvertor.cpp"),
+ env.File("PubSubPublishConvertor.cpp"),
+ env.File("PubSubItemsConvertor.cpp"),
+ env.File("PubSubOwnerRedirectConvertor.cpp"),
+ env.File("PubSubEventRedirectConvertor.cpp"),
+ env.File("UserTuneConvertor.cpp"),
+ env.File("PubSubConfigureConvertor.cpp"),
+ env.File("PubSubEventDisassociateConvertor.cpp"),
+ env.File("PubSubOwnerAffiliationsConvertor.cpp"),
+ env.File("PubSubOwnerConfigureConvertor.cpp"),
+ env.File("UserLocationConvertor.cpp"),
+ env.File("PubSubSubscribeOptionsConvertor.cpp"),
+ env.File("PubSubOwnerSubscriptionsConvertor.cpp"),
+ env.File("PubSubDefaultConvertor.cpp"),
+ env.File("PubSubEventCollectionConvertor.cpp"),
+ env.File("PubSubEventSubscriptionConvertor.cpp"),
+ env.File("PubSubEventRetractConvertor.cpp"),
+ env.File("PubSubItemConvertor.cpp"),
+ env.File("PubSubUnsubscribeConvertor.cpp"),
+ env.File("PubSubEventDeleteConvertor.cpp"),
+ env.File("PubSubCreateConvertor.cpp"),
+ env.File("PubSubOwnerPurgeConvertor.cpp"),
+ env.File("PubSubEventItemsConvertor.cpp"),
+ env.File("PubSubOptionsConvertor.cpp"),
+ env.File("PubSubEventItemConvertor.cpp"),
+ env.File("PubSubOwnerSubscriptionConvertor.cpp"),
+ env.File("PubSubOwnerAffiliationConvertor.cpp"),
+ env.File("PubSubEventPurgeConvertor.cpp"),
+ env.File("PubSubAffiliationConvertor.cpp"),
+ env.File("PubSubSubscribeConvertor.cpp"),
+ env.File("PubSubOwnerDeleteConvertor.cpp"),
+ env.File("PubSubOwnerDefaultConvertor.cpp"),
+ env.File("PubSubSubscriptionsConvertor.cpp"),
+ env.File("PubSubEventAssociateConvertor.cpp"),
+ env.File("PubSubSubscriptionConvertor.cpp"),
+ env.File("SecurityLabelConvertor.cpp"),
+ env.File("PubSubEventConfigurationConvertor.cpp"),
+ env.File("IQConvertor.cpp"),
+ env.File("PresenceConvertor.cpp"),
+ env.File("MessageConvertor.cpp"),
+ env.File("ResultSetConvertor.cpp"),
+ env.File("ForwardedConvertor.cpp"),
+ env.File("MAMResultConvertor.cpp"),
+ env.File("MAMQueryConvertor.cpp"),
+ env.File("MAMFinConvertor.cpp"),
+ env.File("SubjectConvertor.cpp"),
+ env.File("IsodeIQDelegationConvertor.cpp")
]
Return('convertors')
diff --git a/Sluift/SConscript b/Sluift/SConscript
index 09da0a9..de9cab6 100644
--- a/Sluift/SConscript
+++ b/Sluift/SConscript
@@ -3,86 +3,86 @@ import Version, os.path
Import(["env"])
if env["SCONS_STAGE"] == "build" and not GetOption("help") and not env.get("HAVE_LUA", 0) :
- print "Warning: Lua was not found. Sluift will not be built."
- if "Sluift" in env["PROJECTS"] :
- env["PROJECTS"].remove("Sluift")
-
+ print "Warning: Lua was not found. Sluift will not be built."
+ if "Sluift" in env["PROJECTS"] :
+ env["PROJECTS"].remove("Sluift")
+
elif env["SCONS_STAGE"] == "build" :
- sluift_sources = [
- "Lua/Value.cpp",
- "Lua/Exception.cpp",
- "Lua/Check.cpp",
- "Lua/FunctionRegistration.cpp",
- "Lua/FunctionRegistry.cpp",
- "Lua/LuaUtils.cpp",
- "LuaElementConvertors.cpp",
- "LuaElementConvertor.cpp",
- "Response.cpp",
- "ElementConvertors/BodyConvertor.cpp",
- "ElementConvertors/VCardUpdateConvertor.cpp",
- "ElementConvertors/PubSubEventConvertor.cpp",
- "ElementConvertors/RawXMLElementConvertor.cpp",
- "ElementConvertors/DOMElementConvertor.cpp",
- "ElementConvertors/DefaultElementConvertor.cpp",
- "ElementConvertors/DiscoInfoConvertor.cpp",
- "ElementConvertors/DiscoItemsConvertor.cpp",
- "ElementConvertors/FormConvertor.cpp",
- "ElementConvertors/SoftwareVersionConvertor.cpp",
- "ElementConvertors/VCardConvertor.cpp",
- "ElementConvertors/CommandConvertor.cpp",
- "ElementConvertors/StatusConvertor.cpp",
- "ElementConvertors/StatusShowConvertor.cpp",
- "ElementConvertors/DelayConvertor.cpp",
- "Helpers.cpp",
- "SluiftClient.cpp",
- "SluiftComponent.cpp",
- "Watchdog.cpp",
- "core.c",
- "client.cpp",
- "component.cpp",
- "sluift.cpp"
- ]
- sluift_sources += env.SConscript("ElementConvertors/SConscript")
+ sluift_sources = [
+ "Lua/Value.cpp",
+ "Lua/Exception.cpp",
+ "Lua/Check.cpp",
+ "Lua/FunctionRegistration.cpp",
+ "Lua/FunctionRegistry.cpp",
+ "Lua/LuaUtils.cpp",
+ "LuaElementConvertors.cpp",
+ "LuaElementConvertor.cpp",
+ "Response.cpp",
+ "ElementConvertors/BodyConvertor.cpp",
+ "ElementConvertors/VCardUpdateConvertor.cpp",
+ "ElementConvertors/PubSubEventConvertor.cpp",
+ "ElementConvertors/RawXMLElementConvertor.cpp",
+ "ElementConvertors/DOMElementConvertor.cpp",
+ "ElementConvertors/DefaultElementConvertor.cpp",
+ "ElementConvertors/DiscoInfoConvertor.cpp",
+ "ElementConvertors/DiscoItemsConvertor.cpp",
+ "ElementConvertors/FormConvertor.cpp",
+ "ElementConvertors/SoftwareVersionConvertor.cpp",
+ "ElementConvertors/VCardConvertor.cpp",
+ "ElementConvertors/CommandConvertor.cpp",
+ "ElementConvertors/StatusConvertor.cpp",
+ "ElementConvertors/StatusShowConvertor.cpp",
+ "ElementConvertors/DelayConvertor.cpp",
+ "Helpers.cpp",
+ "SluiftClient.cpp",
+ "SluiftComponent.cpp",
+ "Watchdog.cpp",
+ "core.c",
+ "client.cpp",
+ "component.cpp",
+ "sluift.cpp"
+ ]
+ sluift_sources += env.SConscript("ElementConvertors/SConscript")
- sluift_env = env.Clone()
- sluift_env.UseFlags(env.get("LUA_FLAGS", {}))
- sluift_env.UseFlags(env["SWIFTEN_FLAGS"])
- sluift_env.UseFlags(env["SWIFTEN_DEP_FLAGS"])
- # Support compilation on both Lua 5.1 and Lua 5.2
- sluift_env.Append(CPPDEFINES = ["LUA_COMPAT_ALL"])
- if sluift_env["PLATFORM"] == "win32" :
- sluift_env.Append(CPPDEFINES = ["SLUIFT_BUILD_DLL"])
+ sluift_env = env.Clone()
+ sluift_env.UseFlags(env.get("LUA_FLAGS", {}))
+ sluift_env.UseFlags(env["SWIFTEN_FLAGS"])
+ sluift_env.UseFlags(env["SWIFTEN_DEP_FLAGS"])
+ # Support compilation on both Lua 5.1 and Lua 5.2
+ sluift_env.Append(CPPDEFINES = ["LUA_COMPAT_ALL"])
+ if sluift_env["PLATFORM"] == "win32" :
+ sluift_env.Append(CPPDEFINES = ["SLUIFT_BUILD_DLL"])
- if sluift_env["PLATFORM"] == "darwin" and os.path.isdir("/Applications/iTunes.app") :
- sluift_env.Append(FRAMEWORKS = ["ScriptingBridge"])
- sluift_env.Command("iTunes.h", "/Applications/iTunes.app",
- "sdef ${SOURCE} | sdp -fh --basename iTunes -V 10.10 -o ${TARGET.dir}")
- sluift_env.Append(CPPDEFINES = ["HAVE_ITUNES"])
- sluift_sources += ["ITunesInterface.mm"]
+ if sluift_env["PLATFORM"] == "darwin" and os.path.isdir("/Applications/iTunes.app") :
+ sluift_env.Append(FRAMEWORKS = ["ScriptingBridge"])
+ sluift_env.Command("iTunes.h", "/Applications/iTunes.app",
+ "sdef ${SOURCE} | sdp -fh --basename iTunes -V 10.10 -o ${TARGET.dir}")
+ sluift_env.Append(CPPDEFINES = ["HAVE_ITUNES"])
+ sluift_sources += ["ITunesInterface.mm"]
- # Generate Version.h
- version_header = "#pragma once\n\n"
- version_header += "#define SLUIFT_VERSION_STRING \"" + Version.getBuildVersion(env.Dir("#").abspath, "sluift") + "\"\n"
- sluift_env.WriteVal("Version.h", sluift_env.Value(version_header))
+ # Generate Version.h
+ version_header = "#pragma once\n\n"
+ version_header += "#define SLUIFT_VERSION_STRING \"" + Version.getBuildVersion(env.Dir("#").abspath, "sluift") + "\"\n"
+ sluift_env.WriteVal("Version.h", sluift_env.Value(version_header))
- # Generate core.c
- def generate_embedded_lua(env, target, source) :
- f = open(source[0].abspath, "r")
- data = f.read()
- f.close()
- f = open(target[0].abspath, "w")
- f.write('#include <stddef.h>\n')
- f.write('const size_t ' + source[0].name.replace(".", "_") + "_size = " + str(len(data)) + ";\n")
- f.write('const char ' + source[0].name.replace(".", "_") + "[] = {" + ", ".join([str(ord(c)) for c in data]) + "};\n")
- f.close()
- sluift_env.Command("core.c", ["core.lua"], env.Action(generate_embedded_lua, cmdstr="$GENCOMSTR"))
+ # Generate core.c
+ def generate_embedded_lua(env, target, source) :
+ f = open(source[0].abspath, "r")
+ data = f.read()
+ f.close()
+ f = open(target[0].abspath, "w")
+ f.write('#include <stddef.h>\n')
+ f.write('const size_t ' + source[0].name.replace(".", "_") + "_size = " + str(len(data)) + ";\n")
+ f.write('const char ' + source[0].name.replace(".", "_") + "[] = {" + ", ".join([str(ord(c)) for c in data]) + "};\n")
+ f.close()
+ sluift_env.Command("core.c", ["core.lua"], env.Action(generate_embedded_lua, cmdstr="$GENCOMSTR"))
- sluift_env.WriteVal("dll.c", sluift_env.Value(""))
+ sluift_env.WriteVal("dll.c", sluift_env.Value(""))
- sluift_sources = [env.File(x) for x in sluift_sources]
- for sluift_variant in ['dll', 'exe'] :
- SConscript(["SConscript.variant"], variant_dir = sluift_variant,
- duplicate = 0,
- exports = ['sluift_sources', 'sluift_variant', 'sluift_env'])
+ sluift_sources = [env.File(x) for x in sluift_sources]
+ for sluift_variant in ['dll', 'exe'] :
+ SConscript(["SConscript.variant"], variant_dir = sluift_variant,
+ duplicate = 0,
+ exports = ['sluift_sources', 'sluift_variant', 'sluift_env'])
diff --git a/Sluift/SConscript.variant b/Sluift/SConscript.variant
index d0e2b18..9f56c91 100644
--- a/Sluift/SConscript.variant
+++ b/Sluift/SConscript.variant
@@ -6,37 +6,37 @@ Import('sluift_variant')
Import('sluift_sources')
if sluift_variant == 'exe' :
- common_objects = sluift_env.StaticObject(sluift_sources)
+ common_objects = sluift_env.StaticObject(sluift_sources)
- sluift_exe_env = sluift_env.Clone()
- tokenize = sluift_exe_env.StaticObject("#/Sluift/tokenize.cpp")
- exe_sources = tokenize + [
- "#/Sluift/Console.cpp",
- "#/Sluift/Terminal.cpp",
- "#/Sluift/StandardTerminal.cpp",
- "#/Sluift/Completer.cpp",
- "#/Sluift/main.cpp",
- ]
+ sluift_exe_env = sluift_env.Clone()
+ tokenize = sluift_exe_env.StaticObject("#/Sluift/tokenize.cpp")
+ exe_sources = tokenize + [
+ "#/Sluift/Console.cpp",
+ "#/Sluift/Terminal.cpp",
+ "#/Sluift/StandardTerminal.cpp",
+ "#/Sluift/Completer.cpp",
+ "#/Sluift/main.cpp",
+ ]
- if sluift_exe_env.get("HAVE_EDITLINE", False) :
- sluift_exe_env.Append(CPPDEFINES = ["HAVE_EDITLINE"])
- sluift_exe_env.MergeFlags(sluift_exe_env["EDITLINE_FLAGS"])
- exe_sources += ["#/Sluift/EditlineTerminal.cpp"]
+ if sluift_exe_env.get("HAVE_EDITLINE", False) :
+ sluift_exe_env.Append(CPPDEFINES = ["HAVE_EDITLINE"])
+ sluift_exe_env.MergeFlags(sluift_exe_env["EDITLINE_FLAGS"])
+ exe_sources += ["#/Sluift/EditlineTerminal.cpp"]
- env["SLUIFT"] = sluift_exe_env.Program("sluift", common_objects + exe_sources)
- if sluift_exe_env.get("SLUIFT_INSTALLDIR", "") :
- sluift_exe_env.Install(os.path.join(sluift_exe_env["SLUIFT_INSTALLDIR"], "bin"), env["SLUIFT"])
+ env["SLUIFT"] = sluift_exe_env.Program("sluift", common_objects + exe_sources)
+ if sluift_exe_env.get("SLUIFT_INSTALLDIR", "") :
+ sluift_exe_env.Install(os.path.join(sluift_exe_env["SLUIFT_INSTALLDIR"], "bin"), env["SLUIFT"])
- # Unit tests
- env.Append(UNITTEST_OBJECTS = tokenize + ["#/Sluift/UnitTest/TokenizeTest.cpp"])
+ # Unit tests
+ env.Append(UNITTEST_OBJECTS = tokenize + ["#/Sluift/UnitTest/TokenizeTest.cpp"])
else :
- sluift_env["SLUIFT_DLL_SUFFIX"] = "${SHLIBSUFFIX}"
- if sluift_env["PLATFORM"] == "darwin" :
- sluift_env["SLUIFT_DLL_SUFFIX"] = ".so"
- sluift_dll = sluift_env.SharedLibrary(sluift_env.File("sluift${SLUIFT_DLL_SUFFIX}"),
- sluift_sources + ["#/Sluift/dll.c"])
- if sluift_env.get("SLUIFT_INSTALLDIR", False) and sluift_env.get("LUA_VERSION", False) :
- sluift_env.Install(
- os.path.join(sluift_env["SLUIFT_INSTALLDIR"], "lib", "lua", sluift_env["LUA_VERSION"]),
- sluift_dll)
+ sluift_env["SLUIFT_DLL_SUFFIX"] = "${SHLIBSUFFIX}"
+ if sluift_env["PLATFORM"] == "darwin" :
+ sluift_env["SLUIFT_DLL_SUFFIX"] = ".so"
+ sluift_dll = sluift_env.SharedLibrary(sluift_env.File("sluift${SLUIFT_DLL_SUFFIX}"),
+ sluift_sources + ["#/Sluift/dll.c"])
+ if sluift_env.get("SLUIFT_INSTALLDIR", False) and sluift_env.get("LUA_VERSION", False) :
+ sluift_env.Install(
+ os.path.join(sluift_env["SLUIFT_INSTALLDIR"], "lib", "lua", sluift_env["LUA_VERSION"]),
+ sluift_dll)