Home | History | Annotate | Download | only in blueprint
      1 if [ ! "${BLUEPRINT_BOOTSTRAP_VERSION}" -eq "2" ]; then
      2   echo "Please run bootstrap.bash again (out of date)" >&2
      3   exit 1
      4 fi
      5 
      6 
      7 # Allow the caller to pass in a list of module files
      8 if [ -z "$BLUEPRINT_LIST_FILE" ]; then
      9   # If the caller does not pass a list of module files, then do a search now
     10   OUR_LIST_FILE="${BUILDDIR}/.bootstrap/bplist"
     11   TEMP_LIST_FILE="${OUR_FILES_LIST}.tmp"
     12   mkdir -p "$(dirname ${OUR_LIST_FILE})"
     13   (cd "$SRCDIR";
     14     find . -mindepth 1 -type d \( -name ".*" -o -execdir test -e {}/.out-dir \; \) -prune \
     15       -o -name $TOPNAME -print | sort) >"${TEMP_LIST_FILE}"
     16   if cmp -s "${OUR_LIST_FILE}" "${TEMP_LIST_FILE}"; then
     17     rm "${TEMP_LIST_FILE}"
     18   else
     19     mv "${TEMP_LIST_FILE}" "${OUR_LIST_FILE}"
     20   fi
     21   BLUEPRINT_LIST_FILE="${OUR_LIST_FILE}"
     22 fi
     23 
     24 export GOROOT
     25 export BLUEPRINT_LIST_FILE
     26 
     27 source "${BLUEPRINTDIR}/microfactory/microfactory.bash"
     28 
     29 BUILDDIR="${BUILDDIR}/.minibootstrap" build_go minibp github.com/google/blueprint/bootstrap/minibp
     30 
     31 # Build the bootstrap build.ninja
     32 "${NINJA}" -w dupbuild=err -f "${BUILDDIR}/.minibootstrap/build.ninja"
     33 
     34 # Build the primary builder and the main build.ninja
     35 "${NINJA}" -w dupbuild=err -f "${BUILDDIR}/.bootstrap/build.ninja"
     36 
     37 # SKIP_NINJA can be used by wrappers that wish to run ninja themselves.
     38 if [ -z "$SKIP_NINJA" ]; then
     39     "${NINJA}" -w dupbuild=err -f "${BUILDDIR}/build.ninja" "$@"
     40 else
     41     exit 0
     42 fi
     43