summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-06-29 21:39:20 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2009-06-29 21:39:20 (GMT)
commit5d248ed34d511600c5e398d5ecaeffc7858888b5 (patch)
tree0fbb5bfc36b153dcd4844f9c993a0ded106c9896
parent2e86b6896a6964246d3a846a10c7659395a70ba5 (diff)
downloadktest-5d248ed34d511600c5e398d5ecaeffc7858888b5.zip
ktest-5d248ed34d511600c5e398d5ecaeffc7858888b5.tar.gz
ktest-5d248ed34d511600c5e398d5ecaeffc7858888b5.tar.bz2
ktest-5d248ed34d511600c5e398d5ecaeffc7858888b5.tar.xz
allmake: better handling of canned config; fix error
-rwxr-xr-xallmake.sh24
1 files changed, 17 insertions, 7 deletions
diff --git a/allmake.sh b/allmake.sh
index b1ad52d..520b49d 100755
--- a/allmake.sh
+++ b/allmake.sh
@@ -7,8 +7,10 @@ fi
set -xe
+canned='i386 x86_64 i386-pae'
+
if [ -z "$ALL" ]; then
- ALL='i386 x86_64 i386-pae i386-allconfig x86_64-allconfig i386-noconfig x86_64-noconfig'
+ ALL="$canned i386-allconfig x86_64-allconfig i386-noconfig x86_64-noconfig"
fi
here=`dirname "$0"`
@@ -19,18 +21,26 @@ jobs=$((cpus*2))
# This can be 'ccache gcc'
gcc=gcc
-mkdir -p o.i386-allconfig o.x86_64-allconfig \
- o.i386-noconfig o.x86_64-noconfig
-for c in [ i386 i386-pae x86_64 ]; do
+#
+# Canned configurations
+#
+for c in "$canned"; do
mkdir -p o.$c
if [ ! -f o.$c/.config ]; then
cp "$here"/config.$c o.$c/.config
fi
+ if grep -q -s '^CONFIG_X86_64=' o.$c/.config; then
+ yes '' | make ARCH=x86_64 O=o.$c CC="$gcc" oldconfig
+ else
+ yes '' | make ARCH=i386 O=o.$c CC="$gcc" oldconfig
+ fi
done
-yes '' | make ARCH=x86_64 O=o.x86_64 CC="$gcc" oldconfig
-yes '' | make ARCH=i386 O=o.i386 CC="$gcc -m32" oldconfig
-yes '' | make ARCH=i386 O=o.i386-pae CC="$gcc -m32" oldconfig
+#
+# Automatic configurations
+#
+mkdir -p o.i386-allconfig o.x86_64-allconfig \
+ o.i386-noconfig o.x86_64-noconfig
make ARCH=x86_64 O=o.x86_64-allconfig CC="$gcc" allyesconfig
sed -r -e 's/^(CONFIG_DEBUG_INFO)=./\1=n/' -i o.x86_64-allconfig/.config
sed -r -e 's/^(CONFIG_CMDLINE_BOOL)=./\1=n/' -i o.x86_64-allconfig/.config