This commit was generated by cvs2svn to track changes on a CVS vendor
[external/binutils.git] / gdb / testsuite / gdb.threads / Makefile.in
1 # Makefile for the threads tests for GDB.
2 # Copyright (C) 1992, 1993, 1994, 1995 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
20 srcdir = .
21 prefix = /usr/local
22 program_transform_name =
23
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27 tooldir = $(libdir)/$(target_alias)
28
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)
44
45 SHELL = /bin/sh
46
47 INSTALL = install -c
48 INSTALL_PROGRAM = $(INSTALL)
49 INSTALL_DATA = $(INSTALL)
50
51 CFLAGS = -g
52
53 RUNTESTFLAGS = 
54
55 LINK=           ln -s
56
57 EXPECT = ` \
58   if [ -f $${rootme}/../../../expect/expect ] ; then \
59     echo $${rootme}/../../../expect/expect ; \
60   else \
61     echo expect ; \
62   fi`
63
64 RUNTEST = ` \
65   if [ -f $${rootme}/../../dejagnu/site.exp ] ; then \
66     echo $${rootme}/../../dejagnu/runtest ; \
67   else \
68     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
69       echo runtest; \
70     else \
71       t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
72     fi; \
73   fi`
74
75 CC = ` \
76   if [ -f $${rootme}/../../../gcc/xgcc ] ; then \
77     echo $${rootme}/../../../gcc/xgcc -B$${rootme}/../../../gcc/; \
78   else \
79     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
80       echo gcc; \
81     else \
82       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
83     fi; \
84   fi`
85
86 #### host, target, and site specific Makefile frags come in here.
87
88 EXECUTABLES = $(STEP_EXECUTABLE)
89
90
91 all:    $(EXECUTABLES)
92
93 step.o: $(srcdir)/step.c
94         $(CC) -c $(CFLAGS) $(THREADFLAGS) $<
95
96 step: step.o
97         $(CC) $(CFLAGS) $(THREADFLAGS) $(LDFLAGS) -o step step.o $(LIBS)
98
99 # This gets compiled *without* -g, so don't add CFLAGS here.
100
101 .NOEXPORT:
102
103 INFODIRS=doc
104
105 info:
106
107 install-info:
108
109 dvi:
110
111 install:
112
113 uninstall: force
114
115 site.exp: ./config.status Makefile
116         @echo "Making a new config file..."
117         -@rm -f ./tmp?
118         @touch site.exp
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
132         -@rm -f ./tmp?
133
134 installcheck:
135 check: site.exp all just-check
136 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)
144
145 clean mostlyclean:
146         -rm -f *~ *.o a.out xgdb *.x $(EXECUTABLES)
147         -rm -f core core.coremaker coremaker.core corefile
148
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.*
153
154 Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag)
155         $(SHELL) ./config.status
156