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@
39 INTFLAGS_FOR_TARGET
=--watch-cycles-nmi
=+100
41 EXPECT
= `if [ -f $${rootme}/../../expect/expect ] ; then \
42 echo $${rootme}/../../expect/expect ; \
43 else echo expect ; fi`
45 RUNTEST
= $(RUNTEST_FOR_TARGET
)
49 RUNTEST_FOR_TARGET
= `\
50 if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
51 echo $${srcdir}/../../../dejagnu/runtest; \
53 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
56 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
62 if [ -x ../../../gas/as-new ]; then \
63 echo ../../../gas/as-new ; \
65 echo $(target_alias)-as ; \
69 if [ -x ../../../ld/ld-new ]; then \
70 echo ../../../ld/ld-new ; \
72 echo $(target_alias)-ld ; \
76 if [ -x ../../../sim/v850/run ]; then \
77 echo ../../../sim/v850/run ; \
79 echo $(target_alias)-run ; \
106 check: sanity
$(TESTS
)
108 @eval echo AS_FOR_TARGET
=$(AS_FOR_TARGET
)
109 @eval echo LD_FOR_TARGET
=$(LD_FOR_TARGET
)
110 @eval echo RUN_FOR_TARGET
=$(RUN_FOR_TARGET
)
117 # Rules for running the tests
119 .SUFFIXES
: .ok .run .hi .ko .ti
123 $(RUN_FOR_TARGET
) $(RUNFLAGS_FOR_TARGET
) $*.run
> tmp-
$*
126 rm -f tmp-
$* $*.hi diff-
$*
128 $(RUN_FOR_TARGET
) $(RUNFLAGS_FOR_TARGET
) $*.run
> tmp-
$*
129 echo
'Hello World!' | diff
- tmp-
$* > diff-
$*
130 cat tmp-
$* diff-
$* > $*.hi
135 $(RUN_FOR_TARGET
) $(RUNFLAGS_FOR_TARGET
) $*.run
> tmp-
$* ; \
136 if
[ $$?
-eq
47 ] ; then \
146 $(RUN_FOR_TARGET
) $(RUNFLAGS_FOR_TARGET
) $(INTFLAGS_FOR_TARGET
) $*.run
> tmp-
$*
147 test `cat tmp-$* | wc -l` -eq
10 < /dev
/null
148 test `grep Tick tmp-$* | wc -l` -eq
10 < /dev
/null
151 # Rules for building the test
152 # Preference is for obtaining the executable (.run) from a prebuilt image
154 .SUFFIXES
: .uue .s .S .run
156 head
$* | grep
$*.run
> /dev
/null
159 uuencode
< $*.run
$*.run
> $*.u
161 $(LD_FOR_TARGET
) $(LDFLAGS_FOR_TARGET
) -o
$*.run
$*.o
163 $(AS_FOR_TARGET
) $(ASFLAGS_FOR_TARGET
) -I
$(srcdir) $(srcdir)/$*.s
-o
$*.o
165 $(AS_FOR_TARGET
) $(ASFLAGS_FOR_TARGET
) -I
$(srcdir) $(srcdir)/$*.S
-o
$*.o
168 Makefile
: Makefile.in config.status
169 $(SHELL
) .
/config.status
171 config.status
: configure
172 $(SHELL
) .
/config.status
--recheck