Lines Matching +full:ninja +full:- +full:bin
1 #!/bin/bash
7 # It can also be invoked from another script to bootstrap a custom Blueprint-
23 set -e
30 if [ -z "$BOOTSTRAP" ]; then
33 # WRAPPER should only be set if you want a ninja wrapper script to be
36 [ -z "$WRAPPER" ] && WRAPPER="`dirname "${BOOTSTRAP}"`/blueprint.bash"
42 # be moved relative to or along with the source directory without re-running
44 [ -z "$SRCDIR" ] && SRCDIR=`dirname "${BOOTSTRAP}"`
48 [ -z "$BLUEPRINTDIR" ] && BLUEPRINTDIR="${SRCDIR}"
52 [ -z "$BUILDDIR" ] && BUILDDIR=.
56 [ -z "$NINJA_BUILDDIR" ] && NINJA_BUILDDIR="${BUILDDIR}"
58 # TOPNAME should be set to the name of the top-level Blueprints file
59 [ -z "$TOPNAME" ] && TOPNAME="Blueprints"
61 # These variables should be set by auto-detecting or knowing a priori the host
63 [ -z "$GOROOT" ] && GOROOT=`go env GOROOT`
67 echo " -h: print a help message and exit"
68 echo " -b <builddir>: set the build directory"
69 echo " -t: run tests"
70 echo " -n: use validations to depend on tests"
84 echo "Invalid option: -$OPTARG" >&2
89 echo "Option -$OPTARG requires an argument." >&2
95 # If RUN_TESTS is set, behave like -t was passed in as an option.
96 [ ! -z "$RUN_TESTS" ] && EXTRA_ARGS="${EXTRA_ARGS} -t"
98 # If $USE_VALIDATIONS is set, pass --use-validations.
99 [ ! -z "$USE_VALIDATIONS" ] && EXTRA_ARGS="${EXTRA_ARGS} --use-validations"
101 # If EMPTY_NINJA_FILE is set, have the primary build write out a 0-byte ninja
104 [ ! -z "$EMPTY_NINJA_FILE" ] && EXTRA_ARGS="${EXTRA_ARGS} --empty-ninja-file"
107 if [ -z "${BLUEPRINT_LIST_FILE}" ]; then
110 EXTRA_ARGS="${EXTRA_ARGS} -l ${BLUEPRINT_LIST_FILE}"
112 mkdir -p $BUILDDIR/.minibootstrap
114 echo "bootstrapBuildDir = $BUILDDIR" > $BUILDDIR/.minibootstrap/build.ninja
115 echo "topFile = $SRCDIR/$TOPNAME" >> $BUILDDIR/.minibootstrap/build.ninja
116 echo "extraArgs = $EXTRA_ARGS" >> $BUILDDIR/.minibootstrap/build.ninja
117 echo "builddir = $NINJA_BUILDDIR" >> $BUILDDIR/.minibootstrap/build.ninja
118 echo "include $BLUEPRINTDIR/bootstrap/build.ninja" >> $BUILDDIR/.minibootstrap/build.ninja
120 if [ ! -f "$BUILDDIR/.minibootstrap/build-globs.ninja" ]; then
121 touch "$BUILDDIR/.minibootstrap/build-globs.ninja"
131 touch "${BUILDDIR}/.out-dir"
133 if [ ! -z "$WRAPPER" ]; then