diff options
| author | ruki <[email protected]> | 2015-06-11 15:08:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-11 15:08:30 +0800 |
| commit | ef4fe60273da742248fe9111e9141df51185c204 (patch) | |
| tree | e114a7fabbf363772e4c3247f68b9631c64418aa /xmake/scripts/base/compiler.lua | |
| parent | d81ff2a9fbfefbfd58697f918a879a59e14321c1 (diff) | |
open new file and create directory
Diffstat (limited to 'xmake/scripts/base/compiler.lua')
| -rw-r--r-- | xmake/scripts/base/compiler.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua index f078c598f..23796d403 100644 --- a/xmake/scripts/base/compiler.lua +++ b/xmake/scripts/base/compiler.lua @@ -24,6 +24,7 @@ local compiler = compiler or {} -- load modules +local io = require("base/io") local path = require("base/path") local rule = require("base/rule") local utils = require("base/utils") @@ -328,7 +329,7 @@ function compiler.check_include(opt, include, srcpath, objpath) assert(opt and srcpath and objpath) -- open the checking source file - local srcfile = io.open(srcpath, "w") + local srcfile = io.openmk(srcpath) if not srcfile then return end -- make include @@ -402,7 +403,7 @@ function compiler.check_function(opt, interface, srcpath, objpath) assert(opt and interface) -- open the checking source file - local srcfile = io.open(srcpath, "w") + local srcfile = io.openmk(srcpath) if not srcfile then return end -- get the compiler |
