summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-26 11:35:29 +0800
committerruki <[email protected]>2015-06-26 11:35:29 +0800
commit37247cc86d31c6134deca9819f9ffe8cfe253797 (patch)
tree7787052bb60bfa86bab771513ef7015d9b7c8660 /xmake/scripts/base/package.lua
parentcd530f704a361fecba459bc8e3dc27cb1c6522c8 (diff)
set package script to project
Diffstat (limited to 'xmake/scripts/base/package.lua')
-rw-r--r--xmake/scripts/base/package.lua30
1 files changed, 27 insertions, 3 deletions
diff --git a/xmake/scripts/base/package.lua b/xmake/scripts/base/package.lua
index d07f6590a..d2018573d 100644
--- a/xmake/scripts/base/package.lua
+++ b/xmake/scripts/base/package.lua
@@ -27,6 +27,21 @@ local package = package or {}
local os = require("base/os")
local path = require("base/path")
local utils = require("base/utils")
+local config = require("base/config")
+local platform = require("platform/platform")
+
+-- package info from the given info configure
+function package._done_target(name, info)
+
+ -- check
+ assert(name and info)
+
+ -- dump
+ utils.dump(info)
+
+ -- ok
+ return true
+end
-- done package from the configure
function package.done(configs)
@@ -34,9 +49,18 @@ function package.done(configs)
-- check
assert(configs)
- -- dump
- utils.dump(configs)
-
+ -- package targets
+ for name, info in pairs(configs) do
+
+ -- package it
+ if not package._done_target(name, info) then
+ -- errors
+ utils.error("package %s failed!", name)
+ return false
+ end
+
+ end
+
-- ok
return true
end