]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/testsuite/Makefile.in
sim: testsuite: push $arch out to targets
[thirdparty/binutils-gdb.git] / sim / testsuite / Makefile.in
CommitLineData
c906108c 1# Makefile for regression testing the GNU debugger.
3666a048 2# Copyright (C) 1997-2021 Free Software Foundation, Inc.
c906108c
SS
3
4# This file is part of GDB.
5
4744ac1b 6# This program is free software; you can redistribute it and/or modify
c906108c 7# it under the terms of the GNU General Public License as published by
4744ac1b
JB
8# the Free Software Foundation; either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
c906108c
SS
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.
4744ac1b 15#
c906108c 16# You should have received a copy of the GNU General Public License
4744ac1b 17# along with this program. If not, see <http://www.gnu.org/licenses/>.
c906108c
SS
18
19VPATH = @srcdir@
20srcdir = @srcdir@
21prefix = @prefix@
22exec_prefix = @exec_prefix@
23
24build_canonical = @build@
25build_alias = @build_alias@
26host_canonical = @host@
27host_alias = @host_alias@
28target_canonical = @target@
29target_alias = @target_alias@
30program_transform_name = @program_transform_name@
31
c906108c
SS
32SHELL = /bin/sh
33SUBDIRS = @subdirs@
34RPATH_ENVVAR = @RPATH_ENVVAR@
35
36EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
37 echo $${rootme}/../../expect/expect ; \
38 else echo expect ; fi`
39
40RUNTEST = `if [ -f $${srcdir}/../../dejagnu/runtest ] ; then \
41 echo $${srcdir}/../../dejagnu/runtest ; else echo runtest; \
42 fi`
43
44RUNTESTFLAGS =
45
46#### host, target, and site specific Makefile frags come in here.
47
48# The use of $$(x_FOR_TARGET) reduces the command line length by not
49# duplicating the lengthy definition.
50
51TARGET_FLAGS_TO_PASS = \
52 "prefix=$(prefix)" \
53 "exec_prefix=$(exec_prefix)" \
54 "against=$(against)" \
55 'CC=$$(CC_FOR_TARGET)' \
56 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
57 "CFLAGS=$(TESTSUITE_CFLAGS)" \
58 "CHILLFLAGS=$(CHILLFLAGS)" \
59 'CHILL=$$(CHILL_FOR_TARGET)' \
60 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
61 "CHILL_LIB=$(CHILL_LIB)" \
62 'CXX=$$(CXX_FOR_TARGET)' \
63 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
64 "CXXFLAGS=$(CXXFLAGS)" \
65 "MAKEINFO=$(MAKEINFO)" \
66 "INSTALL=$(INSTALL)" \
67 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
68 "INSTALL_DATA=$(INSTALL_DATA)" \
69 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
70
71# "RUNTEST=$(RUNTEST)" \
72
73all:
74 @echo "Nothing to be done for all..."
75
76.NOEXPORT:
77info:
78install-info:
79dvi:
80
81install:
78aa740b 82install-strip:
c906108c
SS
83
84uninstall: force
85
86installcheck:
87
88check: check-DEJAGNU check-recursive
89
90#test1:
91check-recursive:
92 @for i in . ${SUBDIRS}; do \
93 if [ $$i = . ] ; then continue ; fi ; \
94 if [ -d ./$$i ] ; then \
95 if (rootme=`pwd`/ ; export rootme ; \
96 rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
97 echo "check recursively into $$i directory..."; \
98 cd ./$$i; \
99 $(MAKE) $(TARGET_FLAGS_TO_PASS) check) ; then true ; \
100 else exit 1 ; fi ; \
101 else true ; fi ; \
102 done
103
104#test2:
105check-DEJAGNU: site.exp
106 echo "Dejagnu-checking in `pwd` directory ..."
107 rootme=`pwd`; export rootme; echo rootme = $$rootme; \
108 srcdir=`cd ${srcdir}; pwd`; export srcdir ; echo srcdir = $$srcdir; \
109 EXPECT=${EXPECT} ; export EXPECT ; echo EXPECT = $$EXPECT; \
110 if [ -f $$rootme/../../expect/expect ]; then \
111 TCL_LIBRARY=`cd $$srcdir/../../tcl/library && pwd`; \
112 export TCL_LIBRARY; \
113 fi; \
114 echo TCL_LIBRARY = $$TCL_LIBRARY; \
115 runtest=$(RUNTEST); echo runtest = $$runtest; \
116 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
117 $$runtest $(RUNTESTFLAGS); \
118 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
119 fi
120
121
122site.exp: Makefile
123 @echo 'Making a new site.exp file...'
124 -@rm -f site.bak
125 @echo '## these variables are automatically generated by make ##' > $@-t
126 @echo '# Do not edit here. If you wish to override these values' >> $@-t
127 @echo '# edit the last section' >> $@-t
c906108c
SS
128 @echo 'set srcdir $(srcdir)' >> $@-t
129 @echo 'set objdir' `pwd` >> $@-t
c906108c
SS
130 @echo 'set build_alias $(build_alias)' >> $@-t
131 @echo 'set build_triplet $(build_canonical)' >> $@-t
132 @echo 'set host_alias $(host_alias)' >> $@-t
133 @echo 'set host_triplet $(host_canonical)' >> $@-t
134 @echo 'set target_alias $(target_alias)' >> $@-t
135 @echo 'set target_triplet $(target_canonical)' >> $@-t
136 @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
137 -@sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
138 -@mv site.exp site.bak
139 @mv $@-t site.exp
140
141force:;
142
143clean mostlyclean:
144 -rm -f *~ core *.o a.out xgdb *.x *.grt
145 -rm -f *.rum *.c *.dif *.*out
146 if [ x"${SUBDIRS}" != x ] ; then \
147 for dir in ${SUBDIRS}; \
148 do \
149 echo "$$dir:"; \
150 if [ -d $$dir ]; then \
151 (cd $$dir; $(MAKE) clean); \
152 fi; \
153 done ; \
154 else true; fi
155
156distclean maintainer-clean realclean: clean
157 -rm -f *~ core
158 -rm -f Makefile config.status *-init.exp
159 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
160 if [ x"${SUBDIRS}" != x ] ; then \
161 for dir in ${SUBDIRS}; \
162 do \
163 echo "$$dir:"; \
164 if [ -d $$dir ]; then \
165 (cd $$dir; $(MAKE) distclean); \
166 fi; \
167 done ; \
168 else true; fi
169
bb3eddb5
MF
170Makefile : Makefile.in ../config.status
171 $(SHELL) ../config.status
c906108c 172
bb3eddb5
MF
173config.status: $(srcdir)/../configure
174 $(SHELL) ../config.status --recheck
c906108c
SS
175# FIXME: Requires --enable-maintainer-mode, which one could add, but
176# it's provided by automake. Maybe switch to automake someday.
177#$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in
178# cd $(srcdir) && autoconf