1 # Makefile for regression testing the GNU debugger.
2 # Copyright (C) 1997, 1998 Free Software Foundation, Inc.
4 # This file is part of GDB.
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)
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.
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.
23 exec_prefix = @
exec_prefix@
25 build_canonical
= @build@
26 build_alias
= @build_alias@
27 host_canonical
= @host@
28 host_alias
= @host_alias@
29 target_canonical
= @target@
30 target_alias
= @target_alias@
31 program_transform_name
= @program_transform_name@
37 RPATH_ENVVAR
= @RPATH_ENVVAR@
39 EXPECT
= `if [ -f $${rootme}/../../expect/expect ] ; then \
40 echo $${rootme}/../../expect/expect ; \
41 else echo expect ; fi`
43 RUNTEST
= `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
44 echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
50 CGENDIR
= $(srcdir)/..
/..
/cgen
53 CGENFILES
= $(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
61 #### host, target, and site specific Makefile frags come in here.
63 # The use of $$(x_FOR_TARGET) reduces the command line length by not
64 # duplicating the lengthy definition.
66 TARGET_FLAGS_TO_PASS
= \
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)" \
86 "RUNTEST=$(RUNTEST)" \
87 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
90 @echo
"Nothing to be done for all..."
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
; \
110 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check) ; then true
; \
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
; \
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; :;\
128 @echo
'Making a new site.exp file...'
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
151 -rm -f
*~ core
*.o a.out xgdb
*.x
*.grt
152 if
[ x
"${SUBDIRS}" != x
] ; then \
153 for
dir in
${SUBDIRS}; \
156 if
[ -d
$$dir ]; then \
157 (cd
$$dir; $(MAKE
) clean); \
162 distclean maintainer-clean
realclean: clean
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}; \
170 if
[ -d
$$dir ]; then \
171 (cd
$$dir; $(MAKE
) distclean); \
176 Makefile
: Makefile.in config.status
177 $(SHELL
) config.status
179 config.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
186 # CGEN utilities to build part of a cpu's testsuite.
190 $(SCHEME
) $(SCHEMEFLAGS
) $(CGENDIR
)/cgen-stest.scm \