summaryrefslogtreecommitdiffstats
path: root/patches/lua-5.1.4/0102-Add-lua-support-to-ptxdist-1.99-add-automake-files.patch
blob: a2b6c4aae8ed763336ad7eaa7bb03c4fc425c83c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
From: Erwin Rol <erwin@erwinrol.com>
Date: Fri, 9 Dec 2011 11:32:12 +0100
Subject: [PATCH] Add lua support to ptxdist 1.99: add automake files

This patch add lua support to ptxdist 1.99. It has a menu entry under
scripting languages. And a patch that makes it possible to use autoconf
to build.

This part of the patch adds the automake files.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 Makefile.am      |  5 +++++
 doc/Makefile.am  |  5 +++++
 etc/Makefile.am  |  8 ++++++++
 src/Makefile.am  | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 test/Makefile.am |  5 +++++
 5 files changed, 70 insertions(+)
 create mode 100644 Makefile.am
 create mode 100644 doc/Makefile.am
 create mode 100644 etc/Makefile.am
 create mode 100644 src/Makefile.am
 create mode 100644 test/Makefile.am

diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..de78a24
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,5 @@
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = src doc etc test
+
+EXTRA_DIST = autogen.sh COPYRIGHT HISTORY INSTALL README
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..574b6f8
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,5 @@
+man1_MANS = lua.1 luac.1
+
+EXTRA_DIST = \
+	contents.html  lua.1   luac.html  lua.html     manual.html \
+	logo.gif       luac.1  lua.css    readme.html
diff --git a/etc/Makefile.am b/etc/Makefile.am
new file mode 100644
index 0000000..23edd92
--- /dev/null
+++ b/etc/Makefile.am
@@ -0,0 +1,8 @@
+include_HEADERS = lua.hpp
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = lua.pc
+
+EXTRA_DIST = \
+	all.c      lua.ico    lua.pc.in  noparser.c  strict.lua \
+	luavs.bat  min.c      README
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..cf6bdea
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,47 @@
+AM_CFLAGS = -Wall
+
+include_HEADERS = lua.h lualib.h lauxlib.h
+nodist_include_HEADERS = luaconf.h
+
+lib_LTLIBRARIES = liblua.la
+liblua_la_LDFLAGS = -release @VERSION@ -Wl,--as-needed
+liblua_la_SOURCES = \
+	lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c \
+	lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c ltm.c  \
+	lundump.c lvm.c lzio.c \
+	lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c loslib.c ltablib.c \
+	lstrlib.c loadlib.c linit.c \
+	lapi.h ldebug.h lgc.h lmem.h lparser.h ltable.h lzio.h ldo.h llex.h \
+	lobject.h lstate.h ltm.h lundump.h lcode.h lfunc.h llimits.h lopcodes.h \
+	lstring.h lvm.h
+
+liblua_la_LIBADD = @LUA_LIBS@
+
+bin_PROGRAMS = lua luac
+
+lua_SOURCES = lua.c
+lua_LDADD = liblua.la @LUA_LIBS@
+lua_DEPENDENCIES = liblua.la
+
+luac_SOURCES = luac.c print.c
+luac_LDADD = liblua.la @LUA_LIBS@
+luac_DEPENDENCIES = liblua.la
+
+# luac must be linked statically because it uses functions that
+# don't get exported to the shared object
+luac_LDFLAGS = -static
+
+EXTRA_DIST = luaconf.h.template.in
+BUILT_SOURCES = luaconf.h
+CLEANFILES = luaconf.h
+
+readline_defs = @READLINE_DEFS@
+
+edit = 	sed \
+	  -e 's,%lua_datadir%,$(datadir),g' \
+	  -e 's,%lua_libdir%,$(libdir),g'
+
+luaconf.h : luaconf.h.template
+	rm -f luaconf.h luaconf.h.tmp
+	$(edit) luaconf.h.template > luaconf.h.tmp
+	mv luaconf.h.tmp luaconf.h
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..bab7eac
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,5 @@
+EXTRA_DIST = \
+	bisect.lua  env.lua         fib.lua      life.lua          printf.lua \
+	sieve.lua   trace-calls.lua cf.lua       factorial.lua     globals.lua \
+	luac.lua    README          sort.lua     trace-globals.lua echo.lua \
+	fibfor.lua  hello.lua       readonly.lua table.lua         xd.lua