ref: 69699f7183cfa3a2af6e87c269c22ab3c672fbbc
parent: 07fda22831e6aa8a12455d7357f3f03d6376ed67
author: kvik <[email protected]>
date: Thu Aug 5 07:30:36 EDT 2021
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.
--- a/mkfile
+++ b/mkfile
@@ -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 @@
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}