platform_build_blueprint/blueprint_impl.bash
Dan Willemsen 1e72321e58 Use microfactory to build the bootstrap minibp
This duplicates building common blueprint go packages between minibp and
the primary builder, but drastically simplifies the first stage,
removing the need to check in a generated build.ninja.in.

Change-Id: I639a9637f1ed36d4210823ef276c0f7a064a83bd
2017-07-24 14:02:51 -07:00

21 lines
698 B
Bash

if [ ! "${BLUEPRINT_BOOTSTRAP_VERSION}" -eq "1" ]; then
echo "Please run bootstrap.bash again (out of date)" >&2
exit 1
fi
source "${BLUEPRINTDIR}/microfactory/microfactory.bash"
BUILDDIR="${BUILDDIR}/.minibootstrap" build_go minibp github.com/google/blueprint/bootstrap/minibp
# Build the bootstrap build.ninja
"${NINJA}" -w dupbuild=err -f "${BUILDDIR}/.minibootstrap/build.ninja"
# Build the primary builder and the main build.ninja
"${NINJA}" -w dupbuild=err -f "${BUILDDIR}/.bootstrap/build.ninja"
# SKIP_NINJA can be used by wrappers that wish to run ninja themselves.
if [ -z "$SKIP_NINJA" ]; then
"${NINJA}" -w dupbuild=err -f "${BUILDDIR}/build.ninja" "$@"
else
exit 0
fi