summaryrefslogtreecommitdiff
path: root/xmake/core/base/interpreter.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-10-13 22:37:18 +0800
committerruki <[email protected]>2023-10-13 22:37:18 +0800
commit4e84c69824df8815b6120c74c165326c224301eb (patch)
tree73568a2c6cfd70e07e078b3463ab6fdebac80ae5 /xmake/core/base/interpreter.lua
parentcab174afcbf6bfbb1f4cfd446406e95d4e3b00fa (diff)
mark includes check_xxx as deprecated
Diffstat (limited to 'xmake/core/base/interpreter.lua')
-rw-r--r--xmake/core/base/interpreter.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua
index 109032e28..8be5a8e4f 100644
--- a/xmake/core/base/interpreter.lua
+++ b/xmake/core/base/interpreter.lua
@@ -1712,10 +1712,14 @@ function interpreter:api_builtin_includes(...)
end
-- attempt to find files from programdir/includes/*.lua (deprecated)
if not found and not path.is_absolute(subpath) then
- local files = os.files(path.join(os.programdir(), "includes", subpath))
- if files and #files > 0 then
- table.join2(subpaths_matched, files)
- found = true
+ -- e.g. includes("check_cflags.lua")
+ if subpath:startswith("check_") then
+ local files = os.files(path.join(os.programdir(), "includes", "check", subpath))
+ if files and #files > 0 then
+ table.join2(subpaths_matched, files)
+ found = true
+ utils.warning("deprecated: please use includes(\"@builtin/check\") instead of includes(\"%s\")", subpath)
+ end
end
end
if not found then