mkfile: use explicit VERSION variable (thanks qwx) Using lu9 -v to determine the version fails for cross-platform builds. Maintaining an explicit VERSION variable is good enough for now as Lua minor version is a slow moving number. If or when we allow building across multiple Lua versions another automatic approach might be warranted, such as parsing the lua.h LUA_VERSION.
1 files changed, 4 insertions(+), 3 deletions(-) M mkfile
M mkfile => mkfile +4 -3
@@ 1,5 1,7 @@ </$objtype/mkfile VERSION=5.4 CFLAGS=-FTVw -p -Ilua/shim -Ilua -Ilpeg -DLUA_USE_PLAN9 @@ TARG=$O.lu9 25,10 27,9 @@ pull:V: if not git/clone https://git.sr.ht/~kvik/lu9-p9 p9} install:QV: $TARG $MAN/1/lu9 luav=`{$TARG -v} cp $TARG $BIN/lu9 cp $TARG $BIN/lu9-^$luav mkdir -p $MOD/$luav cp $TARG $BIN/lu9-^$VERSION mkdir -p $MOD/$VERSION clean:QV: @{cd lua; mk clean}