summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-21 23:00:21 +0800
committerruki <[email protected]>2022-05-21 23:00:21 +0800
commit37f4aa5c071d4f4214ebd42dd5e8e0f448d331a6 (patch)
treeb4cba6eb7ac5de32c60fc9dde598f6c4d0f9e10e
parent593e92dc0691eaaf3e1217fcf47161dc856af05e (diff)
improve to connect service
-rw-r--r--xmake/modules/private/service/clean_files.lua13
-rw-r--r--xmake/modules/private/service/connect_service.lua13
-rw-r--r--xmake/modules/private/service/disconnect_service.lua13
3 files changed, 30 insertions, 9 deletions
diff --git a/xmake/modules/private/service/clean_files.lua b/xmake/modules/private/service/clean_files.lua
index 3986d5d1f..47b3aa86f 100644
--- a/xmake/modules/private/service/clean_files.lua
+++ b/xmake/modules/private/service/clean_files.lua
@@ -40,13 +40,20 @@ end
function main(...)
local cleaners = {}
+ local default = true
if option.get("remote") then
table.insert(cleaners, _clean_remote_build_server)
- elseif option.get("distcc") then
+ default = false
+ end
+ if option.get("distcc") then
table.insert(cleaners, _clean_distcc_build_server)
- elseif option.get("ccache") then
+ default = false
+ end
+ if option.get("ccache") then
table.insert(cleaners, _clean_remote_cache_server)
- else
+ default = false
+ end
+ if default then
if config.get("remote_build") then
table.insert(cleaners, _clean_remote_build_server)
end
diff --git a/xmake/modules/private/service/connect_service.lua b/xmake/modules/private/service/connect_service.lua
index c6e0167ab..934c89af7 100644
--- a/xmake/modules/private/service/connect_service.lua
+++ b/xmake/modules/private/service/connect_service.lua
@@ -40,13 +40,20 @@ end
function main(...)
local connectors = {}
+ local default = true
if option.get("remote") then
table.insert(connectors, _connect_remote_build_server)
- elseif option.get("distcc") then
+ default = false
+ end
+ if option.get("distcc") then
table.insert(connectors, _connect_distcc_build_server)
- elseif option.get("ccache") then
+ default = false
+ end
+ if option.get("ccache") then
table.insert(connectors, _connect_remote_cache_server)
- else
+ default = false
+ end
+ if default then
if config.get("remote_build") then
table.insert(connectors, _connect_remote_build_server)
end
diff --git a/xmake/modules/private/service/disconnect_service.lua b/xmake/modules/private/service/disconnect_service.lua
index 9f8a07146..ac5184a3c 100644
--- a/xmake/modules/private/service/disconnect_service.lua
+++ b/xmake/modules/private/service/disconnect_service.lua
@@ -40,13 +40,20 @@ end
function main(...)
local disconnectors = {}
+ local default = true
if option.get("remote") then
table.insert(disconnectors, _disconnect_remote_build_server)
- elseif option.get("distcc") then
+ default = false
+ end
+ if option.get("distcc") then
table.insert(disconnectors, _disconnect_distcc_build_server)
- elseif option.get("ccache") then
+ default = false
+ end
+ if option.get("ccache") then
table.insert(disconnectors, _disconnect_remote_cache_server)
- else
+ default = false
+ end
+ if default then
if config.get("remote_build") then
table.insert(disconnectors, _disconnect_remote_build_server)
end