]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/testsuite/d30v-elf/Makefile.in
This commit was generated by cvs2svn to track changes on a CVS vendor
[thirdparty/binutils-gdb.git] / sim / testsuite / d30v-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 EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
41 echo $${rootme}/../../expect/expect ; \
42 else echo expect ; fi`
43
44 RUNTEST = $(RUNTEST_FOR_TARGET)
45
46 RUNTESTFLAGS =
47
48 RUNTEST_FOR_TARGET = `\
49 if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
50 echo $${srcdir}/../../../dejagnu/runtest; \
51 else \
52 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
53 echo runtest; \
54 else \
55 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
56 fi; \
57 fi`
58
59
60 AS_FOR_TARGET = `\
61 if [ -x ../../../gas/as.new ]; then \
62 echo ../../../gas/as.new ; \
63 else \
64 echo $(target_alias)-as ; \
65 fi`
66
67 LD_FOR_TARGET = `\
68 if [ -x ../../../ld/ld.new ]; then \
69 echo ../../../ld/ld.new ; \
70 else \
71 echo $(target_alias)-ld ; \
72 fi`
73
74 RUN_FOR_TARGET = `\
75 if [ -x ../../../sim/${target_cpu}/run ]; then \
76 echo ../../../sim/${target_cpu}/run ; \
77 else \
78 echo $(target_alias)-run ; \
79 fi`
80
81 TESTS = \
82 em-e0.ok \
83 em-e47.ko \
84 em-pstr.hi \
85 em-pchr.hi \
86 \
87 ls-ld2h.ko \
88 ls-ld2w.ko \
89 ls-ld4bh.ko \
90 ls-ld4bhu.ko \
91 ls-ldb.ko \
92 ls-ldbu.ko \
93 ls-ldh.ko \
94 ls-ldhh.ko \
95 ls-ldhu.ko \
96 ls-ldw.ko \
97 ls-moddec.ko \
98 ls-modinc.ko \
99 ls-st2h.hi \
100 ls-st2w.hi \
101 ls-st4hb.hi \
102 ls-stb.hi \
103 ls-sth.hi \
104 ls-sthh.hi \
105 ls-stw.hi \
106 \
107 br-bra.ok \
108 br-bratnz.ok \
109 br-bratzr.ok \
110 br-bsr.ok \
111 br-dbra.ko \
112 br-djmp.ko \
113 br-djsr.ok \
114
115 check: sanity $(TESTS)
116 sanity:
117 @eval echo AS_FOR_TARGET = $(AS_FOR_TARGET)
118 @eval echo LD_FOR_TARGET = $(LD_FOR_TARGET)
119 @eval echo RUN_FOR_TARGET = $(RUN_FOR_TARGET)
120
121
122
123 # Rules for running all the tests, put into three types
124 # exit success, exit fail, print "Hello World"
125
126 .u.log:
127 uudecode $*.u
128 $(RUN_FOR_TARGET) $* > $*.log
129
130
131 # Rules for running the tests
132
133 .SUFFIXES: .u .ok .d30v .hi .ko
134 .d30v.ok:
135 rm -f tmp-$* $*.hi
136 $(RUN_FOR_TARGET) $*.d30v > tmp-$*
137 mv tmp-$* $*.ok
138 .d30v.hi:
139 rm -f tmp-$* $*.hi diff-$*
140 $(RUN_FOR_TARGET) $*.d30v > tmp-$*
141 echo "Hello World" | diff - tmp-$* > diff-$*
142 cat tmp-$* diff-$* > $*.hi
143 .d30v.ko:
144 rm -f tmp-$* $*.ko
145 $(RUN_FOR_TARGET) $*.d30v > tmp-$* ; \
146 if [ $$? -eq 47 ] ; then \
147 exit 0 ; \
148 else \
149 exit 1 ; \
150 fi
151 mv tmp-$* $*.ko
152
153
154 # Rules for building all the tests and packing them into
155 # uuencoded files.
156
157 uuencode: em-pstr.u em-e0.u em-e47.u em-pchr.u
158
159 .SUFFIXES: .u .S .d30v
160 .S.u:
161 rm -f $*.o $*.d30v
162 $(AS_FOR_TARGET) $(srcdir)/$*.S -o $*.o
163 $(LD_FOR_TARGET) -o $* $*.o
164 uuencode < $* $* > $*.u
165 rm -f $*.o $*
166 .S.d30v:
167 rm -f $*.o $*.d30v
168 $(AS_FOR_TARGET) $(srcdir)/$*.S -o $*.o
169 $(LD_FOR_TARGET) -o $*.d30v $*.o
170 rm -f $*.o $*
171
172
173
174 #
175 # Standard
176 #
177 clean mostlyclean:
178 -rm -f *~ core *.o a.out *.x *.grt
179 rm -f $(TESTS)
180 # if [ x"${SUBDIRS}" != x ] ; then \
181 # for dir in ${SUBDIRS}; \
182 # do \
183 # echo "$$dir:"; \
184 # if [ -d $$dir ]; then \
185 # (cd $$dir; $(MAKE) clean); \
186 # fi; \
187 # done ; \
188 # else true; fi
189
190 distclean maintainer-clean realclean: clean
191 -rm -f *~ core
192 -rm -f Makefile config.status *-init.exp
193 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
194 # if [ x"${SUBDIRS}" != x ] ; then \
195 # for dir in ${SUBDIRS}; \
196 # do \
197 # echo "$$dir:"; \
198 # if [ -d $$dir ]; then \
199 # (cd $$dir; $(MAKE) distclean); \
200 # fi; \
201 # done ; \
202 # else true; fi
203
204 Makefile : Makefile.in config.status
205 $(SHELL) config.status
206
207 config.status: configure
208 $(SHELL) config.status --recheck