*** empty log message ***
[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
403d9505
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
403d9505
NN
48tooldir = @tooldir@
49build_tooldir = @build_tooldir@
252b5132 50
403d9505 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
403d9505 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
852e5f18
NN
85AS = @AS@
86AR = @AR@
252b5132
RH
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)
852e5f18
NN
93BUILD_PREFIX = @BUILD_PREFIX@
94BUILD_PREFIX_1 = @BUILD_PREFIX_1@
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
852e5f18
NN
120DLLTOOL = @DLLTOOL@
121WINDRES = @WINDRES@
252b5132 122
852e5f18 123NM = @NM@
252b5132 124
852e5f18 125LD = @LD@
252b5132 126
252b5132 127# These values are substituted by configure.
403d9505
NN
128DEFAULT_YACC = @DEFAULT_YACC@
129DEFAULT_LEX = @DEFAULT_LEX@
130DEFAULT_M4 = @DEFAULT_M4@
252b5132 131
852e5f18
NN
132BISON=@BISON@
133USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
252b5132
RH
134 echo $$r/bison/bison -L $$s/bison/ ; \
135 else \
136 echo bison ; \
137 fi`
138
852e5f18
NN
139YACC=@YACC@
140USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
252b5132
RH
141 echo $$r/bison/bison -y -L $$s/bison/ ; \
142 elif [ -f $$r/byacc/byacc ] ; then \
143 echo $$r/byacc/byacc ; \
144 else \
145 echo ${DEFAULT_YACC} ; \
146 fi`
147
852e5f18
NN
148LEX=@LEX@
149USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
252b5132
RH
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.
852e5f18
NN
159MAKEINFO=@MAKEINFO@
160USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
252b5132 161 then echo $$r/texinfo/makeinfo/makeinfo ; \
f08fa01d
HPN
162 else if (makeinfo --version \
163 | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \
164 then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
252b5132
RH
165
166# This just becomes part of the MAKEINFO definition passed down to
167# sub-makes. It lets flags be given on the command line while still
168# using the makeinfo from the object tree.
169MAKEINFOFLAGS =
170
171EXPECT = `if [ -f $$r/expect/expect ] ; \
172 then echo $$r/expect/expect ; \
173 else echo expect ; fi`
174
175RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
176 then echo $$s/dejagnu/runtest ; \
177 else echo runtest ; fi`
178
179
180# compilers to use to create programs which must be run in the build
181# environment.
852e5f18 182CC_FOR_BUILD = @CC_FOR_BUILD@
252b5132
RH
183CXX_FOR_BUILD = $(CXX)
184
f03b4789 185SUBDIRS = @configdirs@
252b5132
RH
186
187# This is set by the configure script to the list of directories which
188# should be built using the target tools.
58daee98 189TARGET_CONFIGDIRS = @target_configdirs@
252b5132
RH
190
191# Target libraries are put under this directory:
192# Changed by configure to $(target_alias) if cross.
58daee98 193TARGET_SUBDIR = @target_subdir@
252b5132 194
49b7683b 195BUILD_CONFIGDIRS = libiberty
58daee98 196BUILD_SUBDIR = @build_subdir@
49b7683b
DD
197
198# This is set by the configure script to the arguments to use when configuring
199# directories built for the target.
58daee98 200TARGET_CONFIGARGS = @target_configargs@
49b7683b
DD
201
202# This is set by the configure script to the arguments to use when configuring
203# directories built for the build system.
58daee98 204BUILD_CONFIGARGS = @build_configargs@
252b5132
RH
205
206# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
207# was used.
8607b6c9 208SET_LIB_PATH = @SET_LIB_PATH@
252b5132
RH
209
210# This is the name of the environment variable used for the path to
211# the libraries. This may be changed by configure.in.
8607b6c9 212RPATH_ENVVAR = @RPATH_ENVVAR@
252b5132 213
0da52010
AO
214# This is the list of directories that may be needed in RPATH_ENVVAR
215# so that programs built for the host machine work.
216HOST_LIB_PATH = $$r/bfd:$$r/opcodes
217
218# This is the list of directories that may be needed in RPATH_ENVVAR
219# so that prorgams built for the target machine work.
75205f78 220TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
0da52010 221
252b5132 222# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
0da52010
AO
223# Some platforms don't like blank entries, so we remove duplicate,
224# leading and trailing colons.
252b5132 225REALLY_SET_LIB_PATH = \
0da52010 226 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
252b5132
RH
227
228ALL = all.normal
229INSTALL_TARGET = installdirs \
230 install-gcc \
231 $(INSTALL_MODULES) \
232 $(INSTALL_TARGET_MODULES) \
233 $(INSTALL_X11_MODULES) \
234 $(INSTALL_DOSREL)
235
236INSTALL_TARGET_CROSS = installdirs \
237 install-gcc-cross \
238 $(INSTALL_MODULES) \
239 $(INSTALL_TARGET_MODULES) \
240 $(INSTALL_X11_MODULES) \
241 $(INSTALL_DOSREL)
242
9e449d3e 243# Should be substed by configure.in
58daee98
NN
244FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
245CC_FOR_TARGET = @CC_FOR_TARGET@
246CXX_FOR_TARGET = @CXX_FOR_TARGET@
247CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
248GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
252b5132 249
9e449d3e 250# If GCC_FOR_TARGET is not overriden on the command line, then this
252b5132
RH
251# variable is passed down to the gcc Makefile, where it is used to
252# build libgcc2.a. We define it here so that it can itself be
253# overridden on the command line.
852e5f18
NN
254GCC_FOR_TARGET=@GCC_FOR_TARGET@
255USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
252b5132 256
852e5f18
NN
257AS_FOR_TARGET=@AS_FOR_TARGET@
258USUAL_AS_FOR_TARGET = ` \
252b5132
RH
259 if [ -f $$r/gas/as-new ] ; then \
260 echo $$r/gas/as-new ; \
dc70af01
AO
261 elif [ -f $$r/gcc/xgcc ]; then \
262 $(CC_FOR_TARGET) -print-prog-name=as ; \
252b5132 263 else \
3f152009 264 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
265 echo $(AS); \
266 else \
267 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
268 fi; \
269 fi`
270
852e5f18
NN
271LD_FOR_TARGET=@LD_FOR_TARGET@
272USUAL_LD_FOR_TARGET = ` \
252b5132
RH
273 if [ -f $$r/ld/ld-new ] ; then \
274 echo $$r/ld/ld-new ; \
dc70af01
AO
275 elif [ -f $$r/gcc/xgcc ]; then \
276 $(CC_FOR_TARGET) -print-prog-name=ld ; \
252b5132 277 else \
3f152009 278 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
279 echo $(LD); \
280 else \
281 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
282 fi; \
283 fi`
284
852e5f18
NN
285DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
286USUAL_DLLTOOL_FOR_TARGET = ` \
252b5132
RH
287 if [ -f $$r/binutils/dlltool ] ; then \
288 echo $$r/binutils/dlltool ; \
289 else \
3f152009 290 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
291 echo $(DLLTOOL); \
292 else \
293 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
294 fi; \
295 fi`
296
852e5f18
NN
297WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
298USUAL_WINDRES_FOR_TARGET = ` \
252b5132
RH
299 if [ -f $$r/binutils/windres ] ; then \
300 echo $$r/binutils/windres ; \
301 else \
3f152009 302 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
303 echo $(WINDRES); \
304 else \
305 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
306 fi; \
307 fi`
308
852e5f18
NN
309AR_FOR_TARGET=@AR_FOR_TARGET@
310USUAL_AR_FOR_TARGET = ` \
252b5132
RH
311 if [ -f $$r/binutils/ar ] ; then \
312 echo $$r/binutils/ar ; \
313 else \
3f152009 314 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
315 echo $(AR); \
316 else \
317 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
318 fi; \
319 fi`
320
852e5f18
NN
321RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
322USUAL_RANLIB_FOR_TARGET = ` \
252b5132
RH
323 if [ -f $$r/binutils/ranlib ] ; then \
324 echo $$r/binutils/ranlib ; \
325 else \
3f152009
AO
326 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
327 if [ x'$(RANLIB)' != x ]; then \
328 echo $(RANLIB); \
329 else \
330 echo ranlib; \
331 fi; \
252b5132
RH
332 else \
333 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
334 fi; \
335 fi`
336
852e5f18
NN
337NM_FOR_TARGET=@NM_FOR_TARGET@
338USUAL_NM_FOR_TARGET = ` \
252b5132
RH
339 if [ -f $$r/binutils/nm-new ] ; then \
340 echo $$r/binutils/nm-new ; \
dc70af01
AO
341 elif [ -f $$r/gcc/xgcc ]; then \
342 $(CC_FOR_TARGET) -print-prog-name=nm ; \
252b5132 343 else \
3f152009 344 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
345 echo $(NM); \
346 else \
347 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
348 fi; \
349 fi`
350
351# The first rule in the file had better be this one. Don't put any above it.
352# This lives here to allow makefile fragments to contain dependencies.
353all: all.normal
354.PHONY: all
355
356# These can be overridden by config/mt-*.
357# The _TARGET_ is because they're specified in mt-foo.
358# The _HOST_ is because they're programs that run on the host.
359EXTRA_TARGET_HOST_ALL_MODULES =
360EXTRA_TARGET_HOST_INSTALL_MODULES =
361EXTRA_TARGET_HOST_CHECK_MODULES =
362
363#### host and target specific makefile fragments come in here.
364###
365
366# Flags to pass down to all sub-makes.
367# Please keep these in alphabetical order.
368BASE_FLAGS_TO_PASS = \
369 "AR_FLAGS=$(AR_FLAGS)" \
370 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
371 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
372 "BISON=$(BISON)" \
373 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
374 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
375 "CFLAGS=$(CFLAGS)" \
376 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
75205f78 377 "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
252b5132
RH
378 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
379 "CXXFLAGS=$(CXXFLAGS)" \
380 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
381 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
382 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
383 "INSTALL=$(INSTALL)" \
384 "INSTALL_DATA=$(INSTALL_DATA)" \
385 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
386 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
387 "LDFLAGS=$(LDFLAGS)" \
388 "LEX=$(LEX)" \
389 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
390 "LIBCFLAGS=$(LIBCFLAGS)" \
391 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
392 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
393 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
394 "M4=$(M4)" \
395 "MAKE=$(MAKE)" \
396 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
397 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
398 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
399 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
400 "SHELL=$(SHELL)" \
401 "EXPECT=$(EXPECT)" \
402 "RUNTEST=$(RUNTEST)" \
403 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
404 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
405 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
406 "YACC=$(YACC)" \
407 "bindir=$(bindir)" \
408 "datadir=$(datadir)" \
409 "exec_prefix=$(exec_prefix)" \
410 "includedir=$(includedir)" \
411 "infodir=$(infodir)" \
412 "libdir=$(libdir)" \
413 "libexecdir=$(libexecdir)" \
414 "lispdir=$(lispdir)" \
75205f78
DD
415 "libstdcxx_incdir=$(libstdcxx_incdir)" \
416 "libsubdir=$(libsubdir)" \
252b5132
RH
417 "localstatedir=$(localstatedir)" \
418 "mandir=$(mandir)" \
419 "oldincludedir=$(oldincludedir)" \
420 "prefix=$(prefix)" \
421 "sbindir=$(sbindir)" \
422 "sharedstatedir=$(sharedstatedir)" \
423 "sysconfdir=$(sysconfdir)" \
424 "tooldir=$(tooldir)" \
ba73c63f 425 "build_tooldir=$(build_tooldir)" \
252b5132
RH
426 "gxx_include_dir=$(gxx_include_dir)" \
427 "gcc_version=$(gcc_version)" \
428 "gcc_version_trigger=$(gcc_version_trigger)" \
75205f78 429 "target_alias=$(target_alias)"
252b5132 430
dec0cb0c
AO
431# For any flags above that may contain shell code that varies from one
432# target library to another. When doing recursive invocations of the
433# top-level Makefile, we don't want the outer make to evaluate them,
434# so we pass these variables down unchanged. They must not contain
435# single nor double quotes.
436RECURSE_FLAGS = \
437 CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)'
438
252b5132
RH
439# Flags to pass down to most sub-makes, in which we're building with
440# the host environment.
441# If any variables are added here, they must be added to do-*, below.
442EXTRA_HOST_FLAGS = \
443 'AR=$(AR)' \
444 'AS=$(AS)' \
445 'CC=$(CC)' \
446 'CXX=$(CXX)' \
447 'DLLTOOL=$(DLLTOOL)' \
448 'LD=$(LD)' \
449 'NM=$(NM)' \
75205f78 450 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
451 'WINDRES=$(WINDRES)'
452
453FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
454
455# Flags that are concerned with the location of the X11 include files
456# and library files
457#
458# NOTE: until the top-level is getting the values via autoconf, it only
459# causes problems to have this top-level Makefile overriding the autoconf-set
460# values in child directories. Only variables that don't conflict with
461# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
462#
463X11_FLAGS_TO_PASS = \
464 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
465 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
466
467# Flags to pass down to makes which are built with the target environment.
468# The double $ decreases the length of the command line; the variables
469# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
470# If any variables are added here, they must be added to do-*, below.
471EXTRA_TARGET_FLAGS = \
472 'AR=$$(AR_FOR_TARGET)' \
473 'AS=$$(AS_FOR_TARGET)' \
474 'CC=$$(CC_FOR_TARGET)' \
475 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
476 'CXX=$$(CXX_FOR_TARGET)' \
477 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
478 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
479 'LD=$$(LD_FOR_TARGET)' \
480 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
481 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
482 'NM=$$(NM_FOR_TARGET)' \
483 'RANLIB=$$(RANLIB_FOR_TARGET)' \
484 'WINDRES=$$(WINDRES_FOR_TARGET)'
485
486TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
487
488# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
489# unfortunately needs the native compiler and the target ar and
490# ranlib.
491# If any variables are added here, they must be added to do-*, below.
492# The HOST_* variables are a special case, which are used for the gcc
493# cross-building scheme.
494EXTRA_GCC_FLAGS = \
495 'AR=$(AR)' \
496 'AS=$(AS)' \
497 'CC=$(CC)' \
498 'CXX=$(CXX)' \
499 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
500 'HOST_CC=$(CC_FOR_BUILD)' \
27f15fdd
DD
501 'BUILD_PREFIX=$(BUILD_PREFIX)' \
502 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
252b5132 503 'NM=$(NM)' \
75205f78 504 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
505 'WINDRES=$$(WINDRES_FOR_TARGET)' \
506 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
75205f78 507 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
252b5132
RH
508 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
509 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
510 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
511 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
512 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
513 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
514 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
75205f78 515 "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
516 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
517
518GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
519
49b7683b
DD
520# This is a list of the targets for all of the modules which are compiled
521# using the build machine's native compiler. Configure edits the second
522# macro for build!=host builds.
523ALL_BUILD_MODULES_LIST = \
524 all-build-libiberty
403d9505 525ALL_BUILD_MODULES = @all_build_modules@
49b7683b
DD
526
527# This is a list of the configure targets for all of the modules which
528# are compiled using the native tools.
529CONFIGURE_BUILD_MODULES = \
530 configure-build-libiberty
531
252b5132
RH
532# This is a list of the targets for all of the modules which are compiled
533# using $(FLAGS_TO_PASS).
534ALL_MODULES = \
252b5132
RH
535 all-ash \
536 all-autoconf \
537 all-automake \
538 all-bash \
539 all-bfd \
405ea7a0 540 all-opcodes \
252b5132
RH
541 all-binutils \
542 all-bison \
543 all-byacc \
544 all-bzip2 \
252b5132
RH
545 all-db \
546 all-dejagnu \
547 all-diff \
548 all-dosutils \
549 all-etc \
75205f78 550 all-fastjar \
252b5132
RH
551 all-fileutils \
552 all-findutils \
553 all-find \
554 all-flex \
555 all-gas \
556 all-gawk \
557 all-gettext \
558 all-gnuserv \
559 all-gprof \
560 all-grep \
252b5132
RH
561 all-gzip \
562 all-hello \
563 all-indent \
252b5132 564 all-intl \
405ea7a0 565 all-tcl \
252b5132
RH
566 all-itcl \
567 all-ld \
568 all-libgui \
569 all-libiberty \
570 all-libtool \
571 all-m4 \
572 all-make \
573 all-mmalloc \
252b5132
RH
574 all-patch \
575 all-perl \
576 all-prms \
577 all-rcs \
578 all-readline \
579 all-release \
580 all-recode \
581 all-sed \
582 all-send-pr \
583 all-shellutils \
8817b92e 584 all-sid \
252b5132 585 all-sim \
ba73c63f 586 all-snavigator \
252b5132 587 all-tar \
252b5132
RH
588 all-texinfo \
589 all-textutils \
252b5132
RH
590 all-time \
591 all-uudecode \
592 all-wdiff \
593 all-zip \
5cec67bf 594 all-zlib \
252b5132
RH
595 $(EXTRA_TARGET_HOST_ALL_MODULES)
596
597# This is a list of the check targets for all of the modules which are
598# compiled using $(FLAGS_TO_PASS).
599#
600# The list is in two parts. The first lists those tools which
601# are tested as part of the host's native tool-chain, and not
602# tested in a cross configuration.
603NATIVE_CHECK_MODULES = \
604 check-bison \
605 check-byacc \
75205f78 606 check-fastjar \
252b5132
RH
607 check-flex \
608 check-zip
609
610CROSS_CHECK_MODULES = \
252b5132
RH
611 check-ash \
612 check-autoconf \
613 check-automake \
614 check-bash \
615 check-bfd \
405ea7a0 616 check-opcodes \
252b5132
RH
617 check-binutils \
618 check-bzip2 \
252b5132
RH
619 check-db \
620 check-dejagnu \
621 check-diff \
622 check-etc \
623 check-fileutils \
624 check-findutils \
625 check-find \
626 check-gas \
627 check-gawk \
628 check-gettext \
629 check-gnuserv \
630 check-gprof \
631 check-grep \
632 check-gzip \
633 check-hello \
634 check-indent \
252b5132 635 check-intl \
405ea7a0 636 check-tcl \
252b5132
RH
637 check-itcl \
638 check-ld \
639 check-libgui \
640 check-libiberty \
641 check-libtool \
642 check-m4 \
643 check-make \
252b5132
RH
644 check-patch \
645 check-perl \
646 check-prms \
647 check-rcs \
648 check-readline \
649 check-recode \
650 check-sed \
651 check-send-pr \
652 check-shellutils \
8817b92e 653 check-sid \
252b5132 654 check-sim \
405ea7a0 655 check-snavigator \
252b5132 656 check-tar \
252b5132
RH
657 check-texinfo \
658 check-textutils \
252b5132
RH
659 check-time \
660 check-uudecode \
661 check-wdiff \
662 $(EXTRA_TARGET_HOST_CHECK_MODULES)
663
664CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
665
666# This is a list of the install targets for all of the modules which are
667# compiled using $(FLAGS_TO_PASS).
252b5132 668INSTALL_MODULES = \
252b5132
RH
669 install-ash \
670 install-autoconf \
671 install-automake \
672 install-bash \
673 install-bfd \
252b5132
RH
674 install-opcodes \
675 install-binutils \
676 install-bison \
677 install-byacc \
405ea7a0 678 install-bzip2 \
252b5132
RH
679 install-db \
680 install-dejagnu \
681 install-diff \
682 install-dosutils \
683 install-etc \
75205f78 684 install-fastjar \
252b5132
RH
685 install-fileutils \
686 install-findutils \
687 install-find \
688 install-flex \
689 install-gas \
690 install-gawk \
691 install-gettext \
692 install-gnuserv \
693 install-gprof \
694 install-grep \
252b5132
RH
695 install-gzip \
696 install-hello \
697 install-indent \
252b5132 698 install-intl \
252b5132 699 install-tcl \
252b5132
RH
700 install-itcl \
701 install-ld \
702 install-libgui \
703 install-libiberty \
704 install-libtool \
705 install-m4 \
706 install-make \
707 install-mmalloc \
708 install-patch \
709 install-perl \
710 install-prms \
711 install-rcs \
712 install-readline \
713 install-recode \
714 install-sed \
715 install-send-pr \
716 install-shellutils \
8817b92e 717 install-sid \
252b5132 718 install-sim \
ba73c63f 719 install-snavigator \
252b5132 720 install-tar \
252b5132 721 install-textutils \
252b5132
RH
722 install-time \
723 install-uudecode \
724 install-wdiff \
725 install-zip \
726 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
727
728# This is a list of the targets for all of the modules which are compiled
729# using $(X11_FLAGS_TO_PASS).
730ALL_X11_MODULES = \
252b5132
RH
731 all-gdb \
732 all-expect \
252b5132
RH
733 all-guile \
734 all-tclX \
735 all-tk \
852e5f18 736 all-tix
252b5132
RH
737
738# This is a list of the check targets for all of the modules which are
739# compiled using $(X11_FLAGS_TO_PASS).
740CHECK_X11_MODULES = \
252b5132 741 check-gdb \
252b5132 742 check-expect \
852e5f18 743 check-guile \
252b5132
RH
744 check-tclX \
745 check-tk \
852e5f18 746 check-tix
252b5132
RH
747
748# This is a list of the install targets for all the modules which are
749# compiled using $(X11_FLAGS_TO_PASS).
750INSTALL_X11_MODULES = \
252b5132 751 install-gdb \
252b5132 752 install-expect \
852e5f18 753 install-guile \
252b5132
RH
754 install-tclX \
755 install-tk \
852e5f18 756 install-tix
252b5132
RH
757
758# This is a list of the targets for all of the modules which are compiled
759# using $(TARGET_FLAGS_TO_PASS).
760ALL_TARGET_MODULES = \
ba73c63f 761 all-target-libstdc++-v3 \
252b5132 762 all-target-newlib \
ba73c63f 763 all-target-libf2c \
ba73c63f 764 all-target-libobjc \
252b5132
RH
765 all-target-libtermcap \
766 all-target-winsup \
767 all-target-libgloss \
768 all-target-libiberty \
769 all-target-gperf \
770 all-target-examples \
ba73c63f
JM
771 all-target-libffi \
772 all-target-libjava \
773 all-target-zlib \
774 all-target-boehm-gc \
dd2768ff
KB
775 all-target-qthreads \
776 all-target-rda
252b5132
RH
777
778# This is a list of the configure targets for all of the modules which
779# are compiled using the target tools.
780CONFIGURE_TARGET_MODULES = \
ba73c63f 781 configure-target-libstdc++-v3 \
252b5132 782 configure-target-newlib \
ba73c63f 783 configure-target-libf2c \
ba73c63f 784 configure-target-libobjc \
252b5132
RH
785 configure-target-libtermcap \
786 configure-target-winsup \
787 configure-target-libgloss \
788 configure-target-libiberty \
789 configure-target-gperf \
790 configure-target-examples \
ba73c63f
JM
791 configure-target-libffi \
792 configure-target-libjava \
793 configure-target-zlib \
794 configure-target-boehm-gc \
dd2768ff
KB
795 configure-target-qthreads \
796 configure-target-rda
252b5132
RH
797
798# This is a list of the check targets for all of the modules which are
799# compiled using $(TARGET_FLAGS_TO_PASS).
800CHECK_TARGET_MODULES = \
ba73c63f 801 check-target-libstdc++-v3 \
252b5132 802 check-target-newlib \
ba73c63f 803 check-target-libf2c \
ba73c63f 804 check-target-libobjc \
252b5132
RH
805 check-target-winsup \
806 check-target-libiberty \
907a7241 807 check-target-gperf \
ba73c63f
JM
808 check-target-libffi \
809 check-target-libjava \
810 check-target-zlib \
811 check-target-boehm-gc \
dd2768ff
KB
812 check-target-qthreads \
813 check-target-rda
252b5132
RH
814
815# This is a list of the install targets for all of the modules which are
816# compiled using $(TARGET_FLAGS_TO_PASS).
817INSTALL_TARGET_MODULES = \
ba73c63f 818 install-target-libstdc++-v3 \
252b5132 819 install-target-newlib \
ba73c63f 820 install-target-libf2c \
ba73c63f 821 install-target-libobjc \
252b5132
RH
822 install-target-libtermcap \
823 install-target-winsup \
824 install-target-libgloss \
825 install-target-libiberty \
907a7241 826 install-target-gperf \
ba73c63f
JM
827 install-target-libjava \
828 install-target-zlib \
829 install-target-boehm-gc \
dd2768ff
KB
830 install-target-qthreads \
831 install-target-rda
252b5132
RH
832
833# This is a list of the targets for which we can do a clean-{target}.
834CLEAN_MODULES = \
252b5132
RH
835 clean-ash \
836 clean-autoconf \
837 clean-automake \
838 clean-bash \
839 clean-bfd \
405ea7a0 840 clean-opcodes \
252b5132
RH
841 clean-binutils \
842 clean-bison \
843 clean-byacc \
844 clean-bzip2 \
252b5132
RH
845 clean-db \
846 clean-dejagnu \
847 clean-diff \
848 clean-dosutils \
849 clean-etc \
75205f78 850 clean-fastjar \
252b5132
RH
851 clean-fileutils \
852 clean-findutils \
853 clean-find \
854 clean-flex \
855 clean-gas \
856 clean-gawk \
857 clean-gettext \
858 clean-gnuserv \
859 clean-gprof \
860 clean-grep \
252b5132
RH
861 clean-gzip \
862 clean-hello \
863 clean-indent \
252b5132 864 clean-intl \
405ea7a0 865 clean-tcl \
252b5132
RH
866 clean-itcl \
867 clean-ld \
868 clean-libgui \
869 clean-libiberty \
870 clean-libtool \
871 clean-m4 \
872 clean-make \
873 clean-mmalloc \
252b5132
RH
874 clean-patch \
875 clean-perl \
876 clean-prms \
877 clean-rcs \
878 clean-readline \
879 clean-release \
880 clean-recode \
881 clean-sed \
882 clean-send-pr \
883 clean-shellutils \
8817b92e 884 clean-sid \
252b5132 885 clean-sim \
ba73c63f 886 clean-snavigator \
252b5132 887 clean-tar \
252b5132
RH
888 clean-texinfo \
889 clean-textutils \
252b5132
RH
890 clean-time \
891 clean-uudecode \
892 clean-wdiff \
5cec67bf 893 clean-zip \
405ea7a0 894 clean-zlib
252b5132
RH
895
896# All of the target modules that can be cleaned
897CLEAN_TARGET_MODULES = \
ba73c63f 898 clean-target-libstdc++-v3 \
252b5132 899 clean-target-newlib \
ba73c63f 900 clean-target-libf2c \
ba73c63f 901 clean-target-libobjc \
252b5132
RH
902 clean-target-winsup \
903 clean-target-libgloss \
904 clean-target-libiberty \
905 clean-target-gperf \
906 clean-target-examples \
ba73c63f
JM
907 clean-target-libffi \
908 clean-target-libjava \
909 clean-target-zlib \
910 clean-target-boehm-gc \
dd2768ff
KB
911 clean-target-qthreads \
912 clean-target-rda
252b5132
RH
913
914# All of the x11 modules that can be cleaned
915CLEAN_X11_MODULES = \
252b5132
RH
916 clean-gdb \
917 clean-expect \
252b5132
RH
918 clean-guile \
919 clean-tclX \
920 clean-tk \
852e5f18 921 clean-tix
252b5132
RH
922
923# The target built for a native build.
924.PHONY: all.normal
925all.normal: \
49b7683b 926 $(ALL_BUILD_MODULES) \
252b5132
RH
927 $(ALL_MODULES) \
928 $(ALL_X11_MODULES) \
929 $(ALL_TARGET_MODULES) \
930 all-gcc
931
932# Do a target for all the subdirectories. A ``make do-X'' will do a
933# ``make X'' in all subdirectories (because, in general, there is a
934# dependency (below) of X upon do-X, a ``make X'' will also do this,
935# but it may do additional work as well).
936# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
937# because it is so large that it can easily overflow the command line
938# length limit on some systems.
939DO_X = \
940 do-clean \
941 do-distclean \
942 do-dvi \
943 do-info \
944 do-install-info \
945 do-installcheck \
946 do-mostlyclean \
947 do-maintainer-clean \
948 do-TAGS
949.PHONY: $(DO_X)
950$(DO_X):
951 @target=`echo $@ | sed -e 's/^do-//'`; \
d5de0a84
NC
952 r=`${PWD}`; export r; \
953 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
954 $(SET_LIB_PATH) \
955 for i in $(SUBDIRS) -dummy-; do \
956 if [ -f ./$$i/Makefile ]; then \
957 case $$i in \
958 gcc) \
959 for flag in $(EXTRA_GCC_FLAGS); do \
3f152009 960 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
252b5132
RH
961 done; \
962 ;; \
963 *) \
964 for flag in $(EXTRA_HOST_FLAGS); do \
3f152009 965 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
252b5132
RH
966 done; \
967 ;; \
968 esac ; \
252b5132
RH
969 if (cd ./$$i; \
970 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
971 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
75205f78 972 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
252b5132
RH
973 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
974 $${target}); \
975 then true; else exit 1; fi; \
976 else true; fi; \
977 done
978 @target=`echo $@ | sed -e 's/^do-//'`; \
d5de0a84
NC
979 r=`${PWD}`; export r; \
980 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
981 $(SET_LIB_PATH) \
982 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
983 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
984 for flag in $(EXTRA_TARGET_FLAGS); do \
3f152009 985 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
252b5132 986 done; \
252b5132
RH
987 if (cd $(TARGET_SUBDIR)/$$i; \
988 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
989 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
75205f78 990 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
252b5132
RH
991 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
992 $${target}); \
993 then true; else exit 1; fi; \
994 else true; fi; \
995 done
996
997# Here are the targets which correspond to the do-X targets.
998
999.PHONY: info installcheck dvi install-info
1000.PHONY: clean distclean mostlyclean maintainer-clean realclean
1001.PHONY: local-clean local-distclean local-maintainer-clean
1002info: do-info
1003installcheck: do-installcheck
1004dvi: do-dvi
1005
1006# Make sure makeinfo is built before we do a `make info'.
1007do-info: all-texinfo
1008
1009install-info: do-install-info dir.info
d5de0a84 1010 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1011 if [ -f dir.info ] ; then \
1012 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1013 else true ; fi
1014
1015local-clean:
1016 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
1017
1018local-distclean:
1019 -rm -f Makefile config.status config.cache mh-frag mt-frag
1020 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1021 rm -rf $(TARGET_SUBDIR); \
1022 else true; fi
75205f78
DD
1023 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
1024 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
1025 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
1026 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
1027 -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
252b5132
RH
1028
1029local-maintainer-clean:
1030 @echo "This command is intended for maintainers to use;"
1031 @echo "it deletes files that may require special tools to rebuild."
1032
1033clean: do-clean local-clean
1034mostlyclean: do-mostlyclean local-clean
1035distclean: do-distclean local-clean local-distclean
1036maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1037maintainer-clean: local-distclean
1038realclean: maintainer-clean
1039
1040# This rule is used to clean specific modules.
1041.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1042$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1043 @dir=`echo $@ | sed -e 's/clean-//'`; \
1044 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1045 r=`${PWD}`; export r; \
1046 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1047 $(SET_LIB_PATH) \
1048 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1049 else \
1050 true; \
1051 fi
1052
1053.PHONY: $(CLEAN_TARGET_MODULES)
1054$(CLEAN_TARGET_MODULES):
1055 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1056 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1057 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
d5de0a84
NC
1058 r=`${PWD}`; export r; \
1059 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1060 $(SET_LIB_PATH) \
1061 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1062 else \
1063 true; \
1064 fi
1065
5cec67bf
AO
1066clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
1067clean-target-libgcc:
1068 test ! -d gcc/libgcc || \
1069 (cd gcc/libgcc && find . -type d -print) | \
1070 while read d; do rm -f gcc/$$d/libgcc.a || : ; done
1071 -rm -rf gcc/libgcc
252b5132
RH
1072
1073# Check target.
1074
80413487
RH
1075.PHONY: check do-check
1076check:
1077 $(MAKE) do-check NOTPARALLEL=parallel-ok
1078
1079do-check: $(CHECK_MODULES) \
252b5132
RH
1080 $(CHECK_TARGET_MODULES) \
1081 $(CHECK_X11_MODULES) \
1082 check-gcc
1083
1084# Automated reporting of test results.
1085
1086warning.log: build.log
1087 $(srcdir)/contrib/warn_summary build.log > $@
1088
1089mail-report.log:
1090 if test x'$(BOOT_CFLAGS)' != x''; then \
1091 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1092 fi; \
1093 $(srcdir)/contrib/test_summary -t >$@
1094 chmod +x $@
1095 echo If you really want to send e-mail, run ./$@ now
1096
1097mail-report-with-warnings.log: warning.log
1098 if test x'$(BOOT_CFLAGS)' != x''; then \
1099 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1100 fi; \
1101 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1102 chmod +x $@
1103 echo If you really want to send e-mail, run ./$@ now
1104
1105# Installation targets.
1106
1107.PHONY: install install-cross uninstall source-vault binary-vault vault-install
1108install: $(INSTALL_TARGET)
1109install-cross: $(INSTALL_TARGET_CROSS)
1110
1111uninstall:
1112 @echo "the uninstall target is not supported in this tree"
1113
1114source-vault:
1115 $(MAKE) -f ./release/Build-A-Release \
1116 host=$(host_alias) source-vault
1117
1118binary-vault:
1119 $(MAKE) -f ./release/Build-A-Release \
1120 host=$(host_alias) target=$(target_alias)
1121
1122vault-install:
1123 @if [ -f ./release/vault-install ] ; then \
1124 ./release/vault-install $(host_alias) $(target_alias) ; \
1125 else \
1126 true ; \
1127 fi
1128
1129.PHONY: install.all
1130install.all: install-no-fixedincludes
1131 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84 1132 r=`${PWD}` ; export r ; \
252b5132
RH
1133 $(SET_LIB_PATH) \
1134 (cd ./gcc; \
1135 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1136 else \
1137 true ; \
1138 fi
1139
252b5132
RH
1140# install-no-fixedincludes is used because Cygnus can not distribute
1141# the fixed header files.
1142.PHONY: install-no-fixedincludes
1143install-no-fixedincludes: \
1144 installdirs \
1145 $(INSTALL_MODULES) \
1146 $(INSTALL_TARGET_MODULES) \
1147 $(INSTALL_X11_MODULES) \
1148 gcc-no-fixedincludes
1149
1150# Install the gcc headers files, but not the fixed include files,
1151# which Cygnus is not allowed to distribute. This rule is very
1152# dependent on the workings of the gcc Makefile.in.
1153.PHONY: gcc-no-fixedincludes
1154gcc-no-fixedincludes:
1155 @if [ -f ./gcc/Makefile ]; then \
1156 rm -rf gcc/tmp-include; \
1157 mv gcc/include gcc/tmp-include 2>/dev/null; \
1158 mkdir gcc/include; \
1159 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1160 touch gcc/stmp-fixinc gcc/include/fixed; \
1161 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
d5de0a84
NC
1162 r=`${PWD}`; export r; \
1163 s=`cd $(srcdir); ${PWD}` ; export s; \
252b5132
RH
1164 $(SET_LIB_PATH) \
1165 (cd ./gcc; \
1166 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1167 rm -rf gcc/include; \
1168 mv gcc/tmp-include gcc/include 2>/dev/null; \
1169 else true; fi
1170
49b7683b
DD
1171# This rule is used to build the modules which are built with the
1172# build machine's native compiler.
1173.PHONY: $(ALL_BUILD_MODULES)
1174$(ALL_BUILD_MODULES):
1175 dir=`echo $@ | sed -e 's/all-build-//'`; \
1176 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1177 r=`${PWD}`; export r; \
1178 s=`cd $(srcdir); ${PWD}`; export s; \
49b7683b
DD
1179 (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \
1180 else \
1181 true; \
1182 fi
1183
1184# This rule is used to configure the modules which are built with the
1185# native tools.
1186.PHONY: $(CONFIGURE_BUILD_MODULES)
1187$(CONFIGURE_BUILD_MODULES):
1188 @dir=`echo $@ | sed -e 's/configure-build-//'`; \
1189 if [ ! -d $(BUILD_SUBDIR) ]; then \
1190 true; \
1191 elif [ -f $(BUILD_SUBDIR)/$${dir}/Makefile ] ; then \
1192 true; \
1193 elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1194 if [ -d $(srcdir)/$${dir} ]; then \
1195 [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\
d5de0a84
NC
1196 r=`${PWD}`; export r; \
1197 s=`cd $(srcdir); ${PWD}`; export s; \
49b7683b
DD
1198 AR="$(AR_FOR_BUILD)"; export AR; \
1199 AS="$(AS_FOR_BUILD)"; export AS; \
1200 CC="$(CC_FOR_BUILD)"; export CC; \
1201 CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
1202 CXX="$(CXX_FOR_BUILD)"; export CXX; \
1203 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
1204 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
1205 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
1206 LD="$(LD_FOR_BUILD)"; export LD; \
1207 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
1208 NM="$(NM_FOR_BUILD)"; export NM; \
1209 RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
1210 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
1211 echo Configuring in $(BUILD_SUBDIR)/$${dir}; \
1212 cd "$(BUILD_SUBDIR)/$${dir}" || exit 1; \
1213 case $(srcdir) in \
1214 /* | [A-Za-z]:[\\/]*) \
1215 topdir=$(srcdir) ;; \
1216 *) \
1217 case "$(BUILD_SUBDIR)" in \
1218 .) topdir="../$(srcdir)" ;; \
1219 *) topdir="../../$(srcdir)" ;; \
1220 esac ;; \
1221 esac; \
1222 if [ "$(srcdir)" = "." ] ; then \
1223 if [ "$(BUILD_SUBDIR)" != "." ] ; then \
1224 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1225 if [ -f Makefile ]; then \
1226 if $(MAKE) distclean; then \
1227 true; \
1228 else \
1229 exit 1; \
1230 fi; \
1231 else \
1232 true; \
1233 fi; \
1234 else \
1235 exit 1; \
1236 fi; \
1237 else \
1238 true; \
1239 fi; \
1240 srcdiroption="--srcdir=."; \
1241 libsrcdir="."; \
1242 else \
1243 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1244 libsrcdir="$$s/$${dir}"; \
1245 fi; \
1246 if [ -f $${libsrcdir}/configure ] ; then \
1247 rm -f no-such-file skip-this-dir; \
1248 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1249 $(BUILD_CONFIGARGS) $${srcdiroption} \
1250 --with-build-subdir="$(BUILD_SUBDIR)"; \
1251 else \
1252 rm -f no-such-file skip-this-dir; \
1253 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1254 $(BUILD_CONFIGARGS) $${srcdiroption} \
1255 --with-build-subdir="$(BUILD_SUBDIR)"; \
1256 fi || exit 1; \
1257 if [ -f skip-this-dir ] ; then \
1258 sh skip-this-dir; \
1259 rm -f skip-this-dir; \
1260 cd ..; rmdir $${dir} || true; \
1261 else \
1262 true; \
1263 fi; \
1264 else \
1265 true; \
1266 fi; \
1267 else \
1268 true; \
1269 fi
1270
252b5132
RH
1271# This rule is used to build the modules which use FLAGS_TO_PASS. To
1272# build a target all-X means to cd to X and make all.
c86f794b
NN
1273.PHONY: $(ALL_MODULES)
1274$(ALL_MODULES):
252b5132
RH
1275 @dir=`echo $@ | sed -e 's/all-//'`; \
1276 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1277 r=`${PWD}`; export r; \
1278 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1279 $(SET_LIB_PATH) \
1280 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1281 else \
1282 true; \
1283 fi
1284
1285# These rules are used to check the modules which use FLAGS_TO_PASS.
1286# To build a target check-X means to cd to X and make check. Some
1287# modules are only tested in a native toolchain.
1288
1289.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1290$(NATIVE_CHECK_MODULES):
3f152009 1291 @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
1292 dir=`echo $@ | sed -e 's/check-//'`; \
1293 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1294 r=`${PWD}`; export r; \
1295 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1296 $(SET_LIB_PATH) \
1297 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1298 else \
1299 true; \
1300 fi; \
1301 fi
1302
1303$(CROSS_CHECK_MODULES):
1304 @dir=`echo $@ | sed -e 's/check-//'`; \
1305 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1306 r=`${PWD}`; export r; \
1307 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1308 $(SET_LIB_PATH) \
1309 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1310 else \
1311 true; \
1312 fi
1313
1314# This rule is used to install the modules which use FLAGS_TO_PASS.
1315# To build a target install-X means to cd to X and make install.
1316.PHONY: $(INSTALL_MODULES)
1317$(INSTALL_MODULES): installdirs
1318 @dir=`echo $@ | sed -e 's/install-//'`; \
1319 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1320 r=`${PWD}`; export r; \
1321 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1322 $(SET_LIB_PATH) \
1323 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1324 else \
1325 true; \
1326 fi
1327
1328# This rule is used to configure the modules which are built with the
1329# target tools.
1330.PHONY: $(CONFIGURE_TARGET_MODULES)
1331$(CONFIGURE_TARGET_MODULES):
1332 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1333 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
d5de0a84 1334 r=`${PWD}`; export r; \
252b5132
RH
1335 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1336 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1337 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1338 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1339 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1340 else \
1341 echo "Multilibs changed for $${dir}, reconfiguring"; \
1342 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1343 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1344 fi; \
1345 else \
1346 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1347 fi; \
1348 fi; \
1349 fi; exit 0 # break command into two pieces
1350 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1351 if [ ! -d $(TARGET_SUBDIR) ]; then \
1352 true; \
1353 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1354 true; \
1355 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1356 if [ -d $(srcdir)/$${dir} ]; then \
1357 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
d5de0a84
NC
1358 r=`${PWD}`; export r; \
1359 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1360 $(SET_LIB_PATH) \
1361 AR="$(AR_FOR_TARGET)"; export AR; \
1362 AS="$(AS_FOR_TARGET)"; export AS; \
1363 CC="$(CC_FOR_TARGET)"; export CC; \
1364 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1365 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1366 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
75205f78 1367 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
252b5132
RH
1368 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1369 LD="$(LD_FOR_TARGET)"; export LD; \
1370 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1371 NM="$(NM_FOR_TARGET)"; export NM; \
1372 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1373 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1374 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
75205f78 1375 cd "$(TARGET_SUBDIR)/$${dir}" || exit 1; \
252b5132 1376 case $(srcdir) in \
75205f78 1377 /* | [A-Za-z]:[\\/]*) \
252b5132
RH
1378 topdir=$(srcdir) ;; \
1379 *) \
1380 case "$(TARGET_SUBDIR)" in \
1381 .) topdir="../$(srcdir)" ;; \
1382 *) topdir="../../$(srcdir)" ;; \
1383 esac ;; \
1384 esac; \
1385 if [ "$(srcdir)" = "." ] ; then \
1386 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1387 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1388 if [ -f Makefile ]; then \
1389 if $(MAKE) distclean; then \
1390 true; \
1391 else \
1392 exit 1; \
1393 fi; \
1394 else \
1395 true; \
1396 fi; \
1397 else \
1398 exit 1; \
1399 fi; \
1400 else \
1401 true; \
1402 fi; \
1403 srcdiroption="--srcdir=."; \
1404 libsrcdir="."; \
1405 else \
1406 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1407 libsrcdir="$$s/$${dir}"; \
1408 fi; \
1409 if [ -f $${libsrcdir}/configure ] ; then \
1410 rm -f no-such-file skip-this-dir; \
1411 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
49b7683b 1412 $(TARGET_CONFIGARGS) $${srcdiroption} \
252b5132
RH
1413 --with-target-subdir="$(TARGET_SUBDIR)"; \
1414 else \
1415 rm -f no-such-file skip-this-dir; \
1416 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
49b7683b 1417 $(TARGET_CONFIGARGS) $${srcdiroption} \
252b5132 1418 --with-target-subdir="$(TARGET_SUBDIR)"; \
75205f78 1419 fi || exit 1; \
252b5132
RH
1420 if [ -f skip-this-dir ] ; then \
1421 sh skip-this-dir; \
1422 rm -f skip-this-dir; \
1423 cd ..; rmdir $${dir} || true; \
1424 else \
1425 true; \
1426 fi; \
1427 else \
1428 true; \
1429 fi; \
1430 else \
1431 true; \
1432 fi
1433
1434# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1435# To build a target all-X means to cd to X and make all.
1436.PHONY: $(ALL_TARGET_MODULES)
1437$(ALL_TARGET_MODULES):
1438 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1439 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
d5de0a84
NC
1440 r=`${PWD}`; export r; \
1441 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 1442 $(SET_LIB_PATH) \
dec0cb0c
AO
1443 (cd $(TARGET_SUBDIR)/$${dir}; \
1444 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
252b5132
RH
1445 else \
1446 true; \
1447 fi
1448
1449# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1450# To build a target install-X means to cd to X and make install.
1451.PHONY: $(CHECK_TARGET_MODULES)
1452$(CHECK_TARGET_MODULES):
1453 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1454 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
d5de0a84
NC
1455 r=`${PWD}`; export r; \
1456 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 1457 $(SET_LIB_PATH) \
dec0cb0c
AO
1458 (cd $(TARGET_SUBDIR)/$${dir}; \
1459 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
252b5132
RH
1460 else \
1461 true; \
1462 fi
1463
1464# This rule is used to install the modules which use
1465# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1466# and make install.
1467.PHONY: $(INSTALL_TARGET_MODULES)
1468$(INSTALL_TARGET_MODULES): installdirs
1469 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1470 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
d5de0a84
NC
1471 r=`${PWD}`; export r; \
1472 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1473 $(SET_LIB_PATH) \
1474 (cd $(TARGET_SUBDIR)/$${dir}; \
1475 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1476 else \
1477 true; \
1478 fi
1479
1480# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1481# To build a target all-X means to cd to X and make all.
1482.PHONY: $(ALL_X11_MODULES)
1483$(ALL_X11_MODULES):
1484 @dir=`echo $@ | sed -e 's/all-//'`; \
1485 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1486 r=`${PWD}`; export r; \
1487 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1488 $(SET_LIB_PATH) \
1489 (cd $${dir}; \
1490 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1491 else \
1492 true; \
1493 fi
1494
1495# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1496# To build a target check-X means to cd to X and make all.
1497.PHONY: $(CHECK_X11_MODULES)
1498$(CHECK_X11_MODULES):
1499 @dir=`echo $@ | sed -e 's/check-//'`; \
1500 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1501 r=`${PWD}`; export r; \
1502 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1503 $(SET_LIB_PATH) \
1504 (cd $${dir}; \
1505 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1506 else \
1507 true; \
1508 fi
1509
1510# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1511# To build a target install-X means to cd to X and make install.
1512.PHONY: $(INSTALL_X11_MODULES)
1513$(INSTALL_X11_MODULES): installdirs
1514 @dir=`echo $@ | sed -e 's/install-//'`; \
1515 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1516 r=`${PWD}`; export r; \
1517 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1518 $(SET_LIB_PATH) \
1519 (cd $${dir}; \
1520 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1521 else \
1522 true; \
1523 fi
1524
1525# gcc is the only module which uses GCC_FLAGS_TO_PASS.
1526.PHONY: all-gcc
1527all-gcc:
1528 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1529 r=`${PWD}`; export r; \
1530 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1531 $(SET_LIB_PATH) \
1532 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1533 else \
1534 true; \
1535 fi
1536
1537# Building GCC uses some tools for rebuilding "source" files
1538# like texinfo, bison/byacc, etc. So we must depend on those.
1539#
1540# While building GCC, it may be necessary to run various target
1541# programs like the assembler, linker, etc. So we depend on
1542# those too.
1543#
1544# In theory, on an SMP all those dependencies can be resolved
1545# in parallel.
1546#
1aa8389d
DD
1547.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
1548bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap
d5de0a84
NC
1549 @r=`${PWD}`; export r; \
1550 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1551 $(SET_LIB_PATH) \
1552 echo "Bootstrapping the compiler"; \
5cec67bf 1553 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
d5de0a84
NC
1554 @r=`${PWD}`; export r; \
1555 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1556 case "$@" in \
1557 *bootstrap4-lean ) \
1558 msg="Comparing stage3 and stage4 of the compiler"; \
1559 compare=compare3-lean ;; \
1560 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1561 compare=compare3 ;; \
1562 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
1563 compare=compare-lean ;; \
1564 * ) msg="Comparing stage2 and stage3 of the compiler"; \
1565 compare=compare ;; \
1566 esac; \
1567 $(SET_LIB_PATH) \
1568 echo "$$msg"; \
5cec67bf 1569 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
d5de0a84
NC
1570 @r=`${PWD}`; export r; \
1571 s=`cd $(srcdir); ${PWD}` ; export s; \
252b5132
RH
1572 $(SET_LIB_PATH) \
1573 echo "Building runtime libraries"; \
dec0cb0c 1574 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
252b5132
RH
1575
1576.PHONY: cross
1577cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
d5de0a84
NC
1578 @r=`${PWD}`; export r; \
1579 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1580 $(SET_LIB_PATH) \
1581 echo "Building the C and C++ compiler"; \
5cec67bf 1582 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
d5de0a84
NC
1583 @r=`${PWD}`; export r; \
1584 s=`cd $(srcdir); ${PWD}` ; export s; \
252b5132
RH
1585 $(SET_LIB_PATH) \
1586 echo "Building runtime libraries"; \
dec0cb0c
AO
1587 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
1588 LANGUAGES="c c++" all
252b5132
RH
1589
1590.PHONY: check-gcc
1591check-gcc:
1592 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1593 r=`${PWD}`; export r; \
1594 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1595 $(SET_LIB_PATH) \
1596 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1597 else \
1598 true; \
1599 fi
1600
75205f78
DD
1601.PHONY: check-c++
1602check-c++:
1603 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1604 r=`${PWD}`; export r; \
1605 s=`cd $(srcdir); ${PWD}`; export s; \
75205f78
DD
1606 $(SET_LIB_PATH) \
1607 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
1608 $(MAKE) check-target-libstdc++-v3; \
1609 else \
1610 true; \
1611 fi
1612
252b5132
RH
1613.PHONY: install-gcc
1614install-gcc:
1615 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1616 r=`${PWD}`; export r; \
1617 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1618 $(SET_LIB_PATH) \
1619 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1620 else \
1621 true; \
1622 fi
1623
1624.PHONY: install-gcc-cross
1625install-gcc-cross:
1626 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1627 r=`${PWD}`; export r; \
1628 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1629 $(SET_LIB_PATH) \
1630 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1631 else \
1632 true; \
1633 fi
1634# EXPERIMENTAL STUFF
1635# This rule is used to install the modules which use FLAGS_TO_PASS.
1636# To build a target install-X means to cd to X and make install.
1637.PHONY: install-dosrel
1638install-dosrel: installdirs info
1639 @dir=`echo $@ | sed -e 's/install-//'`; \
1640 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1641 r=`${PWD}`; export r; \
1642 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1643 $(SET_LIB_PATH) \
1644 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1645 else \
1646 true; \
1647 fi
1648
1649install-dosrel-fake:
1650
c559bb17
AO
1651ALL_GCC = all-gcc
1652ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss
75205f78 1653ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3
252b5132
RH
1654
1655# This is a list of inter-dependencies among modules.
252b5132
RH
1656all-ash:
1657all-autoconf: all-m4 all-texinfo
1658all-automake: all-m4 all-texinfo
1659all-bash:
1660all-bfd: all-libiberty all-intl
1661all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
227b9953 1662all-bison: all-texinfo
75205f78 1663configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads
252b5132
RH
1664all-byacc:
1665all-bzip2:
252b5132
RH
1666all-db:
1667all-dejagnu: all-tcl all-expect all-tk
1668all-diff: all-libiberty
252b5132 1669all-etc:
5cec67bf 1670configure-target-examples: $(ALL_GCC_C)
252b5132
RH
1671all-expect: all-tcl all-tk
1672all-fileutils: all-libiberty
1673all-findutils:
1674all-find:
1675all-flex: all-libiberty all-bison all-byacc
1676all-gas: all-libiberty all-opcodes all-bfd all-intl
252b5132 1677all-gawk:
5cec67bf 1678all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib
2809b4b9 1679all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
403d9505 1680GDB_TK = @GDB_TK@
252b5132
RH
1681all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1682all-gettext:
1683all-gnuserv:
373688ac 1684configure-target-gperf: $(ALL_GCC_CXX)
907a7241 1685all-target-gperf: all-target-libiberty all-target-libstdc++-v3
252b5132 1686all-gprof: all-libiberty all-bfd all-opcodes all-intl
ba73c63f 1687all-grep: all-libiberty
252b5132
RH
1688all-guile:
1689all-gzip: all-libiberty
1690all-hello: all-libiberty
1691all-indent:
252b5132 1692all-intl:
fd8958d5 1693all-itcl: all-tcl all-tk
252b5132 1694all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
252b5132 1695configure-target-libgloss: $(ALL_GCC)
907a7241 1696all-target-libgloss: configure-target-newlib
fd8958d5 1697all-libgui: all-tcl all-tk all-itcl
252b5132 1698all-libiberty:
49b7683b
DD
1699
1700all-build-libiberty: configure-build-libiberty
1701
5cec67bf 1702configure-target-libffi: $(ALL_GCC_C)
75205f78 1703configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
907a7241 1704all-target-libjava: all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
5cec67bf 1705configure-target-libstdc++-v3: $(ALL_GCC_C)
907a7241 1706all-target-libstdc++-v3: all-target-libiberty
252b5132 1707all-libtool:
5cec67bf 1708configure-target-libf2c: $(ALL_GCC_C)
907a7241 1709all-target-libf2c: all-target-libiberty
5cec67bf 1710configure-target-libobjc: $(ALL_GCC_C)
907a7241 1711all-target-libobjc: all-target-libiberty
b0dad762 1712all-m4: all-libiberty all-texinfo
252b5132
RH
1713all-make: all-libiberty
1714all-mmalloc:
1715configure-target-newlib: $(ALL_GCC)
5cec67bf 1716configure-target-libtermcap: $(ALL_GCC_C)
cdb9e2b8 1717all-opcodes: all-bfd all-libiberty
252b5132
RH
1718all-patch: all-libiberty
1719all-perl:
1720all-prms: all-libiberty
5cec67bf 1721configure-target-qthreads: $(ALL_GCC_C)
252b5132
RH
1722all-rcs:
1723all-readline:
1724all-recode: all-libiberty
1725all-sed: all-libiberty
1726all-send-pr: all-prms
1727all-shellutils:
8817b92e 1728all-sid: all-tcl all-tk
cdb9e2b8 1729all-sim: all-libiberty all-bfd all-opcodes all-readline
48d19748 1730all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui
252b5132
RH
1731all-tar: all-libiberty
1732all-tcl:
252b5132
RH
1733all-tclX: all-tcl all-tk
1734all-tk: all-tcl
252b5132
RH
1735all-texinfo: all-libiberty
1736all-textutils:
252b5132 1737all-time:
fd8958d5 1738all-tix: all-tcl all-tk
252b5132 1739all-wdiff:
5cec67bf 1740configure-target-winsup: $(ALL_GCC_C)
907a7241 1741all-target-winsup: all-target-libiberty all-target-libtermcap
252b5132
RH
1742all-uudecode: all-libiberty
1743all-zip:
51601921 1744all-zlib:
5cec67bf 1745configure-target-zlib: $(ALL_GCC_C)
75205f78
DD
1746all-fastjar: all-zlib all-libiberty
1747configure-target-fastjar: configure-target-zlib
1748all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty
5cec67bf 1749configure-target-libiberty: $(ALL_GCC_C)
403d9505 1750configure-target: $(CONFIGURE_TARGET_MODULES)
252b5132
RH
1751all-target: $(ALL_TARGET_MODULES)
1752install-target: $(INSTALL_TARGET_MODULES)
afb8d725 1753install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
8817b92e 1754install-sid: install-tcl install-tk
907a7241 1755
a9590527
NN
1756# We put install-opcodes before install-binutils because the installed
1757# binutils might be on PATH, and they might need the shared opcodes
1758# library.
1759install-binutils: install-opcodes
1760
1761# We put install-tcl before install-itcl because itcl wants to run a
1762# program on installation which uses the Tcl libraries.
1763install-itcl: install-tcl
1764
1765
907a7241
NN
1766# Dependencies of all-target-foo on configure-target-foo.
1767all-target-libstdc++-v3: configure-target-libstdc++-v3
1768all-target-newlib: configure-target-newlib
1769all-target-libf2c: configure-target-libf2c
1770all-target-libobjc: configure-target-libobjc
1771all-target-libtermcap: configure-target-libtermcap
1772all-target-winsup: configure-target-winsup
1773all-target-libgloss: configure-target-libgloss
1774all-target-libiberty: configure-target-libiberty
1775all-target-gperf: configure-target-gperf
1776all-target-examples: configure-target-examples
1777all-target-libffi: configure-target-libffi
1778all-target-libjava: configure-target-libjava
1779all-target-zlib: configure-target-zlib
1780all-target-boehm-gc: configure-target-boehm-gc
1781all-target-qthreads: configure-target-qthreads
dd2768ff 1782all-target-rda: configure-target-rda
907a7241
NN
1783
1784
252b5132
RH
1785### other supporting targets
1786
1787MAKEDIRS= \
d3d8a9ee
NC
1788 $(DESTDIR)$(prefix) \
1789 $(DESTDIR)$(exec_prefix)
252b5132
RH
1790.PHONY: installdirs
1791installdirs: mkinstalldirs
1792 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1793
1794dir.info: do-install-info
1795 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1796 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1797 mv -f dir.info.new dir.info ; \
1798 else true ; \
1799 fi
1800
1801dist:
1802 @echo "Building a full distribution of this tree isn't done"
1803 @echo "via 'make dist'. Check out the etc/ subdirectory"
1804
1805etags tags: TAGS
1806
1807# Right now this just builds TAGS in each subdirectory. emacs19 has the
1808# ability to use several tags files at once, so there is probably no need
1809# to combine them into one big TAGS file (like CVS 1.3 does). We could
1810# (if we felt like it) have this Makefile write a piece of elisp which
1811# the user could load to tell emacs19 where all the TAGS files we just
1812# built are.
1813TAGS: do-TAGS
1814
14a2a2f1
NN
1815# Rebuilding Makefile.in, using autogen.
1816$(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
1817 cd $(srcdir) && autogen Makefile.def
1818
252b5132
RH
1819# with the gnu make, this is done automatically.
1820
1821Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
1822 $(SHELL) ./config.status
1823
1824#
252b5132
RH
1825
1826.NOEXPORT:
1827MAKEOVERRIDES=
1828
1829# end of Makefile.in
This page took 0.236057 seconds and 4 git commands to generate.