build: move stagedir to unique location to enable parallel flavour build
This commit is contained in:
parent
da6273b55d
commit
920838ded1
5
Makefile
5
Makefile
|
@ -30,6 +30,7 @@ _VERSION!= date '+%Y%m%d%H%M'
|
|||
VERSION?= ${_VERSION}
|
||||
PRIVKEY?= /root/repo.key
|
||||
PUBKEY?= /root/repo.pub
|
||||
STAGEDIRPREFIX?=/usr/obj
|
||||
PORTSREFDIR?= /usr/freebsd-ports
|
||||
PLUGINSDIR?= /usr/plugins
|
||||
TOOLSDIR?= /usr/tools
|
||||
|
@ -65,10 +66,10 @@ VERBOSE_FLAGS= -x
|
|||
|
||||
.for STEP in ${STEPS}
|
||||
${STEP}:
|
||||
@cd build && sh ${VERBOSE_FLAGS} ./${.TARGET}.sh \
|
||||
@cd ${.CURDIR}/build && sh ${VERBOSE_FLAGS} ./${.TARGET}.sh \
|
||||
-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}" \
|
||||
-m ${MIRRORS:Ox:[1]} ${${STEP}_ARGS}
|
||||
-m ${MIRRORS:Ox:[1]} -o "${STAGEDIRPREFIX}" ${${STEP}_ARGS}
|
||||
.endfor
|
||||
|
|
|
@ -33,12 +33,13 @@ usage()
|
|||
{
|
||||
echo "Usage: ${0} -f flavour -n name -v version -R freebsd-ports.git" >&2
|
||||
echo " -C core.git -P ports.git -S src.git -T tools.git -t type" >&2
|
||||
echo " -k /path/to/privkey -K /path/to/pubkey -m web_mirror " >&2
|
||||
echo " -l 'custom sign check' -L 'custom sign command' [...]" >&2
|
||||
echo " -k /path/to/privkey -K /path/to/pubkey -m web_mirror" >&2
|
||||
echo " [ -l customsigncheck -L customsigncommand ]" >&2
|
||||
echo " [ -o stagedirprefix ] [...]" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
while getopts C:f:K:k:L:l:m:n:P:p:R:S:s:T:t:v: OPT; do
|
||||
while getopts C:f:K:k:L:l:m:n:o:P:p:R:S:s:T:t:v: OPT; do
|
||||
case ${OPT} in
|
||||
C)
|
||||
export COREDIR=${OPTARG}
|
||||
|
@ -76,6 +77,12 @@ while getopts C:f:K:k:L:l:m:n:P:p:R:S:s:T:t:v: OPT; do
|
|||
export PRODUCT_NAME=${OPTARG}
|
||||
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
|
||||
;;
|
||||
o)
|
||||
if [ -n "${OPTARG}" ]; then
|
||||
export STAGEDIRPREFIX=${OPTARG}
|
||||
fi
|
||||
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
|
||||
;;
|
||||
P)
|
||||
export PORTSDIR=${OPTARG}
|
||||
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
|
||||
|
@ -147,7 +154,7 @@ export TARGETARCH=${ARCH}
|
|||
|
||||
# define target directories
|
||||
export CONFIGDIR="${TOOLSDIR}/config/${PRODUCT_SETTINGS}"
|
||||
export STAGEDIR="/usr/obj/stage"
|
||||
export STAGEDIR="${STAGEDIRPREFIX}${CONFIGDIR}/${PRODUCT_FLAVOUR}"
|
||||
export IMAGESDIR="/tmp/images"
|
||||
export SETSDIR="/tmp/sets"
|
||||
export PACKAGESDIR="/.pkg"
|
||||
|
|
Loading…
Reference in New Issue