import gdb-2000-01-05 snapshot
[deliverable/binutils-gdb.git] / sim / testsuite / d10v-elf / Makefile.in
CommitLineData
c906108c
SS
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
20VPATH = @srcdir@
21srcdir = @srcdir@
22srcroot = $(srcdir)/..
23
24prefix = @prefix@
25exec_prefix = @exec_prefix@
26
27host_alias = @host_alias@
28target_alias = @target_alias@
29program_transform_name = @program_transform_name@
30build_canonical = @build@
31host_canonical = @host@
32target_canonical = @target@
33target_cpu = @target_cpu@
34
35
36SHELL = /bin/sh
37SUBDIRS = @subdirs@
38RPATH_ENVVAR = @RPATH_ENVVAR@
39
40TESTS = \
41 exit47.ko \
42 hello.hi \
43 t-dbt.ok \
cff3e48b 44 t-ld-st.ok \
c906108c
SS
45 t-mac.ok \
46 t-mvtac.ok \
47 t-mvtc.ok \
48 t-msbu.ok \
49 t-mulxu.ok \
50 t-rac.ok \
51 t-rachi.ok \
52 t-rdt.ok \
53 t-rep.ok \
54 t-rte.ok \
cff3e48b
JM
55 t-sac.ok \
56 t-sachi.ok \
c906108c 57 t-sadd.ok \
cff3e48b 58 t-slae.ok \
c906108c
SS
59 t-sp.ok \
60 t-sub2w.ok \
61 t-sub.ok \
62 t-subi.ok \
c3f6f71d
JM
63 t-ae-ld-d.ok \
64 t-ae-ld-i.ok \
65 t-ae-ld-id.ok \
66 t-ae-ld-im.ok \
67 t-ae-ld-ip.ok \
68 t-ae-ld2w-d.ok \
69 t-ae-ld2w-i.ok \
70 t-ae-ld2w-id.ok \
71 t-ae-ld2w-im.ok \
72 t-ae-ld2w-ip.ok \
73 t-ae-st-d.ok \
74 t-ae-st-i.ok \
75 t-ae-st-id.ok \
76 t-ae-st-im.ok \
77 t-ae-st-ip.ok \
78 t-ae-st-is.ok \
79 t-ae-st2w-d.ok \
80 t-ae-st2w-i.ok \
81 t-ae-st2w-id.ok \
82 t-ae-st2w-im.ok \
83 t-ae-st2w-ip.ok \
84 t-ae-st2w-is.ok \
85 t-mod-ld-pre.ok \
c906108c
SS
86#
87
88AS_FOR_TARGET = `\
89 if [ -x ../../../gas/as-new ]; then \
90 echo ../../../gas/as-new ; \
91 else \
92 echo $(target_alias)-as ; \
93 fi`
94
95LD_FOR_TARGET = `\
96 if [ -x ../../../ld/ld-new ]; then \
97 echo ../../../ld/ld-new ; \
98 else \
99 echo $(target_alias)-ld ; \
100 fi`
101
102RUN_FOR_TARGET = `\
103 if [ -x ../../../sim/d10v/run ]; then \
104 echo ../../../sim/d10v/run ; \
105 else \
106 echo $(target_alias)-run ; \
107 fi`
108
109
110check: sanity $(TESTS)
111sanity:
112 @eval echo AS_FOR_TARGET=$(AS_FOR_TARGET)
113 @eval echo LD_FOR_TARGET=$(LD_FOR_TARGET)
114 @eval echo RUN_FOR_TARGET=$(RUN_FOR_TARGET)
115
116clean:
117 rm -f $(TESTS)
118 rm -f *.run *.o
119 rm -f core *.core
120
121# Rules for running the tests
122
123.SUFFIXES: .ok .run .hi .ko .ti
124.run.ok:
125 rm -f tmp-$* $*.hi
126 ulimit -t 5 ; \
127 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
128 mv tmp-$* $*.ok
129.run.hi:
130 rm -f tmp-$* $*.hi diff-$*
131 ulimit -t 5 ; \
132 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
133 echo 'Hello World!' | diff - tmp-$* > diff-$*
134 cat tmp-$* diff-$* > $*.hi
135.run.ko:
136 rm -f tmp-$* $*.ko
137 set +e ; \
138 ulimit -t 5 ; \
139 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$* ; \
140 if [ $$? -eq 47 ] ; then \
141 exit 0 ; \
142 else \
143 exit 1 ; \
144 fi
145 mv tmp-$* $*.ko
146.run.ti:
147 rm -f tmp-$* $*.ti
148 set +e ; \
149 ulimit -t 5 ; \
150 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $(INTFLAGS_FOR_TARGET) $*.run > tmp-$*
151 test `cat tmp-$* | wc -l` -eq 10 < /dev/null
152 test `grep Tick tmp-$* | wc -l` -eq 10 < /dev/null
153 mv tmp-$* $*.ti
154
155
156# Rules for building the test
157# Preference is for obtaining the executable (.run) from a prebuilt image
158
159.SUFFIXES: .uue .s .S .run
160.uue.run:
161 head $* | grep $*.run > /dev/null
162 uudecode $*.uue
163.run.u:
164 uuencode < $*.run $*.run > $*.u
165.o.run:
166 $(LD_FOR_TARGET) $(LDFLAGS_FOR_TARGET) -o $*.run $*.o
167.s.o:
168 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.s -o $*.o
169.S.o:
170 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.S -o $*.o
171
172
173Makefile: Makefile.in config.status
174 $(SHELL) ./config.status
175
176config.status: configure
177 $(SHELL) ./config.status --recheck
This page took 0.041698 seconds and 4 git commands to generate.