]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/testsuite/mips64el-elf/Makefile.in
50f3929ffd163688ea2938fc1c60ce123e0701c7
[thirdparty/binutils-gdb.git] / sim / testsuite / mips64el-elf / Makefile.in
1 # Makefile for regression testing the GNU debugger.
2 # Copyright (C) 1992, 1993, 1994, 1995, 2007 Free Software Foundation, Inc.
3
4 # This file is part of GDB.
5
6 # This program 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 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program 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, see <http://www.gnu.org/licenses/>.
18
19 VPATH = @srcdir@
20 srcdir = @srcdir@
21 srcroot = $(srcdir)/..
22
23 prefix = @prefix@
24 exec_prefix = @exec_prefix@
25
26 host_alias = @host_alias@
27 target_alias = @target_alias@
28 program_transform_name = @program_transform_name@
29 build_canonical = @build@
30 host_canonical = @host@
31 target_canonical = @target@
32 target_cpu = @target_cpu@
33
34
35 SHELL = /bin/sh
36 SUBDIRS = @subdirs@
37 RPATH_ENVVAR = @RPATH_ENVVAR@
38
39 EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
40 echo $${rootme}/../../expect/expect ; \
41 else echo expect ; fi`
42
43 RUNTEST = $(RUNTEST_FOR_TARGET)
44
45 RUNTESTFLAGS =
46
47 RUNTEST_FOR_TARGET = `\
48 if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
49 echo $${srcdir}/../../../dejagnu/runtest; \
50 else \
51 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
52 echo runtest; \
53 else \
54 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
55 fi; \
56 fi`
57
58
59 AS_FOR_TARGET = `\
60 if [ -x ../../../gas/as-new ]; then \
61 echo ../../../gas/as-new ; \
62 else \
63 echo $(target_alias)-as ; \
64 fi`
65
66 LD_FOR_TARGET = `\
67 if [ -x ../../../ld/ld-new ]; then \
68 echo ../../../ld/ld-new ; \
69 else \
70 echo $(target_alias)-ld ; \
71 fi`
72
73 RUN_FOR_TARGET = `\
74 if [ -x ../../../sim/mips/run ]; then \
75 echo ../../../sim/mips/run ; \
76 else \
77 echo $(target_alias)-run ; \
78 fi`
79
80 TESTS =
81
82 check: sanity $(TESTS)
83 sanity:
84 @eval echo AS_FOR_TARGET = $(AS_FOR_TARGET)
85 @eval echo LD_FOR_TARGET = $(LD_FOR_TARGET)
86 @eval echo RUN_FOR_TARGET = $(RUN_FOR_TARGET)
87
88
89
90 # Rules for running all the tests, put into three types
91 # exit success, exit fail, print "Hello World"
92
93 .u.log:
94 uudecode $*.u
95 $(RUN_FOR_TARGET) $* > $*.log
96
97
98 # Rules for running the tests
99
100 .SUFFIXES: .u .uue .ok .ok .run .hi .ko .ko
101 .run.ok:
102 rm -f tmp-$* $*.ok
103 ulimit -t 5 ; $(RUN_FOR_TARGET) $*.run > tmp-$*
104 mv tmp-$* $*.ok
105 .run.hi:
106 rm -f tmp-$* $*.hi diff-$*
107 ulimit -t 5 ; $(RUN_FOR_TARGET) $*.run > tmp-$*
108 echo 'Hello World!' | diff - tmp-$* > diff-$*
109 cat tmp-$* diff-$* > $*.hi
110 .run.ko:
111 rm -f tmp-$* $*.ko
112 set +e ; \
113 ulimit -t 5 ; $(RUN_FOR_TARGET) $*.run > tmp-$* ; \
114 if [ $$? -eq 47 ] ; then \
115 exit 0 ; \
116 else \
117 exit 1 ; \
118 fi
119 mv tmp-$* $*.ko
120
121
122 # Rules for building all the tests and packing them into
123 # uuencoded files.
124
125 .run.u:
126 uuencode < $*.run $*.run > $*.u
127 @echo "Move $*.u $*.uue"
128 .uue.run:
129 uudecode $(srcdir)/$*.uue
130 .o.run:
131 $(LD_FOR_TARGET) -Ttext 0xa0020000 -o $*.run $*.o
132 .s.o:
133 $(AS_FOR_TARGET) -I $(srcdir) $(srcdir)/$*.s -o $*.o
134
135
136 #
137 # Standard
138 #
139 clean mostlyclean:
140 -rm -f *~ core *.o a.out *.x *.grt *.run tmp-* diff-*
141 rm -f $(TESTS)
142 # if [ x"${SUBDIRS}" != x ] ; then \
143 # for dir in ${SUBDIRS}; \
144 # do \
145 # echo "$$dir:"; \
146 # if [ -d $$dir ]; then \
147 # (cd $$dir; $(MAKE) clean); \
148 # fi; \
149 # done ; \
150 # else true; fi
151
152 distclean maintainer-clean realclean: clean
153 -rm -f *~ core
154 -rm -f Makefile config.status *-init.exp
155 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
156 # if [ x"${SUBDIRS}" != x ] ; then \
157 # for dir in ${SUBDIRS}; \
158 # do \
159 # echo "$$dir:"; \
160 # if [ -d $$dir ]; then \
161 # (cd $$dir; $(MAKE) distclean); \
162 # fi; \
163 # done ; \
164 # else true; fi
165
166 Makefile : Makefile.in config.status
167 $(SHELL) config.status
168
169 config.status: configure
170 $(SHELL) config.status --recheck