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