view sources/more/buildall.sh @ 944:fc134a13357e

Largeish refactoring and cleanup of compiler build: Break out native-compiler.sh from root-filesystem.sh NATIVE_TOOLCHAIN=* went away now NO_NATIVE_COMPILER=1 affecting build.sh root-filesystem.sh: Much simplified No more ROOT_TOPDIR, adjust STAGE_DIR=$STAGE_DIR/usr instead. Doesn't build native-compiler, instead copies existing native-compiler else installs library binaries out of cross compiler. Only build make/bash/distcc when we have a native compiler. native-compiler.sh: No more BUILD_STATIC_NATIVE_COMPILER, now built/packaged separately by default (NO_NATIVE_COMPILER=1 to skip), then incorporated into root-filesystem. now static by default, use BUILD_STATIC=none to override This script also makes the (optional) full cross-compiler renamed STATIC_CROSS_COMPILER_HOST to STATIC_CC_HOST Rename cross-compiler stage to simple-cross-compiler
author Rob Landley <rob@landley.net>
date Sun, 03 Jan 2010 17:04:39 -0600
parents 43efbc4c4838
children 71456bd138eb
line wrap: on
line source

#!/bin/bash

# Build every target architecture, creating build-$ARCH.txt log files.
# If $FORK is set, build them in parallel.

. sources/functions.sh || exit 1

[ -z "$STATIC_CC_HOST" ] && export STATIC_CC_HOST=i686
export FAIL_QUIET=1

[ -z "${ARCHES}" ] &&
  ARCHES="$(cd sources/targets/; ls | grep -v '^hw-')"

[ -z "$HWARCHES" ] &&
  HWARCHES="$(cd sources/targets; ls | grep '^hw-')"

[ ! -z "$FORK" ] && QUIET=1

trap "killtree $$" EXIT

# Build the host architecture.  This has to be built first so the other
# architectures can canadian cross static compilers to run on the host using
# this toolchain to link against a host version of uClibc.

# This also performs the download.sh and host-tools.sh steps, which don't
# parallelize well if many build.sh instances try to call them at once.

# If this fails, don't bother trying to build the other targets.

blank_tempdir build
mkdir -p build/logs &&
(./download.sh --extract 2>&1 &&
 ./host-tools.sh 2>&1 &&
 ./cross-compiler.sh 2>&1 "$STATIC_CC_HOST" ||
 dienow) | tee build/logs/build-host-cc.txt | maybe_quiet

cp packages/MANIFEST build || dienow

# Build all non-hw targets, possibly in parallel

for i in ${ARCHES}
do
  maybe_fork "./build.sh $i 2>&1 | tee build/logs/build-${i}.txt | maybe_quiet"
done

wait

# Build all hw targets, possibly in parallel

for i in ${HWARCHES}
do
  maybe_fork "./build.sh $i 2>&1 | tee build/logs/build-${i}.txt | maybe_quiet"
done

# Run smoketest.sh for each non-hw target.

for i in ${ARCHES}
do
  maybe_fork "./smoketest.sh $i 2>&1 | tee build/logs/smoketest-$i.txt | maybe_quiet"
done

wait

# This one has to do its own forking to avoid redundantly creating hdc.sqf

sources/more/native-static-build.sh $i

# Create a file containing simple pass/fail results for all architectures.

sources/more/smoketest-all.sh --logs | tee build/logs/status.txt