]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/testsuite/d10v-elf/Makefile.in
This commit was generated by cvs2svn to track changes on a CVS vendor
[thirdparty/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-mac.ok \
44 t-mvtac.ok \
45 t-mvtc.ok \
46 t-msbu.ok \
47 t-mulxu.ok \
48 t-rac.ok \
49 t-rachi.ok \
50 t-rep.ok \
51 t-rte.ok \
52 t-sp.ok \
53 t-sub2w.ok \
54 t-sub.ok \
55 t-subi.ok \
56 #
57
58 AS_FOR_TARGET = `\
59 if [ -x ../../../gas/as-new ]; then \
60 echo ../../../gas/as-new ; \
61 else \
62 echo $(target_alias)-as ; \
63 fi`
64
65 LD_FOR_TARGET = `\
66 if [ -x ../../../ld/ld-new ]; then \
67 echo ../../../ld/ld-new ; \
68 else \
69 echo $(target_alias)-ld ; \
70 fi`
71
72 RUN_FOR_TARGET = `\
73 if [ -x ../../../sim/d10v/run ]; then \
74 echo ../../../sim/d10v/run ; \
75 else \
76 echo $(target_alias)-run ; \
77 fi`
78
79
80 check: sanity $(TESTS)
81 sanity:
82 @eval echo AS_FOR_TARGET=$(AS_FOR_TARGET)
83 @eval echo LD_FOR_TARGET=$(LD_FOR_TARGET)
84 @eval echo RUN_FOR_TARGET=$(RUN_FOR_TARGET)
85
86 clean:
87 rm -f $(TESTS)
88 rm -f *.run *.o
89 rm -f core *.core
90
91 # Rules for running the tests
92
93 .SUFFIXES: .ok .run .hi .ko .ti
94 .run.ok:
95 rm -f tmp-$* $*.hi
96 ulimit -t 5 ; \
97 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
98 mv tmp-$* $*.ok
99 .run.hi:
100 rm -f tmp-$* $*.hi diff-$*
101 ulimit -t 5 ; \
102 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
103 echo 'Hello World!' | diff - tmp-$* > diff-$*
104 cat tmp-$* diff-$* > $*.hi
105 .run.ko:
106 rm -f tmp-$* $*.ko
107 set +e ; \
108 ulimit -t 5 ; \
109 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$* ; \
110 if [ $$? -eq 47 ] ; then \
111 exit 0 ; \
112 else \
113 exit 1 ; \
114 fi
115 mv tmp-$* $*.ko
116 .run.ti:
117 rm -f tmp-$* $*.ti
118 set +e ; \
119 ulimit -t 5 ; \
120 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $(INTFLAGS_FOR_TARGET) $*.run > tmp-$*
121 test `cat tmp-$* | wc -l` -eq 10 < /dev/null
122 test `grep Tick tmp-$* | wc -l` -eq 10 < /dev/null
123 mv tmp-$* $*.ti
124
125
126 # Rules for building the test
127 # Preference is for obtaining the executable (.run) from a prebuilt image
128
129 .SUFFIXES: .uue .s .S .run
130 .uue.run:
131 head $* | grep $*.run > /dev/null
132 uudecode $*.uue
133 .run.u:
134 uuencode < $*.run $*.run > $*.u
135 .o.run:
136 $(LD_FOR_TARGET) $(LDFLAGS_FOR_TARGET) -o $*.run $*.o
137 .s.o:
138 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.s -o $*.o
139 .S.o:
140 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.S -o $*.o
141
142
143 Makefile: Makefile.in config.status
144 $(SHELL) ./config.status
145
146 config.status: configure
147 $(SHELL) ./config.status --recheck