lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I was upgrading my local install of Lua 5.3 and had to deal with modifying
luaconf.h yet again. Usually I just apply a patch, but today I wrote a shell
script that can translate the LUA_ROOT, LUA_LDIR, and LUA_CDIR definitions
in upstream luaconf.h.

	https://github.com/wahern/lua-5.3/blob/luaconf-subst/src/luaconf.sh

The script can import INSTALL_TOP, INSTALL_LMOD, INSTALL_CMOD, etc from the
Makefile by parsing MAKEFLAGS, which make exports to subshell environments.
Variables can also be passed via the environment directly or by command-line
options. It should be relatively easy to drop into custom builds, assuming
it supports a unix shell environment.

The following branch modifies the Lua makefiles to generate luaconf.h at
build time

	https://github.com/wahern/lua-5.3/tree/luaconf-subst

One caveat is that you want to make sure that you're specifying INSTALL_TOP
both when building and when installing.