diff options
| author | ruki <[email protected]> | 2015-05-18 12:45:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-05-18 12:45:41 +0800 |
| commit | 3f53e1ea0f6c9deff5295e689df141feba9cce4c (patch) | |
| tree | e8f461081849fa77b31a3b29e57e846de8cd5e8f /xmake/scripts/base/utils.lua | |
| parent | 4e9518e18e817551772545092b186e8f570b4a0f (diff) | |
make target and dependence for makefile
Diffstat (limited to 'xmake/scripts/base/utils.lua')
| -rw-r--r-- | xmake/scripts/base/utils.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xmake/scripts/base/utils.lua b/xmake/scripts/base/utils.lua index 8def2a7e6..61998339e 100644 --- a/xmake/scripts/base/utils.lua +++ b/xmake/scripts/base/utils.lua @@ -134,5 +134,17 @@ function utils.dump(object, exclude) return object end +-- wrap object to table +function utils.wrap(object) + + -- check + assert(object) + + -- wrap it if not table + if type(object) ~= "table" then + return {object} + end +end + -- return module: utils return utils |
