lua-users home
lua-l archive

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


On Wed, 2006-10-18 at 09:30 -0300, Luiz Henrique de Figueiredo wrote:
> > The attatched patch should let you change you chage the LUA_ROOT (and
> > LUA_LDIR and LUA_CDIR) with -D
> >
> > CFLAGS = ..... -DLUA_ROOT=\"$(INSTALL_TOP)\"
> 
> luaconf.h explicitly avoids #ifndef like this
> 
> +#ifndef LUA_ROOT
>  #define LUA_ROOT       "/usr/local/"
> +#endif
> 
> luaconf.h is supposed to be edited and frozen when installed so that further
> compilations of client code correctly reflect what the library has, at least
> in the public parts.

Its not fun to need to edit .h files when you have 300+ packages to
build for your linux distro.

> Furthermore, the Makefile in src/ does not know about INSTALL_TOP, which is
> only defined in the top-level Makefile.
> 
> Bottom line: you have to change the top-level Makefile to reflect luaconf.h.
> Perhaps we should add a comment in the Makefile about this.
> (There's also etc/lua.pc.)
> --lhf

If you want to make life easier for us package maintainers I would
suggest this:

Replace INSTALL_TOP with DESTDIR (or just INSTALL_TOP=$(DESTDIR))

Replace LUA_ROOT with PREFIX (or just LUA_ROOT=$(PREFIX))

Have support for those dirs by commandline or as makefile parameter.
(its ok if its only supported from the toplevel dir)

If you still want to go for the manually edit .h files soultion, you
could ship a script (named to configure?) that edits the file for the
package manager.

./configure --prefix=/usr
make
make DESTDIR=/var/tmp/portage/lua-5.1.2

# make binary package from /var/tmp/portage/lua-5.1.2 here...


Thanks!