diff options
| author | ruki <[email protected]> | 2016-07-10 21:28:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-07-10 21:28:04 +0800 |
| commit | c0a237b461bb03a73f3ba93c1f6b1637f3d613ce (patch) | |
| tree | c39c2b7e7d0445986bb93276135e2d493726c6bc /xmake/plugins/project/makefile.lua | |
| parent | 6f0ee30871bde957f6923bdad95ac1c10a39fda3 (diff) | |
fix the current directory changed when building
Diffstat (limited to 'xmake/plugins/project/makefile.lua')
| -rwxr-xr-x | xmake/plugins/project/makefile.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/plugins/project/makefile.lua b/xmake/plugins/project/makefile.lua index 7620293ae..61300eb4c 100755 --- a/xmake/plugins/project/makefile.lua +++ b/xmake/plugins/project/makefile.lua @@ -25,6 +25,7 @@ import("core.tool.tool") import("core.tool.linker") import("core.tool.archiver") import("core.tool.compiler") +import("core.project.config") import("core.project.project") -- get log makefile @@ -78,8 +79,7 @@ function _make_object(makefile, target, srcfile, objfile) end -- make command - local ccache = tool.shellname("ccache") - local command = compiler.compcmd(srcfile, objfile, target) + local command = compiler.compcmd(srcfile, objfile, target) -- make head makefile:printf("%s:", objfile) @@ -88,7 +88,7 @@ function _make_object(makefile, target, srcfile, objfile) makefile:print(" %s", srcfile) -- make body - makefile:print("\t@echo %scompiling.$(mode) %s", ifelse(ccache, "ccache ", ""), srcfile) + makefile:print("\t@echo %scompiling.$(mode) %s", ifelse(config.get("ccache"), "ccache ", ""), srcfile) makefile:print("\t@xmake l %$(VERBOSE) verbose \"%s\"", command:encode()) makefile:print("\t@xmake l mkdir %s", path.directory(objfile)) makefile:print("\t@%s > %s 2>&1", command, _logfile()) |
