diff options
| author | ruki <[email protected]> | 2020-12-26 20:20:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-26 20:20:12 +0800 |
| commit | 719959138fd47ab9a5654b4e5089d3d43777422a (patch) | |
| tree | 700b3200c64ef9393d4557cb31ffd9779bf7bd7e | |
| parent | eda32624658ffb006d02b934dfb1e70e298a1ee6 (diff) | |
improve dump config
| -rw-r--r-- | xmake/actions/build/main.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/config/main.lua | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/xmake/actions/build/main.lua b/xmake/actions/build/main.lua index ae405fe02..253f4a45d 100644 --- a/xmake/actions/build/main.lua +++ b/xmake/actions/build/main.lua @@ -97,7 +97,7 @@ function main() local targetname = option.get("target") -- config it first - task.run("config", {target = targetname, verbose = false}) + task.run("config", {target = targetname}, {disable_dump = true}) -- enter project directory local oldir = os.cd(project.directory()) diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index 9e7110c7f..45aa42301 100644 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -164,9 +164,10 @@ function _check_target_toolchains() end -- main entry -function main() +function main(opt) -- avoid to run this task repeatly + opt = opt or {} if _g.configured then return end _g.configured = true @@ -185,7 +186,7 @@ function main() -- check the working directory if not option.get("project") and not option.get("file") and os.isdir(os.projectdir()) then if path.translate(os.projectdir()) ~= path.translate(os.workingdir()) then - utils.warning([[You are working in the project directory(%s) and you can also + wprint([[You are working in the project directory(%s) and you can also force to build in current directory via run `xmake -P .`]], os.projectdir()) end end @@ -321,7 +322,7 @@ force to build in current directory via run `xmake -P .`]], os.projectdir()) end -- dump config - if option.get("verbose") then + if option.get("verbose") and not opt.disable_dump then config.dump() end |
