summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-12-31 16:47:57 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-12-31 16:47:57 +0100
commit50e7ffe10d0bca1ef5b2d27ebc518b456035a18d (patch)
treec25c7f2ab1a256d0f6a6781015c9febfb9631314 /scripts
parent23251c0c6ee9f7c0d3c4b20a5db9f51b4a0cc361 (diff)
fix native builds
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update-sys15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/update-sys b/scripts/update-sys
index 6a40aff36..bbbfcdbf8 100755
--- a/scripts/update-sys
+++ b/scripts/update-sys
@@ -1,4 +1,7 @@
-#!/bin/sh
+#!/usr/bin/env bash
+# 1. create Config.in.systems with all available target systems for each architecture
+# 2. if ADK configuration exist, create Config.in.arch/Config.in.system with fixed values
+
topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))
defaults() {
@@ -9,12 +12,22 @@ defaults() {
exit 0
}
+check_native() {
+ native=$(grep ^ADK_LINUX_NATIVE $topdir/.config)
+ if [ ! -z "$native" ];then
+ exit 0
+ fi
+}
+
for i in $(ls $topdir/target/);do
if [ -d "$topdir/target/$i/sys-enabled" ];then
cat $topdir/target/$i/sys-enabled/* > $topdir/target/$i/Config.in.systems 2>/dev/null
fi
done
if [ -f $topdir/.config ];then
+
+check_native
+
arch=$(grep ^ADK_TARGET_ARCH $topdir/.config|cut -f 2 -d = | sed -e 's#"##g')
systemsym=$(grep ^ADK_TARGET_SYSTEM_ $topdir/.config|cut -f 1 -d =)
system=$(grep ^ADK_TARGET_SYSTEM= $topdir/.config|cut -f 2 -d = | sed -e 's#"##g')