From 2e9294e6d97a468091dace7f3f82f6c9d91e2c8f Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 12 Jan 2025 23:13:19 +0800 Subject: use absolute path for xrepo/includes --- xmake/modules/private/xrepo/action/download.lua | 4 +++- xmake/modules/private/xrepo/action/export.lua | 4 +++- xmake/modules/private/xrepo/action/fetch.lua | 4 +++- xmake/modules/private/xrepo/action/install.lua | 4 +++- xmake/modules/private/xrepo/action/remove.lua | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/xmake/modules/private/xrepo/action/download.lua b/xmake/modules/private/xrepo/action/download.lua index db68e50b0..189d6aa8c 100644 --- a/xmake/modules/private/xrepo/action/download.lua +++ b/xmake/modules/private/xrepo/action/download.lua @@ -98,7 +98,9 @@ function _download_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory diff --git a/xmake/modules/private/xrepo/action/export.lua b/xmake/modules/private/xrepo/action/export.lua index 1b6e2e885..af2b3562c 100644 --- a/xmake/modules/private/xrepo/action/export.lua +++ b/xmake/modules/private/xrepo/action/export.lua @@ -92,7 +92,9 @@ function _export_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory diff --git a/xmake/modules/private/xrepo/action/fetch.lua b/xmake/modules/private/xrepo/action/fetch.lua index eb5abfeba..0cf83ae09 100644 --- a/xmake/modules/private/xrepo/action/fetch.lua +++ b/xmake/modules/private/xrepo/action/fetch.lua @@ -103,7 +103,9 @@ function _fetch_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua index 873c52cc0..954fa9f94 100644 --- a/xmake/modules/private/xrepo/action/install.lua +++ b/xmake/modules/private/xrepo/action/install.lua @@ -132,7 +132,9 @@ function _install_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory diff --git a/xmake/modules/private/xrepo/action/remove.lua b/xmake/modules/private/xrepo/action/remove.lua index 2744da943..21ee8b826 100644 --- a/xmake/modules/private/xrepo/action/remove.lua +++ b/xmake/modules/private/xrepo/action/remove.lua @@ -95,7 +95,9 @@ function _remove_packages(packages) local rcfiles = {} local includes = option.get("includes") if includes then - table.join2(rcfiles, path.splitenv(includes)) + for _, includefile in ipairs(path.splitenv(includes)) do + table.insert(rcfiles, path.absolute(includefile)) + end end -- enter working project directory -- cgit v1.3.1