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