aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/luajit.182
-rw-r--r--etc/luajit.pc24
2 files changed, 106 insertions, 0 deletions
diff --git a/etc/luajit.1 b/etc/luajit.1
new file mode 100644
index 00000000..fab65803
--- /dev/null
+++ b/etc/luajit.1
@@ -0,0 +1,82 @@
1.TH luajit 1 "" "" "LuaJIT documentation"
2.SH NAME
3luajit \- Just-In-Time Compiler for the Lua Language
4\fB
5.SH SYNOPSIS
6.B luajit
7[\fIoptions\fR]... [\fIscript\fR [\fIargs\fR]...]
8.SH "WEB SITE"
9.IR http://luajit.org
10.SH DESCRIPTION
11.PP
12This is the command-line program to run Lua programs with \fBLuaJIT\fR.
13.PP
14\fBLuaJIT\fR is a just-in-time (JIT) compiler for the Lua language.
15The virtual machine (VM) is based on a fast interpreter combined with
16a trace compiler. It can significantly improve the performance of Lua programs.
17.PP
18\fBLuaJIT\fR is API\- and ABI-compatible with the VM of the standard
19Lua\ 5.1 interpreter. When embedding the VM into an application,
20the built library can be used as a drop-in replacement.
21.SH OPTIONS
22.TP
23.BI "\-e " chunk
24Run the given chunk of Lua code.
25.TP
26.BI "\-l " library
27Load the named library, just like \fBrequire("\fR\fIlibrary\fR\fB")\fR.
28.TP
29.BI "\-j " command
30Perform LuaJIT control command (optional space after \fB\-j\fR).
31.TP
32.BI "\-O" [opt]
33Control LuaJIT optimizations.
34.TP
35.B "\-i"
36Run in interactive mode.
37.TP
38.B "\-v"
39Show \fBLuaJIT\fR version.
40.TP
41.B "\-\-"
42Stop processing options.
43.TP
44.B "\-"
45Read script from stdin instead.
46.PP
47After all options are processed, the given \fIscript\fR is run.
48The arguments are passed in the global \fIarg\fR table.
49.PP
50Interactive mode is only entered, if no \fIscript\fR and no \fB\-e\fR
51option is given. Interactive mode can be left with EOF (\fICtrl\-Z\fB).
52.SH EXAMPLES
53.TP
54luajit hello.lua world
55
56Prints "Hello world", assuming \fIhello.lua\fR contains:
57.br
58 print("Hello", arg[1])
59.TP
60luajit \-e "local x=0; for i=1,1e9 do x=x+i end; print(x)"
61
62Calculates the sum of the numbers from 1 to 1000000000.
63.br
64And finishes in a reasonable amount of time, too.
65.TP
66luajit \-jv \-e "for i=1,10 do for j=1,10 do for k=1,100 do end end end"
67
68Runs some nested loops and shows the resulting traces.
69.SH COPYRIGHT
70.PP
71\fBLuaJIT\fR is Copyright \(co 2005-2009 Mike Pall.
72.br
73\fBLuaJIT\fR is open source software, released under the MIT/X license.
74.SH SEE ALSO
75.PP
76More details in the provided HTML docs or at:
77.IR http://luajit.org
78.br
79More about the Lua language can be found at:
80.IR http://lua.org/docs.html
81.PP
82lua(1)
diff --git a/etc/luajit.pc b/etc/luajit.pc
new file mode 100644
index 00000000..f0490097
--- /dev/null
+++ b/etc/luajit.pc
@@ -0,0 +1,24 @@
1# Package information for LuaJIT to be used by pkg-config.
2majver=2
3minver=0
4relver=0
5version=${majver}.${minver}.${relver}-beta2
6abiver=5.1
7
8prefix=/usr/local
9exec_prefix=${prefix}
10libdir=${exec_prefix}/lib
11libname=luajit-${abiver}
12includedir=${prefix}/include/luajit-${majver}.${minver}
13
14INSTALL_LMOD=${prefix}/share/lua/${abiver}
15INSTALL_CMOD=${prefix}/lib/lua/${abiver}
16
17Name: LuaJIT
18Description: Just-in-time compiler for Lua
19URL: http://luajit.org
20Version: ${version}
21Requires:
22Libs: -L${libdir} -l${libname}
23Libs.private: -Wl,-E -lm -ldl
24Cflags: -I${includedir}