summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-07-12 08:13:32 +0800
committerruki <[email protected]>2016-07-12 08:13:32 +0800
commit45e1839ea78bdff05460bdfb8d619325419274d6 (patch)
tree65d8d374f28072416d2d9ac2b0c937be41f5a833
parent1bf44cd0d190fe0b388b92ca12515cecfa5f9715 (diff)
fix config.h alway be modified when building
-rwxr-xr-xxmake/actions/build/kinds/object.lua22
-rwxr-xr-xxmake/actions/config/main.lua4
2 files changed, 8 insertions, 18 deletions
diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua
index 85163ece8..5cfaf7cf5 100755
--- a/xmake/actions/build/kinds/object.lua
+++ b/xmake/actions/build/kinds/object.lua
@@ -91,12 +91,6 @@ function _build(target, g, index)
end
table.insert(depfiles, sourcefile)
- -- the config header
- local configheader = target:get("config_h")
- if configheader then
- configheader = path.translate(configheader)
- end
-
-- check the dependent files are modified?
local modified = false
local objectmtime = nil
@@ -113,18 +107,12 @@ function _build(target, g, index)
-- source and header files have been modified?
if os.mtime(depfile) > objectmtime then
- -- ignore the config header, because it always changed with build version.
- -- and other config content will not be changed when building each time(without reconfig or rebuild)
- --
- if depfile ~= configheader then
-
- -- modified
- modified = true
+ -- modified
+ modified = true
- -- mark this depfile as modified
- _g.depfile_results[depfile] = true
- break
- end
+ -- mark this depfile as modified
+ _g.depfile_results[depfile] = true
+ break
end
-- mark this depfile as not modified
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua
index 8b46f58a1..123af865c 100755
--- a/xmake/actions/config/main.lua
+++ b/xmake/actions/config/main.lua
@@ -234,7 +234,9 @@ function main()
cache.flush()
-- make the config.h
- configheader.make()
+ if recheck then
+ configheader.make()
+ end
-- dump it
config.dump()