diff options
| author | ruki <[email protected]> | 2015-12-06 00:38:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-12-06 00:38:11 +0800 |
| commit | b7a0ed4cd24fbd421715dad7376ae691871ca126 (patch) | |
| tree | ade15aaefe06cdfad6ee4fb81289c0b0e21f278d /xmake/scripts/base/makefile.lua | |
| parent | 55baf72274c1aeefceb125f49a4da77e1d49bf40 (diff) | |
auto configure if makefile not exists
Diffstat (limited to 'xmake/scripts/base/makefile.lua')
| -rw-r--r-- | xmake/scripts/base/makefile.lua | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/xmake/scripts/base/makefile.lua b/xmake/scripts/base/makefile.lua index 9dbf1ae35..b35ac8412 100644 --- a/xmake/scripts/base/makefile.lua +++ b/xmake/scripts/base/makefile.lua @@ -98,7 +98,8 @@ function makefile._make_object_for_static(file, target, srcfile, objfile) else mode = "" end -- make command - local cmd = string.format("xmake l -P %s -f %s dispatcher ex extract %s %s > %s 2>&1", xmake._PROJECT_DIR, xmake._PROJECT_FILE, srcfile:encode(), objfile:encode(), makefile._LOGFILE) +-- local cmd = string.format("xmake l -P %s -f %s dispatcher ex extract %s %s > %s 2>&1", xmake._PROJECT_DIR, xmake._PROJECT_FILE, srcfile:encode(), objfile:encode(), makefile._LOGFILE) + local cmd = string.format("xmake l -P %s -f %s dispatcher ex extract %s %s", xmake._PROJECT_DIR, xmake._PROJECT_FILE, srcfile:encode(), objfile:encode()) -- make head file:write(string.format("%s:", objfile)) @@ -343,17 +344,6 @@ function makefile._make_targets(file) return true end --- get the makefile path -function makefile.path() - - -- get the build directory - local buildir = config.get("buildir") - assert(buildir) - - -- get it - return path.translate(buildir .. "/makefile") -end - -- make makefile in the build directory function makefile.make() @@ -372,7 +362,7 @@ function makefile.make() assert(logfile) -- open the makefile - local path = makefile.path() + local path = rule.makefile() local file = io.openmk(path) if not file then -- error @@ -409,10 +399,6 @@ function makefile.build(target) -- check assert(target and type(target) == "string") - -- get the build directory - local buildir = config.get("buildir") - assert(buildir) - -- load make local make = tools.get("make") if not make then @@ -421,7 +407,7 @@ function makefile.build(target) end -- done make - return make:main(buildir .. "/makefile", target) + return make:main(rule.makefile(), target) end -- return module: makefile |
