Skip to content

1.2.2: Bug fix---don't rely upon print() in Makefile

Compare
Choose a tag to compare
@spc476 spc476 released this 03 Dec 05:20
· 24 commits to master since this release
From the Lua mailing list:

> 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)