build: fold CONFIGDIRPREFIX into CONFIGDIR, derive (PRODUCT_)SETTINGS
So now we either set SETTINGS or CONFIGDIR and if the latter is used SETTINGS variable is populated from the basename of CONFIGDIR to avoid having to set two overrides at the same time. Also add a build.conf.local optional build configuration to make adjustments beyond our own scope feasible.
This commit is contained in:
parent
88d4e8c575
commit
808649f0ed
|
@ -1,2 +1,3 @@
|
|||
/config/*/build.conf.local
|
||||
/config/*/repo.key
|
||||
/config/*/repo.pub
|
||||
|
|
17
Makefile
17
Makefile
|
@ -55,10 +55,17 @@ lint: lint-steps lint-composite
|
|||
|
||||
TOOLSDIR?= /usr/tools
|
||||
TOOLSBRANCH?= master
|
||||
CONFIGDIR?= ${TOOLSDIR}/config
|
||||
SETTINGS?= 21.1
|
||||
|
||||
.include "${CONFIGDIR}/${SETTINGS}/build.conf"
|
||||
.if defined(CONFIGDIR)
|
||||
SETTINGS= ${CONFIGDIR:C/^.*\///}
|
||||
.else
|
||||
SETTINGS?= 21.1
|
||||
.endif
|
||||
|
||||
CONFIGDIR?= ${TOOLSDIR}/config/${SETTINGS}
|
||||
|
||||
.include "${CONFIGDIR}/build.conf"
|
||||
.-include "${CONFIGDIR}/build.conf.local"
|
||||
|
||||
# Bootstrap the build options if not set:
|
||||
|
||||
|
@ -141,14 +148,14 @@ 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 ${CONFIGDIR} \
|
||||
-S ${SRCDIR} -P ${PORTSDIR} -p ${PLUGINSDIR} -T ${TOOLSDIR} \
|
||||
-C ${COREDIR} -R ${PORTSREFDIR} -t ${TYPE} -k "${PRIVKEY}" \
|
||||
-K "${PUBKEY}" -l "${SIGNCHK}" -L "${SIGNCMD}" -d ${DEVICE} \
|
||||
-m ${MIRRORS:Ox:[1]} -o "${STAGEDIRPREFIX}" -c ${SPEED} \
|
||||
-b ${SRCBRANCH} -B ${PORTSBRANCH} -e ${PLUGINSBRANCH} \
|
||||
-g ${TOOLSBRANCH} -E ${COREBRANCH} -G ${PORTSREFBRANCH} \
|
||||
-H "${COREENV}" -u "${UEFI:tl}" -U "${SUFFIX}" -i ${CONFIGDIR} \
|
||||
-H "${COREENV}" -u "${UEFI:tl}" -U "${SUFFIX}" \
|
||||
-V "${ADDITIONS}" -O "${GITBASE}" -r "${SERVER}" \
|
||||
-q "${VERSIONS}" -h "${PLUGINSENV}" -I "${UPLOADDIR}" \
|
||||
-D "${EXTRABRANCH}" -A "${PORTSREFURL}" ${${STEP}_ARGS}
|
||||
|
|
|
@ -47,8 +47,8 @@ All build steps are invoked via make(1):
|
|||
|
||||
Available early build options are:
|
||||
|
||||
* CONFIGDIR: reads settings from the specified directory
|
||||
* SETTINGS: the name of the requested config directory
|
||||
* SETTINGS: the name of the requested local configuration
|
||||
* CONFIGDIR: read configuration from other directory and override SETTINGS
|
||||
|
||||
Available build options are:
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
OPTS="A:a:B:b:C:c:D:d:E:e:F:f:G:g:H:h:I:i:K:k:L:l:m:n:O:o:P:p:q:R:r:S:s:T:t:U:u:v:V:"
|
||||
OPTS="A:a:B:b:C:c:D:d:E:e:F:f:G:g:H:h:I:K:k:L:l:m:n:O:o:P:p:q:R:r:S:s:T:t:U:u:v:V:"
|
||||
|
||||
while getopts ${OPTS} OPT; do
|
||||
case ${OPT} in
|
||||
|
@ -96,9 +96,6 @@ while getopts ${OPTS} OPT; do
|
|||
I)
|
||||
export UPLOADDIR=${OPTARG}
|
||||
;;
|
||||
i)
|
||||
export CONFIGDIRPREFIX=${OPTARG}
|
||||
;;
|
||||
L)
|
||||
if [ -n "${OPTARG}" ]; then
|
||||
export PRODUCT_SIGNCMD=${OPTARG}
|
||||
|
@ -143,7 +140,7 @@ while getopts ${OPTS} OPT; do
|
|||
export SRCDIR=${OPTARG}
|
||||
;;
|
||||
s)
|
||||
export PRODUCT_SETTINGS=${OPTARG}
|
||||
export CONFIGDIR=${OPTARG}
|
||||
;;
|
||||
T)
|
||||
export TOOLSDIR=${OPTARG}
|
||||
|
@ -181,7 +178,7 @@ done
|
|||
shift $((${OPTIND} - 1))
|
||||
|
||||
CHECK_MISSING="
|
||||
CONFIGDIRPREFIX
|
||||
CONFIGDIR
|
||||
COREBRANCH
|
||||
COREDIR
|
||||
PLUGINSBRANCH
|
||||
|
@ -203,7 +200,6 @@ PRODUCT_PHP
|
|||
PRODUCT_PYTHON
|
||||
PRODUCT_RUBY
|
||||
PRODUCT_SERVER
|
||||
PRODUCT_SETTINGS
|
||||
PRODUCT_SPEED
|
||||
PRODUCT_TYPE
|
||||
PRODUCT_VERSION
|
||||
|
@ -231,7 +227,7 @@ MACHTYPE=${MACHTYPE} PWD=${PWD} GROUP=${GROUP} HOST=${HOST} \
|
|||
EDITOR=${EDITOR} PAGER=${PAGER} ABI_FILE=${ABI_FILE}"
|
||||
|
||||
# define build and config directories
|
||||
export CONFIGDIR="${CONFIGDIRPREFIX}/${PRODUCT_SETTINGS}"
|
||||
export PRODUCT_SETTINGS="${CONFIGDIR##*/}"
|
||||
export DEVICEDIR="${TOOLSDIR}/device"
|
||||
export PACKAGESDIR="/.pkg"
|
||||
|
||||
|
|
Loading…
Reference in New Issue