1 # Makefile for regression testing the GNU debugger.
2 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2004,
4 # Free Software Foundation, Inc.
6 # This file is part of GDB.
8 # GDB is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
13 # GDB is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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
= @gdb_target_cpu@
38 RPATH_ENVVAR
= @RPATH_ENVVAR@
39 ALL_SUBDIRS
= gdb.ada gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm \
41 gdb.fortran gdb.server gdb.java gdb.mi \
42 gdb.objc gdb.threads gdb.trace \
45 EXPECT
= `if [ -f $${rootme}/../../expect/expect ] ; then \
46 echo $${rootme}/../../expect/expect ; \
47 else echo expect ; fi`
49 RUNTEST
= $(RUNTEST_FOR_TARGET
)
53 RUNTEST_FOR_TARGET
= `\
54 if [ -f $${srcdir}/../../dejagnu/runtest ]; then \
55 echo $${srcdir}/../../dejagnu/runtest; \
57 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
60 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
64 #### host, target, and site specific Makefile frags come in here.
66 # The use of $$(x_FOR_TARGET) reduces the command line length by not
67 # duplicating the lengthy definition.
69 TARGET_FLAGS_TO_PASS
= \
71 "exec_prefix=$(exec_prefix)" \
72 "against=$(against)" \
73 'CC=$$(CC_FOR_TARGET)' \
74 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
75 "CFLAGS=$(TESTSUITE_CFLAGS)" \
76 'CXX=$$(CXX_FOR_TARGET)' \
77 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
78 "CXXFLAGS=$(CXXFLAGS)" \
79 "MAKEINFO=$(MAKEINFO)" \
80 "INSTALL=$(INSTALL)" \
81 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
82 "INSTALL_DATA=$(INSTALL_DATA)" \
83 "LDFLAGS=$(LDFLAGS)" \
85 "RUNTEST=$(RUNTEST)" \
86 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
89 @echo
"Nothing to be done for all..."
103 site.exp
: .
/config.status Makefile
104 @echo
"Making a new config file..."
107 -@mv site.exp site.bak
108 @echo
"## these variables are automatically generated by make ##" > .
/tmp0
109 @echo
"# Do not edit here. If you wish to override these values" >> .
/tmp0
110 @echo
"# add them to the last section" >> .
/tmp0
111 @echo
"set host_alias $(host_alias)" >> .
/tmp0
112 @echo
"set host_triplet ${host_canonical}" >> .
/tmp0
113 @echo
"set target_alias $(target_alias)" >> .
/tmp0
114 @echo
"set target_triplet ${target_canonical}" >> .
/tmp0
115 @echo
"set build_triplet ${build_canonical}" >> .
/tmp0
116 @echo
"set srcdir ${srcdir}" >> .
/tmp0
117 @echo
"set tool gdb" >> .
/tmp0
118 @echo
"## All variables above are generated by configure. Do Not Edit ##" >> .
/tmp0
119 @cat .
/tmp0
> site.exp
120 @cat site.bak | sed \
121 -e
'1,/^## All variables above are.*##/ d' >> site.exp
126 check: site.exp
all just-check
129 rootme
=`pwd`; export rootme
; \
130 srcdir=${srcdir} ; export srcdir ; \
131 EXPECT
=${EXPECT} ; export EXPECT
; \
132 EXEEXT
=${EXEEXT} ; export EXEEXT
; \
133 $(RPATH_ENVVAR
)=$$rootme/..
/..
/expect
:$$rootme/..
/..
/libstdc
++:$$rootme/..
/..
/tk
/unix
:$$rootme/..
/..
/tcl
/unix
:$$rootme/..
/..
/bfd
:$$rootme/..
/..
/opcodes
:$$$(RPATH_ENVVAR
); \
134 export $(RPATH_ENVVAR
); \
135 if
[ -f
$${rootme}/..
/..
/expect
/expect
] ; then \
136 TCL_LIBRARY
=$${srcdir}/..
/..
/tcl
/library
; \
137 export TCL_LIBRARY
; fi
; \
138 $(RUNTEST
) $(RUNTESTFLAGS
)
141 @for i in
$(DODIRS
); do \
142 if
[ -d .
/$$i ] ; then \
143 if
(rootme
=`pwd`/ ; export rootme
; \
144 rootsrc
=`cd $(srcdir); pwd`/ ; export rootsrc
; \
146 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
154 for
dir in
${ALL_SUBDIRS} ; \
157 if
[ -d
$$dir ] ; then \
158 (rootme
=`pwd`/ ; export rootme
; \
159 rootsrc
=`cd $(srcdir); pwd`/ ; export rootsrc
; \
160 cd
$$dir; $(MAKE
) $(TARGET_FLAGS_TO_PASS
)); \
165 -rm -f
*~ core
*.o a.out xgdb
*.x
*.grt
166 if
[ x
"${ALL_SUBDIRS}" != x
] ; then \
167 for
dir in
${ALL_SUBDIRS}; \
170 if
[ -d
$$dir ]; then \
171 (cd
$$dir; $(MAKE
) clean); \
176 distclean maintainer-clean
realclean: clean
178 -rm -f Makefile config.status
*-init.exp
179 -rm -fr
*.log summary detail
*.plog
*.sum
*.psum site.
*
180 if
[ x
"${ALL_SUBDIRS}" != x
] ; then \
181 for
dir in
${ALL_SUBDIRS}; \
184 if
[ -d
$$dir ]; then \
185 (cd
$$dir; $(MAKE
) distclean); \
190 Makefile
: Makefile.in config.status
$(host_makefile_frag
) $(target_makefile_frag
)
191 $(SHELL
) config.status
193 config.status
: configure
194 $(SHELL
) config.status
--recheck