summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xxmake/actions/config/scanner.lua11
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