diff options
| author | ruki <[email protected]> | 2020-09-18 22:36:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-09-18 22:36:07 +0800 |
| commit | c24f886427d8e8e28d558366946d512a7e92b428 (patch) | |
| tree | 22ea7bc684331f6e8aad4d35e599f33ed52d17ff | |
| parent | 97fdf4e120b14782e0f99d3e49634fc2432e039d (diff) | |
improve checking tips
29 files changed, 59 insertions, 59 deletions
diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index 36a460313..19dd71fa2 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -132,7 +132,7 @@ function _instance:_do_check() -- trace if baseoption.get("verbose") or baseoption.get("diagnosis") then for _, feature in ipairs(features) do - utils.cprint("${dim}checking for the feature(%s) ... %s", feature, passed and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") + utils.cprint("${dim}checking for feature(%s) ... %s", feature, passed and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") end end end @@ -174,7 +174,7 @@ function _instance:_check() end -- trace - utils.cprint("checking for the %s ... %s", name, self:enabled() and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") + utils.cprint("checking for %s ... %s", name, self:enabled() and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") if not ok then os.raise(errors) end diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua index 85d4d733b..819802a76 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua @@ -286,9 +286,9 @@ function sandbox_lib_detect_find_program.main(name, opt) -- trace if option.get("verbose") or opt.verbose then if result then - utils.cprint("checking for the %s ... ${color.success}%s", name, (name == result and "${text.success}" or result)) + utils.cprint("checking for %s ... ${color.success}%s", name, (name == result and "${text.success}" or result)) else - utils.cprint("checking for the %s ... ${color.nothing}${text.nothing}", name) + utils.cprint("checking for %s ... ${color.nothing}${text.nothing}", name) end end return result diff --git a/xmake/modules/detect/sdks/find_android_sdk.lua b/xmake/modules/detect/sdks/find_android_sdk.lua index b723c1859..3495697b8 100644 --- a/xmake/modules/detect/sdks/find_android_sdk.lua +++ b/xmake/modules/detect/sdks/find_android_sdk.lua @@ -110,14 +110,14 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the Android SDK directory ... ${color.success}%s", sdk.sdkdir) - cprint("checking for the Build Tools Version of Android SDK ... ${color.success}%s", sdk.build_toolver) + cprint("checking for Android SDK directory ... ${color.success}%s", sdk.sdkdir) + cprint("checking for Build Tools Version of Android SDK ... ${color.success}%s", sdk.build_toolver) end else -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the Android SDK directory ... ${color.nothing}${text.nothing}") + cprint("checking for Android SDK directory ... ${color.nothing}${text.nothing}") end end diff --git a/xmake/modules/detect/sdks/find_cuda.lua b/xmake/modules/detect/sdks/find_cuda.lua index f02936860..dc0f7ba88 100644 --- a/xmake/modules/detect/sdks/find_cuda.lua +++ b/xmake/modules/detect/sdks/find_cuda.lua @@ -122,13 +122,13 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the Cuda SDK directory ... ${color.success}%s", cuda.sdkdir) + cprint("checking for Cuda SDK directory ... ${color.success}%s", cuda.sdkdir) end else -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the Cuda SDK directory ... ${color.nothing}${text.nothing}") + cprint("checking for Cuda SDK directory ... ${color.nothing}${text.nothing}") end end diff --git a/xmake/modules/detect/sdks/find_dotnet.lua b/xmake/modules/detect/sdks/find_dotnet.lua index e974259ee..7ef14189b 100644 --- a/xmake/modules/detect/sdks/find_dotnet.lua +++ b/xmake/modules/detect/sdks/find_dotnet.lua @@ -113,14 +113,14 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the .Net SDK directory ... ${color.success}%s", dotnet.sdkdir) - cprint("checking for the .Net SDK version ... ${color.success}%s", dotnet.sdkver) + cprint("checking for .Net SDK directory ... ${color.success}%s", dotnet.sdkdir) + cprint("checking for .Net SDK version ... ${color.success}%s", dotnet.sdkver) end else -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the .Net SDK directory ... ${color.nothing}${text.nothing}") + cprint("checking for .Net SDK directory ... ${color.nothing}${text.nothing}") end end diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua index 9ec58de85..cc0a7eaa7 100644 --- a/xmake/modules/detect/sdks/find_mingw.lua +++ b/xmake/modules/detect/sdks/find_mingw.lua @@ -119,13 +119,13 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the mingw directory ... ${color.success}%s", mingw.sdkdir) + cprint("checking for mingw directory ... ${color.success}%s", mingw.sdkdir) end else -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the mingw directory ... ${color.nothing}${text.nothing}") + cprint("checking for mingw directory ... ${color.nothing}${text.nothing}") end end diff --git a/xmake/modules/detect/sdks/find_ndk.lua b/xmake/modules/detect/sdks/find_ndk.lua index f0ee66676..626191cf8 100644 --- a/xmake/modules/detect/sdks/find_ndk.lua +++ b/xmake/modules/detect/sdks/find_ndk.lua @@ -216,15 +216,15 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the NDK directory ... ${color.success}%s", ndk.sdkdir) - cprint("checking for the SDK version of NDK ... ${color.success}%s", ndk.sdkver) - cprint("checking for the toolchains version of NDK ... ${color.success}%s", ndk.toolchains_ver) + cprint("checking for NDK directory ... ${color.success}%s", ndk.sdkdir) + cprint("checking for SDK version of NDK ... ${color.success}%s", ndk.sdkver) + cprint("checking for toolchains version of NDK ... ${color.success}%s", ndk.toolchains_ver) end else -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the NDK directory ... ${color.nothing}${text.nothing}") + cprint("checking for NDK directory ... ${color.nothing}${text.nothing}") end end diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua index 1872a9df0..d959de9ef 100644 --- a/xmake/modules/detect/sdks/find_qt.lua +++ b/xmake/modules/detect/sdks/find_qt.lua @@ -207,18 +207,18 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the Qt SDK directory ... ${color.success}%s", qt.sdkdir) + cprint("checking for Qt SDK directory ... ${color.success}%s", qt.sdkdir) if qt.sdkver then - cprint("checking for the Qt SDK version ... ${color.success}%s", qt.sdkver) + cprint("checking for Qt SDK version ... ${color.success}%s", qt.sdkver) else - cprint("checking for the Qt SDK version ... ${color.nothing}${text.nothing}") + cprint("checking for Qt SDK version ... ${color.nothing}${text.nothing}") end end else -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the Qt SDK directory ... ${color.nothing}${text.nothing}") + cprint("checking for Qt SDK directory ... ${color.nothing}${text.nothing}") end end diff --git a/xmake/modules/detect/sdks/find_vcpkgdir.lua b/xmake/modules/detect/sdks/find_vcpkgdir.lua index 0c2f50d45..ce03cdd8e 100644 --- a/xmake/modules/detect/sdks/find_vcpkgdir.lua +++ b/xmake/modules/detect/sdks/find_vcpkgdir.lua @@ -87,13 +87,13 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the vcpkg directory ... ${color.success}%s", vcpkg) + cprint("checking for vcpkg directory ... ${color.success}%s", vcpkg) end else -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the vcpkg directory ... ${color.nothing}${text.nothing}") + cprint("checking for vcpkg directory ... ${color.nothing}${text.nothing}") end end diff --git a/xmake/modules/detect/sdks/find_wdk.lua b/xmake/modules/detect/sdks/find_wdk.lua index 16796d301..cc6819c04 100644 --- a/xmake/modules/detect/sdks/find_wdk.lua +++ b/xmake/modules/detect/sdks/find_wdk.lua @@ -176,14 +176,14 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the WDK directory ... ${color.success}%s", wdk.sdkdir) - cprint("checking for the WDK version ... ${color.success}%s", wdk.sdkver) + cprint("checking for WDK directory ... ${color.success}%s", wdk.sdkdir) + cprint("checking for WDK version ... ${color.success}%s", wdk.sdkver) end else -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the WDK directory ... ${color.nothing}${text.nothing}") + cprint("checking for WDK directory ... ${color.nothing}${text.nothing}") end end diff --git a/xmake/modules/detect/sdks/find_xcode.lua b/xmake/modules/detect/sdks/find_xcode.lua index a1ab709df..5a2f4109a 100644 --- a/xmake/modules/detect/sdks/find_xcode.lua +++ b/xmake/modules/detect/sdks/find_xcode.lua @@ -165,18 +165,18 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the Xcode directory ... ${color.success}%s", xcode.sdkdir) - cprint("checking for the SDK version of Xcode ... ${color.success}%s", xcode.sdkver) + cprint("checking for Xcode directory ... ${color.success}%s", xcode.sdkdir) + cprint("checking for SDK version of Xcode ... ${color.success}%s", xcode.sdkver) if xcode.codesign_identity then - cprint("checking for the Codesign Identity of Xcode ... ${color.success}%s", xcode.codesign_identity) + cprint("checking for Codesign Identity of Xcode ... ${color.success}%s", xcode.codesign_identity) else - cprint("checking for the Codesign Identity of Xcode ... ${color.nothing}${text.nothing}") + cprint("checking for Codesign Identity of Xcode ... ${color.nothing}${text.nothing}") end if plat == "iphoneos" then if xcode.mobile_provision then - cprint("checking for the Mobile Provision of Xcode ... ${color.success}%s", xcode.mobile_provision) + cprint("checking for Mobile Provision of Xcode ... ${color.success}%s", xcode.mobile_provision) else - cprint("checking for the Mobile Provision of Xcode ... ${color.nothing}${text.nothing}") + cprint("checking for Mobile Provision of Xcode ... ${color.nothing}${text.nothing}") end end end @@ -184,7 +184,7 @@ function main(sdkdir, opt) -- trace if opt.verbose or option.get("verbose") then - cprint("checking for the Xcode directory ... ${color.nothing}${text.nothing}") + cprint("checking for Xcode directory ... ${color.nothing}${text.nothing}") end end diff --git a/xmake/modules/lib/detect/check_cxsnippets.lua b/xmake/modules/lib/detect/check_cxsnippets.lua index 4a55ba32a..deab5a0e5 100644 --- a/xmake/modules/lib/detect/check_cxsnippets.lua +++ b/xmake/modules/lib/detect/check_cxsnippets.lua @@ -215,23 +215,23 @@ function main(snippets, opt) if opt.verbose or option.get("verbose") or option.get("diagnosis") then local kind = opt.sourcekind == "cc" and "c" or "c++" if #includes > 0 then - cprint("${dim}> checking for the %s includes(%s)", kind, table.concat(includes, ", ")) + cprint("${dim}> checking for %s includes(%s)", kind, table.concat(includes, ", ")) end if #types > 0 then - cprint("${dim}> checking for the %s types(%s)", kind, table.concat(types, ", ")) + cprint("${dim}> checking for %s types(%s)", kind, table.concat(types, ", ")) end if #funcs > 0 then - cprint("${dim}> checking for the %s funcs(%s)", kind, table.concat(funcs, ", ")) + cprint("${dim}> checking for %s funcs(%s)", kind, table.concat(funcs, ", ")) end if #links > 0 then - cprint("${dim}> checking for the %s links(%s)", kind, table.concat(links, ", ")) + cprint("${dim}> checking for %s links(%s)", kind, table.concat(links, ", ")) end for idx_or_name, snippet in pairs(snippets) do local name = idx_or_name if type(name) == "number" then name = snippet:sub(1, 16) end - cprint("${dim}> checking for the %s snippet(%s)", kind, name) + cprint("${dim}> checking for %s snippet(%s)", kind, name) end end if errors and option.get("diagnosis") and #tostring(errors) > 0 then diff --git a/xmake/modules/lib/detect/has_flags.lua b/xmake/modules/lib/detect/has_flags.lua index 4e4f3535a..f91e6bfbd 100644 --- a/xmake/modules/lib/detect/has_flags.lua +++ b/xmake/modules/lib/detect/has_flags.lua @@ -120,7 +120,7 @@ function main(name, flags, opt) -- trace if option.get("verbose") or option.get("diagnosis") or opt.verbose then - cprintf("${dim}checking for the flags (") + cprintf("${dim}checking for flags (") io.write(opt.flagskey) cprint("${dim}) ... %s", result and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") if option.get("diagnosis") then diff --git a/xmake/platforms/android/xmake.lua b/xmake/platforms/android/xmake.lua index 27bea1645..fa1e26559 100644 --- a/xmake/platforms/android/xmake.lua +++ b/xmake/platforms/android/xmake.lua @@ -48,7 +48,7 @@ platform("android") local arch = config.get("arch") if not arch then config.set("arch", "armeabi-v7a") - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/bsd/xmake.lua b/xmake/platforms/bsd/xmake.lua index ab474b725..6e07c9dcc 100644 --- a/xmake/platforms/bsd/xmake.lua +++ b/xmake/platforms/bsd/xmake.lua @@ -45,7 +45,7 @@ platform("bsd") local arch = config.get("arch") if not arch then config.set("arch", os.arch()) - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/cross/xmake.lua b/xmake/platforms/cross/xmake.lua index c5b12eda5..3457f6cbc 100644 --- a/xmake/platforms/cross/xmake.lua +++ b/xmake/platforms/cross/xmake.lua @@ -39,7 +39,7 @@ platform("cross") local arch = config.get("arch") if not arch then config.set("arch", "none") - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/cygwin/xmake.lua b/xmake/platforms/cygwin/xmake.lua index 76f841a33..1c1801db6 100644 --- a/xmake/platforms/cygwin/xmake.lua +++ b/xmake/platforms/cygwin/xmake.lua @@ -46,7 +46,7 @@ platform("cygwin") local arch = config.get("arch") if not arch then config.set("arch", os.subarch()) - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/iphoneos/xmake.lua b/xmake/platforms/iphoneos/xmake.lua index 7118846b7..77bf91c88 100644 --- a/xmake/platforms/iphoneos/xmake.lua +++ b/xmake/platforms/iphoneos/xmake.lua @@ -42,7 +42,7 @@ platform("iphoneos") local arch = config.get("arch") if not arch then config.set("arch", "arm64") - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/linux/xmake.lua b/xmake/platforms/linux/xmake.lua index ba45997bf..fa601e846 100644 --- a/xmake/platforms/linux/xmake.lua +++ b/xmake/platforms/linux/xmake.lua @@ -45,7 +45,7 @@ platform("linux") local arch = config.get("arch") if not arch then config.set("arch", os.arch()) - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/macosx/xmake.lua b/xmake/platforms/macosx/xmake.lua index abd7792cf..4d61a720d 100644 --- a/xmake/platforms/macosx/xmake.lua +++ b/xmake/platforms/macosx/xmake.lua @@ -45,7 +45,7 @@ platform("macosx") local arch = config.get("arch") if not arch then config.set("arch", os.arch()) - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/mingw/xmake.lua b/xmake/platforms/mingw/xmake.lua index 46ac8b83a..2cc76dc6f 100644 --- a/xmake/platforms/mingw/xmake.lua +++ b/xmake/platforms/mingw/xmake.lua @@ -43,7 +43,7 @@ platform("mingw") local arch = config.get("arch") if not arch then config.set("arch", "x86_64") - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/msys/xmake.lua b/xmake/platforms/msys/xmake.lua index 3c03cc850..734fa18a1 100644 --- a/xmake/platforms/msys/xmake.lua +++ b/xmake/platforms/msys/xmake.lua @@ -46,7 +46,7 @@ platform("msys") local arch = config.get("arch") if not arch then config.set("arch", os.subarch()) - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/watchos/xmake.lua b/xmake/platforms/watchos/xmake.lua index b6d864d0b..d04d29020 100644 --- a/xmake/platforms/watchos/xmake.lua +++ b/xmake/platforms/watchos/xmake.lua @@ -42,7 +42,7 @@ platform("watchos") local arch = config.get("arch") if not arch then config.set("arch", "armv7k") - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/platforms/windows/xmake.lua b/xmake/platforms/windows/xmake.lua index 3f1e83702..41d324070 100644 --- a/xmake/platforms/windows/xmake.lua +++ b/xmake/platforms/windows/xmake.lua @@ -43,7 +43,7 @@ platform("windows") local arch = config.get("arch") if not arch then config.set("arch", os.arch()) - cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index 01a38e670..c0de5afb8 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x.lua @@ -220,7 +220,7 @@ function make(outputdir, vsinfo) for arch_idx, arch in ipairs(vsinfo.archs) do -- trace - print("checking for the %s.%s ...", mode, arch) + print("checking for %s.%s ...", mode, arch) -- reload config, project and platform if mode ~= config.mode() or arch ~= config.arch() then diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index 78aa483db..2edf2f8df 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -281,7 +281,7 @@ function main(outputdir, vsinfo) vsinfo._sub2[mode][arch] = { mode = mode, arch = arch } -- trace - print("checking for the %s.%s ...", mode, arch) + print("checking for %s.%s ...", mode, arch) -- reload config, project and platform -- modify config diff --git a/xmake/rules/lex_yacc/lex/xmake.lua b/xmake/rules/lex_yacc/lex/xmake.lua index 24c1242c8..c2dca5ed4 100644 --- a/xmake/rules/lex_yacc/lex/xmake.lua +++ b/xmake/rules/lex_yacc/lex/xmake.lua @@ -33,9 +33,9 @@ rule("lex") lex = find_tool("flex") or find_tool("lex") if lex and lex.program then config.set("__lex", lex.program) - cprint("checking for the Lex ... ${color.success}%s", lex.program) + cprint("checking for Lex ... ${color.success}%s", lex.program) else - cprint("checking for the Lex ... ${color.nothing}${text.nothing}") + cprint("checking for Lex ... ${color.nothing}${text.nothing}") raise("lex/flex not found!") end end diff --git a/xmake/rules/lex_yacc/yacc/xmake.lua b/xmake/rules/lex_yacc/yacc/xmake.lua index 6cdc731a4..035fcb2a6 100644 --- a/xmake/rules/lex_yacc/yacc/xmake.lua +++ b/xmake/rules/lex_yacc/yacc/xmake.lua @@ -33,9 +33,9 @@ rule("yacc") yacc = find_tool("bison") or find_tool("yacc") if yacc and yacc.program then config.set("__yacc", yacc.program) - cprint("checking for the Yacc ... ${color.success}%s", yacc.program) + cprint("checking for Yacc ... ${color.success}%s", yacc.program) else - cprint("checking for the Yacc ... ${color.nothing}${text.nothing}") + cprint("checking for Yacc ... ${color.nothing}${text.nothing}") raise("yacc/bison not found!") end end diff --git a/xmake/toolchains/msvc/check.lua b/xmake/toolchains/msvc/check.lua index 6c3b82555..aecd0e51a 100644 --- a/xmake/toolchains/msvc/check.lua +++ b/xmake/toolchains/msvc/check.lua @@ -77,9 +77,9 @@ function _check_vstudio(toolchain) local vs = _check_vsenv(toolchain) if vs then config.set("vs", vs, {readonly = true, force = true}) - cprint("checking for the Microsoft Visual Studio (%s) version ... ${color.success}%s", toolchain:arch(), vs) + cprint("checking for Microsoft Visual Studio (%s) version ... ${color.success}%s", toolchain:arch(), vs) else - cprint("checking for the Microsoft Visual Studio (%s) version ... ${color.nothing}${text.nothing}", toolchain:arch()) + cprint("checking for Microsoft Visual Studio (%s) version ... ${color.nothing}${text.nothing}", toolchain:arch()) if not (opt and opt.try) then print("please run:") print(" - xmake config --vs=xxx [--vs_toolset=xxx]") |
