1 # Makefile for regression testing the GNU debugger.
2 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2004
3 # Free Software Foundation, Inc.
5 # This file is part of GDB.
7 # GDB 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 2, or (at your option)
12 # GDB 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, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 exec_prefix = @
exec_prefix@
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
= @gdb_target_cpu@
37 RPATH_ENVVAR
= @RPATH_ENVVAR@
38 ALL_SUBDIRS
= gdb.ada gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm \
39 gdb.fortran gdb.java gdb.mi gdb.objc gdb.threads gdb.trace \
42 EXPECT
= `if [ -f $${rootme}/../../expect/expect ] ; then \
43 echo $${rootme}/../../expect/expect ; \
44 else echo expect ; fi`
46 RUNTEST
= $(RUNTEST_FOR_TARGET
)
50 RUNTEST_FOR_TARGET
= `\
51 if [ -f $${srcdir}/../../dejagnu/runtest ]; then \
52 echo $${srcdir}/../../dejagnu/runtest; \
54 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
57 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
61 #### host, target, and site specific Makefile frags come in here.
63 # The use of $$(x_FOR_TARGET) reduces the command line length by not
64 # duplicating the lengthy definition.
66 TARGET_FLAGS_TO_PASS
= \
68 "exec_prefix=$(exec_prefix)" \
69 "against=$(against)" \
70 'CC=$$(CC_FOR_TARGET)' \
71 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
72 "CFLAGS=$(TESTSUITE_CFLAGS)" \
73 'CXX=$$(CXX_FOR_TARGET)' \
74 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
75 "CXXFLAGS=$(CXXFLAGS)" \
76 "MAKEINFO=$(MAKEINFO)" \
77 "INSTALL=$(INSTALL)" \
78 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
79 "INSTALL_DATA=$(INSTALL_DATA)" \
80 "LDFLAGS=$(LDFLAGS)" \
82 "RUNTEST=$(RUNTEST)" \
83 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
86 @echo
"Nothing to be done for all..."
100 site.exp
: .
/config.status Makefile
101 @echo
"Making a new config file..."
104 -@mv site.exp site.bak
105 @echo
"## these variables are automatically generated by make ##" > .
/tmp0
106 @echo
"# Do not edit here. If you wish to override these values" >> .
/tmp0
107 @echo
"# add them to the last section" >> .
/tmp0
108 @echo
"set host_alias $(host_alias)" >> .
/tmp0
109 @echo
"set host_triplet ${host_canonical}" >> .
/tmp0
110 @echo
"set target_alias $(target_alias)" >> .
/tmp0
111 @echo
"set target_triplet ${target_canonical}" >> .
/tmp0
112 @echo
"set build_triplet ${build_canonical}" >> .
/tmp0
113 @echo
"set srcdir ${srcdir}" >> .
/tmp0
114 @echo
"set tool gdb" >> .
/tmp0
115 @echo
"## All variables above are generated by configure. Do Not Edit ##" >> .
/tmp0
116 @cat .
/tmp0
> site.exp
117 @cat site.bak | sed \
118 -e
'1,/^## All variables above are.*##/ d' >> site.exp
123 check: site.exp
all just-check
126 rootme
=`pwd`; export rootme
; \
127 srcdir=${srcdir} ; export srcdir ; \
128 EXPECT
=${EXPECT} ; export EXPECT
; \
129 EXEEXT
=${EXEEXT} ; export EXEEXT
; \
130 $(RPATH_ENVVAR
)=$$rootme/..
/..
/expect
:$$rootme/..
/..
/libstdc
++:$$rootme/..
/..
/tk
/unix
:$$rootme/..
/..
/tcl
/unix
:$$rootme/..
/..
/bfd
:$$rootme/..
/..
/opcodes
:$$$(RPATH_ENVVAR
); \
131 export $(RPATH_ENVVAR
); \
132 if
[ -f
$${rootme}/..
/..
/expect
/expect
] ; then \
133 TCL_LIBRARY
=$${srcdir}/..
/..
/tcl
/library
; \
134 export TCL_LIBRARY
; fi
; \
135 $(RUNTEST
) $(RUNTESTFLAGS
)
138 @for i in
$(DODIRS
); do \
139 if
[ -d .
/$$i ] ; then \
140 if
(rootme
=`pwd`/ ; export rootme
; \
141 rootsrc
=`cd $(srcdir); pwd`/ ; export rootsrc
; \
143 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
151 for
dir in
${ALL_SUBDIRS} ; \
154 if
[ -d
$$dir ] ; then \
155 (rootme
=`pwd`/ ; export rootme
; \
156 rootsrc
=`cd $(srcdir); pwd`/ ; export rootsrc
; \
157 cd
$$dir; $(MAKE
) $(TARGET_FLAGS_TO_PASS
)); \
162 -rm -f
*~ core
*.o a.out xgdb
*.x
*.grt
163 if
[ x
"${ALL_SUBDIRS}" != x
] ; then \
164 for
dir in
${ALL_SUBDIRS}; \
167 if
[ -d
$$dir ]; then \
168 (cd
$$dir; $(MAKE
) clean); \
173 distclean maintainer-clean
realclean: clean
175 -rm -f Makefile config.status
*-init.exp
176 -rm -fr
*.log summary detail
*.plog
*.sum
*.psum site.
*
177 if
[ x
"${ALL_SUBDIRS}" != x
] ; then \
178 for
dir in
${ALL_SUBDIRS}; \
181 if
[ -d
$$dir ]; then \
182 (cd
$$dir; $(MAKE
) distclean); \
187 Makefile
: Makefile.in config.status
$(host_makefile_frag
) $(target_makefile_frag
)
188 $(SHELL
) config.status
190 config.status
: configure
191 $(SHELL
) config.status
--recheck