|
From: | Ken Smith |
Subject: | Patch to Add Lua Support |
Date: | Sun, 15 Oct 2006 13:11:15 -0700 |
Hi All, Please consider this patch a request for comments. I have added Lua 5.1.1 support to GNU make 3.81. Attached to this email are patches for two files. The patch for function.c should work for any platform. The patches for the Makefile were generated under Darwin and Linux. Both are included to give a bigger picture to the nature of the changes required to build this patch. You may have to modify your Makefile by hand to get this patch to build and/or link. This is just to get you up and running since, if this patch is accepted, the autoconf processing would need to be modified to properly support linking to Lua. Readers of this list may know that you can apply these patches with the following steps. tar xjvf make-3.81.tar.bz2 cd make-3.81 ./configure patch -p1 < make-3.81-lua-5.1.1-Makefile.patch patch -p1 < make-3.81-lua-5.1.1-function.c.patch The attached GNUmakefile will produce something akin to the following output when run with a patched GNU make 3.81. Detected Lua support. lua result = "5" Make is 3.81 or later. Hello from Lua (x = table: 0x305380) t.1 = 4 t.2 = 5 t.something_else = true t.x.1 = 1 t.x.2 = 2 t.x.3 = 3 t.hi = value Terminado. This patch requires Lua 5.1.1 to be installed but requires no modifications to the Lua codebase. The patch adds one function to Lua's global namespace, "printmake", which prints a string back to make rather than to stdout. You can use $(lua printmake('text')) like you would use $(shell echo 'text'). This patch was developed under Darwin 8.8.1 (Mac OS X 10.4.8 Intel). Ken
make-3.81-lua-5.1.1-Makefile.patch
Description: Binary data
make-3.81-lua-5.1.1-function.c.patch
Description: Binary data
GNUmakefile
Description: Binary data
make-3.81-lua-5.1.1-Makefile-Gentoo-Linux-2.6-ppc.patch
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |