]>
Commit | Line | Data |
---|---|---|
6599da04 JM |
1 | # |
2 | # Makefile for directory with subdirs to build. | |
5d4a5ee6 JL |
3 | # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 |
4 | # Free Software Foundation | |
6599da04 JM |
5 | # |
6 | # This file 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 of the License, or | |
9 | # (at your option) any later version. | |
10 | # | |
11 | # This program 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 | ||
21 | srcdir = . | |
22 | ||
23 | prefix = /usr/local | |
6599da04 | 24 | exec_prefix = $(prefix) |
5d4a5ee6 JL |
25 | |
26 | bindir=${exec_prefix}/bin | |
27 | sbindir=${exec_prefix}/sbin | |
28 | libexecdir=${exec_prefix}/libexec | |
29 | datadir=${prefix}/share | |
30 | sysconfdir=${prefix}/etc | |
31 | sharedstatedir=${prefix}/com | |
32 | localstatedir=${prefix}/var | |
33 | libdir=${exec_prefix}/lib | |
34 | includedir=${prefix}/include | |
35 | oldincludedir=/usr/include | |
36 | infodir=${prefix}/info | |
37 | mandir=${prefix}/man | |
88101ab9 | 38 | gxx_include_dir=${includedir}/g++ |
5d4a5ee6 | 39 | |
5cb95c7a JL |
40 | tooldir = $(exec_prefix)/$(target_alias) |
41 | build_tooldir = $(exec_prefix)/$(target_alias) | |
42 | ||
6599da04 JM |
43 | program_transform_name = |
44 | ||
6599da04 JM |
45 | man1dir = $(mandir)/man1 |
46 | man2dir = $(mandir)/man2 | |
47 | man3dir = $(mandir)/man3 | |
48 | man4dir = $(mandir)/man4 | |
49 | man5dir = $(mandir)/man5 | |
50 | man6dir = $(mandir)/man6 | |
51 | man7dir = $(mandir)/man7 | |
52 | man8dir = $(mandir)/man8 | |
53 | man9dir = $(mandir)/man9 | |
54 | infodir = $(prefix)/info | |
55 | includedir = $(prefix)/include | |
fe2fa3c4 MH |
56 | # Directory in which the compiler finds executables, libraries, etc. |
57 | libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version) | |
6599da04 JM |
58 | GDB_NLM_DEPS = |
59 | ||
60 | SHELL = /bin/sh | |
61 | ||
62 | # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a | |
d207ebef | 63 | # cygwin host. |
6599da04 JM |
64 | INSTALL_PROGRAM_ARGS = |
65 | ||
66 | INSTALL = $(SHELL) $$s/install-sh -c | |
67 | INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS) | |
68 | INSTALL_SCRIPT = $(INSTALL) | |
69 | INSTALL_DATA = $(INSTALL) -m 644 | |
70 | ||
71 | INSTALL_DOSREL = install-dosrel-fake | |
72 | ||
73 | AS = as | |
74 | AR = ar | |
75 | AR_FLAGS = rc | |
76 | CC = cc | |
77 | ||
78 | # Special variables passed down in EXTRA_GCC_FLAGS. They are defined | |
79 | # here so that they can be overridden by Makefile fragments. | |
80 | HOST_CC = $(CC_FOR_BUILD) | |
81 | HOST_PREFIX = | |
82 | HOST_PREFIX_1 = loser- | |
83 | ||
84 | # These flag values are normally overridden by the configure script. | |
85 | CFLAGS = -g | |
86 | CXXFLAGS = -g -O2 | |
87 | ||
d207ebef | 88 | LDFLAGS = |
6599da04 JM |
89 | LIBCFLAGS = $(CFLAGS) |
90 | CFLAGS_FOR_TARGET = $(CFLAGS) | |
91 | LDFLAGS_FOR_TARGET = | |
92 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) | |
93 | PICFLAG = | |
94 | PICFLAG_FOR_TARGET = | |
95 | ||
5d4a5ee6 JL |
96 | CHILLFLAGS = $(CFLAGS) |
97 | CHILL_LIB = -lchill | |
6599da04 JM |
98 | CXX = c++ |
99 | ||
100 | # Use -O2 to stress test the compiler. | |
101 | LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates | |
102 | CXXFLAGS_FOR_TARGET = $(CXXFLAGS) | |
103 | LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates | |
104 | ||
105 | RANLIB = ranlib | |
106 | ||
107 | DLLTOOL = dlltool | |
108 | WINDRES = windres | |
109 | ||
110 | NM = nm | |
111 | ||
112 | LD = ld | |
113 | ||
d207ebef JM |
114 | BZIPPROG = bzip2 |
115 | MD5PROG = md5sum | |
6599da04 JM |
116 | |
117 | # These values are substituted by configure. | |
118 | DEFAULT_YACC = yacc | |
119 | DEFAULT_LEX = lex | |
3a35dcc4 | 120 | DEFAULT_M4 = m4 |
6599da04 JM |
121 | |
122 | BISON = `if [ -f $$r/bison/bison ] ; then \ | |
123 | echo $$r/bison/bison -L $$s/bison/ ; \ | |
124 | else \ | |
125 | echo bison ; \ | |
126 | fi` | |
127 | ||
128 | YACC = `if [ -f $$r/bison/bison ] ; then \ | |
129 | echo $$r/bison/bison -y -L $$s/bison/ ; \ | |
130 | elif [ -f $$r/byacc/byacc ] ; then \ | |
131 | echo $$r/byacc/byacc ; \ | |
132 | else \ | |
133 | echo ${DEFAULT_YACC} ; \ | |
134 | fi` | |
135 | ||
136 | LEX = `if [ -f $$r/flex/flex ] ; \ | |
137 | then echo $$r/flex/flex ; \ | |
138 | else echo ${DEFAULT_LEX} ; fi` | |
139 | ||
140 | M4 = `if [ -f $$r/m4/m4 ] ; \ | |
141 | then echo $$r/m4/m4 ; \ | |
3a35dcc4 | 142 | else echo ${DEFAULT_M4} ; fi` |
6599da04 JM |
143 | |
144 | MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \ | |
145 | then echo $$r/texinfo/makeinfo/makeinfo ; \ | |
146 | else echo makeinfo ; fi` | |
147 | ||
148 | # This just becomes part of the MAKEINFO definition passed down to | |
149 | # sub-makes. It lets flags be given on the command line while still | |
150 | # using the makeinfo from the object tree. | |
151 | MAKEINFOFLAGS = | |
152 | ||
153 | EXPECT = `if [ -f $$r/expect/expect ] ; \ | |
154 | then echo $$r/expect/expect ; \ | |
155 | else echo expect ; fi` | |
156 | ||
157 | RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ | |
158 | then echo $$s/dejagnu/runtest ; \ | |
159 | else echo runtest ; fi` | |
160 | ||
161 | ||
162 | # compilers to use to create programs which must be run in the build | |
163 | # environment. | |
164 | CC_FOR_BUILD = $(CC) | |
165 | CXX_FOR_BUILD = $(CXX) | |
166 | ||
167 | SUBDIRS = "this is set via configure, don't edit this" | |
168 | OTHERS = | |
169 | ||
170 | # This is set by the configure script to the list of directories which | |
171 | # should be built using the target tools. | |
d207ebef | 172 | TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon libf2c libchill libobjc |
6599da04 JM |
173 | |
174 | # Target libraries are put under this directory: | |
175 | # Changed by configure to $(target_alias) if cross. | |
176 | TARGET_SUBDIR = . | |
177 | ||
178 | # This is set by the configure script to the arguments passed to configure. | |
179 | CONFIG_ARGUMENTS = | |
180 | ||
181 | # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared | |
182 | # was used. | |
183 | SET_LIB_PATH = | |
184 | ||
185 | # This is the name of the environment variable used for the path to | |
186 | # the libraries. This may be changed by configure.in. | |
187 | RPATH_ENVVAR = LD_LIBRARY_PATH | |
188 | ||
189 | # configure.in sets SET_LIB_PATH to this if --enable-shared was used. | |
190 | REALLY_SET_LIB_PATH = \ | |
8ccdc228 L |
191 | if [ x"$$$(RPATH_ENVVAR)" != x ]; then \ |
192 | $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \ | |
193 | else \ | |
194 | $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \ | |
195 | fi; \ | |
6599da04 JM |
196 | export $(RPATH_ENVVAR); |
197 | ||
198 | ALL = all.normal | |
199 | INSTALL_TARGET = installdirs \ | |
96b0f1fc | 200 | install-gcc \ |
6599da04 JM |
201 | $(INSTALL_MODULES) \ |
202 | $(INSTALL_TARGET_MODULES) \ | |
203 | $(INSTALL_X11_MODULES) \ | |
6599da04 JM |
204 | $(INSTALL_DOSREL) |
205 | ||
205cba53 JL |
206 | INSTALL_TARGET_CROSS = installdirs \ |
207 | install-gcc-cross \ | |
208 | $(INSTALL_MODULES) \ | |
209 | $(INSTALL_TARGET_MODULES) \ | |
210 | $(INSTALL_X11_MODULES) \ | |
211 | $(INSTALL_DOSREL) | |
6599da04 JM |
212 | |
213 | CC_FOR_TARGET = ` \ | |
214 | if [ -f $$r/gcc/xgcc ] ; then \ | |
215 | if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ | |
1ebe758f CF |
216 | case "$(target_canonical)" in \ |
217 | i[3456]86-*-cygwin*) \ | |
d207ebef | 218 | echo $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$$r/gcc/ -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/winsup/cygwin/include -idirafter $$s/winsup/w32api/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \ |
1ebe758f CF |
219 | ;; \ |
220 | *) \ | |
d207ebef | 221 | echo $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ |
1ebe758f CF |
222 | ;; \ |
223 | esac \ | |
6599da04 | 224 | else \ |
d207ebef | 225 | echo $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -isystem $(build_tooldir)/include; \ |
6599da04 JM |
226 | fi; \ |
227 | else \ | |
228 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
229 | echo $(CC); \ | |
230 | else \ | |
231 | t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ | |
232 | fi; \ | |
233 | fi` | |
234 | ||
235 | # If CC_FOR_TARGET is not overriden on the command line, then this | |
236 | # variable is passed down to the gcc Makefile, where it is used to | |
237 | # build libgcc2.a. We define it here so that it can itself be | |
238 | # overridden on the command line. | |
d207ebef | 239 | GCC_FOR_TARGET = $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -isystem $(build_tooldir)/include |
6599da04 | 240 | |
5d4a5ee6 JL |
241 | CHILL_FOR_TARGET = ` \ |
242 | if [ -f $$r/gcc/xgcc ] ; then \ | |
d207ebef | 243 | echo $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \ |
5d4a5ee6 JL |
244 | else \ |
245 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
246 | echo $(CC); \ | |
247 | else \ | |
248 | t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ | |
249 | fi; \ | |
250 | fi` | |
6599da04 JM |
251 | |
252 | CXX_FOR_TARGET = ` \ | |
7a53e94b | 253 | if [ -f $$r/gcc/g++ ] ; then \ |
6599da04 | 254 | if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ |
1ebe758f CF |
255 | case "$(target_canonical)" in \ |
256 | i[3456]86-*-cygwin*) \ | |
d207ebef | 257 | echo $$r/gcc/g++ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$$r/gcc/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/cygwin/include -idirafter $$s/winsup/w32api/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc -L$$r/$(TARGET_SUBDIR)/libstdc++; \ |
1ebe758f CF |
258 | ;; \ |
259 | *) \ | |
d207ebef | 260 | echo $$r/gcc/g++ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc -L$$r/$(TARGET_SUBDIR)/libstdc++; \ |
1ebe758f CF |
261 | ;; \ |
262 | esac \ | |
6599da04 | 263 | else \ |
d207ebef | 264 | echo $$r/gcc/g++ -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -isystem $(build_tooldir)/include -L$$r/$(TARGET_SUBDIR)/libstdc++; \ |
6599da04 JM |
265 | fi; \ |
266 | else \ | |
267 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
268 | echo $(CXX); \ | |
269 | else \ | |
270 | t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \ | |
271 | fi; \ | |
272 | fi` | |
273 | ||
274 | AS_FOR_TARGET = ` \ | |
275 | if [ -f $$r/gas/as-new ] ; then \ | |
276 | echo $$r/gas/as-new ; \ | |
277 | else \ | |
278 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
279 | echo $(AS); \ | |
280 | else \ | |
281 | t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \ | |
282 | fi; \ | |
283 | fi` | |
284 | ||
285 | LD_FOR_TARGET = ` \ | |
286 | if [ -f $$r/ld/ld-new ] ; then \ | |
287 | echo $$r/ld/ld-new ; \ | |
288 | else \ | |
289 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
290 | echo $(LD); \ | |
291 | else \ | |
292 | t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \ | |
293 | fi; \ | |
294 | fi` | |
295 | ||
296 | DLLTOOL_FOR_TARGET = ` \ | |
297 | if [ -f $$r/binutils/dlltool ] ; then \ | |
298 | echo $$r/binutils/dlltool ; \ | |
299 | else \ | |
300 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
301 | echo $(DLLTOOL); \ | |
302 | else \ | |
303 | t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \ | |
304 | fi; \ | |
305 | fi` | |
306 | ||
307 | WINDRES_FOR_TARGET = ` \ | |
308 | if [ -f $$r/binutils/windres ] ; then \ | |
309 | echo $$r/binutils/windres ; \ | |
310 | else \ | |
311 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
312 | echo $(WINDRES); \ | |
313 | else \ | |
314 | t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \ | |
315 | fi; \ | |
316 | fi` | |
317 | ||
318 | AR_FOR_TARGET = ` \ | |
319 | if [ -f $$r/binutils/ar ] ; then \ | |
320 | echo $$r/binutils/ar ; \ | |
321 | else \ | |
322 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
323 | echo $(AR); \ | |
324 | else \ | |
325 | t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \ | |
326 | fi; \ | |
327 | fi` | |
328 | ||
329 | RANLIB_FOR_TARGET = ` \ | |
330 | if [ -f $$r/binutils/ranlib ] ; then \ | |
331 | echo $$r/binutils/ranlib ; \ | |
332 | else \ | |
333 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
334 | echo $(RANLIB); \ | |
335 | else \ | |
336 | t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \ | |
337 | fi; \ | |
338 | fi` | |
339 | ||
340 | NM_FOR_TARGET = ` \ | |
341 | if [ -f $$r/binutils/nm-new ] ; then \ | |
342 | echo $$r/binutils/nm-new ; \ | |
343 | else \ | |
344 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
345 | echo $(NM); \ | |
346 | else \ | |
347 | t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \ | |
348 | fi; \ | |
349 | fi` | |
350 | ||
5d4a5ee6 JL |
351 | # The first rule in the file had better be this one. Don't put any above it. |
352 | # This lives here to allow makefile fragments to contain dependencies. | |
353 | all: all.normal | |
354 | .PHONY: all | |
355 | ||
356 | # These can be overridden by config/mt-*. | |
357 | # The _TARGET_ is because they're specified in mt-foo. | |
358 | # The _HOST_ is because they're programs that run on the host. | |
359 | EXTRA_TARGET_HOST_ALL_MODULES = | |
360 | EXTRA_TARGET_HOST_INSTALL_MODULES = | |
361 | EXTRA_TARGET_HOST_CHECK_MODULES = | |
362 | ||
6599da04 JM |
363 | #### host and target specific makefile fragments come in here. |
364 | ### | |
365 | ||
366 | # Flags to pass down to all sub-makes. | |
367 | # Please keep these in alphabetical order. | |
368 | BASE_FLAGS_TO_PASS = \ | |
369 | "AR_FLAGS=$(AR_FLAGS)" \ | |
370 | "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ | |
371 | "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ | |
372 | "BISON=$(BISON)" \ | |
373 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ | |
374 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ | |
375 | "CFLAGS=$(CFLAGS)" \ | |
376 | "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ | |
5d4a5ee6 JL |
377 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
378 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ | |
379 | "CHILL_LIB=$(CHILL_LIB)" \ | |
6599da04 JM |
380 | "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ |
381 | "CXXFLAGS=$(CXXFLAGS)" \ | |
382 | "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ | |
383 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ | |
384 | "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ | |
385 | "INSTALL=$(INSTALL)" \ | |
386 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
387 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
388 | "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ | |
389 | "LDFLAGS=$(LDFLAGS)" \ | |
390 | "LEX=$(LEX)" \ | |
391 | "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ | |
392 | "LIBCFLAGS=$(LIBCFLAGS)" \ | |
393 | "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ | |
394 | "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ | |
395 | "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ | |
396 | "M4=$(M4)" \ | |
397 | "MAKE=$(MAKE)" \ | |
398 | "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ | |
399 | "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ | |
6599da04 | 400 | "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ |
5d4a5ee6 | 401 | "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ |
6599da04 JM |
402 | "SHELL=$(SHELL)" \ |
403 | "EXPECT=$(EXPECT)" \ | |
404 | "RUNTEST=$(RUNTEST)" \ | |
405 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ | |
81241b5e | 406 | "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ |
6599da04 JM |
407 | "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ |
408 | "YACC=$(YACC)" \ | |
5d4a5ee6 JL |
409 | "bindir=$(bindir)" \ |
410 | "datadir=$(datadir)" \ | |
6599da04 | 411 | "exec_prefix=$(exec_prefix)" \ |
5d4a5ee6 JL |
412 | "includedir=$(includedir)" \ |
413 | "infodir=$(infodir)" \ | |
414 | "libdir=$(libdir)" \ | |
415 | "libexecdir=$(libexecdir)" \ | |
416 | "lispdir=$(lispdir)" \ | |
417 | "localstatedir=$(localstatedir)" \ | |
418 | "mandir=$(mandir)" \ | |
419 | "oldincludedir=$(oldincludedir)" \ | |
6599da04 | 420 | "prefix=$(prefix)" \ |
5d4a5ee6 JL |
421 | "sbindir=$(sbindir)" \ |
422 | "sharedstatedir=$(sharedstatedir)" \ | |
423 | "sysconfdir=$(sysconfdir)" \ | |
d0a8352c | 424 | "tooldir=$(tooldir)" \ |
5cb95c7a | 425 | "build_tooldir=$(build_tooldir)" \ |
fe2fa3c4 MH |
426 | "gxx_include_dir=$(gxx_include_dir)" \ |
427 | "gcc_version=$(gcc_version)" \ | |
6dd27861 | 428 | "gcc_version_trigger=$(gcc_version_trigger)" \ |
fe2fa3c4 MH |
429 | "target_alias=$(target_alias)" \ |
430 | "libsubdir=$(libsubdir)" | |
6599da04 JM |
431 | |
432 | # Flags to pass down to most sub-makes, in which we're building with | |
433 | # the host environment. | |
434 | # If any variables are added here, they must be added to do-*, below. | |
435 | EXTRA_HOST_FLAGS = \ | |
436 | 'AR=$(AR)' \ | |
437 | 'AS=$(AS)' \ | |
438 | 'CC=$(CC)' \ | |
439 | 'CXX=$(CXX)' \ | |
440 | 'DLLTOOL=$(DLLTOOL)' \ | |
441 | 'LD=$(LD)' \ | |
442 | 'NM=$(NM)' \ | |
443 | 'RANLIB=$(RANLIB)' \ | |
444 | 'WINDRES=$(WINDRES)' | |
445 | ||
446 | FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) | |
447 | ||
448 | # Flags that are concerned with the location of the X11 include files | |
449 | # and library files | |
450 | # | |
451 | # NOTE: until the top-level is getting the values via autoconf, it only | |
452 | # causes problems to have this top-level Makefile overriding the autoconf-set | |
453 | # values in child directories. Only variables that don't conflict with | |
454 | # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. | |
455 | # | |
456 | X11_FLAGS_TO_PASS = \ | |
457 | 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ | |
458 | 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' | |
459 | ||
460 | # Flags to pass down to makes which are built with the target environment. | |
461 | # The double $ decreases the length of the command line; the variables | |
462 | # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. | |
463 | # If any variables are added here, they must be added to do-*, below. | |
464 | EXTRA_TARGET_FLAGS = \ | |
465 | 'AR=$$(AR_FOR_TARGET)' \ | |
466 | 'AS=$$(AS_FOR_TARGET)' \ | |
467 | 'CC=$$(CC_FOR_TARGET)' \ | |
468 | 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ | |
469 | 'CXX=$$(CXX_FOR_TARGET)' \ | |
470 | 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ | |
471 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ | |
472 | 'LD=$$(LD_FOR_TARGET)' \ | |
473 | 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ | |
474 | 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ | |
475 | 'NM=$$(NM_FOR_TARGET)' \ | |
6599da04 JM |
476 | 'RANLIB=$$(RANLIB_FOR_TARGET)' \ |
477 | 'WINDRES=$$(WINDRES_FOR_TARGET)' | |
478 | ||
479 | TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) | |
480 | ||
481 | # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it | |
482 | # unfortunately needs the native compiler and the target ar and | |
483 | # ranlib. | |
484 | # If any variables are added here, they must be added to do-*, below. | |
485 | # The HOST_* variables are a special case, which are used for the gcc | |
486 | # cross-building scheme. | |
487 | EXTRA_GCC_FLAGS = \ | |
ecd62820 | 488 | 'AR=$(AR)' \ |
6599da04 JM |
489 | 'AS=$(AS)' \ |
490 | 'CC=$(CC)' \ | |
491 | 'CXX=$(CXX)' \ | |
492 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ | |
493 | 'HOST_CC=$(CC_FOR_BUILD)' \ | |
494 | 'HOST_PREFIX=$(HOST_PREFIX)' \ | |
495 | 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \ | |
496 | 'NM=$(NM)' \ | |
ecd62820 | 497 | 'RANLIB=$(RANLIB)' \ |
6599da04 JM |
498 | 'WINDRES=$$(WINDRES_FOR_TARGET)' \ |
499 | "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ | |
5d4a5ee6 JL |
500 | "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \ |
501 | "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \ | |
502 | "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \ | |
503 | "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \ | |
504 | "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ | |
505 | "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ | |
506 | "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \ | |
507 | "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \ | |
508 | "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" | |
6599da04 JM |
509 | |
510 | GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) | |
511 | ||
512 | # This is a list of the targets for all of the modules which are compiled | |
513 | # using $(FLAGS_TO_PASS). | |
514 | ALL_MODULES = \ | |
515 | all-apache \ | |
5d4a5ee6 | 516 | all-ash \ |
6599da04 JM |
517 | all-autoconf \ |
518 | all-automake \ | |
519 | all-bash \ | |
520 | all-bfd \ | |
521 | all-binutils \ | |
522 | all-bison \ | |
523 | all-byacc \ | |
5d4a5ee6 JL |
524 | all-bzip2 \ |
525 | all-cvssrc \ | |
6599da04 JM |
526 | all-db \ |
527 | all-dejagnu \ | |
528 | all-diff \ | |
529 | all-dosutils \ | |
530 | all-etc \ | |
531 | all-fileutils \ | |
532 | all-findutils \ | |
533 | all-find \ | |
534 | all-flex \ | |
535 | all-gas \ | |
536 | all-gawk \ | |
5d4a5ee6 | 537 | all-gettext \ |
6599da04 JM |
538 | all-gnuserv \ |
539 | all-gprof \ | |
540 | all-grep \ | |
541 | all-grez \ | |
542 | all-gzip \ | |
543 | all-hello \ | |
544 | all-indent \ | |
545 | all-inet \ | |
5d4a5ee6 | 546 | all-intl \ |
6599da04 JM |
547 | all-ispell \ |
548 | all-itcl \ | |
549 | all-ld \ | |
5d4a5ee6 | 550 | all-libgui \ |
6599da04 | 551 | all-libiberty \ |
d207ebef | 552 | all-libtool \ |
6599da04 JM |
553 | all-m4 \ |
554 | all-make \ | |
555 | all-mmalloc \ | |
556 | all-opcodes \ | |
557 | all-patch \ | |
558 | all-perl \ | |
559 | all-prms \ | |
560 | all-rcs \ | |
561 | all-readline \ | |
562 | all-release \ | |
563 | all-recode \ | |
564 | all-sed \ | |
565 | all-send-pr \ | |
566 | all-shellutils \ | |
567 | all-sim \ | |
5d4a5ee6 | 568 | all-snavigator \ |
6599da04 JM |
569 | all-tar \ |
570 | all-tcl \ | |
d207ebef | 571 | all-tcl8.1 \ |
6599da04 JM |
572 | all-texinfo \ |
573 | all-textutils \ | |
574 | all-tgas \ | |
575 | all-time \ | |
576 | all-uudecode \ | |
5d4a5ee6 | 577 | all-wdiff \ |
99d60508 | 578 | all-zip \ |
5d4a5ee6 | 579 | $(EXTRA_TARGET_HOST_ALL_MODULES) |
6599da04 JM |
580 | |
581 | # This is a list of the check targets for all of the modules which are | |
582 | # compiled using $(FLAGS_TO_PASS). | |
583 | # | |
584 | # The list is in two parts. The first lists those tools which | |
585 | # are tested as part of the host's native tool-chain, and not | |
586 | # tested in a cross configuration. | |
587 | NATIVE_CHECK_MODULES = \ | |
588 | check-bison \ | |
589 | check-byacc \ | |
99d60508 TT |
590 | check-flex \ |
591 | check-zip | |
6599da04 JM |
592 | |
593 | CROSS_CHECK_MODULES = \ | |
594 | check-apache \ | |
5d4a5ee6 | 595 | check-ash \ |
6599da04 JM |
596 | check-autoconf \ |
597 | check-automake \ | |
598 | check-bash \ | |
599 | check-bfd \ | |
600 | check-binutils \ | |
5d4a5ee6 JL |
601 | check-bzip2 \ |
602 | check-cvssrc \ | |
6599da04 JM |
603 | check-db \ |
604 | check-dejagnu \ | |
605 | check-diff \ | |
606 | check-etc \ | |
607 | check-fileutils \ | |
608 | check-findutils \ | |
609 | check-find \ | |
610 | check-gas \ | |
611 | check-gawk \ | |
5d4a5ee6 | 612 | check-gettext \ |
6599da04 JM |
613 | check-gnuserv \ |
614 | check-gprof \ | |
615 | check-grep \ | |
616 | check-gzip \ | |
617 | check-hello \ | |
618 | check-indent \ | |
619 | check-inet \ | |
5d4a5ee6 | 620 | check-intl \ |
6599da04 JM |
621 | check-ispell \ |
622 | check-itcl \ | |
623 | check-ld \ | |
5d4a5ee6 | 624 | check-libgui \ |
6599da04 | 625 | check-libiberty \ |
5d4a5ee6 | 626 | check-libtool \ |
6599da04 JM |
627 | check-m4 \ |
628 | check-make \ | |
629 | check-mmcheckoc \ | |
630 | check-opcodes \ | |
631 | check-patch \ | |
632 | check-perl \ | |
633 | check-prms \ | |
634 | check-rcs \ | |
635 | check-readline \ | |
636 | check-recode \ | |
637 | check-sed \ | |
638 | check-send-pr \ | |
639 | check-shellutils \ | |
1ebe758f | 640 | check-snavigator \ |
6599da04 JM |
641 | check-sim \ |
642 | check-tar \ | |
643 | check-tcl \ | |
644 | check-texinfo \ | |
645 | check-textutils \ | |
646 | check-tgas \ | |
647 | check-time \ | |
648 | check-uudecode \ | |
5d4a5ee6 JL |
649 | check-wdiff \ |
650 | $(EXTRA_TARGET_HOST_CHECK_MODULES) | |
6599da04 JM |
651 | |
652 | CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) | |
653 | ||
654 | # This is a list of the install targets for all of the modules which are | |
655 | # compiled using $(FLAGS_TO_PASS). | |
656 | # We put install-opcodes before install-binutils because the installed | |
657 | # binutils might be on PATH, and they might need the shared opcodes | |
658 | # library. | |
5d4a5ee6 JL |
659 | # We put install-tcl before install-itcl because itcl wants to run a |
660 | # program on installation which uses the Tcl libraries. | |
6599da04 JM |
661 | INSTALL_MODULES = \ |
662 | install-apache \ | |
5d4a5ee6 | 663 | install-ash \ |
6599da04 JM |
664 | install-autoconf \ |
665 | install-automake \ | |
666 | install-bash \ | |
667 | install-bfd \ | |
5d4a5ee6 | 668 | install-bzip2 \ |
6599da04 JM |
669 | install-opcodes \ |
670 | install-binutils \ | |
671 | install-bison \ | |
672 | install-byacc \ | |
5d4a5ee6 | 673 | install-cvssrc \ |
6599da04 JM |
674 | install-db \ |
675 | install-dejagnu \ | |
676 | install-diff \ | |
677 | install-dosutils \ | |
678 | install-etc \ | |
679 | install-fileutils \ | |
680 | install-findutils \ | |
681 | install-find \ | |
682 | install-flex \ | |
683 | install-gas \ | |
684 | install-gawk \ | |
5d4a5ee6 | 685 | install-gettext \ |
6599da04 JM |
686 | install-gnuserv \ |
687 | install-gprof \ | |
688 | install-grep \ | |
689 | install-grez \ | |
690 | install-gzip \ | |
691 | install-hello \ | |
692 | install-indent \ | |
693 | install-inet \ | |
5d4a5ee6 | 694 | install-intl \ |
6599da04 | 695 | install-ispell \ |
5d4a5ee6 | 696 | install-tcl \ |
d207ebef | 697 | install-tcl8.1 \ |
6599da04 JM |
698 | install-itcl \ |
699 | install-ld \ | |
5d4a5ee6 | 700 | install-libgui \ |
6599da04 | 701 | install-libiberty \ |
5d4a5ee6 | 702 | install-libtool \ |
6599da04 JM |
703 | install-m4 \ |
704 | install-make \ | |
705 | install-mmalloc \ | |
706 | install-patch \ | |
707 | install-perl \ | |
708 | install-prms \ | |
709 | install-rcs \ | |
710 | install-readline \ | |
711 | install-recode \ | |
712 | install-sed \ | |
713 | install-send-pr \ | |
714 | install-shellutils \ | |
715 | install-sim \ | |
5d4a5ee6 | 716 | install-snavigator \ |
6599da04 | 717 | install-tar \ |
6599da04 JM |
718 | install-textutils \ |
719 | install-tgas \ | |
720 | install-time \ | |
721 | install-uudecode \ | |
5d4a5ee6 | 722 | install-wdiff \ |
99d60508 | 723 | install-zip \ |
5d4a5ee6 | 724 | $(EXTRA_TARGET_HOST_INSTALL_MODULES) |
6599da04 JM |
725 | |
726 | # This is a list of the targets for all of the modules which are compiled | |
727 | # using $(X11_FLAGS_TO_PASS). | |
728 | ALL_X11_MODULES = \ | |
729 | all-emacs \ | |
730 | all-emacs19 \ | |
731 | all-gdb \ | |
732 | all-expect \ | |
733 | all-gash \ | |
734 | all-guile \ | |
735 | all-tclX \ | |
736 | all-tk \ | |
d207ebef | 737 | all-tk8.1 \ |
6599da04 JM |
738 | all-tix |
739 | ||
740 | # This is a list of the check targets for all of the modules which are | |
741 | # compiled using $(X11_FLAGS_TO_PASS). | |
742 | CHECK_X11_MODULES = \ | |
743 | check-emacs \ | |
744 | check-gdb \ | |
745 | check-guile \ | |
746 | check-expect \ | |
747 | check-gash \ | |
748 | check-tclX \ | |
749 | check-tk \ | |
750 | check-tix | |
751 | ||
752 | # This is a list of the install targets for all the modules which are | |
753 | # compiled using $(X11_FLAGS_TO_PASS). | |
754 | INSTALL_X11_MODULES = \ | |
755 | install-emacs \ | |
756 | install-emacs19 \ | |
757 | install-gdb \ | |
758 | install-guile \ | |
759 | install-expect \ | |
760 | install-gash \ | |
761 | install-tclX \ | |
762 | install-tk \ | |
d207ebef | 763 | install-tk8.1 \ |
6599da04 JM |
764 | install-tix |
765 | ||
766 | # This is a list of the targets for all of the modules which are compiled | |
767 | # using $(TARGET_FLAGS_TO_PASS). | |
768 | ALL_TARGET_MODULES = \ | |
769 | all-target-libio \ | |
770 | all-target-libstdc++ \ | |
17090313 | 771 | all-target-libstdc++-v3 \ |
6599da04 JM |
772 | all-target-librx \ |
773 | all-target-libg++ \ | |
774 | all-target-newlib \ | |
8821a725 | 775 | all-target-libf2c \ |
b54db294 | 776 | all-target-libchill \ |
6fc19d6d | 777 | all-target-libobjc \ |
d207ebef | 778 | all-target-libtermcap \ |
6599da04 JM |
779 | all-target-winsup \ |
780 | all-target-libgloss \ | |
781 | all-target-libiberty \ | |
782 | all-target-gperf \ | |
5d4a5ee6 JL |
783 | all-target-examples \ |
784 | all-target-libstub \ | |
aab0d19d | 785 | all-target-libffi \ |
99d60508 TT |
786 | all-target-libjava \ |
787 | all-target-zlib \ | |
788 | all-target-boehm-gc \ | |
789 | all-target-qthreads \ | |
d207ebef | 790 | all-target-bsp \ |
5d4a5ee6 | 791 | all-target-cygmon |
6599da04 JM |
792 | |
793 | # This is a list of the configure targets for all of the modules which | |
794 | # are compiled using the target tools. | |
795 | CONFIGURE_TARGET_MODULES = \ | |
796 | configure-target-libio \ | |
797 | configure-target-libstdc++ \ | |
17090313 | 798 | configure-target-libstdc++-v3 \ |
6599da04 JM |
799 | configure-target-librx \ |
800 | configure-target-libg++ \ | |
801 | configure-target-newlib \ | |
8821a725 | 802 | configure-target-libf2c \ |
b54db294 | 803 | configure-target-libchill \ |
6fc19d6d | 804 | configure-target-libobjc \ |
d207ebef | 805 | configure-target-libtermcap \ |
6599da04 JM |
806 | configure-target-winsup \ |
807 | configure-target-libgloss \ | |
808 | configure-target-libiberty \ | |
809 | configure-target-gperf \ | |
5d4a5ee6 JL |
810 | configure-target-examples \ |
811 | configure-target-libstub \ | |
aab0d19d | 812 | configure-target-libffi \ |
99d60508 TT |
813 | configure-target-libjava \ |
814 | configure-target-zlib \ | |
815 | configure-target-boehm-gc \ | |
816 | configure-target-qthreads \ | |
d207ebef | 817 | configure-target-bsp \ |
5d4a5ee6 | 818 | configure-target-cygmon |
6599da04 JM |
819 | |
820 | # This is a list of the check targets for all of the modules which are | |
821 | # compiled using $(TARGET_FLAGS_TO_PASS). | |
822 | CHECK_TARGET_MODULES = \ | |
823 | check-target-libio \ | |
824 | check-target-libstdc++ \ | |
17090313 | 825 | check-target-libstdc++-v3 \ |
6599da04 JM |
826 | check-target-libg++ \ |
827 | check-target-newlib \ | |
8821a725 | 828 | check-target-libf2c \ |
b54db294 | 829 | check-target-libchill \ |
6fc19d6d | 830 | check-target-libobjc \ |
6599da04 JM |
831 | check-target-winsup \ |
832 | check-target-libiberty \ | |
aab0d19d | 833 | check-target-libffi \ |
99d60508 TT |
834 | check-target-libjava \ |
835 | check-target-zlib \ | |
836 | check-target-boehm-gc \ | |
837 | check-target-qthreads \ | |
6599da04 JM |
838 | check-target-gperf |
839 | ||
840 | # This is a list of the install targets for all of the modules which are | |
841 | # compiled using $(TARGET_FLAGS_TO_PASS). | |
842 | INSTALL_TARGET_MODULES = \ | |
843 | install-target-libio \ | |
844 | install-target-libstdc++ \ | |
17090313 | 845 | install-target-libstdc++-v3 \ |
6599da04 JM |
846 | install-target-libg++ \ |
847 | install-target-newlib \ | |
8821a725 | 848 | install-target-libf2c \ |
b54db294 | 849 | install-target-libchill \ |
6fc19d6d | 850 | install-target-libobjc \ |
d207ebef | 851 | install-target-libtermcap \ |
6599da04 JM |
852 | install-target-winsup \ |
853 | install-target-libgloss \ | |
854 | install-target-libiberty \ | |
99d60508 TT |
855 | install-target-bsp \ |
856 | install-target-libjava \ | |
857 | install-target-zlib \ | |
858 | install-target-boehm-gc \ | |
859 | install-target-qthreads \ | |
6599da04 JM |
860 | install-target-gperf |
861 | ||
862 | # This is a list of the targets for which we can do a clean-{target}. | |
863 | CLEAN_MODULES = \ | |
864 | clean-apache \ | |
5d4a5ee6 | 865 | clean-ash \ |
6599da04 JM |
866 | clean-autoconf \ |
867 | clean-automake \ | |
868 | clean-bash \ | |
869 | clean-bfd \ | |
870 | clean-binutils \ | |
871 | clean-bison \ | |
872 | clean-byacc \ | |
5d4a5ee6 JL |
873 | clean-bzip2 \ |
874 | clean-cvssrc \ | |
6599da04 JM |
875 | clean-db \ |
876 | clean-dejagnu \ | |
877 | clean-diff \ | |
878 | clean-dosutils \ | |
879 | clean-etc \ | |
880 | clean-fileutils \ | |
881 | clean-findutils \ | |
882 | clean-find \ | |
883 | clean-flex \ | |
884 | clean-gas \ | |
885 | clean-gawk \ | |
5d4a5ee6 | 886 | clean-gettext \ |
6599da04 JM |
887 | clean-gnuserv \ |
888 | clean-gprof \ | |
889 | clean-grep \ | |
890 | clean-grez \ | |
891 | clean-gzip \ | |
892 | clean-hello \ | |
893 | clean-indent \ | |
894 | clean-inet \ | |
5d4a5ee6 | 895 | clean-intl \ |
6599da04 JM |
896 | clean-ispell \ |
897 | clean-itcl \ | |
898 | clean-ld \ | |
5d4a5ee6 | 899 | clean-libgui \ |
6599da04 | 900 | clean-libiberty \ |
5d4a5ee6 | 901 | clean-libtool \ |
6599da04 JM |
902 | clean-m4 \ |
903 | clean-make \ | |
904 | clean-mmalloc \ | |
905 | clean-opcodes \ | |
906 | clean-patch \ | |
907 | clean-perl \ | |
908 | clean-prms \ | |
909 | clean-rcs \ | |
910 | clean-readline \ | |
911 | clean-release \ | |
912 | clean-recode \ | |
913 | clean-sed \ | |
914 | clean-send-pr \ | |
915 | clean-shellutils \ | |
916 | clean-sim \ | |
5d4a5ee6 | 917 | clean-snavigator \ |
6599da04 JM |
918 | clean-tar \ |
919 | clean-tcl \ | |
920 | clean-texinfo \ | |
921 | clean-textutils \ | |
922 | clean-tgas \ | |
923 | clean-time \ | |
924 | clean-uudecode \ | |
99d60508 TT |
925 | clean-wdiff \ |
926 | clean-zip | |
927 | ||
6599da04 JM |
928 | # All of the target modules that can be cleaned |
929 | CLEAN_TARGET_MODULES = \ | |
930 | clean-target-libio \ | |
931 | clean-target-libstdc++ \ | |
17090313 | 932 | clean-target-libstdc++-v3 \ |
6599da04 JM |
933 | clean-target-librx \ |
934 | clean-target-libg++ \ | |
935 | clean-target-newlib \ | |
8821a725 | 936 | clean-target-libf2c \ |
b54db294 | 937 | clean-target-libchill \ |
6fc19d6d | 938 | clean-target-libobjc \ |
6599da04 JM |
939 | clean-target-winsup \ |
940 | clean-target-libgloss \ | |
941 | clean-target-libiberty \ | |
942 | clean-target-gperf \ | |
5d4a5ee6 JL |
943 | clean-target-examples \ |
944 | clean-target-libstub \ | |
aab0d19d | 945 | clean-target-libffi \ |
99d60508 TT |
946 | clean-target-libjava \ |
947 | clean-target-zlib \ | |
948 | clean-target-boehm-gc \ | |
949 | clean-target-qthreads \ | |
d207ebef | 950 | clean-target-bsp \ |
5d4a5ee6 | 951 | clean-target-cygmon |
6599da04 JM |
952 | |
953 | # All of the x11 modules that can be cleaned | |
954 | CLEAN_X11_MODULES = \ | |
955 | clean-emacs \ | |
956 | clean-emacs19 \ | |
957 | clean-gdb \ | |
958 | clean-expect \ | |
959 | clean-gash \ | |
960 | clean-guile \ | |
961 | clean-tclX \ | |
962 | clean-tk \ | |
963 | clean-tix | |
964 | ||
6599da04 JM |
965 | # The target built for a native build. |
966 | .PHONY: all.normal | |
967 | all.normal: \ | |
968 | $(ALL_MODULES) \ | |
969 | $(ALL_X11_MODULES) \ | |
970 | $(ALL_TARGET_MODULES) \ | |
971 | all-gcc | |
972 | ||
973 | # Do a target for all the subdirectories. A ``make do-X'' will do a | |
974 | # ``make X'' in all subdirectories (because, in general, there is a | |
975 | # dependency (below) of X upon do-X, a ``make X'' will also do this, | |
976 | # but it may do additional work as well). | |
977 | # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, | |
978 | # because it is so large that it can easily overflow the command line | |
979 | # length limit on some systems. | |
980 | DO_X = \ | |
981 | do-clean \ | |
982 | do-distclean \ | |
983 | do-dvi \ | |
984 | do-info \ | |
985 | do-install-info \ | |
986 | do-installcheck \ | |
987 | do-mostlyclean \ | |
988 | do-maintainer-clean \ | |
989 | do-TAGS | |
990 | .PHONY: $(DO_X) | |
991 | $(DO_X): | |
992 | @target=`echo $@ | sed -e 's/^do-//'`; \ | |
993 | r=`pwd`; export r; \ | |
994 | s=`cd $(srcdir); pwd`; export s; \ | |
995 | $(SET_LIB_PATH) \ | |
996 | for i in $(SUBDIRS) -dummy-; do \ | |
997 | if [ -f ./$$i/Makefile ]; then \ | |
998 | case $$i in \ | |
999 | gcc) \ | |
1000 | for flag in $(EXTRA_GCC_FLAGS); do \ | |
1001 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ | |
1002 | done; \ | |
1003 | ;; \ | |
1004 | *) \ | |
1005 | for flag in $(EXTRA_HOST_FLAGS); do \ | |
1006 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ | |
1007 | done; \ | |
1008 | ;; \ | |
1009 | esac ; \ | |
1010 | export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ | |
1011 | if (cd ./$$i; \ | |
1012 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
1013 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ | |
1014 | "RANLIB=$${RANLIB}" \ | |
1015 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ | |
1016 | $${target}); \ | |
1017 | then true; else exit 1; fi; \ | |
1018 | else true; fi; \ | |
1019 | done | |
1020 | @target=`echo $@ | sed -e 's/^do-//'`; \ | |
1021 | r=`pwd`; export r; \ | |
1022 | s=`cd $(srcdir); pwd`; export s; \ | |
1023 | $(SET_LIB_PATH) \ | |
1024 | for i in $(TARGET_CONFIGDIRS) -dummy-; do \ | |
1025 | if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ | |
1026 | for flag in $(EXTRA_TARGET_FLAGS); do \ | |
1027 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ | |
1028 | done; \ | |
1029 | export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ | |
1030 | if (cd $(TARGET_SUBDIR)/$$i; \ | |
1031 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
1032 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ | |
1033 | "RANLIB=$${RANLIB}" \ | |
1034 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ | |
1035 | $${target}); \ | |
1036 | then true; else exit 1; fi; \ | |
1037 | else true; fi; \ | |
1038 | done | |
1039 | ||
1040 | # Here are the targets which correspond to the do-X targets. | |
1041 | ||
1042 | .PHONY: info installcheck dvi install-info | |
1043 | .PHONY: clean distclean mostlyclean maintainer-clean realclean | |
1044 | .PHONY: local-clean local-distclean local-maintainer-clean | |
1045 | info: do-info | |
1046 | installcheck: do-installcheck | |
1047 | dvi: do-dvi | |
1048 | ||
1049 | # Make sure makeinfo is built before we do a `make info'. | |
1050 | do-info: all-texinfo | |
1051 | ||
1052 | install-info: do-install-info dir.info | |
1053 | s=`cd $(srcdir); pwd`; export s; \ | |
1054 | if [ -f dir.info ] ; then \ | |
1055 | $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ | |
1056 | else true ; fi | |
1057 | ||
1058 | local-clean: | |
c4137c50 | 1059 | -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log |
6599da04 JM |
1060 | |
1061 | local-distclean: | |
f401679e | 1062 | -rm -f Makefile config.status config.cache mh-frag mt-frag |
6599da04 JM |
1063 | -if [ "$(TARGET_SUBDIR)" != "." ]; then \ |
1064 | rm -rf $(TARGET_SUBDIR); \ | |
1065 | else true; fi | |
1066 | ||
1067 | local-maintainer-clean: | |
1068 | @echo "This command is intended for maintainers to use;" | |
1069 | @echo "it deletes files that may require special tools to rebuild." | |
1070 | ||
1071 | clean: do-clean local-clean | |
1072 | mostlyclean: do-mostlyclean local-clean | |
1073 | distclean: do-distclean local-clean local-distclean | |
1074 | maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean | |
1075 | maintainer-clean: local-distclean | |
1076 | realclean: maintainer-clean | |
1077 | ||
1078 | # This rule is used to clean specific modules. | |
1079 | .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc | |
1080 | $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc: | |
1081 | @dir=`echo $@ | sed -e 's/clean-//'`; \ | |
1082 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1083 | r=`pwd`; export r; \ | |
1084 | s=`cd $(srcdir); pwd`; export s; \ | |
1085 | $(SET_LIB_PATH) \ | |
1086 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \ | |
1087 | else \ | |
1088 | true; \ | |
1089 | fi | |
1090 | ||
1091 | .PHONY: $(CLEAN_TARGET_MODULES) | |
1092 | $(CLEAN_TARGET_MODULES): | |
1093 | @dir=`echo $@ | sed -e 's/clean-target-//'`; \ | |
1094 | rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ | |
1095 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1096 | r=`pwd`; export r; \ | |
1097 | s=`cd $(srcdir); pwd`; export s; \ | |
1098 | $(SET_LIB_PATH) \ | |
1099 | (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \ | |
1100 | else \ | |
1101 | true; \ | |
1102 | fi | |
1103 | ||
1104 | clean-target: $(CLEAN_TARGET_MODULES) | |
1105 | ||
1106 | # Check target. | |
1107 | ||
1108 | .PHONY: check | |
1109 | check: $(CHECK_MODULES) \ | |
1110 | $(CHECK_TARGET_MODULES) \ | |
1111 | $(CHECK_X11_MODULES) \ | |
1112 | check-gcc | |
1113 | ||
c4137c50 AO |
1114 | # Automated reporting of test results. |
1115 | ||
1116 | warning.log: build.log | |
1117 | $(srcdir)/contrib/warn_summary build.log > $@ | |
1118 | ||
1119 | mail-report.log: | |
1120 | if test x'$(BOOT_CFLAGS)' != x''; then \ | |
1121 | BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ | |
1122 | fi; \ | |
1123 | $(srcdir)/contrib/test_summary -t >$@ | |
1124 | chmod +x $@ | |
1125 | echo If you really want to send e-mail, run ./$@ now | |
1126 | ||
1127 | mail-report-with-warnings.log: warning.log | |
1128 | if test x'$(BOOT_CFLAGS)' != x''; then \ | |
1129 | BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ | |
1130 | fi; \ | |
1131 | $(srcdir)/contrib/test_summary -t -i warning.log >$@ | |
1132 | chmod +x $@ | |
1133 | echo If you really want to send e-mail, run ./$@ now | |
1134 | ||
6599da04 JM |
1135 | # Installation targets. |
1136 | ||
205cba53 | 1137 | .PHONY: install install-cross uninstall source-vault binary-vault vault-install |
6599da04 | 1138 | install: $(INSTALL_TARGET) |
205cba53 | 1139 | install-cross: $(INSTALL_TARGET_CROSS) |
6599da04 JM |
1140 | |
1141 | uninstall: | |
1142 | @echo "the uninstall target is not supported in this tree" | |
1143 | ||
1144 | source-vault: | |
1145 | $(MAKE) -f ./release/Build-A-Release \ | |
1146 | host=$(host_alias) source-vault | |
1147 | ||
1148 | binary-vault: | |
1149 | $(MAKE) -f ./release/Build-A-Release \ | |
1150 | host=$(host_alias) target=$(target_alias) | |
1151 | ||
1152 | vault-install: | |
1153 | @if [ -f ./release/vault-install ] ; then \ | |
1154 | ./release/vault-install $(host_alias) $(target_alias) ; \ | |
1155 | else \ | |
1156 | true ; \ | |
1157 | fi | |
1158 | ||
1159 | .PHONY: install.all | |
1160 | install.all: install-no-fixedincludes | |
1161 | @if [ -f ./gcc/Makefile ] ; then \ | |
1162 | r=`pwd` ; export r ; \ | |
1163 | $(SET_LIB_PATH) \ | |
1164 | (cd ./gcc; \ | |
1165 | $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ | |
1166 | else \ | |
1167 | true ; \ | |
1168 | fi | |
1169 | ||
1170 | # inet-install is used because the I*Net wants DejaGNU installed but | |
1171 | # not built. Similarly, gzip is built but not installed. | |
1172 | inet-install: | |
1173 | $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install | |
1174 | ||
1175 | # install-no-fixedincludes is used because Cygnus can not distribute | |
1176 | # the fixed header files. | |
1177 | .PHONY: install-no-fixedincludes | |
1178 | install-no-fixedincludes: \ | |
1179 | installdirs \ | |
1180 | $(INSTALL_MODULES) \ | |
1181 | $(INSTALL_TARGET_MODULES) \ | |
1182 | $(INSTALL_X11_MODULES) \ | |
1183 | gcc-no-fixedincludes | |
1184 | ||
1185 | # Install the gcc headers files, but not the fixed include files, | |
1186 | # which Cygnus is not allowed to distribute. This rule is very | |
1187 | # dependent on the workings of the gcc Makefile.in. | |
1188 | .PHONY: gcc-no-fixedincludes | |
1189 | gcc-no-fixedincludes: | |
1190 | @if [ -f ./gcc/Makefile ]; then \ | |
1191 | rm -rf gcc/tmp-include; \ | |
1192 | mv gcc/include gcc/tmp-include 2>/dev/null; \ | |
1193 | mkdir gcc/include; \ | |
1194 | cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ | |
1195 | touch gcc/stmp-fixinc gcc/include/fixed; \ | |
1196 | rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ | |
1197 | r=`pwd`; export r; \ | |
1198 | s=`cd $(srcdir); pwd` ; export s; \ | |
1199 | $(SET_LIB_PATH) \ | |
1200 | (cd ./gcc; \ | |
1201 | $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
1202 | rm -rf gcc/include; \ | |
1203 | mv gcc/tmp-include gcc/include 2>/dev/null; \ | |
1204 | else true; fi | |
1205 | ||
1206 | # This rule is used to build the modules which use FLAGS_TO_PASS. To | |
1207 | # build a target all-X means to cd to X and make all. | |
1208 | # | |
1209 | # all-gui, and all-libproc are handled specially because | |
1210 | # they are still experimental, and if they fail to build, that | |
1211 | # shouldn't stop "make all". | |
1212 | .PHONY: $(ALL_MODULES) all-gui all-libproc | |
1213 | $(ALL_MODULES) all-gui all-libproc: | |
1214 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
1215 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1216 | r=`pwd`; export r; \ | |
1217 | s=`cd $(srcdir); pwd`; export s; \ | |
1218 | $(SET_LIB_PATH) \ | |
1219 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ | |
1220 | else \ | |
1221 | true; \ | |
1222 | fi | |
1223 | ||
1224 | # These rules are used to check the modules which use FLAGS_TO_PASS. | |
1225 | # To build a target check-X means to cd to X and make check. Some | |
1226 | # modules are only tested in a native toolchain. | |
1227 | ||
1228 | .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) | |
1229 | $(NATIVE_CHECK_MODULES): | |
1230 | @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
1231 | dir=`echo $@ | sed -e 's/check-//'`; \ | |
1232 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1233 | r=`pwd`; export r; \ | |
1234 | s=`cd $(srcdir); pwd`; export s; \ | |
1235 | $(SET_LIB_PATH) \ | |
1236 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ | |
1237 | else \ | |
1238 | true; \ | |
1239 | fi; \ | |
1240 | fi | |
1241 | ||
1242 | $(CROSS_CHECK_MODULES): | |
1243 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
1244 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1245 | r=`pwd`; export r; \ | |
1246 | s=`cd $(srcdir); pwd`; export s; \ | |
1247 | $(SET_LIB_PATH) \ | |
1248 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ | |
1249 | else \ | |
1250 | true; \ | |
1251 | fi | |
1252 | ||
1253 | # This rule is used to install the modules which use FLAGS_TO_PASS. | |
1254 | # To build a target install-X means to cd to X and make install. | |
1255 | .PHONY: $(INSTALL_MODULES) | |
1256 | $(INSTALL_MODULES): installdirs | |
1257 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
1258 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1259 | r=`pwd`; export r; \ | |
1260 | s=`cd $(srcdir); pwd`; export s; \ | |
1261 | $(SET_LIB_PATH) \ | |
1262 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ | |
1263 | else \ | |
1264 | true; \ | |
1265 | fi | |
1266 | ||
1267 | # This rule is used to configure the modules which are built with the | |
1268 | # target tools. | |
1269 | .PHONY: $(CONFIGURE_TARGET_MODULES) | |
1270 | $(CONFIGURE_TARGET_MODULES): | |
1271 | @dir=`echo $@ | sed -e 's/configure-target-//'`; \ | |
1272 | if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \ | |
1273 | r=`pwd`; export r; \ | |
1274 | $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \ | |
1275 | if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \ | |
1276 | if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \ | |
1277 | if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \ | |
1278 | rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ | |
1279 | else \ | |
1280 | echo "Multilibs changed for $${dir}, reconfiguring"; \ | |
1281 | rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \ | |
1282 | mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ | |
1283 | fi; \ | |
1284 | else \ | |
1285 | mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ | |
1286 | fi; \ | |
1287 | fi; \ | |
1288 | fi; exit 0 # break command into two pieces | |
1289 | @dir=`echo $@ | sed -e 's/configure-target-//'`; \ | |
1290 | if [ ! -d $(TARGET_SUBDIR) ]; then \ | |
1291 | true; \ | |
1292 | elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1293 | true; \ | |
1294 | elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ | |
1295 | if [ -d $(srcdir)/$${dir} ]; then \ | |
1296 | [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\ | |
1297 | r=`pwd`; export r; \ | |
1298 | s=`cd $(srcdir); pwd`; export s; \ | |
1299 | $(SET_LIB_PATH) \ | |
1300 | AR="$(AR_FOR_TARGET)"; export AR; \ | |
1301 | AS="$(AS_FOR_TARGET)"; export AS; \ | |
1302 | CC="$(CC_FOR_TARGET)"; export CC; \ | |
1303 | CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ | |
1304 | CXX="$(CXX_FOR_TARGET)"; export CXX; \ | |
1305 | CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ | |
1306 | DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ | |
1307 | LD="$(LD_FOR_TARGET)"; export LD; \ | |
1308 | LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ | |
1309 | NM="$(NM_FOR_TARGET)"; export NM; \ | |
1310 | RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ | |
1311 | WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ | |
1312 | echo Configuring in $(TARGET_SUBDIR)/$${dir}; \ | |
1313 | cd $(TARGET_SUBDIR)/$${dir}; \ | |
1314 | case $(srcdir) in \ | |
1315 | /*) \ | |
1316 | topdir=$(srcdir) ;; \ | |
1317 | *) \ | |
1318 | case "$(TARGET_SUBDIR)" in \ | |
1319 | .) topdir="../$(srcdir)" ;; \ | |
1320 | *) topdir="../../$(srcdir)" ;; \ | |
1321 | esac ;; \ | |
1322 | esac; \ | |
1323 | if [ "$(srcdir)" = "." ] ; then \ | |
1324 | if [ "$(TARGET_SUBDIR)" != "." ] ; then \ | |
1325 | if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \ | |
1326 | if [ -f Makefile ]; then \ | |
1327 | if $(MAKE) distclean; then \ | |
1328 | true; \ | |
1329 | else \ | |
1330 | exit 1; \ | |
1331 | fi; \ | |
1332 | else \ | |
1333 | true; \ | |
1334 | fi; \ | |
1335 | else \ | |
1336 | exit 1; \ | |
1337 | fi; \ | |
1338 | else \ | |
1339 | true; \ | |
1340 | fi; \ | |
1341 | srcdiroption="--srcdir=."; \ | |
1342 | libsrcdir="."; \ | |
1343 | else \ | |
1344 | srcdiroption="--srcdir=$${topdir}/$${dir}"; \ | |
1345 | libsrcdir="$$s/$${dir}"; \ | |
1346 | fi; \ | |
1347 | if [ -f $${libsrcdir}/configure ] ; then \ | |
71205e0b | 1348 | rm -f no-such-file skip-this-dir; \ |
601c6475 | 1349 | CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ |
6599da04 JM |
1350 | $(CONFIG_ARGUMENTS) $${srcdiroption} \ |
1351 | --with-target-subdir="$(TARGET_SUBDIR)"; \ | |
1352 | else \ | |
71205e0b | 1353 | rm -f no-such-file skip-this-dir; \ |
601c6475 | 1354 | CONFIG_SITE=no-such-file $(SHELL) $$s/configure \ |
6599da04 JM |
1355 | $(CONFIG_ARGUMENTS) $${srcdiroption} \ |
1356 | --with-target-subdir="$(TARGET_SUBDIR)"; \ | |
1357 | fi; \ | |
71205e0b MH |
1358 | if [ -f skip-this-dir ] ; then \ |
1359 | sh skip-this-dir; \ | |
1360 | rm -f skip-this-dir; \ | |
1361 | cd ..; rmdir $${dir} || true; \ | |
1362 | else \ | |
1363 | true; \ | |
1364 | fi; \ | |
6599da04 JM |
1365 | else \ |
1366 | true; \ | |
1367 | fi; \ | |
1368 | else \ | |
1369 | true; \ | |
1370 | fi | |
1371 | ||
1372 | # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. | |
1373 | # To build a target all-X means to cd to X and make all. | |
1374 | .PHONY: $(ALL_TARGET_MODULES) | |
1375 | $(ALL_TARGET_MODULES): | |
1376 | @dir=`echo $@ | sed -e 's/all-target-//'`; \ | |
1377 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1378 | r=`pwd`; export r; \ | |
1379 | s=`cd $(srcdir); pwd`; export s; \ | |
1380 | $(SET_LIB_PATH) \ | |
1381 | (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ | |
1382 | else \ | |
1383 | true; \ | |
1384 | fi | |
1385 | ||
1386 | # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS. | |
1387 | # To build a target install-X means to cd to X and make install. | |
1388 | .PHONY: $(CHECK_TARGET_MODULES) | |
1389 | $(CHECK_TARGET_MODULES): | |
1390 | @dir=`echo $@ | sed -e 's/check-target-//'`; \ | |
1391 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1392 | r=`pwd`; export r; \ | |
1393 | s=`cd $(srcdir); pwd`; export s; \ | |
1394 | $(SET_LIB_PATH) \ | |
1395 | (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\ | |
1396 | else \ | |
1397 | true; \ | |
1398 | fi | |
1399 | ||
1400 | # This rule is used to install the modules which use | |
1401 | # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X | |
1402 | # and make install. | |
1403 | .PHONY: $(INSTALL_TARGET_MODULES) | |
1404 | $(INSTALL_TARGET_MODULES): installdirs | |
1405 | @dir=`echo $@ | sed -e 's/install-target-//'`; \ | |
1406 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1407 | r=`pwd`; export r; \ | |
1408 | s=`cd $(srcdir); pwd`; export s; \ | |
1409 | $(SET_LIB_PATH) \ | |
1410 | (cd $(TARGET_SUBDIR)/$${dir}; \ | |
1411 | $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ | |
1412 | else \ | |
1413 | true; \ | |
1414 | fi | |
1415 | ||
1416 | # This rule is used to build the modules which use X11_FLAGS_TO_PASS. | |
1417 | # To build a target all-X means to cd to X and make all. | |
1418 | .PHONY: $(ALL_X11_MODULES) | |
1419 | $(ALL_X11_MODULES): | |
1420 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
1421 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1422 | r=`pwd`; export r; \ | |
1423 | s=`cd $(srcdir); pwd`; export s; \ | |
1424 | $(SET_LIB_PATH) \ | |
1425 | (cd $${dir}; \ | |
1426 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ | |
1427 | else \ | |
1428 | true; \ | |
1429 | fi | |
1430 | ||
1431 | # This rule is used to check the modules which use X11_FLAGS_TO_PASS. | |
1432 | # To build a target check-X means to cd to X and make all. | |
1433 | .PHONY: $(CHECK_X11_MODULES) | |
1434 | $(CHECK_X11_MODULES): | |
1435 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
1436 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1437 | r=`pwd`; export r; \ | |
1438 | s=`cd $(srcdir); pwd`; export s; \ | |
1439 | $(SET_LIB_PATH) \ | |
1440 | (cd $${dir}; \ | |
1441 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ | |
1442 | else \ | |
1443 | true; \ | |
1444 | fi | |
1445 | ||
1446 | # This rule is used to install the modules which use X11_FLAGS_TO_PASS. | |
1447 | # To build a target install-X means to cd to X and make install. | |
1448 | .PHONY: $(INSTALL_X11_MODULES) | |
1449 | $(INSTALL_X11_MODULES): installdirs | |
1450 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
1451 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1452 | r=`pwd`; export r; \ | |
1453 | s=`cd $(srcdir); pwd`; export s; \ | |
1454 | $(SET_LIB_PATH) \ | |
1455 | (cd $${dir}; \ | |
1456 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ | |
1457 | else \ | |
1458 | true; \ | |
1459 | fi | |
1460 | ||
1461 | # gcc is the only module which uses GCC_FLAGS_TO_PASS. | |
1462 | .PHONY: all-gcc | |
1463 | all-gcc: | |
1464 | @if [ -f ./gcc/Makefile ] ; then \ | |
1465 | r=`pwd`; export r; \ | |
1466 | s=`cd $(srcdir); pwd`; export s; \ | |
1467 | $(SET_LIB_PATH) \ | |
1468 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ | |
1469 | else \ | |
1470 | true; \ | |
1471 | fi | |
1472 | ||
ec20b1b9 JL |
1473 | # Building GCC uses some tools for rebuilding "source" files |
1474 | # like texinfo, bison/byacc, etc. So we must depend on those. | |
1475 | # | |
1476 | # While building GCC, it may be necessary to run various target | |
1477 | # programs like the assembler, linker, etc. So we depend on | |
1478 | # those too. | |
1479 | # | |
1480 | # In theory, on an SMP all those dependencies can be resolved | |
1481 | # in parallel. | |
1482 | # | |
f0983958 AO |
1483 | .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean |
1484 | bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld | |
ec20b1b9 JL |
1485 | @r=`pwd`; export r; \ |
1486 | s=`cd $(srcdir); pwd`; export s; \ | |
1487 | $(SET_LIB_PATH) \ | |
339c9b00 AO |
1488 | echo "Bootstrapping the compiler"; \ |
1489 | cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@ | |
ec20b1b9 JL |
1490 | @r=`pwd`; export r; \ |
1491 | s=`cd $(srcdir); pwd`; export s; \ | |
cc71c0ca | 1492 | case "$@" in \ |
f0983958 AO |
1493 | *bootstrap4-lean ) \ |
1494 | msg="Comparing stage3 and stage4 of the compiler"; \ | |
1495 | compare=compare3-lean ;; \ | |
cc71c0ca MH |
1496 | *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \ |
1497 | compare=compare3 ;; \ | |
1498 | *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \ | |
1499 | compare=compare-lean ;; \ | |
1500 | * ) msg="Comparing stage2 and stage3 of the compiler"; \ | |
1501 | compare=compare ;; \ | |
1502 | esac; \ | |
ec20b1b9 | 1503 | $(SET_LIB_PATH) \ |
cc71c0ca MH |
1504 | echo "$$msg"; \ |
1505 | cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare | |
f6b58262 JW |
1506 | @r=`pwd`; export r; \ |
1507 | s=`cd $(srcdir); pwd` ; export s; \ | |
1508 | $(SET_LIB_PATH) \ | |
1509 | echo "Building runtime libraries"; \ | |
1510 | $(MAKE) $(BASE_FLAGS_TO_PASS) all | |
b1e3ddfd | 1511 | |
09f97c1e JL |
1512 | .PHONY: cross |
1513 | cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld | |
1514 | @r=`pwd`; export r; \ | |
1515 | s=`cd $(srcdir); pwd`; export s; \ | |
1516 | $(SET_LIB_PATH) \ | |
1517 | echo "Building the C and C++ compiler"; \ | |
1518 | cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" | |
f6b58262 JW |
1519 | @r=`pwd`; export r; \ |
1520 | s=`cd $(srcdir); pwd` ; export s; \ | |
1521 | $(SET_LIB_PATH) \ | |
1522 | echo "Building runtime libraries"; \ | |
1523 | $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++" | |
09f97c1e | 1524 | |
6599da04 JM |
1525 | .PHONY: check-gcc |
1526 | check-gcc: | |
1527 | @if [ -f ./gcc/Makefile ] ; then \ | |
1528 | r=`pwd`; export r; \ | |
1529 | s=`cd $(srcdir); pwd`; export s; \ | |
1530 | $(SET_LIB_PATH) \ | |
1531 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ | |
1532 | else \ | |
1533 | true; \ | |
1534 | fi | |
1535 | ||
1536 | .PHONY: install-gcc | |
1537 | install-gcc: | |
1538 | @if [ -f ./gcc/Makefile ] ; then \ | |
1539 | r=`pwd`; export r; \ | |
1540 | s=`cd $(srcdir); pwd`; export s; \ | |
1541 | $(SET_LIB_PATH) \ | |
3cd730af | 1542 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ |
6599da04 JM |
1543 | else \ |
1544 | true; \ | |
1545 | fi | |
1546 | ||
205cba53 JL |
1547 | .PHONY: install-gcc-cross |
1548 | install-gcc-cross: | |
1549 | @if [ -f ./gcc/Makefile ] ; then \ | |
1550 | r=`pwd`; export r; \ | |
1551 | s=`cd $(srcdir); pwd`; export s; \ | |
1552 | $(SET_LIB_PATH) \ | |
3cd730af | 1553 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \ |
205cba53 JL |
1554 | else \ |
1555 | true; \ | |
1556 | fi | |
6599da04 JM |
1557 | # EXPERIMENTAL STUFF |
1558 | # This rule is used to install the modules which use FLAGS_TO_PASS. | |
1559 | # To build a target install-X means to cd to X and make install. | |
1560 | .PHONY: install-dosrel | |
1561 | install-dosrel: installdirs info | |
1562 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
1563 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1564 | r=`pwd`; export r; \ | |
1565 | s=`cd $(srcdir); pwd`; export s; \ | |
1566 | $(SET_LIB_PATH) \ | |
1567 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ | |
1568 | else \ | |
1569 | true; \ | |
1570 | fi | |
1571 | ||
1572 | install-dosrel-fake: | |
1573 | ||
1574 | ||
1575 | # This is a list of inter-dependencies among modules. | |
1576 | all-apache: | |
5d4a5ee6 | 1577 | all-ash: |
6599da04 | 1578 | all-autoconf: all-m4 all-texinfo |
5d4a5ee6 | 1579 | all-automake: all-m4 all-texinfo |
6599da04 | 1580 | all-bash: |
5d4a5ee6 JL |
1581 | all-bfd: all-libiberty all-intl |
1582 | all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl | |
6599da04 | 1583 | all-bison: all-texinfo |
99d60508 TT |
1584 | configure-target-boehm-gc: configure-target-newlib configure-target-qthreads |
1585 | all-target-boehm-gc: configure-target-boehm-gc | |
d207ebef JM |
1586 | configure-target-bsp: $(ALL_GCC) |
1587 | all-target-bsp: configure-target-bsp all-gcc all-binutils all-target-newlib | |
6599da04 | 1588 | all-byacc: |
5d4a5ee6 JL |
1589 | all-bzip2: |
1590 | all-cvssrc: | |
1591 | configure-target-cygmon: $(ALL_GCC) | |
d207ebef | 1592 | all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub all-target-bsp |
6599da04 JM |
1593 | all-db: |
1594 | all-dejagnu: all-tcl all-expect all-tk | |
1595 | all-diff: all-libiberty | |
1596 | all-emacs: | |
1597 | all-emacs19: all-bison all-byacc | |
1598 | all-etc: | |
1599 | configure-target-examples: $(ALL_GCC) | |
1600 | all-target-examples: configure-target-examples | |
1601 | all-expect: all-tcl all-tk | |
1602 | all-fileutils: all-libiberty | |
1603 | all-findutils: | |
1604 | all-find: | |
1605 | all-flex: all-libiberty all-bison all-byacc | |
5d4a5ee6 | 1606 | all-gas: all-libiberty all-opcodes all-bfd all-intl |
6599da04 JM |
1607 | all-gash: all-tcl |
1608 | all-gawk: | |
1609 | ALL_GCC = all-gcc | |
1610 | all-gcc: all-bison all-byacc all-binutils all-gas all-ld | |
5d4a5ee6 JL |
1611 | all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld |
1612 | GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui | |
6599da04 | 1613 | all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK) |
5d4a5ee6 | 1614 | all-gettext: |
6599da04 JM |
1615 | all-gnuserv: |
1616 | configure-target-gperf: $(ALL_GCC) | |
5d4a5ee6 JL |
1617 | all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++ |
1618 | all-gprof: all-libiberty all-bfd all-opcodes all-intl | |
6599da04 JM |
1619 | all-grep: all-libiberty |
1620 | all-grez: all-libiberty all-bfd all-opcodes | |
1621 | all-gui: all-gdb all-libproc all-target-librx | |
1622 | all-guile: | |
1623 | all-gzip: all-libiberty | |
1624 | all-hello: all-libiberty | |
1625 | all-indent: | |
1626 | all-inet: all-tcl all-send-pr all-perl | |
5d4a5ee6 | 1627 | all-intl: |
6599da04 | 1628 | all-ispell: all-emacs19 |
d207ebef | 1629 | all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1 |
5d4a5ee6 | 1630 | all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl |
6599da04 JM |
1631 | configure-target-libg++: $(ALL_GCC) configure-target-librx |
1632 | all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++ | |
1633 | configure-target-libgloss: $(ALL_GCC) | |
1634 | all-target-libgloss: configure-target-libgloss configure-target-newlib | |
1635 | configure-target-libio: $(ALL_GCC) | |
1636 | all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib | |
d207ebef JM |
1637 | check-target-libio: |
1638 | all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl | |
6599da04 | 1639 | all-libiberty: |
aab0d19d AO |
1640 | configure-target-libffi: $(ALL_GCC) |
1641 | configure-target-libjava: $(ALL_GCC) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-newlib configure-target-libffi | |
1642 | all-target-libffi: configure-target-libffi | |
1643 | all-target-libjava: configure-target-libjava all-gcc all-zip all-target-newlib all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi | |
6599da04 JM |
1644 | configure-target-librx: $(ALL_GCC) configure-target-newlib |
1645 | all-target-librx: configure-target-librx | |
1646 | configure-target-libstdc++: $(ALL_GCC) | |
17090313 | 1647 | configure-target-libstdc++-v3: $(ALL_GCC) |
6599da04 | 1648 | all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio |
17090313 | 1649 | all-target-libstdc++-v3: configure-target-libstdc++-v3 all-gas all-ld all-gcc all-target-libiberty all-target-newlib |
5d4a5ee6 JL |
1650 | configure-target-libstub: $(ALL_GCC) |
1651 | all-target-libstub: configure-target-libstub | |
1652 | all-libtool: | |
5b28edd4 | 1653 | configure-target-libf2c: $(ALL_GCC) |
8821a725 | 1654 | all-target-libf2c: configure-target-libf2c all-gas all-ld all-gcc all-target-libiberty all-target-newlib |
5b28edd4 | 1655 | configure-target-libchill: $(ALL_GCC) |
b54db294 | 1656 | all-target-libchill: configure-target-libchill all-gas all-ld all-gcc all-target-libiberty all-target-newlib |
5b28edd4 | 1657 | configure-target-libobjc: $(ALL_GCC) |
6fc19d6d | 1658 | all-target-libobjc: configure-target-libobjc all-gas all-ld all-gcc all-target-libiberty all-target-newlib |
6599da04 JM |
1659 | all-m4: all-libiberty |
1660 | all-make: all-libiberty | |
1661 | all-mmalloc: | |
1662 | configure-target-newlib: $(ALL_GCC) | |
d207ebef | 1663 | configure-target-libtermcap: $(ALL_GCC) |
6599da04 | 1664 | all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc |
d207ebef | 1665 | all-target-libtermcap: configure-target-libtermcap all-binutils all-gas all-gcc |
6599da04 JM |
1666 | all-opcodes: all-bfd all-libiberty |
1667 | all-patch: all-libiberty | |
1668 | all-perl: | |
1669 | all-prms: all-libiberty | |
99d60508 TT |
1670 | configure-target-qthreads: configure-target-newlib |
1671 | all-target-qthreads: configure-target-qthreads | |
6599da04 JM |
1672 | all-rcs: |
1673 | all-readline: | |
1674 | all-recode: all-libiberty | |
1675 | all-sed: all-libiberty | |
1676 | all-send-pr: all-prms | |
1677 | all-shellutils: | |
5d4a5ee6 | 1678 | all-sim: all-libiberty all-bfd all-opcodes all-readline |
e44e84da | 1679 | all-snavigator: all-tcl all-tk all-itcl all-db all-grep all-libgui |
6599da04 JM |
1680 | all-tar: all-libiberty |
1681 | all-tcl: | |
d207ebef | 1682 | all-tcl8.1: |
6599da04 JM |
1683 | all-tclX: all-tcl all-tk |
1684 | all-tk: all-tcl | |
d207ebef | 1685 | all-tk8.1: all-tcl8.1 |
6599da04 JM |
1686 | all-texinfo: all-libiberty |
1687 | all-textutils: | |
1688 | all-tgas: all-libiberty all-bfd all-opcodes | |
1689 | all-time: | |
d207ebef | 1690 | all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1 |
6599da04 | 1691 | all-wdiff: |
d207ebef | 1692 | all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup |
6599da04 JM |
1693 | configure-target-winsup: configure-target-newlib |
1694 | all-uudecode: all-libiberty | |
99d60508 TT |
1695 | all-zip: |
1696 | configure-target-zlib: $(ALL_GCC) | |
1697 | all-target-zlib: configure-target-zlib | |
075dad02 | 1698 | configure-target-libiberty: $(ALL_GCC) configure-target-newlib |
6599da04 JM |
1699 | all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib |
1700 | all-target: $(ALL_TARGET_MODULES) | |
1701 | install-target: $(INSTALL_TARGET_MODULES) | |
d207ebef | 1702 | install-gdb: install-tcl install-tk install-itcl install-tix install-libgui |
6599da04 JM |
1703 | ### other supporting targets |
1704 | ||
1705 | MAKEDIRS= \ | |
1706 | $(prefix) \ | |
1707 | $(exec_prefix) | |
1708 | .PHONY: installdirs | |
1709 | installdirs: mkinstalldirs | |
1710 | $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) | |
1711 | ||
1712 | dir.info: do-install-info | |
1713 | if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ | |
1714 | $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ | |
1715 | mv -f dir.info.new dir.info ; \ | |
1716 | else true ; \ | |
1717 | fi | |
1718 | ||
1719 | dist: | |
1720 | @echo "Building a full distribution of this tree isn't done" | |
1721 | @echo "via 'make dist'. Check out the etc/ subdirectory" | |
1722 | ||
1723 | etags tags: TAGS | |
1724 | ||
1725 | # Right now this just builds TAGS in each subdirectory. emacs19 has the | |
1726 | # ability to use several tags files at once, so there is probably no need | |
1727 | # to combine them into one big TAGS file (like CVS 1.3 does). We could | |
1728 | # (if we felt like it) have this Makefile write a piece of elisp which | |
1729 | # the user could load to tell emacs19 where all the TAGS files we just | |
1730 | # built are. | |
1731 | TAGS: do-TAGS | |
1732 | ||
1733 | # with the gnu make, this is done automatically. | |
1734 | ||
6dd27861 | 1735 | Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger) |
6599da04 JM |
1736 | $(SHELL) ./config.status |
1737 | ||
1738 | # | |
1739 | # Support for building net releases | |
1740 | ||
1741 | # Files in devo used in any net release. | |
1742 | # ChangeLog omitted because it may refer to files which are not in this | |
1743 | # distribution (perhaps it would be better to include it anyway). | |
1744 | DEVO_SUPPORT= README Makefile.in configure configure.in \ | |
52d4e5b7 | 1745 | config.guess config.if config.sub config move-if-change \ |
6599da04 JM |
1746 | mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ |
1747 | COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ | |
1748 | mkinstalldirs ltconfig ltmain.sh missing ylwrap | |
1749 | ||
1750 | # Files in devo/etc used in any net release. | |
1751 | # ChangeLog omitted because it may refer to files which are not in this | |
1752 | # distribution (perhaps it would be better to include it anyway). | |
1753 | ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ | |
1754 | make-stds.texi standards.info* | |
1755 | ||
1756 | # When you use `make setup-dirs' or `make taz' you should always redefine | |
1757 | # this macro. | |
1758 | SUPPORT_FILES = list-of-support-files-for-tool-in-question | |
1759 | ||
d207ebef JM |
1760 | # NOTE: No double quotes in the below. It is used within shell script |
1761 | # as VER="$(VER)" | |
1762 | VER = ` if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ | |
1763 | sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ | |
1764 | else \ | |
1765 | sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ | |
1766 | fi` | |
1767 | PACKAGE = $(TOOL) | |
6599da04 | 1768 | |
d207ebef JM |
1769 | .PHONY: taz |
1770 | taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
1771 | $(MAKE) -f Makefile.in do-proto-toplev \ | |
1772 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1773 | MD5PROG="$(MD5PROG)" \ | |
1774 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1775 | $(MAKE) -f Makefile.in do-md5sum \ | |
1776 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1777 | MD5PROG="$(MD5PROG)" \ | |
1778 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1779 | $(MAKE) -f Makefile.in do-tar-bz2 \ | |
1780 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1781 | MD5PROG="$(MD5PROG)" \ | |
1782 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1783 | ||
1784 | .PHONY: gdb-taz | |
1785 | gdb-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
1786 | $(MAKE) -f Makefile.in do-proto-toplev \ | |
1787 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1788 | MD5PROG="$(MD5PROG)" \ | |
1789 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1790 | $(MAKE) -f Makefile.in do-md5sum \ | |
1791 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1792 | MD5PROG="$(MD5PROG)" \ | |
1793 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1794 | $(MAKE) -f Makefile.in do-djunpack \ | |
1795 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1796 | MD5PROG="$(MD5PROG)" \ | |
1797 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1798 | $(MAKE) -f Makefile.in do-tar-bz2 \ | |
1799 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1800 | MD5PROG="$(MD5PROG)" \ | |
1801 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1802 | ||
1803 | .PHONY: do-proto-toplev | |
1804 | do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
1805 | echo "==> Making $(PACKAGE)-$(VER)/" | |
1806 | # Take out texinfo from a few places. | |
6599da04 JM |
1807 | sed -e '/^all\.normal: /s/\all-texinfo //' \ |
1808 | -e '/^ install-texinfo /d' \ | |
1809 | <Makefile.in >tmp | |
1810 | mv -f tmp Makefile.in | |
1811 | # | |
1812 | ./configure sun4 | |
1813 | [ -z "$(CONFIGURE_TARGET_MODULES)" ] \ | |
1814 | || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \ | |
1815 | CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)" | |
1816 | # Make links, and run "make diststuff" or "make info" when needed. | |
1817 | rm -rf proto-toplev ; mkdir proto-toplev | |
1818 | set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ | |
1819 | for d in $$dirs ; do \ | |
1820 | if [ -d $$d ]; then \ | |
1821 | if [ ! -f $$d/Makefile ] ; then true ; \ | |
1822 | elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \ | |
1823 | (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \ | |
1824 | elif grep '^info:' $$d/Makefile >/dev/null ; then \ | |
1825 | (cd $$d ; $(MAKE) info ) || exit 1 ; \ | |
1826 | fi ; \ | |
1827 | if [ -d $$d/proto-$$d.dir ]; then \ | |
1828 | ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ | |
1829 | else \ | |
1830 | ln -s ../$$d proto-toplev/$$d ; \ | |
1831 | fi ; \ | |
1832 | else ln -s ../$$d proto-toplev/$$d ; fi ; \ | |
1833 | done | |
1834 | cd etc ; $(MAKE) info | |
1835 | $(MAKE) distclean | |
1836 | # | |
1837 | mkdir proto-toplev/etc | |
1838 | (cd proto-toplev/etc; \ | |
1839 | for i in $(ETC_SUPPORT); do \ | |
1840 | ln -s ../../etc/$$i . ; \ | |
1841 | done) | |
1842 | # | |
1843 | # Take out texinfo from configurable dirs | |
1844 | rm proto-toplev/configure.in | |
1845 | sed -e '/^host_tools=/s/texinfo //' \ | |
1846 | <configure.in >proto-toplev/configure.in | |
1847 | # | |
1848 | mkdir proto-toplev/texinfo | |
1849 | ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ | |
6599da04 JM |
1850 | if test -r texinfo/util/tex3patch ; then \ |
1851 | mkdir proto-toplev/texinfo/util && \ | |
1852 | ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \ | |
1853 | else true; fi | |
5d4a5ee6 | 1854 | chmod -R og=u . || chmod og=u `find . -print` |
d207ebef JM |
1855 | # |
1856 | -rm -f $(PACKAGE)-$(VER) | |
1857 | ln -s proto-toplev $(PACKAGE)-$(VER) | |
1858 | ||
1859 | .PHONY: do-tar-bz2 | |
1860 | do-tar-bz2: | |
1861 | echo "==> Making $(PACKAGE)-$(VER).tar.bz2" | |
1862 | -rm -f $(PACKAGE)-$(VER).tar.bz2 | |
1863 | find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \ | |
1864 | | tar cTfh - $(PACKAGE)-$(VER).tar | |
1865 | $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar | |
1866 | ||
1867 | .PHONY: do-md5sum | |
1868 | do-md5sum: | |
1869 | echo "==> Adding md5 checksum to top-level directory" | |
1870 | cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \ | |
1871 | | xargs $(MD5PROG) > ../md5.sum | |
1872 | mv md5.sum proto-toplev | |
1873 | ||
1874 | .PHONY: do-djunpack | |
1875 | do-djunpack: | |
1876 | echo "==> Adding updated djunpack.bat to top-level directory" | |
1877 | echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/' | |
1878 | sed < djunpack.bat > djunpack.new \ | |
1879 | -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/' | |
1880 | mv djunpack.new djunpack.bat | |
1881 | -rm -f proto-toplev/djunpack.bat | |
1882 | ln -s ../djunpack.bat proto-toplev/djunpack.bat | |
1883 | ||
1884 | TEXINFO_SUPPORT= texinfo/texinfo.tex | |
6599da04 JM |
1885 | DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) |
1886 | ||
d207ebef JM |
1887 | .PHONY: gas.tar.bz2 |
1888 | GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep | |
1889 | gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas | |
6599da04 | 1890 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
d207ebef | 1891 | MD5PROG="$(MD5PROG)" \ |
6599da04 JM |
1892 | SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" |
1893 | ||
1894 | # The FSF "binutils" release includes gprof and ld. | |
d207ebef JM |
1895 | .PHONY: binutils.tar.bz2 |
1896 | BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep | |
1897 | binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils | |
6599da04 | 1898 | $(MAKE) -f Makefile.in taz TOOL=binutils \ |
d207ebef JM |
1899 | MD5PROG="$(MD5PROG)" \ |
1900 | SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)" | |
6599da04 | 1901 | |
d207ebef | 1902 | .PHONY: gas+binutils.tar.bz2 |
6599da04 | 1903 | GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof |
d207ebef | 1904 | gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas |
6599da04 | 1905 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
d207ebef JM |
1906 | MD5PROG="$(MD5PROG)" \ |
1907 | SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" | |
6599da04 | 1908 | |
d207ebef | 1909 | .PHONY: libg++.tar.bz2 |
6599da04 | 1910 | LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty |
d207ebef | 1911 | libg++.tar.bz2: $(DIST_SUPPORT) libg++ |
6599da04 | 1912 | $(MAKE) -f Makefile.in taz TOOL=libg++ \ |
d207ebef | 1913 | MD5PROG="$(MD5PROG)" \ |
6599da04 JM |
1914 | SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" |
1915 | ||
1916 | GNATS_SUPPORT_DIRS=include libiberty send-pr | |
d207ebef | 1917 | gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats |
6599da04 | 1918 | $(MAKE) -f Makefile.in taz TOOL=gnats \ |
d207ebef | 1919 | MD5PROG="$(MD5PROG)" \ |
6599da04 JM |
1920 | SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" |
1921 | ||
d207ebef | 1922 | .PHONY: gdb.tar.bz2 |
5d4a5ee6 | 1923 | GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl |
d207ebef JM |
1924 | gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb |
1925 | $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \ | |
1926 | MD5PROG="$(MD5PROG)" \ | |
1927 | SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" | |
1928 | ||
1929 | .PHONY: dejagnu.tar.bz2 | |
1930 | DEJAGNU_SUPPORT_DIRS= tcl expect libiberty | |
1931 | dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu | |
1932 | $(MAKE) -f Makefile.in taz TOOL=dejagnu \ | |
1933 | MD5PROG="$(MD5PROG)" \ | |
1934 | SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)" | |
1935 | ||
1936 | .PHONY: gdb+dejagnu.tar.bz2 | |
1937 | GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu | |
1938 | gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb | |
1939 | $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \ | |
1940 | MD5PROG="$(MD5PROG)" \ | |
1941 | SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" | |
1942 | ||
1943 | .PHONY: insight.tar.bz2 | |
1944 | INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui | |
1945 | insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb | |
1946 | $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \ | |
1947 | MD5PROG="$(MD5PROG)" \ | |
1948 | SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" | |
1949 | ||
1950 | .PHONY: insight+dejagnu.tar.bz2 | |
1951 | INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu | |
1952 | insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb | |
1953 | $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \ | |
1954 | MD5PROG="$(MD5PROG)" \ | |
1955 | SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" | |
1956 | ||
1957 | .PHONY: newlib.tar.bz2 | |
6599da04 JM |
1958 | NEWLIB_SUPPORT_DIRS=libgloss |
1959 | # taz configures for the sun4 target which won't configure newlib. | |
1960 | # We need newlib configured so that the .info files are made. | |
1961 | # Unfortunately, it is not enough to just configure newlib separately: | |
1962 | # taz will build the .info files but since SUBDIRS won't contain newlib, | |
1963 | # distclean won't be run (leaving Makefile, config.status, and the tmp files | |
1964 | # used in building the .info files, eg: *.def, *.ref). | |
1965 | # The problem isn't solvable however without a lot of extra work because | |
1966 | # target libraries are built in subdir $(target_alias) which gets nuked during | |
1967 | # the make distclean. For now punt on the issue of shipping newlib info files | |
1968 | # with newlib net releases and wait for a day when some native target (sun4?) | |
1969 | # supports newlib (if only minimally). | |
d207ebef | 1970 | newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib |
6599da04 | 1971 | $(MAKE) -f Makefile.in taz TOOL=newlib \ |
d207ebef | 1972 | MD5PROG="$(MD5PROG)" \ |
6599da04 JM |
1973 | SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ |
1974 | DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib | |
1975 | ||
1976 | .NOEXPORT: | |
1977 | MAKEOVERRIDES= | |
1978 | ||
6599da04 | 1979 | # end of Makefile.in |