diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-29 13:53:27 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-29 13:53:27 -0700 |
commit | aa62072c9b7dcc3b650af9fe24f23853c688d07b (patch) | |
tree | 0e7ec6479d598cf63cc4ac36cd6e6dc99dc190d3 | |
parent | 3b6735c64c450e50ec948c07bf9ddbe4a68a87dc (diff) |
make lua test build from source
74 files changed, 32317 insertions, 78720 deletions
diff --git a/tests/lua/COPYRIGHT b/tests/lua/COPYRIGHT deleted file mode 100644 index 3a53e741..00000000 --- a/tests/lua/COPYRIGHT +++ /dev/null @@ -1,34 +0,0 @@ -Lua License ------------ - -Lua is licensed under the terms of the MIT license reproduced below. -This means that Lua is free software and can be used for both academic -and commercial purposes at absolutely no cost. - -For details and rationale, see http://www.lua.org/license.html . - -=============================================================================== - -Copyright (C) 1994-2008 Lua.org, PUC-Rio. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -=============================================================================== - -(end of COPYRIGHT) diff --git a/tests/lua/Makefile b/tests/lua/Makefile index 945e8d7e..bd9515fd 100644 --- a/tests/lua/Makefile +++ b/tests/lua/Makefile @@ -1,184 +1,114 @@ -# makefile for building Lua -# see ../INSTALL for installation instructions -# see ../Makefile and luaconf.h for further customization +# Makefile for installing Lua +# See doc/readme.html for installation and customization instructions. # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= -PLAT=generic # Emscripten needs |generic|! - -# Fix '...' with the proper absolute path -CC = "/.../Dev/llvm-2.8/cbuild/Release/bin/clang++" # C++ compiler, so we don't use longjmp/setjmp! -CFLAGS= -m32 -emit-llvm -U__i386__ -U__x86_64__ -AR= "/.../Dev/llvm-2.8/cbuild/Release/bin/llvm-link" -RANLIB= "/.../Dev/llvm-2.8/cbuild/Release/bin/llvm-dis" +# Your platform. See PLATS for possible values. +PLAT= none + +# Where to install. The installation starts in the src and doc directories, +# so take care if INSTALL_TOP is not an absolute path. See the local target. +# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with +# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. +INSTALL_TOP= /usr/local +INSTALL_BIN= $(INSTALL_TOP)/bin +INSTALL_INC= $(INSTALL_TOP)/include +INSTALL_LIB= $(INSTALL_TOP)/lib +INSTALL_MAN= $(INSTALL_TOP)/man/man1 +INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V +INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V + +# How to install. If your install program does not support "-p", then +# you may have to run ranlib on the installed liblua.a. +INSTALL= install -p +INSTALL_EXEC= $(INSTALL) -m 0755 +INSTALL_DATA= $(INSTALL) -m 0644 +# +# If you don't have "install" you can use "cp" instead. +# INSTALL= cp -p +# INSTALL_EXEC= $(INSTALL) +# INSTALL_DATA= $(INSTALL) + +# Other utilities. +MKDIR= mkdir -p RM= rm -f -LIBS= -lm $(MYLIBS) - -MYCFLAGS= -MYLDFLAGS= -MYLIBS= -# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= +# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= +# Convenience platforms targets. PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris -LUA_A= liblua.a -CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ - lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ - lundump.o lvm.o lzio.o -LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \ - lstrlib.o loadlib.o linit.o - -LUA_T= lua -LUA_O= lua.o - -LUAC_T= luac -LUAC_O= luac.o print.o - -ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) -ALL_T= $(LUA_A) $(LUA_T) -ALL_A= $(LUA_A) +# What to install. +TO_BIN= lua luac +TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp +TO_LIB= liblua.a +TO_MAN= lua.1 luac.1 -default: $(PLAT) +# Lua version and release. +V= 5.2 +R= $V.1 -all: $(ALL_T) +# Targets start here. +all: $(PLAT) -o: $(ALL_O) +$(PLATS) clean: + cd src && $(MAKE) $@ -a: $(ALL_A) +test: dummy + src/lua -v -$(LUA_A): $(CORE_O) $(LIB_O) - $(AR) -o=$@ $? - $(RANLIB) -show-annotations $@ +install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) -$(LUA_T): $(LUA_O) $(LUA_A) - $(AR) -o=$@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) - $(RANLIB) -show-annotations $@ +uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) + cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC) + cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB) + cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN) -$(LUAC_T): $(LUAC_O) $(LUA_A) - $(AR) -o=$@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) - $(RANLIB) -show-annotations $@ - -clean: - $(RM) $(ALL_T) $(ALL_O) - -depend: - @$(CC) $(CFLAGS) -MM l*.c print.c - -echo: - @echo "PLAT = $(PLAT)" - @echo "CC = $(CC)" - @echo "CFLAGS = $(CFLAGS)" - @echo "AR = $(AR)" - @echo "RANLIB = $(RANLIB)" - @echo "RM = $(RM)" - @echo "MYCFLAGS = $(MYCFLAGS)" - @echo "MYLDFLAGS = $(MYLDFLAGS)" - @echo "MYLIBS = $(MYLIBS)" - -# convenience targets for popular platforms +local: + $(MAKE) install INSTALL_TOP=../install none: - @echo "Please choose a platform:" + @echo "Please do 'make PLATFORM' where PLATFORM is one of these:" @echo " $(PLATS)" + @echo "See doc/readme.html for complete instructions." -aix: - $(MAKE) all CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" MYLDFLAGS="-brtl -bexpall" +# make may get confused with test/ and install/ +dummy: -ansi: - $(MAKE) all MYCFLAGS=-DLUA_ANSI - -bsd: - $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E" - -freebsd: - $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline" - -generic: - $(MAKE) all MYCFLAGS= - -linux: - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" - -macosx: - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" -# use this on Mac OS X 10.3- -# $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX - -mingw: - $(MAKE) "LUA_A=lua51.dll" "LUA_T=lua.exe" \ - "AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \ - "MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua.exe - $(MAKE) "LUAC_T=luac.exe" luac.exe - -posix: - $(MAKE) all MYCFLAGS=-DLUA_USE_POSIX - -solaris: - $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" +# echo config parameters +echo: + @cd src && $(MAKE) -s echo + @echo "PLAT= $(PLAT)" + @echo "V= $V" + @echo "R= $R" + @echo "TO_BIN= $(TO_BIN)" + @echo "TO_INC= $(TO_INC)" + @echo "TO_LIB= $(TO_LIB)" + @echo "TO_MAN= $(TO_MAN)" + @echo "INSTALL_TOP= $(INSTALL_TOP)" + @echo "INSTALL_BIN= $(INSTALL_BIN)" + @echo "INSTALL_INC= $(INSTALL_INC)" + @echo "INSTALL_LIB= $(INSTALL_LIB)" + @echo "INSTALL_MAN= $(INSTALL_MAN)" + @echo "INSTALL_LMOD= $(INSTALL_LMOD)" + @echo "INSTALL_CMOD= $(INSTALL_CMOD)" + @echo "INSTALL_EXEC= $(INSTALL_EXEC)" + @echo "INSTALL_DATA= $(INSTALL_DATA)" + +# echo pkg-config data +pc: + @echo "version=$R" + @echo "prefix=$(INSTALL_TOP)" + @echo "libdir=$(INSTALL_LIB)" + @echo "includedir=$(INSTALL_INC)" # list targets that do not create files (but not all makes understand .PHONY) -.PHONY: all $(PLATS) default o a clean depend echo none - -# DO NOT DELETE - -lapi.o: lapi.c lua.h luaconf.h lapi.h lobject.h llimits.h ldebug.h \ - lstate.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h \ - lundump.h lvm.h -lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h -lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h -lcode.o: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ - lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lgc.h \ - ltable.h -ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h -ldebug.o: ldebug.c lua.h luaconf.h lapi.h lobject.h llimits.h lcode.h \ - llex.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h \ - lfunc.h lstring.h lgc.h ltable.h lvm.h -ldo.o: ldo.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ - lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h lstring.h \ - ltable.h lundump.h lvm.h -ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h \ - lzio.h lmem.h lundump.h -lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h lmem.h \ - lstate.h ltm.h lzio.h -lgc.o: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ - lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h -linit.o: linit.c lua.h luaconf.h lualib.h lauxlib.h -liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h -llex.o: llex.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h ltm.h \ - lzio.h lmem.h llex.h lparser.h lstring.h lgc.h ltable.h -lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h -lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ - ltm.h lzio.h lmem.h ldo.h -loadlib.o: loadlib.c lua.h luaconf.h lauxlib.h lualib.h -lobject.o: lobject.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h \ - ltm.h lzio.h lmem.h lstring.h lgc.h lvm.h -lopcodes.o: lopcodes.c lopcodes.h llimits.h lua.h luaconf.h -loslib.o: loslib.c lua.h luaconf.h lauxlib.h lualib.h -lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ - lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h \ - lfunc.h lstring.h lgc.h ltable.h -lstate.o: lstate.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ - ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h llex.h lstring.h ltable.h -lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \ - ltm.h lzio.h lstring.h lgc.h -lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h -ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ - ltm.h lzio.h lmem.h ldo.h lgc.h ltable.h -ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h -ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \ - lmem.h lstring.h lgc.h ltable.h -lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h -luac.o: luac.c lua.h luaconf.h lauxlib.h ldo.h lobject.h llimits.h \ - lstate.h ltm.h lzio.h lmem.h lfunc.h lopcodes.h lstring.h lgc.h \ - lundump.h -lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \ - llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h lundump.h -lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ - lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h -lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \ - lzio.h -print.o: print.c ldebug.h lstate.h lua.h luaconf.h lobject.h llimits.h \ - ltm.h lzio.h lmem.h lopcodes.h lundump.h +.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho # (end of Makefile) diff --git a/tests/lua/README b/tests/lua/README new file mode 100644 index 00000000..6e2aee6c --- /dev/null +++ b/tests/lua/README @@ -0,0 +1,6 @@ + +This is Lua 5.2.2, released on 21 Mar 2013. + +For installation instructions, license details, and +further information about Lua, see doc/readme.html. + diff --git a/tests/lua/doc/contents.html b/tests/lua/doc/contents.html new file mode 100644 index 00000000..0ce297da --- /dev/null +++ b/tests/lua/doc/contents.html @@ -0,0 +1,533 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> +<HEAD> +<TITLE>Lua 5.2 Reference Manual - contents</TITLE> +<LINK REL="stylesheet" TYPE="text/css" HREF="lua.css"> +<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1"> +<STYLE TYPE="text/css"> +ul { + list-style-type: none ; + list-style-position: outside ; +} +</STYLE> +</HEAD> + +<BODY> + +<HR> +<H1> +<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="" BORDER=0></A> +Lua 5.2 Reference Manual +</H1> + +<P> +The reference manual is the official definition of the Lua language. +For a complete introduction to Lua programming, see the book +<A HREF="http://www.lua.org/pil/">Programming in Lua</A>. + +<P> +<A HREF="manual.html">start</A> +· +<A HREF="#contents">contents</A> +· +<A HREF="#index">index</A> +<HR> +<SMALL> +Copyright © 2011–2013 Lua.org, PUC-Rio. +Freely available under the terms of the +<A HREF="http://www.lua.org/license.html">Lua license</A>. +</SMALL> + +<H2><A NAME="contents">Contents</A></H2> +<UL style="padding: 0"> +<LI><A HREF="manual.html">1 – Introduction</A> +<P> +<LI><A HREF="manual.html#2">2 – Basic Concepts</A> +<UL> +<LI><A HREF="manual.html#2.1">2.1 – Values and Types</A> +<LI><A HREF="manual.html#2.2">2.2 – Environments and the Global Environment</A> +<LI><A HREF="manual.html#2.3">2.3 – Error Handling</A> +<LI><A HREF="manual.html#2.4">2.4 – Metatables and Metamethods</A> +<LI><A HREF="manual.html#2.5">2.5 – Garbage Collection</A> +<UL> +<LI><A HREF="manual.html#2.5.1">2.5.1 – Garbage-Collection Metamethods</A> +<LI><A HREF="manual.html#2.5.2">2.5.2 – Weak Tables</A> +</UL> +<LI><A HREF="manual.html#2.6">2.6 – Coroutines</A> +</UL> +<P> +<LI><A HREF="manual.html#3">3 – The Language</A> +<UL> +<LI><A HREF="manual.html#3.1">3.1 – Lexical Conventions</A> +<LI><A HREF="manual.html#3.2">3.2 – Variables</A> +<LI><A HREF="manual.html#3.3">3.3 – Statements</A> +<UL> +<LI><A HREF="manual.html#3.3.1">3.3.1 – Blocks</A> +<LI><A HREF="manual.html#3.3.2">3.3.2 – Chunks</A> +<LI><A HREF="manual.html#3.3.3">3.3.3 – Assignment</A> +<LI><A HREF="manual.html#3.3.4">3.3.4 – Control Structures</A> +<LI><A HREF="manual.html#3.3.5">3.3.5 – For Statement</A> +<LI><A HREF="manual.html#3.3.6">3.3.6 – Function Calls as Statements</A> +<LI><A HREF="manual.html#3.3.7">3.3.7 – Local Declarations</A> +</UL> +<LI><A HREF="manual.html#3.4">3.4 – Expressions</A> +<UL> +<LI><A HREF="manual.html#3.4.1">3.4.1 – Arithmetic Operators</A> +<LI><A HREF="manual.html#3.4.2">3.4.2 – Coercion</A> +<LI><A HREF="manual.html#3.4.3">3.4.3 – Relational Operators</A> +<LI><A HREF="manual.html#3.4.4">3.4.4 – Logical Operators</A> +<LI><A HREF="manual.html#3.4.5">3.4.5 – Concatenation</A> +<LI><A HREF="manual.html#3.4.6">3.4.6 – The Length Operator</A> +<LI><A HREF="manual.html#3.4.7">3.4.7 – Precedence</A> +<LI><A HREF="manual.html#3.4.8">3.4.8 – Table Constructors</A> +<LI><A HREF="manual.html#3.4.9">3.4.9 – Function Calls</A> +<LI><A HREF="manual.html#3.4.10">3.4.10 – Function Definitions</A> +</UL> +<LI><A HREF="manual.html#3.5">3.5 – Visibility Rules</A> +</UL> +<P> +<LI><A HREF="manual.html#4">4 – The Application Program Interface</A> +<UL> +<LI><A HREF="manual.html#4.1">4.1 – The Stack</A> +<LI><A HREF="manual.html#4.2">4.2 – Stack Size</A> +<LI><A HREF="manual.html#4.3">4.3 – Valid and Acceptable Indices</A> +<LI><A HREF="manual.html#4.4">4.4 – C Closures</A> +<LI><A HREF="manual.html#4.5">4.5 – Registry</A> +<LI><A HREF="manual.html#4.6">4.6 – Error Handling in C</A> +<LI><A HREF="manual.html#4.7">4.7 – Handling Yields in C</A> +<LI><A HREF="manual.html#4.8">4.8 – Functions and Types</A> +<LI><A HREF="manual.html#4.9">4.9 – The Debug Interface</A> +</UL> +<P> +<LI><A HREF="manual.html#5">5 – The Auxiliary Library</A> +<UL> +<LI><A HREF="manual.html#5.1">5.1 – Functions and Types</A> +</UL> +<P> +<LI><A HREF="manual.html#6">6 – Standard Libraries</A> +<UL> +<LI><A HREF="manual.html#6.1">6.1 – Basic Functions</A> +<LI><A HREF="manual.html#6.2">6.2 – Coroutine Manipulation</A> +<LI><A HREF="manual.html#6.3">6.3 – Modules</A> +<LI><A HREF="manual.html#6.4">6.4 – String Manipulation</A> +<UL> +<LI><A HREF="manual.html#6.4.1">6.4.1 – Patterns</A> +</UL> +<LI><A HREF="manual.html#6.5">6.5 – Table Manipulation</A> +<LI><A HREF="manual.html#6.6">6.6 – Ma |