* as.h: Don't declare parameters for strstr.
[deliverable/binutils-gdb.git] / gdb / testsuite / Makefile.in
CommitLineData
099c286e 1# Makefile for regression testing the GNU debugger.
ea68d58d 2# Copyright (C) 1992, 93, 1994 Free Software Foundation, Inc.
099c286e
BC
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 GNU CC; see the file COPYING. If not, write to
18#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
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
bf3d2b75 52CFLAGS = -g
4d2ad0a8 53# start-sanitize-chill
bf3d2b75
MW
54CHILLFLAGS = $(CFLAGS)
55CHILL_LIB = -lchill
4d2ad0a8 56# end-sanitize-chill
099c286e
BC
57# This should probably be consistent with the top-level Makefile.in,
58# gdb/Makefile.in, and gdb/testsuite/gdb.t2*/Makefile.in, so that "make check"
59# has the same effect no matter where it is run.
60CXXFLAGS = -g -O
bf3d2b75
MW
61
62LINK= ln -s
63SUBDIRS=
4d2ad0a8 64RUNTEST = runtest
29aa49d4 65RUNTESTFLAGS =
bf3d2b75 66
099c286e
BC
67EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
68 echo $${rootme}/../../expect/expect ; \
69 else echo expect ; fi`
70
099c286e
BC
71RUNTEST_FOR_TARGET = ` \
72 if [ -f $${rootme}/../../dejagnu/site.exp ] ; then \
73 echo $${rootme}/../../dejagnu/runtest ; \
bf3d2b75
MW
74 else \
75 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
099c286e
BC
76 echo $(RUNTEST); \
77 else \
78 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
79 fi; \
80 fi`
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); \
bf3d2b75
MW
88 else \
89 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
90 fi; \
91 fi`
92
099c286e
BC
93CXX = gcc
94CXX_FOR_TARGET = ` \
95 if [ -f $${rootme}/../../gcc/xgcc ] ; then \
96 echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \
bf3d2b75
MW
97 else \
98 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
099c286e 99 echo $(CXX); \
bf3d2b75
MW
100 else \
101 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
102 fi; \
103 fi`
bf3d2b75 104
4d2ad0a8 105# start-sanitize-chill
099c286e
BC
106CHILLFLAGS = $(CFLAGS)
107CHILL = gcc
108CHILL_FOR_TARGET = ` \
109 if [ -f $${rootme}/../../gcc/xgcc ] ; then \
110 echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/ -L$${rootme}/../../chillrt/; \
111 else \
112 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
113 echo $(CC); \
114 else \
115 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
116 fi; \
117 fi`
118
119CHILL_LIB = -lchill
120
121CHILL = ` \
d27960e7 122 if [ -f $${rootme}/../../gcc/Makefile ] ; then \
099c286e 123 echo $${rootme}/../../gcc/xgcc -B$${rootme}../../gcc/ -L$${rootme}../../chillrt/; \
bf3d2b75
MW
124 else \
125 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
29aa49d4 126 echo gcc; \
bf3d2b75
MW
127 else \
128 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
129 fi; \
130 fi`
4d2ad0a8 131# end-sanitize-chill
bf3d2b75 132
d27960e7 133GDB = ` \
a1092b5d
RS
134 if [ -f $${rootme}/../gdb ] ; \
135 then echo $${rootme}|sed -e 's@/[^/]*$$@@'|sed -e 's@$$@/gdb@' ; \
136 else echo gdb; \
d27960e7
RS
137 fi`
138
a1092b5d 139GDBFLAGS = -nx
bf3d2b75 140
bf3d2b75
MW
141#### host, target, and site specific Makefile frags come in here.
142
099c286e
BC
143# The use of $$(x_FOR_TARGET) reduces the command line length by not
144# duplicating the lengthy definition.
145TARGET_FLAGS_TO_PASS = \
146 "prefix=$(prefix)" \
147 "exec_prefix=$(exec_prefix)" \
148 "against=$(against)" \
149 'CC=$$(CC_FOR_TARGET)' \
150 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
151 "CFLAGS=$(CFLAGS)" \
4d2ad0a8 152# start-sanitize-chill
099c286e
BC
153 "CHILLFLAGS=$(CHILLFLAGS)" \
154 'CHILL=$$(CHILL_FOR_TARGET)' \
155 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
156 "CHILL_LIB=$(CHILL_LIB)" \
4d2ad0a8 157# end-sanitize-chill
099c286e
BC
158 'CXX=$$(CXX_FOR_TARGET)' \
159 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
160 "CXXFLAGS=$(CXXFLAGS)" \
161 "MAKEINFO=$(MAKEINFO)" \
162 "INSTALL=$(INSTALL)" \
163 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
164 "INSTALL_DATA=$(INSTALL_DATA)" \
165 "LDFLAGS=$(LDFLAGS)" \
166 "LIBS=$(LIBS)" \
2f109983 167 "EXPECT=${EXPECT}" \
099c286e
BC
168 "RUNTEST=$(RUNTEST)" \
169 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
170 "BISON=$(BISON)"
bf3d2b75
MW
171
172all: subdirs
173
174.NOEXPORT:
175INFODIRS=doc
176info:
bf3d2b75 177install-info:
21ce979a 178dvi:
bf3d2b75
MW
179
180install:
bf3d2b75
MW
181
182uninstall: force
bf3d2b75 183
cc49ffa0 184site.exp: ./config.status Makefile
1ee369e8
RS
185 @echo "Making a new config file..."
186 -@rm -f ./tmp?
187 @touch site.exp
188 -@mv site.exp site.bak
189 @echo "## these variables are automatically generated by make ##" > ./tmp0
190 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
191 @echo "# add them to the last section" >> ./tmp0
a1092b5d 192 @echo "set GDBFLAGS \"${GDBFLAGS}\"" >> ./tmp0
cc49ffa0
RS
193 @echo "set host_triplet ${host_canonical}" >> ./tmp0
194 @echo "set target_triplet ${target_canonical}" >> ./tmp0
1ee369e8 195 @echo "set srcdir ${srcdir}" >> ./tmp0
cc49ffa0 196 @echo "set tool gdb" >> ./tmp0
1ee369e8
RS
197 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
198 @cat ./tmp0 > site.exp
199 @cat site.bak | sed \
200 -e '1,/^## All variables above are.*##/ d' >> site.exp
cc49ffa0 201 -@rm -f ./tmp?
1ee369e8 202
21ce979a 203installcheck:
ab8603ea
RP
204check: site.exp all just-check
205just-check:
d27960e7 206 rootme=`pwd`; export rootme; \
099c286e
BC
207 srcdir=${srcdir} ; export srcdir ; \
208 EXPECT=${EXPECT} ; export EXPECT ; \
209 if [ -f $${rootme}/../../expect/expect ] ; then \
210 TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
211 export TCL_LIBRARY ; fi ; \
212 $(RUNTEST_FOR_TARGET) $(RUNTESTFLAGS) --tool gdb GDB=$(GDB) --srcdir $(srcdir)
29aa49d4 213
bf3d2b75
MW
214subdir_do: force
215 @for i in $(DODIRS); do \
216 if [ -d ./$$i ] ; then \
217 if (rootme=`pwd`/ ; export rootme ; \
218 rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
219 cd ./$$i; \
099c286e 220 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
bf3d2b75
MW
221 else exit 1 ; fi ; \
222 else true ; fi ; \
223 done
29aa49d4
RS
224
225force:;
bf3d2b75
MW
226
227
228subdirs:
229 for dir in ${SUBDIRS}; \
230 do \
231 echo "$$dir:"; \
232 if [ -d $$dir ]; then \
233 (rootme=`pwd`/ ; export rootme ; \
234 rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
099c286e 235 cd $$dir; $(MAKE) $(TARGET_FLAGS_TO_PASS)); \
bf3d2b75
MW
236 fi; \
237 done
238
29aa49d4 239clean mostlyclean:
bf3d2b75 240 -rm -f *~ core *.o a.out xgdb *.x
29aa49d4
RS
241 for dir in ${SUBDIRS}; \
242 do \
243 echo "$$dir:"; \
244 if [ -d $$dir ]; then \
245 (cd $$dir; $(MAKE) clean); \
246 fi; \
247 done
248
249distclean realclean: clean
099c286e 250 -rm -f *~ core *.log *.plog *.sum *.psum site.*
bf3d2b75 251 -rm -f Makefile config.status *-init.exp
285ae57a 252 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
29aa49d4
RS
253 for dir in ${SUBDIRS}; \
254 do \
255 echo "$$dir:"; \
256 (cd $$dir; $(MAKE) distclean); \
257 done
bf3d2b75 258
ab8603ea 259Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag)
bf3d2b75 260 $(SHELL) ./config.status
This page took 0.12638 seconds and 4 git commands to generate.