Commit | Line | Data |
---|---|---|
16def8c8 | 1 | # Makefile for regression testing Chill support for the GNU debugger. |
65424cda | 2 | # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. |
16def8c8 SS |
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 | |
6c9638b4 FF |
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. | |
16def8c8 SS |
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 | docdir = $(datadir)/doc | |
44 | targetdir = $(datadir)/$(target_alias) | |
45 | ||
46 | SHELL = /bin/sh | |
47 | ||
48 | INSTALL = install -c | |
49 | INSTALL_PROGRAM = $(INSTALL) | |
50 | INSTALL_DATA = $(INSTALL) | |
51 | ||
52 | RUNTEST = runtest | |
53 | ||
54 | RUNTESTFLAGS = | |
55 | ||
605f94ba PB |
56 | EXPECT = `if [ -f $${rootme}../../../expect/expect ] ; then \ |
57 | echo $${rootme}../../../expect/expect ; \ | |
16def8c8 SS |
58 | else echo expect ; fi` |
59 | ||
60 | RUNTEST_FOR_TARGET = ` \ | |
605f94ba PB |
61 | if [ -f $${rootme}../../../dejagnu/site.exp ] ; then \ |
62 | echo $${rootme}../../../dejagnu/runtest ; \ | |
16def8c8 SS |
63 | else \ |
64 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
65 | echo $(RUNTEST); \ | |
66 | else \ | |
67 | t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \ | |
68 | fi; \ | |
69 | fi` | |
70 | ||
605f94ba | 71 | CFLAGS = -g |
16def8c8 SS |
72 | CHILLFLAGS = $(CFLAGS) |
73 | ||
74 | CHILL_FOR_TARGET = ` \ | |
605f94ba PB |
75 | if [ -f $${rootme}../../../gcc/Makefile ] ; then \ |
76 | echo $${rootme}../../../gcc/xgcc -B$${rootme}../../../gcc/; \ | |
16def8c8 SS |
77 | else \ |
78 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
79 | echo gcc; \ | |
80 | else \ | |
81 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
82 | fi; \ | |
83 | fi` | |
84 | ||
85 | CHILL = $(CHILL_FOR_TARGET) | |
86 | ||
87 | CHILL_LIB = ` \ | |
605f94ba PB |
88 | if [ -f $${rootme}../../../gcc/ch/runtime/libchill.a ] ; then \ |
89 | echo $${rootme}../../../gcc/ch/runtime/chillrt0.o \ | |
90 | $${rootme}../../../gcc/ch/runtime/libchill.a; \ | |
16def8c8 SS |
91 | else \ |
92 | echo -lchill; \ | |
93 | fi` | |
94 | ||
16def8c8 SS |
95 | #### host, target, and site specific Makefile frags come in here. |
96 | ||
34410e95 PB |
97 | EXECUTABLES = callch.exe chillvars.exe misc.exe \ |
98 | result.exe string.exe tuples.exe \ | |
2dac71f5 | 99 | pr-4975.exe pr-5016.exe pr-5020.exe pr-5022.exe pr-5646.exe pr-5984.exe \ |
09dde100 | 100 | pr-6292.exe pr-6632.exe |
ccda44f9 | 101 | |
fd82583b JK |
102 | all: $(EXECUTABLES) |
103 | ||
ccda44f9 PB |
104 | # To force pr-4975-grt to be compiled before pr-4975, so the |
105 | # latter can use the former's grant file. | |
106 | pr-4975.o: pr-4975-grt.o | |
87846d8a | 107 | pr-5646.o: pr-5646-grt.o |
09dde100 | 108 | pr-6632.o: pr-6632-grt.o |
16def8c8 | 109 | |
16654bbe | 110 | .SUFFIXES: .ch .exe .check |
16def8c8 | 111 | |
09dde100 PB |
112 | pr-6632.exe: pr-6632.o pr-6632-grt.o |
113 | $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o pr-6632.exe \ | |
114 | pr-6632.o pr-6632-grt.o $(CHILL_LIB) $(LIBS) | |
115 | ||
605f94ba PB |
116 | .o.exe: |
117 | $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o $*.exe $*.o $(CHILL_LIB) $(LIBS) | |
118 | ||
119 | .ch.o: | |
adad95c0 | 120 | $(CHILL_FOR_TARGET) $(CHILLFLAGS) -c $< |
16def8c8 | 121 | |
16654bbe PB |
122 | # Do 'make chillvars.check' to run just the chillvars.{ch,exp} test. |
123 | ||
124 | .exe.check: | |
125 | rootme=`pwd`/; export rootme; \ | |
126 | cd .. ; \ | |
127 | $(MAKE) just-check RUNTESTFLAGS="${RUNTESTFLAGS} $*.exp" \ | |
65424cda | 128 | EXPECT=${EXPECT} |
16654bbe | 129 | |
16def8c8 SS |
130 | .NOEXPORT: |
131 | INFODIRS=doc | |
132 | info: | |
133 | install-info: | |
134 | dvi: | |
135 | ||
136 | install: | |
137 | ||
138 | uninstall: force | |
139 | ||
140 | site.exp: ./config.status Makefile | |
141 | @echo "Making a new config file..." | |
142 | -@rm -f ./tmp? | |
143 | @touch site.exp | |
144 | -@mv site.exp site.bak | |
145 | @echo "## these variables are automatically generated by make ##" > ./tmp0 | |
146 | @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 | |
147 | @echo "# add them to the last section" >> ./tmp0 | |
16def8c8 SS |
148 | @echo "set host_os ${host_os}" >> ./tmp0 |
149 | @echo "set host_alias ${host_alias}" >> ./tmp0 | |
150 | @echo "set host_cpu ${host_cpu}" >> ./tmp0 | |
151 | @echo "set host_vendor ${host_vendor}" >> ./tmp0 | |
152 | @echo "set target_os ${target_os}" >> ./tmp0 | |
153 | @echo "set target_alias ${target_alias}" >> ./tmp0 | |
154 | @echo "set target_cpu ${target_cpu}" >> ./tmp0 | |
155 | @echo "set target_vendor ${target_vendor}" >> ./tmp0 | |
156 | @echo "set host_triplet ${host_canonical}" >> ./tmp0 | |
157 | @echo "set target_triplet ${target_canonical}" >> ./tmp0 | |
158 | @echo "set srcdir ${srcdir}" >> ./tmp0 | |
159 | @echo "set objdir `pwd`" >> ./tmp0 | |
160 | @echo "set tool gdb" >> ./tmp0 | |
161 | @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 | |
162 | @cat ./tmp0 > site.exp | |
163 | @cat site.bak | sed \ | |
164 | -e '1,/^## All variables above are.*##/ d' >> site.exp | |
165 | -@rm -f ./tmp? | |
166 | ||
167 | installcheck: | |
168 | check: site.exp all just-check | |
169 | just-check: | |
605f94ba PB |
170 | tests=`cd ${srcdir}; echo *.exp` ; \ |
171 | rootme=`pwd`/; export rootme; \ | |
172 | cd .. ; \ | |
173 | $(MAKE) just-check RUNTESTFLAGS="${RUNTESTFLAGS} $${tests}" \ | |
65424cda | 174 | EXPECT=${EXPECT} |
16def8c8 SS |
175 | |
176 | clean mostlyclean: | |
177 | -rm -f *~ core *.o a.out xgdb *.x $(EXECUTABLES) | |
178 | ||
179 | distclean realclean: clean | |
180 | -rm -f *~ core *.log *.plog *.sum *.psum site.* | |
181 | -rm -f Makefile config.status *-init.exp | |
182 | -rm -fr *.log summary detail *.plog *.sum *.psum site.* | |
183 | ||
184 | Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag) | |
185 | $(SHELL) ./config.status | |
186 |