aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Ferrell <major@homeonderanged.org>2012-03-24 22:13:34 -0500
committerMark Ferrell <major@homeonderanged.org>2012-03-24 22:13:34 -0500
commit8f67ea9fbec009a48d73d94c9e8d678bfc40fc1f (patch)
treea5deb54d1fa62bf5e4dfba2c1a42442bd299223d
parent694e82e2fdd2eb04284d6f79728f9c9a97223175 (diff)
Support build configs
-rwxr-xr-xscripts/build9
-rwxr-xr-xscripts/builder/build-compile16
2 files changed, 14 insertions, 11 deletions
diff --git a/scripts/build b/scripts/build
index b8cd444..d7fc40d 100755
--- a/scripts/build
+++ b/scripts/build
@@ -201,6 +201,7 @@ fi
# This may be a little bit confusing to most. The core issue here is the
# ability to deal with compiled-in defaults, user-defined defaults, environment
# settings, and target settings.
+BUILDER_CFGDIR="${BUILDER_TOPDIR}/.builder"
# first clear the variables that would be set by the configs
CFGDIR=
@@ -210,16 +211,20 @@ ATFDIR=
LIBDIR=
# grab the default and target settings if available, let the target settings
# override the user-defined defaults.
-[ -f "${BUILDER_CFGDIR}/default" ] && . "${BUILDER_CFGDIR}/default"
+if [ "${TARGET}" = "default" ]; then
+ . "${BUILDER_CFGDIR}/default"
+fi
+
if [ "${TARGET}" != "default" ]; then
if [ ! -f "${BUILDER_CFGDIR}/${TARGET}" ]; then
echo "error: invalid target '${TARGET}'" >&2
exit 1
fi
+ BUILDER_CONFIG="${BUILDER_CFGDIR}/${TARGET}"
fi
+. "${BUILDER_CONFIG}"
# set the builtin defaults based on the BUILDER_TOPDIR
-BUILDER_CFGDIR="${BUILDER_CFGDIR:-${BUILDER_TOPDIR}/.builder}"
BUILDER_PKGDIR="${BUILDER_PKGDIR:-${BUILDER_TOPDIR}/packages}"
BUILDER_SRCDIR="${BUILDER_SRCDIR:-${BUILDER_TOPDIR}/sources}"
BUILDER_ATFDIR="${BUILDER_ATFDIR:-${BUILDER_TOPDIR}/artifacts}"
diff --git a/scripts/builder/build-compile b/scripts/builder/build-compile
index 99bb193..0ecad21 100755
--- a/scripts/builder/build-compile
+++ b/scripts/builder/build-compile
@@ -2,16 +2,14 @@
echo "compiling: ${1}"
-# FIXME the CHOST is part of the BUILDER environment and should be handled
-# accordingly
-CHOST="i586-uplogix-linux-gnu"
-CROSS_COMPILE="${CHOST}-"
-ARCH="x86"
-export ARCH CROSS_COMPILE CHOST
+if [ -z "${CHOST}" ]; then
+ CROSS_COMPILE="${CHOST}-"
+ export CROSS_COMPILE CHOST
+fi
-# FIXME xcb sucks my will to live
-PYTHONPATH="${BUILDER_SYSROOT}/usr/lib/python2.7/dist-packages"
-export PYTHONPATH
+if [ -z "${ARCH}" ]; then
+ export ARCH
+fi
# Don't pass along the builder jobcontrol data to child processes
unset MAKEFLAGS