+2002-12-19 Doug Evans <dje@sebabeach.org>
+
+ * gen-all-sim: New script.
+
2002-12-16 DJ Delorie <dj@delorie.com>
* cpu/xstormy16.opc (parse_immediate16): Add prototype.
--- /dev/null
+#! /bin/sh
+# Utility script to generate the sim files for several ports.
+# This is useful for verifying changes to the generated files
+# without having to build every tool chain.
+#
+# Run this script in the src/cgen directory.
+
+# Exit on any error.
+set -e
+
+# For debugging.
+set -x
+
+cpus="i960 m32r"
+
+if [ ! -f sim.scm ]
+then
+ echo "Not in the src/cgen directory." >& 2
+ exit 1
+fi
+
+export cgendir=`pwd`
+
+for c in $cpus
+do
+ rm -rf /tmp/tmp-cgen
+ mkdir /tmp/tmp-cgen
+
+ case $c in
+ i960)
+ (
+ set -e
+ set -x
+ cd /tmp/tmp-cgen
+ $cgendir/../sim/i960/configure --prefix /tmp/junk --target i960-coff
+ make stamp-arch stamp-cpu stamp-desc
+ )
+ test $? == 0 || exit 1
+ ;;
+
+ m32r)
+ (
+ set -e
+ set -x
+ cd /tmp/tmp-cgen
+ $cgendir/../sim/m32r/configure --prefix /tmp/junk --target m32r-elf
+ make stamp-arch stamp-cpu stamp-xcpu
+ )
+ test $? == 0 || exit 1
+ ;;
+
+ *)
+ echo "unsupported cpu $c" >& 2
+ exit 1
+ ;;
+ esac
+done
+
+rm -rf /tmp/tmp-cgen