From ef4fe60273da742248fe9111e9141df51185c204 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 11 Jun 2015 15:08:30 +0800 Subject: open new file and create directory --- xmake/scripts/base/compiler.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xmake/scripts/base/compiler.lua') 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 -- cgit v1.3.1