1 # Makefile for the threads tests for GDB.
2 # Copyright (C) 1992, 1993, 1994, 1995 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.
22 program_transform_name =
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27 tooldir = $(libdir)/$(target_alias)
29 datadir = $(exec_prefix)/lib/dejagnu
30 mandir = $(prefix)/man
31 man1dir = $(mandir)/man1
32 man2dir = $(mandir)/man2
33 man3dir = $(mandir)/man3
34 man4dir = $(mandir)/man4
35 man5dir = $(mandir)/man5
36 man6dir = $(mandir)/man6
37 man7dir = $(mandir)/man7
38 man8dir = $(mandir)/man8
39 man9dir = $(mandir)/man9
40 infodir = $(prefix)/info
41 includedir = $(prefix)/include
42 gxx_includedir = $(tooldir)/g++-include
43 targetdir = $(datadir)/$(target_alias)
48 INSTALL_PROGRAM = $(INSTALL)
49 INSTALL_DATA = $(INSTALL)
58 if [ -f $${rootme}/../../../expect/expect ] ; then \
59 echo $${rootme}/../../../expect/expect ; \
65 if [ -f $${rootme}/../../dejagnu/site.exp ] ; then \
66 echo $${rootme}/../../dejagnu/runtest ; \
68 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
71 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
76 if [ -f $${rootme}/../../../gcc/xgcc ] ; then \
77 echo $${rootme}/../../../gcc/xgcc -B$${rootme}/../../../gcc/; \
79 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
82 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
86 #### host, target, and site specific Makefile frags come in here.
88 EXECUTABLES = $(STEP_EXECUTABLE)
93 step.o: $(srcdir)/step.c
94 $(CC) -c $(CFLAGS) $(THREADFLAGS) $<
97 $(CC) $(CFLAGS) $(THREADFLAGS) $(LDFLAGS) -o step step.o $(LIBS)
99 # This gets compiled *without* -g, so don't add CFLAGS here.
115 site.exp: ./config.status Makefile
116 @echo "Making a new config file..."
119 -@mv site.exp site.bak
120 @echo "## these variables are automatically generated by make ##" > ./tmp0
121 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
122 @echo "# add them to the last section" >> ./tmp0
123 @echo "set host_triplet ${host_canonical}" >> ./tmp0
124 @echo "set target_triplet ${target_canonical}" >> ./tmp0
125 @echo "set srcdir ${srcdir}" >> ./tmp0
126 @echo "set objdir `pwd`" >> ./tmp0
127 @echo "set tool gdb" >> ./tmp0
128 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
129 @cat ./tmp0 > site.exp
130 @cat site.bak | sed \
131 -e '1,/^## All variables above are.*##/ d' >> site.exp
135 check: site.exp all just-check
137 rootme=`pwd`; export rootme; \
138 srcdir=${srcdir} ; export srcdir ; \
139 EXPECT=${EXPECT} ; export EXPECT ; \
140 if [ -f $${rootme}/../../expect/expect ] ; then \
141 TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
142 export TCL_LIBRARY ; fi ; \
143 $(RUNTEST) $(RUNTESTFLAGS) --tool gdb --srcdir $(srcdir)
146 -rm -f *~ *.o a.out xgdb *.x $(EXECUTABLES)
147 -rm -f core core.coremaker coremaker.core corefile
149 distclean maintainer-clean realclean: clean
150 -rm -f *~ core *.log *.plog *.sum *.psum site.*
151 -rm -f Makefile config.status *-init.exp
152 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
154 Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag)
155 $(SHELL) ./config.status