1 # Makefile for regression testing the GNU debugger.
2 # Copyright (C) 1992, 1993, 1994, 1995, 2007, 2008, 2009
3 # Free Software Foundation, Inc.
5 # This file is part of GDB.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
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@
90 if [ -x ../../../gas/as-new ]; then \
91 echo ../../../gas/as-new ; \
93 echo $(target_alias)-as ; \
97 if [ -x ../../../ld/ld-new ]; then \
98 echo ../../../ld/ld-new ; \
100 echo $(target_alias)-ld ; \
104 if [ -x ../../../sim/d10v/run ]; then \
105 echo ../../../sim/d10v/run ; \
107 echo $(target_alias)-run ; \
110 # Force d10v into operating mode.
111 RUNFLAGS_FOR_TARGET
=-o
114 check: sanity
$(TESTS
)
116 @eval echo AS_FOR_TARGET
=$(AS_FOR_TARGET
)
117 @eval echo LD_FOR_TARGET
=$(LD_FOR_TARGET
)
118 @eval echo RUN_FOR_TARGET
=$(RUN_FOR_TARGET
)
125 # Rules for running the tests
127 .SUFFIXES
: .ok .run .hi .ko .ti
131 $(RUN_FOR_TARGET
) $(RUNFLAGS_FOR_TARGET
) $*.run
> tmp-
$*
134 rm -f tmp-
$* $*.hi diff-
$*
136 $(RUN_FOR_TARGET
) $(RUNFLAGS_FOR_TARGET
) $*.run
> tmp-
$*
137 echo
'Hello World!' | diff
- tmp-
$* > diff-
$*
138 cat tmp-
$* diff-
$* > $*.hi
143 $(RUN_FOR_TARGET
) $(RUNFLAGS_FOR_TARGET
) $*.run
> tmp-
$* ; \
144 if
[ $$?
-eq
47 ] ; then \
154 $(RUN_FOR_TARGET
) $(RUNFLAGS_FOR_TARGET
) $(INTFLAGS_FOR_TARGET
) $*.run
> tmp-
$*
155 test `cat tmp-$* | wc -l` -eq
10 < /dev
/null
156 test `grep Tick tmp-$* | wc -l` -eq
10 < /dev
/null
160 # Rules for building the test
161 # Preference is for obtaining the executable (.run) from a prebuilt image
163 .SUFFIXES
: .uue .s .S .run
165 head
$* | grep
$*.run
> /dev
/null
168 uuencode
< $*.run
$*.run
> $*.u
170 $(LD_FOR_TARGET
) $(LDFLAGS_FOR_TARGET
) -o
$*.run
$*.o
172 $(AS_FOR_TARGET
) $(ASFLAGS_FOR_TARGET
) -I
$(srcdir) $(srcdir)/$*.s
-o
$*.o
174 $(AS_FOR_TARGET
) $(ASFLAGS_FOR_TARGET
) -I
$(srcdir) $(srcdir)/$*.S
-o
$*.o
177 Makefile
: Makefile.in config.status
178 $(SHELL
) .
/config.status
180 config.status
: configure
181 $(SHELL
) .
/config.status
--recheck