Thu Jul 25 12:08:09 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / Makefile.in
CommitLineData
099c286e 1# Makefile for regression testing the GNU debugger.
06c87bef 2# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
099c286e 3
dedd81f1 4# This file is part of GDB.
099c286e 5
dedd81f1
FF
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)
9# any later version.
099c286e 10
dedd81f1
FF
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.
099c286e 15
dedd81f1 16# You should have received a copy of the GNU General Public License
06c87bef
FF
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.
099c286e 19
bf3d2b75
MW
20srcdir = .
21prefix = /usr/local
099c286e 22program_transform_name =
bf3d2b75
MW
23
24exec_prefix = $(prefix)
25bindir = $(exec_prefix)/bin
26libdir = $(exec_prefix)/lib
27tooldir = $(libdir)/$(target_alias)
28
ebc0f582 29datadir = $(exec_prefix)/lib/dejagnu
bf3d2b75
MW
30mandir = $(prefix)/man
31man1dir = $(mandir)/man1
32man2dir = $(mandir)/man2
33man3dir = $(mandir)/man3
34man4dir = $(mandir)/man4
35man5dir = $(mandir)/man5
36man6dir = $(mandir)/man6
37man7dir = $(mandir)/man7
38man8dir = $(mandir)/man8
39man9dir = $(mandir)/man9
40infodir = $(prefix)/info
41includedir = $(prefix)/include
42gxx_includedir = $(tooldir)/g++-include
43docdir = $(datadir)/doc
44targetdir = $(datadir)/$(target_alias)
45
46SHELL = /bin/sh
47
48INSTALL = install -c
49INSTALL_PROGRAM = $(INSTALL)
50INSTALL_DATA = $(INSTALL)
51
06c87bef
FF
52# Do not use CFLAGS, that is set in the top-level config/mh-hp300 to not
53# contain -g. In general, the flags to be used for building the tools and
54# the flags to be used to build the testsuite probably don't have much to
55# do with each other.
56TESTSUITE_CFLAGS = -g
57CHILLFLAGS = $(TESTSUITE_CFLAGS)
099c286e
BC
58# This should probably be consistent with the top-level Makefile.in,
59# gdb/Makefile.in, and gdb/testsuite/gdb.t2*/Makefile.in, so that "make check"
60# has the same effect no matter where it is run.
61CXXFLAGS = -g -O
bf3d2b75
MW
62
63LINK= ln -s
64SUBDIRS=
65
099c286e
BC
66EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
67 echo $${rootme}/../../expect/expect ; \
68 else echo expect ; fi`
69
dedd81f1
FF
70RUNTEST = $(RUNTEST_FOR_TARGET)
71
72RUNTESTFLAGS =
73
74RUNTEST_FOR_TARGET = `\
75 if [ -f $${srcdir}/../../dejagnu/runtest ]; then \
76 echo $${srcdir}/../../dejagnu/runtest; \
bf3d2b75 77 else \
dedd81f1
FF
78 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
79 echo runtest; \
099c286e
BC
80 else \
81 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
82 fi; \
83 fi`
84
85CC_FOR_TARGET = ` \
86 if [ -f $${rootme}/../../gcc/xgcc ] ; then \
c2926ab7 87 if [ -f $${rootme}/../../newlib/Makefile ]; then \
be813d02 88 echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/ -idirafter $${rootme}/../../newlib/targ-include -idirafter $${rootsrc}/../../newlib/libc/include -nostdinc -L$${rootme}/../../newlib -B$${rootme}/../../newlib/; \
c2926ab7
C
89 else \
90 echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \
91 fi; \
099c286e
BC
92 else \
93 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
94 echo $(CC); \
bf3d2b75
MW
95 else \
96 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
97 fi; \
98 fi`
99
099c286e
BC
100CXX = gcc
101CXX_FOR_TARGET = ` \
102 if [ -f $${rootme}/../../gcc/xgcc ] ; then \
d18245ea 103 if [ -f $${rootme}/../../newlib/Makefile ]; then \
be813d02 104 echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/ -idirafter $${rootme}/../../newlib/targ-include -idirafter $${rootsrc}/../../newlib/libc/include -nostdinc -L$${rootme}/../../newlib -B$${rootme}/../../newlib/; \
c2926ab7
C
105 else \
106 echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \
107 fi; \
bf3d2b75
MW
108 else \
109 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
099c286e 110 echo $(CXX); \
bf3d2b75
MW
111 else \
112 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
113 fi; \
114 fi`
bf3d2b75 115
06c87bef 116CHILLFLAGS = $(TESTSUITE_CFLAGS)
099c286e
BC
117CHILL = gcc
118CHILL_FOR_TARGET = ` \
06c87bef 119 if [ -f $${rootme}/../../gcc/xgcc ] ; then \
0b9158e6 120 echo $${rootme}/../../gcc/xgcc -B$${rootme}../../gcc/; \
099c286e
BC
121 else \
122 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
06c87bef 123 echo $(CHILL); \
099c286e
BC
124 else \
125 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
126 fi; \
127 fi`
128
0b9158e6
PB
129CHILL_LIB = ` \
130 if [ -f $${rootme}/../../gcc/ch/runtime/libchill.a ] ; then \
131 echo $${rootme}/../../gcc/ch/runtime/chillrt0.o \
132 $${rootme}/../../gcc/ch/runtime/libchill.a; \
bf3d2b75 133 else \
0b9158e6 134 echo -lchill; \
bf3d2b75 135 fi`
bf3d2b75 136
bf3d2b75
MW
137#### host, target, and site specific Makefile frags come in here.
138
099c286e
BC
139# The use of $$(x_FOR_TARGET) reduces the command line length by not
140# duplicating the lengthy definition.
dedd81f1 141
099c286e
BC
142TARGET_FLAGS_TO_PASS = \
143 "prefix=$(prefix)" \
144 "exec_prefix=$(exec_prefix)" \
145 "against=$(against)" \
146 'CC=$$(CC_FOR_TARGET)' \
147 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
06c87bef 148 "CFLAGS=$(TESTSUITE_CFLAGS)" \
099c286e
BC
149 "CHILLFLAGS=$(CHILLFLAGS)" \
150 'CHILL=$$(CHILL_FOR_TARGET)' \
151 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
152 "CHILL_LIB=$(CHILL_LIB)" \
153 'CXX=$$(CXX_FOR_TARGET)' \
154 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
155 "CXXFLAGS=$(CXXFLAGS)" \
156 "MAKEINFO=$(MAKEINFO)" \
157 "INSTALL=$(INSTALL)" \
158 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
159 "INSTALL_DATA=$(INSTALL_DATA)" \
160 "LDFLAGS=$(LDFLAGS)" \
161 "LIBS=$(LIBS)" \
162 "RUNTEST=$(RUNTEST)" \
163 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
164 "BISON=$(BISON)"
bf3d2b75
MW
165
166all: subdirs
167
168.NOEXPORT:
169INFODIRS=doc
170info:
bf3d2b75 171install-info:
21ce979a 172dvi:
bf3d2b75
MW
173
174install:
bf3d2b75
MW
175
176uninstall: force
bf3d2b75 177
cc49ffa0 178site.exp: ./config.status Makefile
1ee369e8
RS
179 @echo "Making a new config file..."
180 -@rm -f ./tmp?
181 @touch site.exp
182 -@mv site.exp site.bak
183 @echo "## these variables are automatically generated by make ##" > ./tmp0
184 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
185 @echo "# add them to the last section" >> ./tmp0
be813d02 186 @echo "set host_alias $(host_alias)" >> ./tmp0
cc49ffa0 187 @echo "set host_triplet ${host_canonical}" >> ./tmp0
be813d02 188 @echo "set target_alias $(target_alias)" >> ./tmp0
cc49ffa0 189 @echo "set target_triplet ${target_canonical}" >> ./tmp0
1ee369e8 190 @echo "set srcdir ${srcdir}" >> ./tmp0
cc49ffa0 191 @echo "set tool gdb" >> ./tmp0
1ee369e8
RS
192 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
193 @cat ./tmp0 > site.exp
194 @cat site.bak | sed \
195 -e '1,/^## All variables above are.*##/ d' >> site.exp
cc49ffa0 196 -@rm -f ./tmp?
1ee369e8 197
21ce979a 198installcheck:
dedd81f1 199
ab8603ea 200check: site.exp all just-check
dedd81f1 201
ab8603ea 202just-check:
d27960e7 203 rootme=`pwd`; export rootme; \
099c286e
BC
204 srcdir=${srcdir} ; export srcdir ; \
205 EXPECT=${EXPECT} ; export EXPECT ; \
206 if [ -f $${rootme}/../../expect/expect ] ; then \
207 TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
208 export TCL_LIBRARY ; fi ; \
06c87bef 209 $(RUNTEST) $(RUNTESTFLAGS)
29aa49d4 210
bf3d2b75
MW
211subdir_do: force
212 @for i in $(DODIRS); do \
213 if [ -d ./$$i ] ; then \
214 if (rootme=`pwd`/ ; export rootme ; \
215 rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
216 cd ./$$i; \
099c286e 217 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
bf3d2b75
MW
218 else exit 1 ; fi ; \
219 else true ; fi ; \
220 done
29aa49d4
RS
221
222force:;
bf3d2b75
MW
223
224
225subdirs:
226 for dir in ${SUBDIRS}; \
227 do \
228 echo "$$dir:"; \
229 if [ -d $$dir ]; then \
230 (rootme=`pwd`/ ; export rootme ; \
231 rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
099c286e 232 cd $$dir; $(MAKE) $(TARGET_FLAGS_TO_PASS)); \
bf3d2b75
MW
233 fi; \
234 done
235
29aa49d4 236clean mostlyclean:
bf3d2b75 237 -rm -f *~ core *.o a.out xgdb *.x
06c87bef
FF
238 if [ x"${SUBDIRS}" != x ] ; then \
239 for dir in ${SUBDIRS}; \
240 do \
241 echo "$$dir:"; \
242 if [ -d $$dir ]; then \
243 (cd $$dir; $(MAKE) clean); \
244 fi; \
245 done ; \
246 else true; fi
29aa49d4
RS
247
248distclean realclean: clean
099c286e 249 -rm -f *~ core *.log *.plog *.sum *.psum site.*
bf3d2b75 250 -rm -f Makefile config.status *-init.exp
285ae57a 251 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
06c87bef
FF
252 if [ x"${SUBDIRS}" != x ] ; then \
253 for dir in ${SUBDIRS}; \
254 do \
255 echo "$$dir:"; \
256 if [ -d $$dir ]; then \
257 (cd $$dir; $(MAKE) distclean); \
258 fi; \
259 done ; \
260 else true; fi
bf3d2b75 261
ab8603ea 262Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag)
bf3d2b75 263 $(SHELL) ./config.status
This page took 0.227939 seconds and 4 git commands to generate.