1 # Makefile for regression testing the GNU debugger.
2 # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
4 # This file is part of GDB.
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)
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.
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.
22 srcroot
= $(srcdir)/..
25 exec_prefix = @
exec_prefix@
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@
38 RPATH_ENVVAR
= @RPATH_ENVVAR@
40 EXPECT
= `if [ -f $${rootme}/../../expect/expect ] ; then \
41 echo $${rootme}/../../expect/expect ; \
42 else echo expect ; fi`
44 RUNTEST
= $(RUNTEST_FOR_TARGET
)
48 RUNTEST_FOR_TARGET
= `\
49 if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
50 echo $${srcdir}/../../../dejagnu/runtest; \
52 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
55 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
61 if [ -x ../../../gas/as.new ]; then \
62 echo ../../../gas/as.new ; \
64 echo $(target_alias)-as ; \
68 if [ -x ../../../ld/ld.new ]; then \
69 echo ../../../ld/ld.new ; \
71 echo $(target_alias)-ld ; \
75 if [ -x ../../../sim/${target_cpu}/run ]; then \
76 echo ../../../sim/${target_cpu}/run ; \
78 echo $(target_alias)-run ; \
115 check: sanity
$(TESTS
)
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
)
123 # Rules for running all the tests, put into three types
124 # exit success, exit fail, print "Hello World"
128 $(RUN_FOR_TARGET
) $* > $*.log
131 # Rules for running the tests
133 .SUFFIXES
: .u .ok .d30v .hi .ko
136 $(RUN_FOR_TARGET
) $*.d30v
> tmp-
$*
139 rm -f tmp-
$* $*.hi diff-
$*
140 $(RUN_FOR_TARGET
) $*.d30v
> tmp-
$*
141 echo
"Hello World" | diff
- tmp-
$* > diff-
$*
142 cat tmp-
$* diff-
$* > $*.hi
145 $(RUN_FOR_TARGET
) $*.d30v
> tmp-
$* ; \
146 if
[ $$?
-eq
47 ] ; then \
154 # Rules for building all the tests and packing them into
157 uuencode
: em-pstr.u em-e0.u em-e47.u em-pchr.u
159 .SUFFIXES
: .u .S .d30v
162 $(AS_FOR_TARGET
) $(srcdir)/$*.S
-o
$*.o
163 $(LD_FOR_TARGET
) -o
$* $*.o
164 uuencode
< $* $* > $*.u
168 $(AS_FOR_TARGET
) $(srcdir)/$*.S
-o
$*.o
169 $(LD_FOR_TARGET
) -o
$*.d30v
$*.o
178 -rm -f
*~ core
*.o a.out
*.x
*.grt
180 # if [ x"${SUBDIRS}" != x ] ; then \
181 # for dir in ${SUBDIRS}; \
184 # if [ -d $$dir ]; then \
185 # (cd $$dir; $(MAKE) clean); \
190 distclean maintainer-clean
realclean: clean
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}; \
198 # if [ -d $$dir ]; then \
199 # (cd $$dir; $(MAKE) distclean); \
204 Makefile
: Makefile.in config.status
205 $(SHELL
) config.status
207 config.status
: configure
208 $(SHELL
) config.status
--recheck