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