diff options
| author | ruki <[email protected]> | 2025-03-28 00:41:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-08 15:31:56 +0800 |
| commit | 43c58c12e7f6a29efc19ae11d27765cfa9e301e2 (patch) | |
| tree | d7ff5f6a227373122becb043b7c24427e9e7e5f1 | |
| parent | 7e60e473a3d92d0706a4856c12f161c4d2df32a9 (diff) | |
add builtin actions
| -rw-r--r-- | xmake/actions/build/.DS_Store | bin | 6148 -> 0 bytes | |||
| -rw-r--r-- | xmake/actions/build/build.lua | 1 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/build_binary.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/build_moduleonly.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/build_object.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/build_shared.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/build_static.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/prepare_binary.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/prepare_moduleonly.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/prepare_object.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/prepare_shared.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/builtin/prepare_static.lua | 25 | ||||
| -rw-r--r-- | xmake/actions/build/deprecated/.DS_Store | bin | 6148 -> 0 bytes | |||
| -rw-r--r-- | xmake/actions/build/target_utils.lua | 3 |
14 files changed, 252 insertions, 2 deletions
diff --git a/xmake/actions/build/.DS_Store b/xmake/actions/build/.DS_Store Binary files differdeleted file mode 100644 index b82482eba..000000000 --- a/xmake/actions/build/.DS_Store +++ /dev/null diff --git a/xmake/actions/build/build.lua b/xmake/actions/build/build.lua index 54827d354..63121ea07 100644 --- a/xmake/actions/build/build.lua +++ b/xmake/actions/build/build.lua @@ -31,6 +31,7 @@ function _prepare(targets_root, opt) target_utils.runjobs(targets_root, opt) end +-- TODO distcc function _build(targets_root, opt) --[[ opt = opt or {} diff --git a/xmake/actions/build/builtin/build_binary.lua b/xmake/actions/build/builtin/build_binary.lua new file mode 100644 index 000000000..591c679c3 --- /dev/null +++ b/xmake/actions/build/builtin/build_binary.lua @@ -0,0 +1,25 @@ +--!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 build_binary.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/builtin/build_moduleonly.lua b/xmake/actions/build/builtin/build_moduleonly.lua new file mode 100644 index 000000000..b45766f4c --- /dev/null +++ b/xmake/actions/build/builtin/build_moduleonly.lua @@ -0,0 +1,25 @@ +--!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 build_moduleonly.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/builtin/build_object.lua b/xmake/actions/build/builtin/build_object.lua new file mode 100644 index 000000000..0d13f392e --- /dev/null +++ b/xmake/actions/build/builtin/build_object.lua @@ -0,0 +1,25 @@ +--!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 build_object.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/builtin/build_shared.lua b/xmake/actions/build/builtin/build_shared.lua new file mode 100644 index 000000000..a178dafd6 --- /dev/null +++ b/xmake/actions/build/builtin/build_shared.lua @@ -0,0 +1,25 @@ +--!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 build_shared.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/builtin/build_static.lua b/xmake/actions/build/builtin/build_static.lua new file mode 100644 index 000000000..21de325da --- /dev/null +++ b/xmake/actions/build/builtin/build_static.lua @@ -0,0 +1,25 @@ +--!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 build_static.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/builtin/prepare_binary.lua b/xmake/actions/build/builtin/prepare_binary.lua new file mode 100644 index 000000000..827f02d95 --- /dev/null +++ b/xmake/actions/build/builtin/prepare_binary.lua @@ -0,0 +1,25 @@ +--!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_binary.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/builtin/prepare_moduleonly.lua b/xmake/actions/build/builtin/prepare_moduleonly.lua new file mode 100644 index 000000000..3f133c9ff --- /dev/null +++ b/xmake/actions/build/builtin/prepare_moduleonly.lua @@ -0,0 +1,25 @@ +--!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_moduleonly.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/builtin/prepare_object.lua b/xmake/actions/build/builtin/prepare_object.lua new file mode 100644 index 000000000..7197d9ad5 --- /dev/null +++ b/xmake/actions/build/builtin/prepare_object.lua @@ -0,0 +1,25 @@ +--!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_object.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/builtin/prepare_shared.lua b/xmake/actions/build/builtin/prepare_shared.lua new file mode 100644 index 000000000..6283d43dd --- /dev/null +++ b/xmake/actions/build/builtin/prepare_shared.lua @@ -0,0 +1,25 @@ +--!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_shared.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/builtin/prepare_static.lua b/xmake/actions/build/builtin/prepare_static.lua new file mode 100644 index 000000000..ac962d98a --- /dev/null +++ b/xmake/actions/build/builtin/prepare_static.lua @@ -0,0 +1,25 @@ +--!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_static.lua +-- + +-- imports +import("core.base.option") + +function main(jobgraph, target) +end diff --git a/xmake/actions/build/deprecated/.DS_Store b/xmake/actions/build/deprecated/.DS_Store Binary files differdeleted file mode 100644 index a8ae5f9d6..000000000 --- a/xmake/actions/build/deprecated/.DS_Store +++ /dev/null diff --git a/xmake/actions/build/target_utils.lua b/xmake/actions/build/target_utils.lua index 0c1c64abf..28b5872e4 100644 --- a/xmake/actions/build/target_utils.lua +++ b/xmake/actions/build/target_utils.lua @@ -38,8 +38,7 @@ end -- add jobs for the builtin script function _add_jobs_for_builtin_script(jobgraph, target, job_kind) if target:is_static() or target:is_binary() or target:is_shared() or target:is_object() or target:is_moduleonly() then - -- TODO - local script = import("deprecated.kinds." .. target:kind(), {anonymous = true})[job_kind] + local script = import("builtin." .. job_kind .. "_" .. target:kind(), {anonymous = true}) if script then script(jobgraph, target) end |
