diff options
| author | ruki <[email protected]> | 2025-03-13 00:51:56 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-08 15:31:54 +0800 |
| commit | 3a813e0ede0505a32ef9e4da7faeb792db0c40f3 (patch) | |
| tree | 7e5821d8481b94b176c61710bf8fabd3a551d0b7 | |
| parent | a1d0e9c838a21d14ff7e17f0cad3d6f3c3531ae3 (diff) | |
add prepare stub
| -rw-r--r-- | xmake/actions/build/build.lua | 5 | ||||
| -rw-r--r-- | xmake/actions/build/build_files.lua | 4 | ||||
| -rw-r--r-- | xmake/actions/build/prepare.lua | 26 |
3 files changed, 34 insertions, 1 deletions
diff --git a/xmake/actions/build/build.lua b/xmake/actions/build/build.lua index 28a33db78..8d5ffb72e 100644 --- a/xmake/actions/build/build.lua +++ b/xmake/actions/build/build.lua @@ -28,6 +28,7 @@ import("private.utils.batchcmds") import("core.base.hashset") import("private.service.remote_cache.client", {alias = "remote_cache_client"}) import("private.service.distcc_build.client", {alias = "distcc_build_client"}) +import("prepare", {alias = "prepare_build"}) -- clean target for rebuilding function _clean_target(target) @@ -299,9 +300,11 @@ function get_batchjobs(targetnames, group_pattern) return batchjobs end --- the main entry function main(targetnames, group_pattern) + -- prepare to build + prepare_build(targetnames, {group_pattern = group_pattern}) + -- enable distcc? local distcc if distcc_build_client.is_connected() then diff --git a/xmake/actions/build/build_files.lua b/xmake/actions/build/build_files.lua index ad85d8b2a..c44b8ecd1 100644 --- a/xmake/actions/build/build_files.lua +++ b/xmake/actions/build/build_files.lua @@ -26,6 +26,7 @@ import("core.project.project") import("private.async.jobpool") import("async.runjobs") import("kinds.object") +import("prepare", {alias = "prepare_build"}) -- match source files function _match_sourcefiles(sourcefile, filepatterns) @@ -196,6 +197,9 @@ end -- the main entry function main(targetname, group_pattern, sourcefiles) + -- prepare to build + prepare_build(targetnames, {group_pattern = group_pattern, sourcefiles = sourcefiles}) + -- convert all sourcefiles to lua pattern local filepatterns = _get_file_patterns(sourcefiles) diff --git a/xmake/actions/build/prepare.lua b/xmake/actions/build/prepare.lua new file mode 100644 index 000000000..52a0152af --- /dev/null +++ b/xmake/actions/build/prepare.lua @@ -0,0 +1,26 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015-present, TBOOX Open Source Group. +-- +-- @author ruki +-- @file prepare.lua +-- + +-- imports +import("core.base.option") +import("core.project.config") + +function main(targetnames, opt) +end |
