summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-09 23:25:38 +0800
committerruki <[email protected]>2022-03-09 23:25:38 +0800
commitfa2e4a9a5f21a8819beafb99a85652d83b7e5429 (patch)
tree8ae328914c4dd54012e0cf6cc013547acaa4caeb /xmake/modules/core/tools
parent4eb65435961776fbefcc11ed774b778532c2c8dd (diff)
improve path.directory
Diffstat (limited to 'xmake/modules/core/tools')
-rw-r--r--xmake/modules/core/tools/cl.lua3
-rw-r--r--xmake/modules/core/tools/clang_cl.lua3
-rw-r--r--xmake/modules/core/tools/gcc.lua3
3 files changed, 3 insertions, 6 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index b499542e3..2526536c4 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -409,8 +409,7 @@ end
function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- ensure the object directory
- -- @note this path here has been normalized, we can quickly find it by the unique path separator prompt
- local objectdir = path.directory(objectfile, path.sep())
+ local objectdir = path.directory(objectfile)
if not os.isdir(objectdir) then
os.mkdir(objectdir)
end
diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua
index 9c4236343..1602b0ac8 100644
--- a/xmake/modules/core/tools/clang_cl.lua
+++ b/xmake/modules/core/tools/clang_cl.lua
@@ -166,8 +166,7 @@ end
function compile(self, sourcefile, objectfile, dependinfo, flags)
-- ensure the object directory
- -- @note this path here has been normalized, we can quickly find it by the unique path separator prompt
- os.mkdir(path.directory(objectfile, path.sep()))
+ os.mkdir(path.directory(objectfile))
-- compile it
local outdata = try
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index a1dc82c9d..0d729692a 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -427,8 +427,7 @@ end
function compile(self, sourcefile, objectfile, dependinfo, flags)
-- ensure the object directory
- -- @note this path here has been normalized, we can quickly find it by the unique path separator prompt
- os.mkdir(path.directory(objectfile, path.sep()))
+ os.mkdir(path.directory(objectfile))
-- compile it
local depfile = dependinfo and os.tmpfile() or nil