diff options
| author | ruki <[email protected]> | 2015-07-02 16:16:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-07-02 16:16:26 +0800 |
| commit | 068999656addf230aac038b5c1de0e3db976dbf1 (patch) | |
| tree | 1b7ca44e2b1be7e263d8ba07115b791e6b55d0f6 /xmake/scripts/tools/make.lua | |
| parent | c14febe1bf4e0386d3590989bc610efa64d7f13c (diff) | |
fix cannot get error log when make with -j4
Diffstat (limited to 'xmake/scripts/tools/make.lua')
| -rw-r--r-- | xmake/scripts/tools/make.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/scripts/tools/make.lua b/xmake/scripts/tools/make.lua index e28019b5b..4e7cb692a 100644 --- a/xmake/scripts/tools/make.lua +++ b/xmake/scripts/tools/make.lua @@ -52,7 +52,16 @@ function make.main(self, mkfile, target) -- done local ok = os.execute(cmd) if ok ~= 0 then - return false + + -- attempt to execute it again for getting the error logs without -j4 + if mkfile and os.isfile(mkfile) then + cmd = string.format("%s -f %s %s VERBOSE=%s", self.name, mkfile, target or "", self._VERBOSE) + else + cmd = string.format("%s %s VERBOSE=%s", self.name, target or "", self._VERBOSE) + end + + -- done + return os.execute(cmd) == 0 end -- ok |
