Skip to content

Commit

Permalink
Prevent multiple different platform/machines builds.
Browse files Browse the repository at this point in the history
Prevents damage to unsuspecting users. (issue #35)
  • Loading branch information
anttikantee committed Jun 22, 2015
1 parent 784a98d commit 0887d07
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build-rr.sh
Expand Up @@ -144,6 +144,25 @@ checksubmodules ()
fi )
}

checkprevbuilds ()
{

if [ -f .prevbuild ]; then
. ./.prevbuild
if [ "${PB_MACHINE}" != "${MACHINE}" \
-o "${PB_PLATFORM}" != "${PLATFORM}" ]; then
echo '>> ERROR:'
echo '>> Building for multiple machine/platform combos'
echo '>> from the same rumprun source tree is currently'
echo '>> not supported. See rumprun issue #35.'
exit 1
fi
else
echo PB_MACHINE=${MACHINE} > ./.prevbuild
echo PB_PLATFORM=${PLATFORM} >> ./.prevbuild
fi
}

buildrump ()
{

Expand All @@ -166,6 +185,8 @@ buildrump ()
MACHINE=$(${RUMPMAKE} -f /dev/null -V '${MACHINE}')
[ -n "${MACHINE}" ] || die could not figure out target machine

checkprevbuilds

makeconfigmk ${PLATFORMDIR}/config.mk

cat >> ${RUMPTOOLS}/mk.conf << EOF
Expand Down

0 comments on commit 0887d07

Please sign in to comment.