From ebd3cf08de2fea05bbf32d095f5a5c5a3c38a4f1 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 10 Jul 2015 15:00:20 +0800 Subject: add install interfaces --- xmake/scripts/base/package.lua | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'xmake/scripts/base/package.lua') diff --git a/xmake/scripts/base/package.lua b/xmake/scripts/base/package.lua index 412f3b8c4..32f1ef759 100644 --- a/xmake/scripts/base/package.lua +++ b/xmake/scripts/base/package.lua @@ -25,6 +25,7 @@ local package = package or {} -- load modules local os = require("base/os") +local io = require("base/io") local rule = require("base/rule") local path = require("base/path") local utils = require("base/utils") @@ -251,6 +252,13 @@ function package._done_from_platform(target) return 0 end +-- get the configure file +function package._file() + + -- get it + return config.directory() .. "/package.conf" +end + -- package target from the given target configure function package._done(target) @@ -291,8 +299,15 @@ function package.done(configs) end - -- ok - return true + -- save to the configure file + return io.save(package._file(), configs) +end + +-- load the package configure +function package.load() + + -- load it + return io.load(package._file()) end -- return module: package -- cgit v1.3.1