lua-users home
lua-l archive

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


> but at the moment, you don't 
> need to build
> Lua to build Lua.

But if you want to have multiple lua executables containing different
libraries you're going to have this anyway arent you?

> No need to be autoconfly complex, though. I'm still 
> suggesting something
> that can go in the standard distribution with no platform 
> dependencies; my
> single goal is to make it simpler to add in optional 
> libraries (something
> that people have been complaining about recently, and rightly so).

I dont think its that complex and it could be a complete solution for
integrating libraries, checking versions are compatible, print warnings and
all compilers and platforms could be included. I've looked at autoconf
scripts and they look horrifically complex. I think something like this
could be done pretty simply in Lua.

eg. config.lua:

PLATFORM = "win32"
COMPILER = "msc"
BUILD = "debug"
LIBRS = { 
	{"wxlua","c:/wxluaproject" },		--name and installation
location (for lib config)
	{"sql","c:/databases/libs/sql"}
	}


uses distributed (and constantly updated) config script:

platforms = {
	win32 = { seperator="\" },
	unix = { seperator="/" },
	...
}

compilers = {
	msc = { compile="cl %(flags) %(files)", debugflag="/g",
linker="link32" }
	borland = { compiler="bcc %(flags) %(files)", linker... }
}

and make.lua: (pseudo botch code :-)

lualibsource = { "lua",

compiler = compilers[COMPILER]
for c in lualibsource do
	system( subst_args(compiler, args) )
end

linker... include objects and libs


Well anyway, its seems just as easy to update the above system as it does to
update an FAQ telling people how to build stuff and use different compilers?
Well just an idea. Maybe overly complex.

Nick