OSDN Git Service

Fix ChangeLog typo.
[pf3gnuchains/pf3gnuchains3x.git] / cgen / gen-all-sim
1 #! /bin/sh
2 # Utility script to generate the sim files for several ports.
3 # This is useful for verifying changes to the generated files
4 # without having to build every tool chain.
5 #
6 # Run this script in the src/cgen directory.
7
8 # Exit on any error.
9 set -e
10
11 # For debugging.
12 set -x
13
14 # fr30 not included, sim has been marked as obsolete.
15 # sh64 not included, not sure which configuration to use.
16 # i960 not included, it's being deleted.
17 cpus="m32r"
18
19 if [ ! -f sim.scm ]
20 then
21     echo "Not in the src/cgen directory." >& 2
22     exit 1
23 fi
24
25 builddir=tmp-sim
26
27 export cgendir=`pwd`
28
29 for c in $cpus
30 do
31   rm -rf $builddir
32   mkdir $builddir
33
34   case $c in
35   i960)
36     (
37         set -e
38         set -x
39         cd $builddir
40         $cgendir/../sim/i960/configure --prefix /tmp/junk --target i960-coff
41         make stamp-arch stamp-cpu stamp-desc
42     )
43     test $? = 0 || exit 1
44     ;;
45
46   m32r)
47     (
48         set -e
49         set -x
50         cd $builddir
51         $cgendir/../sim/m32r/configure --prefix /tmp/junk --target m32r-elf
52         make stamp-arch stamp-cpu stamp-xcpu
53     )
54     test $? = 0 || exit 1
55     ;;
56
57   fr30)
58     (
59         set -e
60         set -x
61         cd $builddir
62         $cgendir/../sim/fr30/configure --prefix /tmp/junk --target fr30-elf
63         make stamp-arch stamp-cpu
64     )
65     test $? = 0 || exit 1
66     ;;
67
68   sh64)
69     (
70         set -e
71         set -x
72         cd $builddir
73         $cgendir/../sim/sh64/configure --prefix /tmp/junk --target ???
74         make stamp-all
75     )
76     test $? = 0 || exit 1
77     ;;
78
79   *)
80     echo "unsupported cpu $c" >& 2
81     exit 1
82     ;;
83   esac
84 done