Framework: stop guessing build parameters

Either we can figure them out at runtime or they were
passed by the build system previously.

Out of band builds are no longer supported, but can be
fixed by specifying the relevant variables like the build
would.
This commit is contained in:
Franco Fichtner
2021-06-29 09:28:38 +02:00
parent 87e58358c0
commit 96b498a6d0
+12 -3
View File
@@ -51,6 +51,13 @@ PLUGIN_FLAVOUR?= Base
.endif
.endif
VERSIONBIN= ${LOCALBASE}/sbin/opnsense-version
.if exists(${VERSIONBIN})
_PLUGIN_ABI!= ${VERSIONBIN} -a
PLUGIN_ABI?= ${_PLUGIN_ABI}
.endif
PHPBIN= ${LOCALBASE}/bin/php
.if exists(${PHPBIN})
@@ -65,9 +72,11 @@ _PLUGIN_PYTHON!=${PYTHONLINK} -V
PLUGIN_PYTHON?= ${_PLUGIN_PYTHON:[2]:S/./ /g:[1..2]:tW:S/ //}
.endif
PLUGIN_ABI?= 21.1
PLUGIN_PHP?= 74
PLUGIN_PYTHON?= 37
.for REPLACEMENT in ABI PHP PYTHON
. if empty(PLUGIN_${REPLACEMENT})
. error Cannot build without PLUGIN_${REPLACEMENT} set
. endif
.endfor
REPLACEMENTS= PLUGIN_ABI \
PLUGIN_ARCH \