composite: allow access to all FLAVOUR settings

Makes it easier to modify stuff.  First one is mandatory, the rest is
eaten up by scripts to be passed down as required.
This commit is contained in:
Franco Fichtner 2019-06-10 17:55:58 +02:00
parent b096201667
commit 5ecee3f3c1
4 changed files with 12 additions and 17 deletions

View File

@ -64,7 +64,7 @@ CONFIG?= ${TOOLSDIR}/config/${SETTINGS}/build.conf
NAME?= OPNsense
TYPE?= ${NAME:tl}
SUFFIX?= #-devel
FLAVOUR?= OpenSSL
FLAVOUR?= OpenSSL LibreSSL # first one is default
_ARCH!= uname -p
ARCH?= ${_ARCH}
KERNEL?= SMP
@ -142,7 +142,7 @@ VERSIONS+= PRODUCT_${_VERSION}=${${_VERSION}}
${STEP}: lint-steps
${VERBOSE_HIDDEN} cd ${.CURDIR}/build && \
sh ${VERBOSE_FLAGS} ./${.TARGET}.sh -a ${ARCH} -F ${KERNEL} \
-f ${FLAVOUR} -n ${NAME} -v ${VERSION} -s ${SETTINGS} \
-f "${FLAVOUR}" -n ${NAME} -v ${VERSION} -s ${SETTINGS} \
-S ${SRCDIR} -P ${PORTSDIR} -p ${PLUGINSDIR} -T ${TOOLSDIR} \
-C ${COREDIR} -R ${PORTSREFDIR} -t ${TYPE} -k "${PRIVKEY}" \
-K "${PUBKEY}" -l "${SIGNCHK}" -L "${SIGNCMD}" -d ${DEVICE} \
@ -157,6 +157,6 @@ ${STEP}: lint-steps
.for SCRIPT in ${SCRIPTS}
${SCRIPT}: lint-composite
${VERBOSE_HIDDEN} cd ${.CURDIR} && sh ${VERBOSE_FLAGS} \
./composite/${SCRIPT}.sh ${${SCRIPT}_ARGS}
${VERBOSE_HIDDEN} cd ${.CURDIR} && FLAVOUR="${FLAVOUR}" \
sh ${VERBOSE_FLAGS} ./composite/${SCRIPT}.sh ${${SCRIPT}_ARGS}
.endfor

View File

@ -66,7 +66,7 @@ while getopts ${OPTS} OPT; do
export PRODUCT_KERNEL=${OPTARG}
;;
f)
export PRODUCT_FLAVOUR=${OPTARG}
export PRODUCT_FLAVOUR=${OPTARG%% *}
;;
G)
export PORTSREFBRANCH=${OPTARG}

View File

@ -25,8 +25,8 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
for FLAVOUR in OpenSSL LibreSSL; do
make clean-obj ${*} FLAVOUR=${FLAVOUR}
for _FLAVOUR in ${FLAVOUR}; do
make clean-obj ${*} FLAVOUR=${_FLAVOUR}
done
make clean-obj

View File

@ -25,15 +25,10 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
FLAVOURS="OpenSSL LibreSSL"
CLEAN=packages
eval "$(make print-LOGSDIR,PRODUCT_ARCH,PRODUCT_VERSION,STAGEDIR,TARGETDIRPREFIX)"
if [ ${PRODUCT_ARCH} = armv6 -o ${PRODUCT_ARCH} = aarch64 ]; then
FLAVOURS="OpenSSL"
fi
if [ -n "${1}" ]; then
CLEAN=plugins,core
fi
@ -53,14 +48,14 @@ for STAGE in update info base kernel xtools distfiles; do
(time make ${STAGE} 2>&1) > ${LOG}
done
for FLAVOUR in ${FLAVOURS}; do
(make clean-${CLEAN} FLAVOUR=${FLAVOUR} 2>&1) > /dev/null
for _FLAVOUR in ${FLAVOUR}; do
(make clean-${CLEAN} FLAVOUR=${_FLAVOUR} 2>&1) > /dev/null
done
for STAGE in ports plugins core test; do
for FLAVOUR in ${FLAVOURS}; do
LOG=${LOGSDIR}/${PRODUCT_VERSION}/${STAGE}-${FLAVOUR}.log
((time make ${STAGE}-nightly FLAVOUR=${FLAVOUR} 2>&1) > ${LOG}; \
for _FLAVOUR in ${FLAVOUR}; do
LOG=${LOGSDIR}/${PRODUCT_VERSION}/${STAGE}-${_FLAVOUR}.log
((time make ${STAGE}-nightly FLAVOUR=${_FLAVOUR} 2>&1) > ${LOG}; \
tail -n 1000 ${LOG} > ${LOG}.tail) &
done