Test rachi instruction.
[deliverable/binutils-gdb.git] / sim / testsuite / d10v-elf / Makefile.in
1 # Makefile for regression testing the GNU debugger.
2 # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3
4 # This file is part of GDB.
5
6 # GDB is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # GDB is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 VPATH = @srcdir@
21 srcdir = @srcdir@
22 srcroot = $(srcdir)/..
23
24 prefix = @prefix@
25 exec_prefix = @exec_prefix@
26
27 host_alias = @host_alias@
28 target_alias = @target_alias@
29 program_transform_name = @program_transform_name@
30 build_canonical = @build@
31 host_canonical = @host@
32 target_canonical = @target@
33 target_cpu = @target_cpu@
34
35
36 SHELL = /bin/sh
37 SUBDIRS = @subdirs@
38 RPATH_ENVVAR = @RPATH_ENVVAR@
39
40 TESTS = \
41 exit47.ko \
42 hello.hi \
43 t-rachi.ok
44
45 AS_FOR_TARGET = `\
46 if [ -x ../../../gas/as-new ]; then \
47 echo ../../../gas/as-new ; \
48 else \
49 echo $(target_alias)-as ; \
50 fi`
51
52 LD_FOR_TARGET = `\
53 if [ -x ../../../ld/ld-new ]; then \
54 echo ../../../ld/ld-new ; \
55 else \
56 echo $(target_alias)-ld ; \
57 fi`
58
59 RUN_FOR_TARGET = `\
60 if [ -x ../../../sim/d10v/run ]; then \
61 echo ../../../sim/d10v/run ; \
62 else \
63 echo $(target_alias)-run ; \
64 fi`
65
66
67 check: sanity $(TESTS)
68 sanity:
69 @eval echo AS_FOR_TARGET=$(AS_FOR_TARGET)
70 @eval echo LD_FOR_TARGET=$(LD_FOR_TARGET)
71 @eval echo RUN_FOR_TARGET=$(RUN_FOR_TARGET)
72
73 clean:
74 rm -f $(TESTS)
75 rm -f *.run *.o
76 rm -f core *.core
77
78 # Rules for running the tests
79
80 .SUFFIXES: .ok .run .hi .ko .ti
81 .run.ok:
82 rm -f tmp-$* $*.hi
83 ulimit -t 5 ; \
84 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
85 mv tmp-$* $*.ok
86 .run.hi:
87 rm -f tmp-$* $*.hi diff-$*
88 ulimit -t 5 ; \
89 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
90 echo 'Hello World!' | diff - tmp-$* > diff-$*
91 cat tmp-$* diff-$* > $*.hi
92 .run.ko:
93 rm -f tmp-$* $*.ko
94 set +e ; \
95 ulimit -t 5 ; \
96 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$* ; \
97 if [ $$? -eq 47 ] ; then \
98 exit 0 ; \
99 else \
100 exit 1 ; \
101 fi
102 mv tmp-$* $*.ko
103 .run.ti:
104 rm -f tmp-$* $*.ti
105 set +e ; \
106 ulimit -t 5 ; \
107 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $(INTFLAGS_FOR_TARGET) $*.run > tmp-$*
108 test `cat tmp-$* | wc -l` -eq 10 < /dev/null
109 test `grep Tick tmp-$* | wc -l` -eq 10 < /dev/null
110 mv tmp-$* $*.ti
111
112
113 # Rules for building the test
114 # Preference is for obtaining the executable (.run) from a prebuilt image
115
116 .SUFFIXES: .uue .s .S .run
117 .uue.run:
118 head $* | grep $*.run > /dev/null
119 uudecode $*.uue
120 .run.u:
121 uuencode < $*.run $*.run > $*.u
122 .o.run:
123 $(LD_FOR_TARGET) $(LDFLAGS_FOR_TARGET) -o $*.run $*.o
124 .s.o:
125 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.s -o $*.o
126 .S.o:
127 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.S -o $*.o
128
129
130 Makefile: Makefile.in config.status
131 $(SHELL) ./config.status
132
133 config.status: configure
134 $(SHELL) ./config.status --recheck
This page took 0.033913 seconds and 4 git commands to generate.