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