summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-05-11 00:42:14 +0800
committerruki <[email protected]>2019-05-10 22:13:29 +0800
commitffa81cffcd6788d70b05a96cd5cc9ab2bbc52ce5 (patch)
treef3aed645a033b2b6d7c4737d776eb6e6cfd5d7fe /xmake/core/package/package.lua
parent788106769627016f41c510e23212a54039d8bb32 (diff)
improve force and shallow to require package
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 301a4ea94..78b012a71 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -196,6 +196,19 @@ function _instance:deps_add(...)
end
end
+-- get parents
+function _instance:parents()
+ return self._PARENTS
+end
+
+-- add parents
+function _instance:parents_add(...)
+ for _, parent in ipairs({...}) do
+ self._PARENTS = self._PARENTS or {}
+ self._PARENTS[parent:name()] = parent
+ end
+end
+
-- get hash of the source package for the url_alias@version_str
function _instance:sourcehash(url_alias)