lua-users home
lua-l archive

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


> I try to draw attention to the inconsistency, especially since you
> went to the trouble to make a target for FreeBSD.

I'd love if we could make the bsd and freebsd targets the same:

bsd:
	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"


freebsd:
	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"

Currently, the difference is just support for LUA_USE_READLINE.
Any bsd experts around? Does the bsd target work in freebsd or vice-versa?

Support for readline is the major source of noise in the Makefile,
even in Linux. It currently requires that the readline headers be
installed, and they come from a dev package which is not in the default
installation.

> A mathematician's solution would be to generalize, Linux, Max OSX and
> FreeBSD all being special cases of OSIX (something not quite POSIX,
> get it?) Then LUA_USE_OSIX offends no one and is understood by
> no one. Fair enough?

I'd love if all *ix system were the same and reduce the targets to
posix and ix, but alas life is not simple. Not even POSIX systems are
the same: some support for dynamic loading, some don't. Some that do,
required -ldl, others don't. Some require "-Wl,-E", others don't. Hence
the many variations:

bsd:
	SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"

freebsd:
	SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"

linux:
	SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"

macosx:
	SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc

posix:
	SYSCFLAGS="-DLUA_USE_POSIX"

solaris:
	SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT" SYSLIBS="-ldl"

I'd love to reduce the number of targets if this would reduce noise
and at the same time worked in many platforms. But I don't know how.
I welcome concrete suggestions from those who have access to these
platforms.