diff options
| author | ruki <[email protected]> | 2018-05-07 22:56:19 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-05-07 11:37:59 +0800 |
| commit | 5a1eebb5b49e7476ceb773d9b846c0c61c9f99c8 (patch) | |
| tree | 046f416c958444761a50ee73c81c7f551f8e759e | |
| parent | e257d701fc71e8d75b31485cfa6b71967f180a43 (diff) | |
rename target depfile to dependfile
| -rw-r--r-- | xmake/actions/build/kinds/binary.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/shared.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/static.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/clean/main.lua | 2 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 12 |
5 files changed, 11 insertions, 9 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua index b148290fe..9967d3070 100644 --- a/xmake/actions/build/kinds/binary.lua +++ b/xmake/actions/build/kinds/binary.lua @@ -93,7 +93,7 @@ function _build_from_objects(target, buildinfo) local linkflags = linker_instance:linkflags({target = target}) -- this target and it's deps are not modified? - local depfile = target:depfile() + local depfile = target:dependfile() local modified = _is_modified(target, depfile, buildinfo, program, linkflags) if not modified then return diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua index 0c6a1023a..0ec1ac3a5 100644 --- a/xmake/actions/build/kinds/shared.lua +++ b/xmake/actions/build/kinds/shared.lua @@ -93,7 +93,7 @@ function _build_from_objects(target, buildinfo) local linkflags = linker_instance:linkflags({target = target}) -- this target and it's deps are not modified? - local depfile = target:depfile() + local depfile = target:dependfile() local modified = _is_modified(target, depfile, buildinfo, program, linkflags) if not modified then return diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua index 4aa4f10c3..f2251a81d 100644 --- a/xmake/actions/build/kinds/static.lua +++ b/xmake/actions/build/kinds/static.lua @@ -93,7 +93,7 @@ function _build_from_objects(target, buildinfo) local linkflags = linker_instance:linkflags({target = target}) -- this target and it's deps are not modified? - local depfile = target:depfile() + local depfile = target:dependfile() local modified = _is_modified(target, depfile, buildinfo, program, linkflags) if not modified then return diff --git a/xmake/actions/clean/main.lua b/xmake/actions/clean/main.lua index dd785aa15..0f9517666 100644 --- a/xmake/actions/clean/main.lua +++ b/xmake/actions/clean/main.lua @@ -75,7 +75,7 @@ function _on_clean_target(target) _remove(target:targetfile() .. ".arg") -- remove the target dependent file if exists - _remove(target:depfile()) + _remove(target:dependfile()) -- remove the symbol file _remove(target:symbolfile()) diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index c2dd7e24f..449f90eb4 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -459,11 +459,6 @@ function target:dependir() return dependir end --- get the target dependent file -function target:depfile() - return path.join(self:dependir(), self:name() .. ".d") -end - -- get the target kind function target:targetkind() return self:get("kind") @@ -841,6 +836,13 @@ end -- get depend file from object file function target:dependfile(objectfile) + + -- get target dependent file? + if not objectfile then + return path.join(self:dependir(), self:name() .. ".d") + end + + -- get object depend file local depentfile = path.join(self:dependir(), path.relative(objectfile, self:objectdir())) return path.join(path.directory(depentfile), path.basename(depentfile) .. ".d") end |
