diff options
| author | ruki <[email protected]> | 2017-01-05 16:08:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-01-06 17:20:09 +0800 |
| commit | f52f86d809374facdd26fe714e7f9d0bc79dba41 (patch) | |
| tree | 67f12fa9b9a104d1f3d7dc214a6d4f698a49faa5 /xmake | |
| parent | a91493b253b4bc70c88c6146565ef6557b68f334 (diff) | |
add color trace for scanner
Diffstat (limited to 'xmake')
| -rwxr-xr-x | xmake/actions/config/scanner.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xmake/actions/config/scanner.lua b/xmake/actions/config/scanner.lua index 68d7278da..ea6036f7b 100755 --- a/xmake/actions/config/scanner.lua +++ b/xmake/actions/config/scanner.lua @@ -21,7 +21,6 @@ -- -- imports -import("core.base.option") import("core.project.config") import("core.project.project") import("core.language.language") @@ -29,6 +28,9 @@ import("core.language.language") -- scan project and generate xmake.lua automaticlly if the project codes exist function make() + -- trace + cprint("${yellow}xmake.lua not found, scanning files ..") + -- scan source files for the current directory local sourcefiles = {} for _, sourcekind in ipairs(language.sourcekinds()) do @@ -45,7 +47,7 @@ function make() os.rm(config.directory()) -- error - raise("xmake.lua not found!") + raise("project not found!") end -- generate xmake.lua @@ -61,6 +63,7 @@ function make() file:print("") file:print(" -- add files") for _, sourcefile in ipairs(sourcefiles) do + cprint("${green}[+]: ${clear}%s", sourcefile) file:print(" add_files(\"%s\")", sourcefile) end file:print("") @@ -68,4 +71,8 @@ function make() -- exit file file:close() end + + -- trace + cprint("target: ${magenta}demo") + cprint("${bright}xmake.lua generated, scan ok!${clear}${ok_hand}") end |
