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