Skip to content

Commit

Permalink
Merge branch 'master' of github.com:stevedonovan/luabuild
Browse files Browse the repository at this point in the history
  • Loading branch information
stevedonovan committed Jul 6, 2013
2 parents 5851130 + 424a5b9 commit d88232e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
3 changes: 2 additions & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ else # have to bootstrap!
"Darwin" ) PLAT=macosx;;
* ) PLAT=posix;;
esac
pushd lua-5.2.1
pushd lua-5.2.2
if ! make $PLAT
then
echo "bootstrap build borked"
Expand All @@ -55,6 +55,7 @@ else # have to bootstrap!
rm lua.o loadlib.o
popd
. setpath
LUA=luaboot
fi
fi

Expand Down
11 changes: 3 additions & 8 deletions lake
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ function pick(a,b)
end

file = {ext='*'}
COPY = choose(Windows,'copy','cp')
COPY = choose(Windows,'copy' ,'cp ')
REMOVE = choose(Windows,'ren ','mv ')
file.compile = '$(COPY) $(DEPENDS) $(TARGET)'


Expand Down Expand Up @@ -651,13 +652,7 @@ function utils.remove(items,single)
end

function utils.remove_files (mask)
local cmd
if Windows then
cmd = 'del '..mask
else
cmd = 'rm '..mask
end
exec(cmd)
exec(REMOVE..mask)
end

function utils.make_callable (obj,fun)
Expand Down
12 changes: 7 additions & 5 deletions lua-5.2.2/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Makefile for building Lua
# See ../doc/readme.html for installation and customization instructions.

# This version has been customized for bootstrapping LuaBuild
# - statically includes luafilesystem
# - does not link to libreadline
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================

# Your platform. See PLATS for possible values.
Expand Down Expand Up @@ -40,7 +42,7 @@ lfs.o: ../modules/lfs/lfs.c

BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)

LUA_T= lua
LUA_T= luaboot
LUA_O= lua.o

LUAC_T= luac
Expand Down Expand Up @@ -103,15 +105,15 @@ bsd:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"

freebsd:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_NO_READLINE" SYSLIBS="-Wl,-E"

generic: $(ALL)

linux:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -lncurses"
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_NO_READLINE" SYSLIBS="-Wl,-E -ldl"

macosx:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_NO_READLINE" SYSLIBS=""

mingw:
$(MAKE) "LUA_A=lua52.dll" "LUA_T=lua.exe" \
Expand Down
4 changes: 3 additions & 1 deletion lua-5.2.2/luaconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
#define LUA_USE_LONGLONG /* assume support for long long */
#endif


#if defined(LUA_NO_READLINE)
#undef LUA_USE_READLINE
#endif

/*
@@ LUA_USE_POSIX includes all functionality listed as X/Open System
Expand Down
2 changes: 2 additions & 0 deletions setpath
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export PATH="$(pwd)/bin:$PATH"
# this is needed for static tests (temporary fix)
export LUA_PATH_5_2="$(pwd)/lua/?.lua;;"
2 changes: 1 addition & 1 deletion test.lake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for line in f:lines() do
local tname = args[3]
local depends = args[4]
local test = target(tname,{luatest,depends},
EXE..' '..luatest..' > $(TARGET)')
EXE..' '..luatest..' > $(TARGET) || $(REMOVE) $(TARGET)')
test.dir = path.splitpath(luatest)
table.insert(tests,test)
end
Expand Down

0 comments on commit d88232e

Please sign in to comment.