lua-users home
lua-l archive

Re: [ANN] lua-ConciseSerialization : another pure Lua implementation of CBOR / RFC7049

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


On 2016年12月03日 00:37, Sean Conner wrote:
> That means you have to edit LUAVER manually. I fixed that by doing:
> 
> 	LUA = lua
> 	LUA_VERSION = $(shell $(LUA) -e "print (_VERSION:match '^Lua (.*)')")
> 
> I have Lua itself tell me what version it is.
Better would be
LUA_VERSION = $(shell $(LUA) -E -e "print (_VERSION:match '^Lua (.*)')")
or maybe (because 5.1 doesn't have -E)
LUA_VERSION = $(shell $(LUA) -e
"io.stdout:write(string.match(_VERSION,'^Lua (.*)'),'\n')")
LUA_INIT (if defined and not disabled by -E) runs first and can
add/remove/replace a lot of things. Don't depend on print producing
"dumb" output if there's LUA_INIT. (The Lua REPL uses whatever _G.print
is to output results, so my 'print' colors values by types, adds
metatable info etc. etc. - resulting in some really funky directory
names if used like that!)
-- nobody (probably not the only one with a colorful REPL)

AltStyle によって変換されたページ (->オリジナル) /