summaryrefslogtreecommitdiff
path: root/xmake/scripts/tools/ar.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-11 16:58:01 +0800
committerruki <[email protected]>2015-06-11 16:58:01 +0800
commit882430fde4f0066e9adbbb664b98612fa4cf3bc1 (patch)
treef5eeeb2961d22bfd68a80d95404e07396791336e /xmake/scripts/tools/ar.lua
parent76fd1ccaf43262df8fae3d9d3bfba1c2f0e04ca5 (diff)
add self for tools
Diffstat (limited to 'xmake/scripts/tools/ar.lua')
-rw-r--r--xmake/scripts/tools/ar.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/xmake/scripts/tools/ar.lua b/xmake/scripts/tools/ar.lua
index 4b1c20f21..b2e2618eb 100644
--- a/xmake/scripts/tools/ar.lua
+++ b/xmake/scripts/tools/ar.lua
@@ -29,25 +29,25 @@ local string = require("base/string")
local config = require("base/config")
-- init the linker
-function ar.init(name)
+function ar.init(self, name)
-- save name
- ar.name = name or "ar"
+ self._NAME = name or "ar"
-- init arflags
- ar.arflags = { "-crs" }
+ self.arflags = { "-crs" }
end
-- make the link command
-function ar.command_link(objfiles, targetfile, flags)
+function ar.command_link(self, objfiles, targetfile, flags)
-- make it
- return string.format("%s %s %s %s", ar.name, flags, targetfile, objfiles)
+ return string.format("%s %s %s %s", self._NAME, flags, targetfile, objfiles)
end
-- the main function
-function ar.main(cmd)
+function ar.main(self, cmd)
-- execute it
local ok = os.execute(cmd)