* sim/sky/sky.exp: Add runtest_file_p support. Don't print
[deliverable/binutils-gdb.git] / sim / testsuite / Makefile.in
CommitLineData
ed063d52
DE
1# Makefile for regression testing the GNU debugger.
2# Copyright (C) 1997, 1998 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; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20VPATH = @srcdir@
21srcdir = @srcdir@
22prefix = @prefix@
23exec_prefix = @exec_prefix@
24
25build_canonical = @build@
26build_alias = @build_alias@
27host_canonical = @host@
28host_alias = @host_alias@
29target_canonical = @target@
30target_alias = @target_alias@
31program_transform_name = @program_transform_name@
32
33arch = @arch@
34
35SHELL = /bin/sh
36SUBDIRS = @subdirs@
37RPATH_ENVVAR = @RPATH_ENVVAR@
38
39EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
40 echo $${rootme}/../../expect/expect ; \
41 else echo expect ; fi`
42
43RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
44 echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
45 fi`
46RUNTESTFLAGS =
47
48SCHEME = @SCHEME@
49SCHEMEFLAGS = -s
50CGENDIR = $(srcdir)/../../cgen
51CGENFLAGS = -v
52
53CGENFILES = $(CGENDIR)/object.scm $(CGENDIR)/utils.scm \
54 $(CGENDIR)/utils-cgen.scm $(CGENDIR)/cpu.scm \
55 $(CGENDIR)/mode.scm $(CGENDIR)/mach.scm \
56 $(CGENDIR)/ifield.scm $(CGENDIR)/iformat.scm \
57 $(CGENDIR)/operand.scm $(CGENDIR)/insn.scm \
58 $(CGENDIR)/opcodes.scm $(CGENDIR)/sem-ccode.scm \
59 $(CGENDIR)/sim-test.scm $(CGENDIR)/cgen-stest.scm
60
61#### host, target, and site specific Makefile frags come in here.
62
63# The use of $$(x_FOR_TARGET) reduces the command line length by not
64# duplicating the lengthy definition.
65
66TARGET_FLAGS_TO_PASS = \
67 "prefix=$(prefix)" \
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 "CHILLFLAGS=$(CHILLFLAGS)" \
74 'CHILL=$$(CHILL_FOR_TARGET)' \
75 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
76 "CHILL_LIB=$(CHILL_LIB)" \
77 'CXX=$$(CXX_FOR_TARGET)' \
78 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
79 "CXXFLAGS=$(CXXFLAGS)" \
80 "MAKEINFO=$(MAKEINFO)" \
81 "INSTALL=$(INSTALL)" \
82 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
83 "INSTALL_DATA=$(INSTALL_DATA)" \
84 "LDFLAGS=$(LDFLAGS)" \
85 "LIBS=$(LIBS)" \
86 "RUNTEST=$(RUNTEST)" \
87 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
88
89all:
90 @echo "Nothing to be done for all..."
91
92.NOEXPORT:
93info:
94install-info:
95dvi:
96
97install:
98
99uninstall: force
100
101installcheck:
102
103check: site.exp
104 @for i in . ${SUBDIRS}; do \
105 if [ $$i = . ] ; then continue ; fi ; \
106 if [ -d ./$$i ] ; then \
107 if (rootme=`pwd`/ ; export rootme ; \
108 rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
109 cd ./$$i; \
110 $(MAKE) $(TARGET_FLAGS_TO_PASS) check) ; then true ; \
111 else exit 1 ; fi ; \
112 else true ; fi ; \
113 done
114 rootme=`pwd`; export rootme; \
115 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
116 EXPECT=${EXPECT} ; export EXPECT ; \
117 if [ -f $$rootme/../../expect/expect ]; then \
118 TCL_LIBRARY=`cd $$srcdir/../../tcl/library && pwd`; \
119 export TCL_LIBRARY; \
120 fi; \
121 runtest=$(RUNTEST); \
122 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
123 $$runtest $(RUNTESTFLAGS); \
124 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
125 fi
126
127site.exp: Makefile
128 @echo 'Making a new site.exp file...'
129 -@rm -f site.bak
130 @echo '## these variables are automatically generated by make ##' > $@-t
131 @echo '# Do not edit here. If you wish to override these values' >> $@-t
132 @echo '# edit the last section' >> $@-t
133 @echo 'set tool sim' >> $@-t
134 @echo 'set srcdir $(srcdir)' >> $@-t
135 @echo 'set objdir' `pwd` >> $@-t
136 @echo 'set arch $(arch)' >> $@-t
137 @echo 'set build_alias $(build_alias)' >> $@-t
138 @echo 'set build_triplet $(build_canonical)' >> $@-t
139 @echo 'set host_alias $(host_alias)' >> $@-t
140 @echo 'set host_triplet $(host_canonical)' >> $@-t
141 @echo 'set target_alias $(target_alias)' >> $@-t
142 @echo 'set target_triplet $(target_canonical)' >> $@-t
143 @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
144 -@sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
145 -@mv site.exp site.bak
146 @mv $@-t site.exp
147
148force:;
149
150clean mostlyclean:
151 -rm -f *~ core *.o a.out xgdb *.x *.grt
152 if [ x"${SUBDIRS}" != x ] ; then \
153 for dir in ${SUBDIRS}; \
154 do \
155 echo "$$dir:"; \
156 if [ -d $$dir ]; then \
157 (cd $$dir; $(MAKE) clean); \
158 fi; \
159 done ; \
160 else true; fi
161
162distclean maintainer-clean realclean: clean
163 -rm -f *~ core
164 -rm -f Makefile config.status *-init.exp
165 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
166 if [ x"${SUBDIRS}" != x ] ; then \
167 for dir in ${SUBDIRS}; \
168 do \
169 echo "$$dir:"; \
170 if [ -d $$dir ]; then \
171 (cd $$dir; $(MAKE) distclean); \
172 fi; \
173 done ; \
174 else true; fi
175
176Makefile : Makefile.in config.status
177 $(SHELL) config.status
178
179config.status: $(srcdir)/configure
180 $(SHELL) ./config.status --recheck
181# FIXME: Requires --enable-maintainer-mode, which one could add, but
182# it's provided by automake. Maybe switch to automake someday.
183#$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in
184# cd $(srcdir) && autoconf
185
186# CGEN utilities to build part of a cpu's testsuite.
187
188.PHONY: cgen
189cgen:
190 $(SCHEME) $(SCHEMEFLAGS) $(CGENDIR)/cgen-stest.scm \
191 -s $(CGENDIR) \
192 $(CGENFLAGS) \
193 -m all \
194 -a $(arch) \
195 -B tmp-build.sh \
196 -E tmp-allinsn.exp
This page took 0.040262 seconds and 4 git commands to generate.