diff include.sh @ 387:f0ceae67ebd0

Convert sources/configs/$ARCH files to sources/targets/$ARCH directories. The miniconfigs are no longer stored as "here" documents, but separate files, meaning they don't need to be copied into build/temp-$ARCH and are easier to use/update/compare. The remaining data goes in a "details" file for each architecture.
author Rob Landley <rob@landley.net>
date Tue, 12 Aug 2008 02:33:29 -0500
parents 739a56397f32
children becb1084a427
line wrap: on
line diff
--- a/include.sh	Mon Aug 11 03:54:24 2008 -0500
+++ b/include.sh	Tue Aug 12 02:33:29 2008 -0500
@@ -86,17 +86,23 @@
 then
   ARCH_NAME="$1"
   ARCH="$(echo "$1" | sed 's@.*/@@')"
-  if [ ! -f "${TOP}/sources/configs/${ARCH}" ]
+  if [ ! -f "${TOP}/sources/targets/${ARCH}/details" ]
   then
     echo "Supported architectures: "
-    (cd "${TOP}/sources/configs" && ls)
+    (cd "${TOP}/sources/targets" && ls)
     exit 1
   fi
 
+  # Read the relevant config file.
+
+  CONFIG_DIR="${TOP}/sources/targets/${ARCH}"
+  source "${CONFIG_DIR}/details"
+
   # Which platform are we building for?
 
   export WORK="${BUILD}/temp-$ARCH"
   mkdir -p "${WORK}"
+
   # Say "unknown" in two different ways so it doesn't assume we're NOT
   # cross compiling when the host and target are the same processor.  (If host
   # and target match, the binutils/gcc/make builds won't use the cross compiler
@@ -105,10 +111,6 @@
   [ -z "$CROSS_HOST" ] && export CROSS_HOST=`uname -m`-walrus-linux
   [ -z "$CROSS_TARGET" ] && export CROSS_TARGET=${ARCH}-unknown-linux
 
-  # Read the relevant config file.
-
-  source "${TOP}/sources/configs/${ARCH}"
-
   # Setup directories and add the cross compiler to the start of the path.
 
   export CROSS="${BUILD}/cross-compiler-$ARCH"