]>
Commit | Line | Data |
---|---|---|
099c286e | 1 | # Makefile for regression testing the GNU debugger. |
06c87bef | 2 | # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. |
099c286e | 3 | |
dedd81f1 | 4 | # This file is part of GDB. |
099c286e | 5 | |
dedd81f1 FF |
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. | |
099c286e | 10 | |
dedd81f1 FF |
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. | |
099c286e | 15 | |
dedd81f1 | 16 | # You should have received a copy of the GNU General Public License |
06c87bef 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. | |
099c286e | 19 | |
20ece597 FF |
20 | srcdir = @srcdir@ |
21 | prefix = @prefix@ | |
22 | exec_prefix = @exec_prefix@ | |
23 | ||
24 | host_alias = @host_alias@ | |
25 | target_alias = @target_alias@ | |
26 | program_transform_name = @program_transform_name@ | |
27 | build_canonical = @build@ | |
28 | host_canonical = @host@ | |
29 | target_canonical = @target@ | |
30 | target_cpu = @gdb_target_cpu@ | |
bf3d2b75 MW |
31 | |
32 | SHELL = /bin/sh | |
20ece597 FF |
33 | SUBDIRS = @subdirs@ |
34 | RPATH_ENVVAR = @RPATH_ENVVAR@ | |
bf3d2b75 | 35 | |
099c286e BC |
36 | EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \ |
37 | echo $${rootme}/../../expect/expect ; \ | |
38 | else echo expect ; fi` | |
39 | ||
dedd81f1 FF |
40 | RUNTEST = $(RUNTEST_FOR_TARGET) |
41 | ||
42 | RUNTESTFLAGS = | |
43 | ||
44 | RUNTEST_FOR_TARGET = `\ | |
45 | if [ -f $${srcdir}/../../dejagnu/runtest ]; then \ | |
46 | echo $${srcdir}/../../dejagnu/runtest; \ | |
bf3d2b75 | 47 | else \ |
dedd81f1 FF |
48 | if [ "$(host_canonical)" = "$(target_canonical)" ]; then \ |
49 | echo runtest; \ | |
099c286e BC |
50 | else \ |
51 | t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \ | |
52 | fi; \ | |
53 | fi` | |
54 | ||
bf3d2b75 MW |
55 | #### host, target, and site specific Makefile frags come in here. |
56 | ||
099c286e BC |
57 | # The use of $$(x_FOR_TARGET) reduces the command line length by not |
58 | # duplicating the lengthy definition. | |
dedd81f1 | 59 | |
099c286e BC |
60 | TARGET_FLAGS_TO_PASS = \ |
61 | "prefix=$(prefix)" \ | |
62 | "exec_prefix=$(exec_prefix)" \ | |
63 | "against=$(against)" \ | |
64 | 'CC=$$(CC_FOR_TARGET)' \ | |
65 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ | |
06c87bef | 66 | "CFLAGS=$(TESTSUITE_CFLAGS)" \ |
099c286e BC |
67 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
68 | 'CHILL=$$(CHILL_FOR_TARGET)' \ | |
69 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ | |
70 | "CHILL_LIB=$(CHILL_LIB)" \ | |
71 | 'CXX=$$(CXX_FOR_TARGET)' \ | |
72 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ | |
73 | "CXXFLAGS=$(CXXFLAGS)" \ | |
74 | "MAKEINFO=$(MAKEINFO)" \ | |
75 | "INSTALL=$(INSTALL)" \ | |
76 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
77 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
78 | "LDFLAGS=$(LDFLAGS)" \ | |
79 | "LIBS=$(LIBS)" \ | |
80 | "RUNTEST=$(RUNTEST)" \ | |
20ece597 | 81 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" |
bf3d2b75 | 82 | |
20ece597 FF |
83 | all: |
84 | @echo "Nothing to be done for all..." | |
bf3d2b75 MW |
85 | |
86 | .NOEXPORT: | |
87 | INFODIRS=doc | |
88 | info: | |
bf3d2b75 | 89 | install-info: |
21ce979a | 90 | dvi: |
bf3d2b75 MW |
91 | |
92 | install: | |
bf3d2b75 MW |
93 | |
94 | uninstall: force | |
bf3d2b75 | 95 | |
cc49ffa0 | 96 | site.exp: ./config.status Makefile |
1ee369e8 RS |
97 | @echo "Making a new config file..." |
98 | -@rm -f ./tmp? | |
99 | @touch site.exp | |
100 | -@mv site.exp site.bak | |
101 | @echo "## these variables are automatically generated by make ##" > ./tmp0 | |
102 | @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 | |
103 | @echo "# add them to the last section" >> ./tmp0 | |
be813d02 | 104 | @echo "set host_alias $(host_alias)" >> ./tmp0 |
cc49ffa0 | 105 | @echo "set host_triplet ${host_canonical}" >> ./tmp0 |
be813d02 | 106 | @echo "set target_alias $(target_alias)" >> ./tmp0 |
cc49ffa0 | 107 | @echo "set target_triplet ${target_canonical}" >> ./tmp0 |
20ece597 | 108 | @echo "set build_triplet ${build_canonical}" >> ./tmp0 |
1ee369e8 | 109 | @echo "set srcdir ${srcdir}" >> ./tmp0 |
cc49ffa0 | 110 | @echo "set tool gdb" >> ./tmp0 |
1ee369e8 RS |
111 | @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 |
112 | @cat ./tmp0 > site.exp | |
113 | @cat site.bak | sed \ | |
114 | -e '1,/^## All variables above are.*##/ d' >> site.exp | |
cc49ffa0 | 115 | -@rm -f ./tmp? |
1ee369e8 | 116 | |
21ce979a | 117 | installcheck: |
dedd81f1 | 118 | |
ab8603ea | 119 | check: site.exp all just-check |
dedd81f1 | 120 | |
ab8603ea | 121 | just-check: |
d27960e7 | 122 | rootme=`pwd`; export rootme; \ |
099c286e BC |
123 | srcdir=${srcdir} ; export srcdir ; \ |
124 | EXPECT=${EXPECT} ; export EXPECT ; \ | |
c03e48e8 | 125 | $(RPATH_ENVVAR)=$$rootme/../../expect:$$rootme/../../libstdc++:$$rootme/../../tk/unix:$$rootme/../../tcl/unix:$$rootme/../../bfd:$$rootme/../../opcodes:$$$(RPATH_ENVVAR); \ |
20ece597 | 126 | export $(RPATH_ENVVAR); \ |
099c286e BC |
127 | if [ -f $${rootme}/../../expect/expect ] ; then \ |
128 | TCL_LIBRARY=$${srcdir}/../../tcl/library ; \ | |
129 | export TCL_LIBRARY ; fi ; \ | |
06c87bef | 130 | $(RUNTEST) $(RUNTESTFLAGS) |
29aa49d4 | 131 | |
bf3d2b75 MW |
132 | subdir_do: force |
133 | @for i in $(DODIRS); do \ | |
134 | if [ -d ./$$i ] ; then \ | |
135 | if (rootme=`pwd`/ ; export rootme ; \ | |
136 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ | |
137 | cd ./$$i; \ | |
099c286e | 138 | $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \ |
bf3d2b75 MW |
139 | else exit 1 ; fi ; \ |
140 | else true ; fi ; \ | |
141 | done | |
29aa49d4 RS |
142 | |
143 | force:; | |
bf3d2b75 | 144 | |
bf3d2b75 | 145 | subdirs: |
20ece597 | 146 | for dir in ${SUBDIRS} ; \ |
bf3d2b75 | 147 | do \ |
20ece597 FF |
148 | echo "$$dir:" ; \ |
149 | if [ -d $$dir ] ; then \ | |
bf3d2b75 MW |
150 | (rootme=`pwd`/ ; export rootme ; \ |
151 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ | |
099c286e | 152 | cd $$dir; $(MAKE) $(TARGET_FLAGS_TO_PASS)); \ |
bf3d2b75 MW |
153 | fi; \ |
154 | done | |
155 | ||
29aa49d4 | 156 | clean mostlyclean: |
bf3d2b75 | 157 | -rm -f *~ core *.o a.out xgdb *.x |
06c87bef FF |
158 | if [ x"${SUBDIRS}" != x ] ; then \ |
159 | for dir in ${SUBDIRS}; \ | |
160 | do \ | |
161 | echo "$$dir:"; \ | |
162 | if [ -d $$dir ]; then \ | |
163 | (cd $$dir; $(MAKE) clean); \ | |
164 | fi; \ | |
165 | done ; \ | |
166 | else true; fi | |
29aa49d4 | 167 | |
20ece597 | 168 | distclean maintainer-clean realclean: clean |
099c286e | 169 | -rm -f *~ core *.log *.plog *.sum *.psum site.* |
bf3d2b75 | 170 | -rm -f Makefile config.status *-init.exp |
285ae57a | 171 | -rm -fr *.log summary detail *.plog *.sum *.psum site.* |
06c87bef FF |
172 | if [ x"${SUBDIRS}" != x ] ; then \ |
173 | for dir in ${SUBDIRS}; \ | |
174 | do \ | |
175 | echo "$$dir:"; \ | |
176 | if [ -d $$dir ]; then \ | |
177 | (cd $$dir; $(MAKE) distclean); \ | |
178 | fi; \ | |
179 | done ; \ | |
180 | else true; fi | |
bf3d2b75 | 181 | |
ab8603ea | 182 | Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag) |
bf3d2b75 | 183 | $(SHELL) ./config.status |