diff options
| author | ruki <[email protected]> | 2019-07-19 00:28:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-07-19 12:54:41 +0800 |
| commit | a9e12dd6f2127cd8a50f2f1691620f44ee83e5bc (patch) | |
| tree | bc2491fb8051b6c35f41095cb54aec21975c5a2a | |
| parent | 660b6f4e66b95ae87b814fdaa538924cfc0f476c (diff) | |
add build_files stub
| -rw-r--r-- | xmake/actions/build/build_files.lua | 40 | ||||
| -rw-r--r-- | xmake/actions/build/main.lua | 8 |
2 files changed, 47 insertions, 1 deletions
diff --git a/xmake/actions/build/build_files.lua b/xmake/actions/build/build_files.lua new file mode 100644 index 000000000..ce7cf519a --- /dev/null +++ b/xmake/actions/build/build_files.lua @@ -0,0 +1,40 @@ +--!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 - 2019, TBOOX Open Source Group. +-- +-- @author ruki +-- @file build_files.lua +-- + +-- imports +import("core.base.option") +import("core.project.config") +import("core.project.project") +import("core.platform.environment") + +-- the main entry +function main(targetname, sourcefiles) + + -- enter toolchains environment + environment.enter("toolchains") + + -- TODO + print("target: %s, files: %s", targetname, sourcefiles) + + -- leave toolchains environment + environment.leave("toolchains") +end + + diff --git a/xmake/actions/build/main.lua b/xmake/actions/build/main.lua index 03acb1e7d..f9446db68 100644 --- a/xmake/actions/build/main.lua +++ b/xmake/actions/build/main.lua @@ -25,6 +25,7 @@ import("core.project.config") import("core.project.project") import("core.platform.platform") import("build") +import("build_files") import("cleaner") import("trybuild") import("statistics") @@ -56,7 +57,12 @@ function main() try { function () - build(targetname) + local sourcefiles = option.get("files") + if sourcefiles then + build_files(targetname, sourcefiles) + else + build(targetname) + end end, catch |
