summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-15 00:20:43 +0800
committerruki <[email protected]>2020-05-14 20:04:19 +0800
commit6dc2e03e738d3bd302cb7b33f47a7f2ce770f8f6 (patch)
treed1d505c925d66901d3c12520e6fd2792c942fc67
parent82fe3d23b2ee9199a540326d8382fea212b23cfa (diff)
fix deps
-rw-r--r--core/src/xmake/os/mtime.c2
-rw-r--r--xmake/modules/core/project/depend.lua4
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