aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2013-04-29 11:12:39 -0300
committerHisham Muhammad <hisham@gobolinux.org>2013-04-29 11:12:39 -0300
commit72c0c2803a7c72fd7f685df3791f0b835431c807 (patch)
treed451d8b46dc5d719ee07090ed81fc66db448e78e
parentf0772ba0521cc4673e9e4750e9147ef7b54fba1b (diff)
parent109ee2cdc00008d06a72f6e24e56a6e997eeb991 (diff)
downloadluarocks-72c0c2803a7c72fd7f685df3791f0b835431c807.tar.gz
luarocks-72c0c2803a7c72fd7f685df3791f0b835431c807.tar.bz2
luarocks-72c0c2803a7c72fd7f685df3791f0b835431c807.zip
Merge branch 'master' of github.com:keplerproject/luarocks
-rw-r--r--src/luarocks/build/builtin.lua33
-rw-r--r--src/luarocks/fs/win32/tools.lua3
2 files changed, 13 insertions, 23 deletions
diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua
index 3d179b34..9d97d58b 100644
--- a/src/luarocks/build/builtin.lua
+++ b/src/luarocks/build/builtin.lua
@@ -217,8 +217,7 @@ function run(rockspec)
217 end 217 end
218 ok = compile_object(object, source, info.defines, info.incdirs) 218 ok = compile_object(object, source, info.defines, info.incdirs)
219 if not ok then 219 if not ok then
220 err = "Failed compiling object "..object 220 return nil, "Failed compiling object "..object
221 break
222 end 221 end
223 table.insert(objects, object) 222 table.insert(objects, object)
224 end 223 end
@@ -231,30 +230,22 @@ function run(rockspec)
231 built_modules[module_name] = dest 230 built_modules[module_name] = dest
232 ok = compile_library(module_name, objects, info.libraries, info.libdirs, name) 231 ok = compile_library(module_name, objects, info.libraries, info.libdirs, name)
233 if not ok then 232 if not ok then
234 err = "Failed compiling module "..module_name 233 return nil, "Failed compiling module "..module_name
235 break
236 end 234 end
237 end 235 end
238 end 236 end
239 if ok then 237 for name, dest in pairs(built_modules) do
240 for name, dest in pairs(built_modules) do 238 fs.make_dir(dest)
241 fs.make_dir(dest) 239 ok = fs.copy(name, dest)
242 ok = fs.copy(name, dest) 240 if not ok then
243 if not ok then 241 return nil, "Failed installing "..name.." in "..dest
244 err = "Failed installing "..name.." in "..dest
245 break
246 end
247 end 242 end
248 end 243 end
249 if ok then 244 if fs.is_dir("lua") then
250 if fs.is_dir("lua") then 245 ok, err = fs.copy_contents("lua", luadir)
251 ok, err = fs.copy_contents("lua", luadir) 246 if not ok then
252 if not ok then err = "Failed copying contents of 'lua' directory: "..err end 247 return nil, "Failed copying contents of 'lua' directory: "..err
253 end 248 end
254 end 249 end
255 if ok then 250 return true
256 return true
257 else
258 return nil, err
259 end
260end 251end
diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua
index c563b137..033f71be 100644
--- a/src/luarocks/fs/win32/tools.lua
+++ b/src/luarocks/fs/win32/tools.lua
@@ -146,8 +146,7 @@ end
146-- plus an error message. 146-- plus an error message.
147function copy_contents(src, dest) 147function copy_contents(src, dest)
148 assert(src and dest) 148 assert(src and dest)
149 if fs.execute_string(fs.quiet("xcopy "..src.."\\*.* "..fs.Q(dest).." /S/E/Y")) then 149 if fs.execute_string(fs.quiet(vars.CP.." -a "..src.."\\*.* "..fs.Q(dest))) then
150 --if fs.execute_string(fs.quiet(vars.CP.." -a "..src.."\\*.* "..fs.Q(dest))) then
151 return true 150 return true
152 else 151 else
153 return false, "Failed copying "..src.." to "..dest 152 return false, "Failed copying "..src.." to "..dest