From 6dc2e03e738d3bd302cb7b33f47a7f2ce770f8f6 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 15 May 2020 00:20:43 +0800 Subject: fix deps --- core/src/xmake/os/mtime.c | 2 -- xmake/modules/core/project/depend.lua | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/xmake/os/mtime.c b/core/src/xmake/os/mtime.c index 1d79c9c74..24ac9e4d8 100644 --- a/core/src/xmake/os/mtime.c +++ b/core/src/xmake/os/mtime.c @@ -47,7 +47,5 @@ tb_int_t xm_os_mtime(lua_State* lua) if (tb_file_info(path, &info)) lua_pushinteger(lua, (lua_Integer)info.mtime); else lua_pushinteger(lua, 0); - - // ok return 1; } diff --git a/xmake/modules/core/project/depend.lua b/xmake/modules/core/project/depend.lua index 84a8b99d9..8863e2f2e 100644 --- a/xmake/modules/core/project/depend.lua +++ b/xmake/modules/core/project/depend.lua @@ -104,8 +104,8 @@ function is_changed(dependinfo, opt) local mtime = files_mtime[file] or os.mtime(file) files_mtime[file] = mtime - -- source and header files have been changed? - if mtime == nil or mtime > lastmtime then + -- source and header files have been changed or not exists? + if mtime == 0 or mtime > lastmtime then return true end end -- cgit v1.3.1