lua-users home
lua-l archive

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


It was thus said that the Great Vadim A. Misbakh-Soloviov once stated:
> >   You don't need to do that.  If you define LUA_VERSION as an environment
> > variable, make will use that instead of the built-in value.
> 
> Yes, in op's case, but not in yours, AFAIRC.

  Well ... darn.  I must have misread that portion of the Make manual. 
Sigh.

> // anyway, I patch your makefile for:
> 
> ```
> 34 ›   ›   -e 's@^(prefix).*@\1=/usr@' \
> 35 ›   ›   -e 's@(.*LUA_DIR.*/lua/.*shell )lua( -e "print.*)@\1${LUA_IMPL}\2@'
> ```
> (i.e. to call proper lua$ver instead lua) ;)

  Can you not then change the make invocation to do

	make LUA_VERSION="6.1" prefix=/usr

or even 

	make LUA=lua-53 prefix=/usr

(or whatever it's called)?  

> > 
> > 	make LUA_VERSION="6.1" DESTDIR=/tmp/foo install
> 
> Nope. It is not "defining environment variables". It is passing arguments to 
> `make` (which are force values over environment variables and vaues from 
> makefile itself).
> 
> While "?=", and, AFAIRC, ":=" too — allows to use exactly environment 
> variables.

  ":=" did not work; "?=" did work.  

  -spc