]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/Makefile.in
Reorganized GDB tests - base
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / Makefile.in
CommitLineData
ef44eed1
SS
1# Makefile for regression testing the GNU debugger.
2# Copyright (C) 1992, 93, 1994 Free Software Foundation, Inc.
3
4# This file is part of GDB.
5
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.
10
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.
15
16# You should have received a copy of the GNU General Public License
17# along with this program; see the file COPYING. If not, write to
18# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20srcdir = .
21prefix = /usr/local
22program_transform_name =
23
24exec_prefix = $(prefix)
25bindir = $(exec_prefix)/bin
26libdir = $(exec_prefix)/lib
27tooldir = $(libdir)/$(target_alias)
28
29datadir = $(exec_prefix)/lib/dejagnu
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
52CFLAGS = -g
53# start-sanitize-chill
54CHILLFLAGS = $(CFLAGS)
55# end-sanitize-chill
56# This should probably be consistent with the top-level Makefile.in,
57# gdb/Makefile.in, and gdb/testsuite/gdb.t2*/Makefile.in, so that "make check"
58# has the same effect no matter where it is run.
59CXXFLAGS = -g -O
60
61LINK= ln -s
62
63RUNTEST = runtest
64
65EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
66 echo $${rootme}/../../expect/expect ; \
67 else echo expect ; fi`
68
69RUNTEST_FOR_TARGET = ` \
70 if [ -f $${rootme}/../../dejagnu/site.exp ] ; then \
71 echo $${rootme}/../../dejagnu/runtest ; \
72 else \
73 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
74 echo $(RUNTEST); \
75 else \
76 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
77 fi; \
78 fi`
79
80RUNTESTFLAGS =
81
82CC_FOR_TARGET = ` \
83 if [ -f $${rootme}/../../gcc/xgcc ] ; then \
84 echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \
85 else \
86 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
87 echo $(CC); \
88 else \
89 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
90 fi; \
91 fi`
92
93CFLAGS_FOR_TARGET = $(CFLAGS)
94
95GDB = ` \
96 if [ -f $${rootme}/../gdb ] ; \
97 then echo $${rootme}|sed -e 's@/[^/]*$$@@'|sed -e 's@$$@/gdb@' ; \
98 else echo gdb; \
99 fi`
100
101GDBFLAGS = -nx
102
103#### host, target, and site specific Makefile frags come in here.
104
105EXECUTABLES = \
106 bitfields \
107 break \
108 callfuncs \
109 coremaker \
110 exprs \
111 funcargs \
112 interrupt \
113 list \
114 mips_pro \
115 nodebug \
116 opaque \
117 opaque-info.exp \
118 printcmds \
119 ptype \
120 recurse \
121 return \
122 run \
123 scope \
124 setvar \
125 signals \
126 t10 \
127 twice \
128 watchpoint \
129 whatis \
130 whatis-info.exp \
131 $(CROSS_EXECUTABLES)
132
133# List of test executables that we have available. They are kept in
134# uuencoded format to avoid SCCS/RCS problems with binary files.
135
136CROSS_EXECUTABLES = \
137 i486-elf \
138 i860-elf \
139 m68k-elf \
140 m68k-aout \
141 m68k-aout2 \
142 mips-ecoff \
143 sparc-aout \
144 sparc-elf
145
146all: $(EXECUTABLES) corefile
147
148CC_CFLAGS_LD_FOR_TARGET = $(CC_FOR_TARGET) $(CFLAGS) $(LDFLAGS_FOR_TARGET)
149
150CC_CFLAGS_FOR_TARGET = $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET)
151
152run: run.o
153 $(CC_CFLAGS_LD_FOR_TARGET) -o run run.o $(LIBS)
154
155run.o: run.c
156 $(CC_FOR_TARGET) $(CFLAGS) -c $(srcdir)/run.c
157
158# We want to make sure comp-info.exp reflects the way that whatis was compiled;
159# that's why this isn't a separate rule.
160
161whatis whatis-info.exp: whatis.o
162 $(CC_CFLAGS_LD_FOR_TARGET) -o whatis.tmp whatis.o $(LIBS)
163 $(CC_FOR_TARGET) $(CFLAGS) -E $(srcdir)/whatis-info.c >whatis-info.tmp
164 mv whatis-info.tmp whatis-info.exp
165 mv whatis.tmp whatis
166
167.PRECIOUS: whatis whatis-info.exp
168
169whatis.o: whatis.c
170 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/whatis.c
171
172ptype: ptype.o
173 $(CC_CFLAGS_LD_FOR_TARGET) -o ptype ptype.o $(LIBS)
174
175ptype.o: ptype.c
176 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/ptype.c
177
178setvar: setvar.o
179 $(CC_CFLAGS_LD_FOR_TARGET) -o setvar setvar.o $(LIBS)
180
181setvar.o: setvar.c
182 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/setvar.c
183
184exprs: exprs.o
185 $(CC_CFLAGS_LD_FOR_TARGET) -o exprs exprs.o $(LIBS)
186
187exprs.o: exprs.c
188 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/exprs.c
189
190break: break.o
191 $(CC_CFLAGS_LD_FOR_TARGET) -o break break.o $(LIBS)
192
193break.o: break.c
194 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/break.c
195
196signals: signals.o
197 ${CC} ${CFLAGS} ${LDFLAGS_FOR_TARGET} -o signals signals.o ${LIBS}
198
199signals.o: signals.c
200 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/signals.c
201
202twice: twice.c
203 echo '#include "twice.c"' >twice-tmp.c
204 $(CC_CFLAGS_LD_FOR_TARGET) -I$(srcdir) -o twice twice-tmp.c $(LIBS)
205 rm -f twice-tmp.c
206
207watchpoint: watchpoint.o
208 $(CC_CFLAGS_LD_FOR_TARGET) -o watchpoint watchpoint.o $(LIBS)
209
210watchpoint.o: watchpoint.c
211 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/watchpoint.c
212
213recurse: recurse.o
214 $(CC_CFLAGS_LD_FOR_TARGET) -o recurse recurse.o $(LIBS)
215
216recurse.o: recurse.c
217 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/recurse.c
218
219# We want to make sure opaque-info.exp reflects the way that opaque
220# was compiled; that's why this isn't a separate rule.
221
222opaque opaque-info.exp: opaque0.o opaque1.o
223 $(CC_CFLAGS_LD_FOR_TARGET) -o opaque.tmp opaque0.o opaque1.o $(LIBS)
224 $(CC_CFLAGS_FOR_TARGET) -E $(srcdir)/opaque-info.c >opaque-info.tmp
225 mv opaque-info.tmp opaque-info.exp
226 mv opaque.tmp opaque
227
228opaque0.o: opaque0.c
229 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/opaque0.c
230
231opaque1.o: opaque1.c
232 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/opaque1.c
233
234coremaker: coremaker.o
235 $(CC_CFLAGS_LD_FOR_TARGET) -o coremaker coremaker.o $(LIBS)
236
237coremaker.o: coremaker.c
238 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/coremaker.c
239
240# Create a core file named "corefile" rather than just "core", to
241# avoid problems with sys admin types that like to regularly prune all
242# files named "core" from the system.
243# bsd 386 systems append the name of the program to the corefile name.
244
245corefile: coremaker
246 -rm -f core
247 -echo Expect a coredump from this next command...
248 -./coremaker >/dev/null 2>&1 || true
249 -if [ -f core ]; then mv core corefile; else true; fi
250 -if [ -f core.coremaker ]; then mv core.coremaker corefile; else true; fi
251
252nodebug: nodebug.o
253 $(CC_FOR_TARGET) $(LDFLAGS_FOR_TARGET) -o nodebug nodebug.o $(LIBS)
254
255# This gets compiled *without* -g, so don't add CFLAGS here.
256
257nodebug.o: nodebug.c
258 $(CC_FOR_TARGET) -c $(srcdir)/nodebug.c
259
260# For VPATH and Sun Make, we have to make explicit dependencies.
261# DEC make doesn't seem to understand the ".u" dependency w/VPATH either.
262
263m68k-elf: $(srcdir)/m68k-elf.u
264 uudecode $(srcdir)/m68k-elf.u
265
266m68k-aout: $(srcdir)/m68k-aout.u
267 uudecode $(srcdir)/m68k-aout.u
268
269m68k-aout2: $(srcdir)/m68k-aout2.u
270 uudecode $(srcdir)/m68k-aout2.u
271
272mips-ecoff: $(srcdir)/mips-ecoff.u
273 uudecode $(srcdir)/mips-ecoff.u
274
275i486-elf: $(srcdir)/i486-elf.u
276 uudecode $(srcdir)/i486-elf.u
277
278sparc-aout: $(srcdir)/sparc-aout.u
279 uudecode $(srcdir)/sparc-aout.u
280
281i860-elf: $(srcdir)/i860-elf.u
282 uudecode $(srcdir)/i860-elf.u
283
284sparc-elf: $(srcdir)/sparc-elf.u
285 uudecode $(srcdir)/sparc-elf.u
286
287t10: t10.o
288 $(CC_CFLAGS_LD_FOR_TARGET) -o t10 t10.o $(LIBS)
289
290list: list0.o list1.o
291 $(CC_CFLAGS_LD_FOR_TARGET) -o list list0.o list1.o $(LIBS)
292
293list0.o: list0.c list0.h
294 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/list0.c
295
296list1.o: list1.c
297 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/list1.c
298
299scope: scope0.o scope1.o
300 $(CC_CFLAGS_LD_FOR_TARGET) -o scope scope0.o scope1.o $(LIBS)
301
302scope0.o: scope0.c
303 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/scope0.c
304
305scope1.o: scope1.c
306 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/scope1.c
307
308bitfields: bitfields.o
309 $(CC_CFLAGS_LD_FOR_TARGET) -o bitfields.tmp bitfields.o $(LIBS)
310 mv bitfields.tmp bitfields
311
312.PRECIOUS: bitfields
313
314bitfields.o: bitfields.c
315 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/bitfields.c
316
317funcargs: funcargs.o
318 $(CC_CFLAGS_LD_FOR_TARGET) -o funcargs funcargs.o $(LIBS)
319
320funcargs.o: funcargs.c
321 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/funcargs.c
322
323return: return.o
324 $(CC_CFLAGS_LD_FOR_TARGET) -o return return.o $(LIBS)
325
326return.o: return.c
327 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/return.c
328
329mips_pro: mips_pro.o
330 $(CC_CFLAGS_LD_FOR_TARGET) -o mips_pro mips_pro.o $(LIBS)
331
332mips_pro.o: mips_pro.c
333 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/mips_pro.c
334
335printcmds: printcmds.o
336 $(CC_CFLAGS_LD_FOR_TARGET) -o printcmds printcmds.o $(LIBS)
337
338printcmds.o: printcmds.c
339 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/printcmds.c
340
341callfuncs: callfuncs.o
342 $(CC_CFLAGS_LD_FOR_TARGET) -o callfuncs callfuncs.o $(LIBS)
343
344callfuncs.o: callfuncs.c
345 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/callfuncs.c
346
347interrupt: interrupt.o
348 $(CC_CFLAGS_LD_FOR_TARGET) -o interrupt interrupt.o $(LIBS)
349
350interrupt.o: interrupt.c
351 $(CC_CFLAGS_FOR_TARGET) -c $(srcdir)/interrupt.c
352
353.NOEXPORT:
354INFODIRS=doc
355info:
356install-info:
357dvi:
358
359install:
360
361uninstall: force
362
363site.exp: ./config.status Makefile
364 @echo "Making a new config file..."
365 -@rm -f ./tmp?
366 @touch site.exp
367 -@mv site.exp site.bak
368 @echo "## these variables are automatically generated by make ##" > ./tmp0
369 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
370 @echo "# add them to the last section" >> ./tmp0
371 @echo "set GDBFLAGS \"${GDBFLAGS}\"" >> ./tmp0
372 @echo "set host_os ${host_os}" >> ./tmp0
373 @echo "set host_alias ${host_alias}" >> ./tmp0
374 @echo "set host_cpu ${host_cpu}" >> ./tmp0
375 @echo "set host_vendor ${host_vendor}" >> ./tmp0
376 @echo "set target_os ${target_os}" >> ./tmp0
377 @echo "set target_alias ${target_alias}" >> ./tmp0
378 @echo "set target_cpu ${target_cpu}" >> ./tmp0
379 @echo "set target_vendor ${target_vendor}" >> ./tmp0
380 @echo "set host_triplet ${host_canonical}" >> ./tmp0
381 @echo "set target_triplet ${target_canonical}" >> ./tmp0
382 @echo "set srcdir ${srcdir}" >> ./tmp0
383 @echo "set objdir `pwd`" >> ./tmp0
384 @echo "set tool gdb" >> ./tmp0
385 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
386 @cat ./tmp0 > site.exp
387 @cat site.bak | sed \
388 -e '1,/^## All variables above are.*##/ d' >> site.exp
389 -@rm -f ./tmp?
390
391installcheck:
392check: site.exp all just-check
393just-check:
394 rootme=`pwd`; export rootme; \
395 srcdir=${srcdir} ; export srcdir ; \
396 EXPECT=${EXPECT} ; export EXPECT ; \
397 if [ -f $${rootme}/../../expect/expect ] ; then \
398 TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
399 export TCL_LIBRARY ; fi ; \
400 $(RUNTEST_FOR_TARGET) $(RUNTESTFLAGS) --tool gdb GDB=$(GDB) --srcdir $(srcdir)
401
402clean mostlyclean:
403 -rm -f *~ *.o a.out xgdb *.x $(EXECUTABLES)
404 -rm -f core core.coremaker corefile
405
406distclean realclean: clean
407 -rm -f *~ core *.log *.plog *.sum *.psum site.*
408 -rm -f Makefile config.status *-init.exp
409 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
410
411Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag)
412 $(SHELL) ./config.status
413