summaryrefslogtreecommitdiff
path: root/xmake/tools/lib.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-06-21 08:41:22 +0800
committerruki <[email protected]>2017-06-21 08:41:22 +0800
commit45a54659f7449ead7ed073f9c0cbbe1da9fcdc06 (patch)
treea09be69c75dce6435d7584ad467aeb51e3c8d37a /xmake/tools/lib.lua
parentace13f7594d5dbddd771cfe0a4004bbcb506b11c (diff)
rename shellname to program
Diffstat (limited to 'xmake/tools/lib.lua')
-rw-r--r--xmake/tools/lib.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/tools/lib.lua b/xmake/tools/lib.lua
index 7b0a851e8..a59f7d713 100644
--- a/xmake/tools/lib.lua
+++ b/xmake/tools/lib.lua
@@ -23,10 +23,10 @@
--
-- init it
-function init(shellname, kind)
+function init(program, kind)
-- save the shell name
- _g.shellname = shellname or "lib.exe"
+ _g.program = program or "lib.exe"
-- save the tool kind
_g.kind = kind
@@ -46,7 +46,7 @@ function extract(libraryfile, objectdir)
os.mkdir(objectdir)
-- list object files
- local objectfiles = os.iorun("%s -nologo -list %s", _g.shellname, libraryfile)
+ local objectfiles = os.iorun("%s -nologo -list %s", _g.program, libraryfile)
-- extrace all object files
for _, objectfile in ipairs(objectfiles:split('\n')) do
@@ -68,7 +68,7 @@ function extract(libraryfile, objectdir)
end
-- extract it
- os.run("%s -nologo -extract:%s -out:%s %s", _g.shellname, objectfile, outputfile, libraryfile)
+ os.run("%s -nologo -extract:%s -out:%s %s", _g.program, objectfile, outputfile, libraryfile)
end
end
end
@@ -85,7 +85,7 @@ function check(flags)
-- check it
os.run("cl -c -Fo%s %s", objfile, srcfile)
os.run("link -lib -out:%s %s", libfile, objfile)
- os.run("%s %s -list %s", _g.shellname, ifelse(flags, flags, ""), libfile)
+ os.run("%s %s -list %s", _g.program, ifelse(flags, flags, ""), libfile)
-- remove files
os.rm(objfile)