diff options
| author | ruki <[email protected]> | 2016-04-06 16:24:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-04-06 16:24:16 +0800 |
| commit | 2b9f00c6aeaa50699ed7d99ecc9f00d7048643df (patch) | |
| tree | df45a78fb54ec3282c61a42a1aa5b1e68bbf28e6 | |
| parent | 986109fa37d1c4b13ad970395358cc5ca6bacc08 (diff) | |
auto reconfig if project changed
| -rw-r--r-- | xmake/core/project/config.lua | 1 | ||||
| -rw-r--r-- | xmake/core/project/project.lua | 11 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/platform/platform.lua | 6 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/project/config.lua | 7 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/project/project.lua | 7 |
5 files changed, 25 insertions, 7 deletions
diff --git a/xmake/core/project/config.lua b/xmake/core/project/config.lua index a687d5416..ccafcb0ba 100644 --- a/xmake/core/project/config.lua +++ b/xmake/core/project/config.lua @@ -67,6 +67,7 @@ function config.set(name, value) -- set it configs[name] = value + end -- get all options diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index eaa8a74e1..9bcbec092 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -646,6 +646,17 @@ function project.options(enable_filter) end +-- get the mtimes +function project.mtimes() + + -- get interpreter + local interp = project._interpreter() + assert(interp) + + -- get it + return interp:mtimes() +end + -- get the project menu function project.menu() diff --git a/xmake/core/sandbox/modules/import/core/platform/platform.lua b/xmake/core/sandbox/modules/import/core/platform/platform.lua index f16ee8df2..1498abd79 100644 --- a/xmake/core/sandbox/modules/import/core/platform/platform.lua +++ b/xmake/core/sandbox/modules/import/core/platform/platform.lua @@ -39,6 +39,12 @@ function sandbox_core_platform_platform.load(plat) end end +-- get the current host +function sandbox_core_platform_platform.host() + + -- get it + return xmake._HOST +end -- return module return sandbox_core_platform_platform diff --git a/xmake/core/sandbox/modules/import/core/project/config.lua b/xmake/core/sandbox/modules/import/core/project/config.lua index 0caa2dc2c..2275db69a 100644 --- a/xmake/core/sandbox/modules/import/core/project/config.lua +++ b/xmake/core/sandbox/modules/import/core/project/config.lua @@ -70,13 +70,6 @@ function sandbox_core_project_config.host() return config.get("host") end --- host has been changed? -function sandbox_core_project_config.host_changed() - - -- changed? - return config.get("host") ~= xmake._HOST -end - -- get the configure directory function sandbox_core_project_config.directory() diff --git a/xmake/core/sandbox/modules/import/core/project/project.lua b/xmake/core/sandbox/modules/import/core/project/project.lua index 6805d661a..568d588bc 100644 --- a/xmake/core/sandbox/modules/import/core/project/project.lua +++ b/xmake/core/sandbox/modules/import/core/project/project.lua @@ -80,5 +80,12 @@ function sandbox_core_project_project.directory() return xmake._PROJECT_DIR end +-- get the project mtimes +function sandbox_core_project_project.mtimes() + + -- get it + return project.mtimes() +end + -- return module return sandbox_core_project_project |
