* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
[deliverable/binutils-gdb.git] / Makefile.tpl
CommitLineData
52d7cdee 1[+ AutoGen5 template -*- Mode: Makefile -*-
405ea7a0
NN
2in
3+]
4
5# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
6#
7# Makefile for directory with subdirs to build.
8# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
91f0e695 9# 1999, 2000, 2001, 2002, 2003 Free Software Foundation
405ea7a0
NN
10#
11# This file is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24#
25
50212802
NN
26# -------------------------------
27# Standard Autoconf-set variables
28# -------------------------------
583d52d7 29VPATH=@srcdir@
583d52d7
NN
30
31build_alias=@build_alias@
7f121bbf 32build=@build@
583d52d7 33host_alias=@host_alias@
7f121bbf 34host=@host@
583d52d7 35target_alias=@target_alias@
7f121bbf 36target=@target@
583d52d7 37
50212802 38program_transform_name = @program_transform_name@
c66d951e
NN
39
40prefix = @prefix@
41exec_prefix = @exec_prefix@
42
50212802
NN
43srcdir = @srcdir@
44
c66d951e
NN
45bindir = @bindir@
46sbindir = @sbindir@
47libexecdir = @libexecdir@
48datadir = @datadir@
49sysconfdir = @sysconfdir@
50sharedstatedir = @sharedstatedir@
51localstatedir = @localstatedir@
52libdir = @libdir@
53includedir = @includedir@
54oldincludedir = @oldincludedir@
55infodir = @infodir@
56mandir = @mandir@
405ea7a0
NN
57man1dir = $(mandir)/man1
58man2dir = $(mandir)/man2
59man3dir = $(mandir)/man3
60man4dir = $(mandir)/man4
61man5dir = $(mandir)/man5
62man6dir = $(mandir)/man6
63man7dir = $(mandir)/man7
64man8dir = $(mandir)/man8
65man9dir = $(mandir)/man9
405ea7a0 66
e5c3f801
NN
67INSTALL = @INSTALL@
68INSTALL_PROGRAM = @INSTALL_PROGRAM@
69INSTALL_SCRIPT = @INSTALL_SCRIPT@
70INSTALL_DATA = @INSTALL_DATA@
405ea7a0 71
50212802
NN
72# -------------------------------------------------
73# Miscellaneous non-standard autoconf-set variables
74# -------------------------------------------------
405ea7a0 75
50212802 76links=@configlinks@
50212802
NN
77# The file containing GCC's version number.
78gcc_version_trigger = @gcc_version_trigger@
79gcc_version = @gcc_version@
405ea7a0 80
50212802
NN
81# The gcc driver likes to know the arguments it was configured with.
82TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@
405ea7a0 83
50212802
NN
84gxx_include_dir = @gxx_include_dir@
85libstdcxx_incdir = @libstdcxx_incdir@
405ea7a0 86
50212802
NN
87tooldir = @tooldir@
88build_tooldir = @build_tooldir@
405ea7a0 89
50212802 90# Directory in which the compiler finds executables, libraries, etc.
ede4fbe4 91libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)
50212802 92GDB_NLM_DEPS =
405ea7a0 93
50212802
NN
94# This is the name of the environment variable used for the path to
95# the libraries.
96RPATH_ENVVAR = @RPATH_ENVVAR@
405ea7a0 97
50212802
NN
98# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
99# was used.
100SET_LIB_PATH = @SET_LIB_PATH@
405ea7a0 101
50212802
NN
102# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
103# Some platforms don't like blank entries, so we remove duplicate,
104# leading and trailing colons.
105REALLY_SET_LIB_PATH = \
106 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
405ea7a0 107
50212802
NN
108# This is the list of directories to be built for the build system.
109BUILD_CONFIGDIRS = libiberty
110# Build programs are put under this directory.
111BUILD_SUBDIR = @build_subdir@
112# This is set by the configure script to the arguments to use when configuring
113# directories built for the build system.
114BUILD_CONFIGARGS = @build_configargs@
115
116# This is the list of directories to built for the host system.
117SUBDIRS = @configdirs@
118# This is set by the configure script to the arguments to use when configuring
119# directories built for the host system.
120HOST_CONFIGARGS = @host_configargs@
121
122# This is set by the configure script to the list of directories which
123# should be built using the target tools.
124TARGET_CONFIGDIRS = @target_configdirs@
125# Target libraries are put under this directory:
126TARGET_SUBDIR = @target_subdir@
127# This is set by the configure script to the arguments to use when configuring
128# directories built for the target.
129TARGET_CONFIGARGS = @target_configargs@
130
131# ----------------------------------------------
132# Programs producing files for the BUILD machine
133# ----------------------------------------------
134
135SHELL = @config_shell@
136
137# pwd command to use. Allow user to override default by setting PWDCMD in
138# the environment to account for automounters. The make variable must not
139# be called PWDCMD, otherwise the value set here is passed to make
140# subprocesses and overrides the setting from the user's environment.
b40e3958
L
141# Don't use PWD since it is a common shell environment variable and we
142# don't want to corrupt it.
143PWD_COMMAND = $${PWDCMD-pwd}
50212802
NN
144
145# compilers to use to create programs which must be run in the build
146# environment.
147CC_FOR_BUILD = @CC_FOR_BUILD@
5fbad20a 148CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
50212802
NN
149
150CXX_FOR_BUILD = $(CXX)
151
152# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
153# here so that they can be overridden by Makefile fragments.
50212802
NN
154BUILD_PREFIX = @BUILD_PREFIX@
155BUILD_PREFIX_1 = @BUILD_PREFIX_1@
405ea7a0 156
852e5f18
NN
157BISON=@BISON@
158USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
405ea7a0
NN
159 echo $$r/bison/bison -L $$s/bison/ ; \
160 else \
161 echo bison ; \
162 fi`
163
50212802 164DEFAULT_YACC = @DEFAULT_YACC@
852e5f18
NN
165YACC=@YACC@
166USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
405ea7a0
NN
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
50212802 174DEFAULT_LEX = @DEFAULT_LEX@
852e5f18
NN
175LEX=@LEX@
176USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
405ea7a0
NN
177 then echo $$r/flex/flex ; \
178 else echo ${DEFAULT_LEX} ; fi`
179
50212802 180DEFAULT_M4 = @DEFAULT_M4@
405ea7a0
NN
181M4 = `if [ -f $$r/m4/m4 ] ; \
182 then echo $$r/m4/m4 ; \
183 else echo ${DEFAULT_M4} ; fi`
184
77f7441a 185# For an installed makeinfo, we require it to be from texinfo 4.2 or
405ea7a0 186# higher, else we use the "missing" dummy.
852e5f18
NN
187MAKEINFO=@MAKEINFO@
188USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
405ea7a0
NN
189 then echo $$r/texinfo/makeinfo/makeinfo ; \
190 else if (makeinfo --version \
77f7441a 191 | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
405ea7a0
NN
192 then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
193
194# This just becomes part of the MAKEINFO definition passed down to
195# sub-makes. It lets flags be given on the command line while still
196# using the makeinfo from the object tree.
62a3fc85
DD
197# (Default to avoid splitting info files by setting the threshold high.)
198MAKEINFOFLAGS = --split-size=5000000
405ea7a0
NN
199
200EXPECT = `if [ -f $$r/expect/expect ] ; \
201 then echo $$r/expect/expect ; \
202 else echo expect ; fi`
203
204RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
205 then echo $$s/dejagnu/runtest ; \
206 else echo runtest ; fi`
207
50212802
NN
208# ---------------------------------------------
209# Programs producing files for the HOST machine
210# ---------------------------------------------
405ea7a0 211
50212802
NN
212# This is the list of directories that may be needed in RPATH_ENVVAR
213# so that programs built for the host machine work.
214HOST_LIB_PATH = $$r/bfd:$$r/opcodes
405ea7a0 215
50212802 216AS = @AS@
405ea7a0 217
50212802
NN
218AR = @AR@
219AR_FLAGS = rc
405ea7a0 220
50212802
NN
221CC = @CC@
222CFLAGS = @CFLAGS@
223LIBCFLAGS = $(CFLAGS)
405ea7a0 224
50212802
NN
225CXX = @CXX@
226CXXFLAGS = @CXXFLAGS@
227LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
405ea7a0 228
50212802 229DLLTOOL = @DLLTOOL@
405ea7a0 230
50212802 231NM = @NM@
15723a45 232
50212802
NN
233LD = @LD@
234LDFLAGS =
15723a45 235
50212802 236RANLIB = @RANLIB@
405ea7a0 237
50212802 238WINDRES = @WINDRES@
405ea7a0 239
50212802
NN
240PICFLAG =
241
242# -----------------------------------------------
243# Programs producing files for the TARGET machine
244# -----------------------------------------------
405ea7a0
NN
245
246# This is the list of directories that may be needed in RPATH_ENVVAR
247# so that prorgams built for the target machine work.
248TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
249
58daee98 250FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
405ea7a0 251
50212802
NN
252AR_FOR_TARGET=@AR_FOR_TARGET@
253USUAL_AR_FOR_TARGET = ` \
254 if [ -f $$r/binutils/ar ] ; then \
255 echo $$r/binutils/ar ; \
256 else \
7f121bbf 257 if [ '$(host)' = '$(target)' ] ; then \
50212802
NN
258 echo $(AR); \
259 else \
260 echo ar | sed '$(program_transform_name)' ; \
261 fi; \
262 fi`
405ea7a0 263
852e5f18
NN
264AS_FOR_TARGET=@AS_FOR_TARGET@
265USUAL_AS_FOR_TARGET = ` \
405ea7a0
NN
266 if [ -f $$r/gas/as-new ] ; then \
267 echo $$r/gas/as-new ; \
268 elif [ -f $$r/gcc/xgcc ]; then \
269 $(CC_FOR_TARGET) -print-prog-name=as ; \
270 else \
7f121bbf 271 if [ '$(host)' = '$(target)' ] ; then \
405ea7a0
NN
272 echo $(AS); \
273 else \
43be203f 274 echo as | sed '$(program_transform_name)' ; \
405ea7a0
NN
275 fi; \
276 fi`
277
50212802
NN
278CC_FOR_TARGET = @CC_FOR_TARGET@
279# During gcc bootstrap, if we use some random cc for stage1 then
280# CFLAGS will be just -g. We want to ensure that TARGET libraries
281# (which we know are built with gcc) are built with optimizations so
282# prepend -O2 when setting CFLAGS_FOR_TARGET.
283CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
284# If GCC_FOR_TARGET is not overriden on the command line, then this
285# variable is passed down to the gcc Makefile, where it is used to
286# build libgcc2.a. We define it here so that it can itself be
287# overridden on the command line.
288GCC_FOR_TARGET=@GCC_FOR_TARGET@
289USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
290LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
291
292CXX_FOR_TARGET = @CXX_FOR_TARGET@
293RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
294CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
295RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
296CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
297LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
405ea7a0 298
852e5f18
NN
299DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
300USUAL_DLLTOOL_FOR_TARGET = ` \
405ea7a0
NN
301 if [ -f $$r/binutils/dlltool ] ; then \
302 echo $$r/binutils/dlltool ; \
303 else \
7f121bbf 304 if [ '$(host)' = '$(target)' ] ; then \
405ea7a0
NN
305 echo $(DLLTOOL); \
306 else \
43be203f 307 echo dlltool | sed '$(program_transform_name)' ; \
405ea7a0
NN
308 fi; \
309 fi`
310
50212802
NN
311GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
312
313LD_FOR_TARGET=@LD_FOR_TARGET@
314USUAL_LD_FOR_TARGET = ` \
315 if [ -f $$r/ld/ld-new ] ; then \
316 echo $$r/ld/ld-new ; \
317 elif [ -f $$r/gcc/xgcc ]; then \
318 $(CC_FOR_TARGET) -print-prog-name=ld ; \
405ea7a0 319 else \
7f121bbf 320 if [ '$(host)' = '$(target)' ] ; then \
50212802 321 echo $(LD); \
405ea7a0 322 else \
50212802 323 echo ld | sed '$(program_transform_name)' ; \
405ea7a0
NN
324 fi; \
325 fi`
326
50212802
NN
327LDFLAGS_FOR_TARGET =
328
329NM_FOR_TARGET=@NM_FOR_TARGET@
330USUAL_NM_FOR_TARGET = ` \
331 if [ -f $$r/binutils/nm-new ] ; then \
332 echo $$r/binutils/nm-new ; \
333 elif [ -f $$r/gcc/xgcc ]; then \
334 $(CC_FOR_TARGET) -print-prog-name=nm ; \
405ea7a0 335 else \
7f121bbf 336 if [ '$(host)' = '$(target)' ] ; then \
50212802 337 echo $(NM); \
405ea7a0 338 else \
50212802 339 echo nm | sed '$(program_transform_name)' ; \
405ea7a0
NN
340 fi; \
341 fi`
342
852e5f18
NN
343RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
344USUAL_RANLIB_FOR_TARGET = ` \
405ea7a0
NN
345 if [ -f $$r/binutils/ranlib ] ; then \
346 echo $$r/binutils/ranlib ; \
347 else \
7f121bbf 348 if [ '$(host)' = '$(target)' ] ; then \
405ea7a0
NN
349 if [ x'$(RANLIB)' != x ]; then \
350 echo $(RANLIB); \
351 else \
352 echo ranlib; \
353 fi; \
354 else \
43be203f 355 echo ranlib | sed '$(program_transform_name)' ; \
405ea7a0
NN
356 fi; \
357 fi`
358
50212802
NN
359WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
360USUAL_WINDRES_FOR_TARGET = ` \
361 if [ -f $$r/binutils/windres ] ; then \
362 echo $$r/binutils/windres ; \
405ea7a0 363 else \
7f121bbf 364 if [ '$(host)' = '$(target)' ] ; then \
50212802 365 echo $(WINDRES); \
405ea7a0 366 else \
50212802 367 echo windres | sed '$(program_transform_name)' ; \
405ea7a0
NN
368 fi; \
369 fi`
370
50212802
NN
371PICFLAG_FOR_TARGET =
372
373# ------------------------------------
374# Miscellaneous targets and flag lists
375# ------------------------------------
376
405ea7a0
NN
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
405ea7a0 382#### host and target specific makefile fragments come in here.
a0da8069
NN
383@target_makefile_frag@
384@alphaieee_frag@
385@ospace_frag@
386@host_makefile_frag@
405ea7a0
NN
387###
388
389# Flags to pass down to all sub-makes.
12f0bd74
NN
390BASE_FLAGS_TO_PASS = [+ FOR flags_to_pass +]\
391 "[+flag+]=$([+flag+])" [+ ENDFOR flags_to_pass +]\
392 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
405ea7a0
NN
393
394# For any flags above that may contain shell code that varies from one
395# target library to another. When doing recursive invocations of the
396# top-level Makefile, we don't want the outer make to evaluate them,
397# so we pass these variables down unchanged. They must not contain
398# single nor double quotes.
399RECURSE_FLAGS = \
930314a4
NN
400 CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
401 RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
405ea7a0
NN
402
403# Flags to pass down to most sub-makes, in which we're building with
404# the host environment.
405ea7a0
NN
405EXTRA_HOST_FLAGS = \
406 'AR=$(AR)' \
407 'AS=$(AS)' \
408 'CC=$(CC)' \
409 'CXX=$(CXX)' \
410 'DLLTOOL=$(DLLTOOL)' \
411 'LD=$(LD)' \
412 'NM=$(NM)' \
b9459e83 413 'RANLIB=$(RANLIB)' \
405ea7a0
NN
414 'WINDRES=$(WINDRES)'
415
416FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
417
418# Flags that are concerned with the location of the X11 include files
419# and library files
420#
421# NOTE: until the top-level is getting the values via autoconf, it only
422# causes problems to have this top-level Makefile overriding the autoconf-set
423# values in child directories. Only variables that don't conflict with
424# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
425#
426X11_FLAGS_TO_PASS = \
427 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
428 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
429
430# Flags to pass down to makes which are built with the target environment.
431# The double $ decreases the length of the command line; the variables
432# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
405ea7a0
NN
433EXTRA_TARGET_FLAGS = \
434 'AR=$$(AR_FOR_TARGET)' \
435 'AS=$$(AS_FOR_TARGET)' \
436 'CC=$$(CC_FOR_TARGET)' \
437 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
438 'CXX=$$(CXX_FOR_TARGET)' \
439 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
440 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
441 'LD=$$(LD_FOR_TARGET)' \
442 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
443 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
444 'NM=$$(NM_FOR_TARGET)' \
445 'RANLIB=$$(RANLIB_FOR_TARGET)' \
446 'WINDRES=$$(WINDRES_FOR_TARGET)'
447
448TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
449
450# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
451# unfortunately needs the native compiler and the target ar and
452# ranlib.
453# If any variables are added here, they must be added to do-*, below.
2a4cbe27 454# The BUILD_* variables are a special case, which are used for the gcc
405ea7a0
NN
455# cross-building scheme.
456EXTRA_GCC_FLAGS = \
457 'AR=$(AR)' \
458 'AS=$(AS)' \
459 'CC=$(CC)' \
460 'CXX=$(CXX)' \
405ea7a0
NN
461 'BUILD_PREFIX=$(BUILD_PREFIX)' \
462 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
463 'NM=$(NM)' \
b9459e83 464 'RANLIB=$(RANLIB)' \
405ea7a0
NN
465 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
466 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
467 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
468 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
469 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
470 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
471 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
472 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
405ea7a0
NN
473 "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
474 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
475
476GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
477
dd12c3a8
NN
478.PHONY: configure-host
479configure-host: maybe-configure-gcc [+
480 FOR host_modules +] \
481 maybe-configure-[+module+][+
482 ENDFOR host_modules +]
483.PHONY: configure-target
484configure-target: [+
485 FOR target_modules +] \
486 maybe-configure-target-[+module+][+
487 ENDFOR target_modules +]
405ea7a0 488
405ea7a0
NN
489# The target built for a native build.
490.PHONY: all.normal
dd12c3a8
NN
491all.normal: @all_build_modules@ all-host all-target
492
493.PHONY: all-host
494all-host: maybe-all-gcc [+
495 FOR host_modules +] \
496 maybe-all-[+module+][+
497 ENDFOR host_modules +]
498.PHONY: all-target
499all-target: [+
500 FOR target_modules +] \
501 maybe-all-target-[+module+][+
502 ENDFOR target_modules +]
405ea7a0
NN
503
504# Do a target for all the subdirectories. A ``make do-X'' will do a
505# ``make X'' in all subdirectories (because, in general, there is a
506# dependency (below) of X upon do-X, a ``make X'' will also do this,
507# but it may do additional work as well).
e393202e 508[+ FOR recursive_targets +]
27b1cc72 509.PHONY: do-[+make_target+]
2a4cbe27
NN
510do-[+make_target+]: [+make_target+]-host [+make_target+]-target
511
512.PHONY: [+make_target+]-host
513[+make_target+]-host: maybe-[+make_target+]-gcc [+
514 FOR host_modules +] \
515 maybe-[+make_target+]-[+module+][+
516 ENDFOR host_modules +]
517
518.PHONY: [+make_target+]-target
519[+make_target+]-target: [+
520 FOR target_modules +] \
521 maybe-[+make_target+]-target-[+module+][+
522 ENDFOR target_modules +]
523
524# GCC, the eternal special case
525.PHONY: maybe-[+make_target+]-gcc [+make_target+]-gcc
526maybe-[+make_target+]-gcc:
527[+make_target+]-gcc: [+
528 FOR depend +]\
529 [+depend+]-gcc [+
530 ENDFOR depend +]
531 @[ -f ./gcc/Makefile ] || exit 0; \
b40e3958
L
532 r=`${PWD_COMMAND}`; export r; \
533 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2a4cbe27
NN
534 $(SET_LIB_PATH) \
535 for flag in $(EXTRA_GCC_FLAGS); do \
536 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
537 done; \
538 echo "Doing [+make_target+] in gcc" ; \
539 (cd gcc && \
540 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
541 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
542 "RANLIB=$${RANLIB}" \
543 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
544 [+make_target+]) \
545 || exit 1
546
547# Host modules.
548[+ FOR host_modules +]
549.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
550maybe-[+make_target+]-[+module+]:
551[+ IF (match-value? = "missing" (get "make_target") ) +]
552# [+module+] doesn't support [+make_target+].
553[+make_target+]-[+module+]:
554[+ ELSE +]
555[+make_target+]-[+module+]: [+
556 FOR depend +]\
557 [+depend+]-[+module+] [+
558 ENDFOR depend +]
559 @[ -f ./[+module+]/Makefile ] || exit 0; \
b40e3958
L
560 r=`${PWD_COMMAND}`; export r; \
561 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 562 $(SET_LIB_PATH) \
2a4cbe27
NN
563 for flag in $(EXTRA_HOST_FLAGS); do \
564 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
565 done; \
566 echo "Doing [+make_target+] in [+module+]" ; \
567 (cd [+module+] && \
568 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
569 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
570 "RANLIB=$${RANLIB}" \
571 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
572 [+make_target+]) \
573 || exit 1
574[+ ENDIF +]
575[+ ENDFOR host_modules +]
576
577# Target modules.
578[+ FOR target_modules +]
579.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
580maybe-[+make_target+]-target-[+module+]:
581[+ IF (match-value? = "missing" (get "make_target") ) +]
582# [+module+] doesn't support [+make_target+].
123494c8 583[+make_target+]-target-[+module+]:
2a4cbe27
NN
584[+ ELSE +]
585[+make_target+]-target-[+module+]: [+
586 FOR depend +]\
587 [+depend+]-target-[+module+] [+
588 ENDFOR depend +]
589 @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
b40e3958
L
590 r=`${PWD_COMMAND}`; export r; \
591 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 592 $(SET_LIB_PATH) \
2a4cbe27
NN
593 echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
594 for flag in $(EXTRA_TARGET_FLAGS); do \
595 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
596 done; \
597 (cd $(TARGET_SUBDIR)/[+module+] && \
598 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
599 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
600 "RANLIB=$${RANLIB}" \
601 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
602 [+make_target+]) \
603 || exit 1
604[+ ENDIF +]
605[+ ENDFOR target_modules +]
e393202e
NN
606[+ ENDFOR recursive_targets +]
607
405ea7a0
NN
608# Here are the targets which correspond to the do-X targets.
609
610.PHONY: info installcheck dvi install-info
611.PHONY: clean distclean mostlyclean maintainer-clean realclean
612.PHONY: local-clean local-distclean local-maintainer-clean
613info: do-info
614installcheck: do-installcheck
615dvi: do-dvi
616
43d92c63
NN
617# Make sure makeinfo is built before we do a `make info', if we're
618# in fact building texinfo.
619do-info: maybe-all-texinfo
405ea7a0
NN
620
621install-info: do-install-info dir.info
b40e3958 622 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 623 if [ -f dir.info ] ; then \
497f816e 624 $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
405ea7a0
NN
625 else true ; fi
626
627local-clean:
628 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
629
630local-distclean:
631 -rm -f Makefile config.status config.cache mh-frag mt-frag
e6bfb94a 632 -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
405ea7a0
NN
633 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
634 rm -rf $(TARGET_SUBDIR); \
635 else true; fi
e4c4d240 636 -rm -rf $(BUILD_SUBDIR)
405ea7a0
NN
637 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
638 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
639 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
640 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
641 -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
642
643local-maintainer-clean:
644 @echo "This command is intended for maintainers to use;"
645 @echo "it deletes files that may require special tools to rebuild."
646
647clean: do-clean local-clean
648mostlyclean: do-mostlyclean local-clean
649distclean: do-distclean local-clean local-distclean
650maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
651maintainer-clean: local-distclean
652realclean: maintainer-clean
653
2a4cbe27
NN
654# Extra dependency for clean-target, owing to the mixed nature of gcc
655clean-target: clean-target-libgcc
405ea7a0
NN
656clean-target-libgcc:
657 test ! -d gcc/libgcc || \
658 (cd gcc/libgcc && find . -type d -print) | \
659 while read d; do rm -f gcc/$$d/libgcc.a || : ; done
660 -rm -rf gcc/libgcc
661
662# Check target.
663
664.PHONY: check do-check
ede4fbe4 665check: do-check
405ea7a0 666
3866be5d 667# Only include modules actually being configured and built.
16ae0395
NN
668do-check: maybe-check-gcc [+
669 FOR host_modules +] \
670 maybe-check-[+module+][+
671 ENDFOR host_modules +][+
672 FOR target_modules +] \
673 maybe-check-target-[+module+][+
674 ENDFOR target_modules +]
405ea7a0
NN
675
676# Automated reporting of test results.
677
678warning.log: build.log
679 $(srcdir)/contrib/warn_summary build.log > $@
680
681mail-report.log:
682 if test x'$(BOOT_CFLAGS)' != x''; then \
683 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
684 fi; \
685 $(srcdir)/contrib/test_summary -t >$@
686 chmod +x $@
687 echo If you really want to send e-mail, run ./$@ now
688
689mail-report-with-warnings.log: warning.log
690 if test x'$(BOOT_CFLAGS)' != x''; then \
691 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
692 fi; \
693 $(srcdir)/contrib/test_summary -t -i warning.log >$@
694 chmod +x $@
695 echo If you really want to send e-mail, run ./$@ now
696
697# Installation targets.
698
ae831be5 699.PHONY: install uninstall
dd12c3a8
NN
700install: installdirs install-host install-target
701
16ae0395
NN
702.PHONY: install-host-nogcc
703install-host-nogcc: [+
704 FOR host_modules +] \
705 maybe-install-[+module+][+
706 ENDFOR host_modules +]
707
dd12c3a8
NN
708.PHONY: install-host
709install-host: maybe-install-gcc [+
710 FOR host_modules +] \
711 maybe-install-[+module+][+
712 ENDFOR host_modules +]
16ae0395 713
dd12c3a8
NN
714.PHONY: install-target
715install-target: [+
716 FOR target_modules +] \
717 maybe-install-target-[+module+][+
718 ENDFOR target_modules +]
405ea7a0
NN
719
720uninstall:
721 @echo "the uninstall target is not supported in this tree"
722
405ea7a0
NN
723.PHONY: install.all
724install.all: install-no-fixedincludes
725 @if [ -f ./gcc/Makefile ] ; then \
b40e3958 726 r=`${PWD_COMMAND}` ; export r ; \
405ea7a0 727 $(SET_LIB_PATH) \
1086bc09 728 (cd ./gcc && \
405ea7a0
NN
729 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
730 else \
731 true ; \
732 fi
733
734# install-no-fixedincludes is used because Cygnus can not distribute
735# the fixed header files.
736.PHONY: install-no-fixedincludes
16ae0395 737install-no-fixedincludes: installdirs install-host-nogcc \
dd12c3a8 738 install-target gcc-no-fixedincludes
405ea7a0 739
15723a45 740### other supporting targets
405ea7a0 741
15723a45
NN
742MAKEDIRS= \
743 $(DESTDIR)$(prefix) \
744 $(DESTDIR)$(exec_prefix)
745.PHONY: installdirs
746installdirs: mkinstalldirs
747 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
748
749dir.info: do-install-info
750 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
497f816e 751 $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
15723a45
NN
752 mv -f dir.info.new dir.info ; \
753 else true ; \
405ea7a0
NN
754 fi
755
15723a45
NN
756dist:
757 @echo "Building a full distribution of this tree isn't done"
758 @echo "via 'make dist'. Check out the etc/ subdirectory"
759
760etags tags: TAGS
761
762# Right now this just builds TAGS in each subdirectory. emacs19 has the
763# ability to use several tags files at once, so there is probably no need
764# to combine them into one big TAGS file (like CVS 1.3 does). We could
765# (if we felt like it) have this Makefile write a piece of elisp which
766# the user could load to tell emacs19 where all the TAGS files we just
767# built are.
768TAGS: do-TAGS
769
15723a45
NN
770# --------------------------------------
771# Modules which run on the build machine
772# --------------------------------------
773[+ FOR build_modules +]
930314a4
NN
774.PHONY: configure-build-[+module+] maybe-configure-build-[+module+]
775maybe-configure-build-[+module+]:
e6bfb94a
AO
776configure-build-[+module+]:
777 @test ! -f $(BUILD_SUBDIR)/[+module+]/Makefile || exit 0; \
9175bfc0 778 $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/[+module+] ; \
b40e3958
L
779 r=`${PWD_COMMAND}`; export r; \
780 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
781 AR="$(AR_FOR_BUILD)"; export AR; \
782 AS="$(AS_FOR_BUILD)"; export AS; \
783 CC="$(CC_FOR_BUILD)"; export CC; \
784 CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
785 CXX="$(CXX_FOR_BUILD)"; export CXX; \
786 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
787 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
788 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
789 LD="$(LD_FOR_BUILD)"; export LD; \
790 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
791 NM="$(NM_FOR_BUILD)"; export NM; \
792 RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
793 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
794 echo Configuring in $(BUILD_SUBDIR)/[+module+]; \
795 cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \
796 case $(srcdir) in \
797 /* | [A-Za-z]:[\\/]*) \
798 topdir=$(srcdir) ;; \
799 *) \
800 case "$(BUILD_SUBDIR)" in \
405ea7a0
NN
801 .) topdir="../$(srcdir)" ;; \
802 *) topdir="../../$(srcdir)" ;; \
bba45b8b
NN
803 esac ;; \
804 esac; \
805 if [ "$(srcdir)" = "." ] ; then \
806 if [ "$(BUILD_SUBDIR)" != "." ] ; then \
807 if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
808 if [ -f Makefile ]; then \
809 if $(MAKE) distclean; then \
810 true; \
811 else \
812 exit 1; \
813 fi; \
405ea7a0 814 else \
bba45b8b 815 true; \
405ea7a0 816 fi; \
405ea7a0 817 else \
bba45b8b 818 exit 1; \
405ea7a0 819 fi; \
bba45b8b
NN
820 else \
821 true; \
822 fi; \
823 srcdiroption="--srcdir=."; \
824 libsrcdir="."; \
825 else \
826 srcdiroption="--srcdir=$${topdir}/[+module+]"; \
827 libsrcdir="$$s/[+module+]"; \
828 fi; \
829 rm -f no-such-file || : ; \
830 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
831 $(BUILD_CONFIGARGS) $${srcdiroption} \
832 --with-build-subdir="$(BUILD_SUBDIR)" \
833 || exit 1
15723a45
NN
834
835.PHONY: all-build-[+module+] maybe-all-build-[+module+]
836maybe-all-build-[+module+]:
837all-build-[+module+]: configure-build-[+module+]
b40e3958
L
838 @r=`${PWD_COMMAND}`; export r; \
839 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b 840 (cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all)
e393202e 841[+ ENDFOR build_modules +]
405ea7a0 842
15723a45
NN
843# --------------------------------------
844# Modules which run on the host machine
845# --------------------------------------
3866be5d 846[+ FOR host_modules +]
e2b9e2dc
NN
847.PHONY: configure-[+module+] maybe-configure-[+module+]
848maybe-configure-[+module+]:
e6bfb94a
AO
849configure-[+module+]:
850 @test ! -f [+module+]/Makefile || exit 0; \
851 [ -d [+module+] ] || mkdir [+module+]; \
b40e3958
L
852 r=`${PWD_COMMAND}`; export r; \
853 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
e2b9e2dc
NN
854 CC="$(CC)"; export CC; \
855 CFLAGS="$(CFLAGS)"; export CFLAGS; \
856 CXX="$(CXX)"; export CXX; \
857 CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
ec7e0995
NN
858 AR="$(AR)"; export AR; \
859 AS="$(AS)"; export AS; \
860 CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
861 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
862 LD="$(LD)"; export LD; \
863 NM="$(NM)"; export NM; \
864 RANLIB="$(RANLIB)"; export RANLIB; \
865 WINDRES="$(WINDRES)"; export WINDRES; \
866 OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
867 OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
e2b9e2dc
NN
868 echo Configuring in [+module+]; \
869 cd [+module+] || exit 1; \
870 case $(srcdir) in \
871 \.) \
872 srcdiroption="--srcdir=."; \
873 libsrcdir=".";; \
874 /* | [A-Za-z]:[\\/]*) \
875 srcdiroption="--srcdir=$(srcdir)/[+module+]"; \
876 libsrcdir="$$s/[+module+]";; \
877 *) \
878 srcdiroption="--srcdir=../$(srcdir)/[+module+]"; \
879 libsrcdir="$$s/[+module+]";; \
880 esac; \
881 $(SHELL) $${libsrcdir}/configure \
882 $(HOST_CONFIGARGS) $${srcdiroption} \
883 || exit 1
884
930314a4
NN
885.PHONY: all-[+module+] maybe-all-[+module+]
886maybe-all-[+module+]:
db1ac78d 887all-[+module+]: configure-[+module+]
b40e3958
L
888 @r=`${PWD_COMMAND}`; export r; \
889 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
890 $(SET_LIB_PATH) \
891 (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
892 IF with_x
893 +] $(X11_FLAGS_TO_PASS)[+
894 ENDIF with_x +] all)
405ea7a0 895
16ae0395
NN
896.PHONY: check-[+module+] maybe-check-[+module+]
897maybe-check-[+module+]:
3866be5d 898[+ IF no_check +]
3866be5d
NN
899check-[+module+]:
900[+ ELIF no_check_cross +]
3866be5d
NN
901# This module is only tested in a native toolchain.
902check-[+module+]:
7f121bbf 903 @if [ '$(host)' = '$(target)' ] ; then \
b40e3958
L
904 r=`${PWD_COMMAND}`; export r; \
905 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 906 $(SET_LIB_PATH) \
1086bc09 907 (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
3866be5d
NN
908 IF with_x
909 +] $(X11_FLAGS_TO_PASS)[+
bba45b8b
NN
910 ENDIF with_x +] check); \
911 fi
912[+ ELSE check +]
bba45b8b 913check-[+module+]:
b40e3958
L
914 @r=`${PWD_COMMAND}`; export r; \
915 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
916 $(SET_LIB_PATH) \
917 (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
918 IF with_x
919 +] $(X11_FLAGS_TO_PASS)[+
920 ENDIF with_x +] check)
3866be5d 921[+ ENDIF no_check +]
405ea7a0 922
930314a4
NN
923.PHONY: install-[+module+] maybe-install-[+module+]
924maybe-install-[+module+]:
16ae0395 925[+ IF no_install +]
3866be5d
NN
926install-[+module+]:
927[+ ELSE install +]
3866be5d 928install-[+module+]: installdirs
b40e3958
L
929 @r=`${PWD_COMMAND}`; export r; \
930 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
931 $(SET_LIB_PATH) \
932 (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
933 IF with_x
934 +] $(X11_FLAGS_TO_PASS)[+
935 ENDIF with_x +] install)
3866be5d
NN
936[+ ENDIF no_install +]
937[+ ENDFOR host_modules +]
405ea7a0 938
15723a45
NN
939# ---------------------------------------
940# Modules which run on the target machine
941# ---------------------------------------
e393202e 942[+ FOR target_modules +]
930314a4
NN
943.PHONY: configure-target-[+module+] maybe-configure-target-[+module+]
944maybe-configure-target-[+module+]:
15723a45 945
1086bc09
NN
946# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
947$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
9175bfc0 948 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
e6bfb94a 949 rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \
1086bc09 950 cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out
15723a45 951
e6bfb94a
AO
952configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/multilib.out
953 @test ! -f $(TARGET_SUBDIR)/[+module+]/Makefile || exit 0; \
9175bfc0 954 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
b40e3958
L
955 r=`${PWD_COMMAND}`; export r; \
956 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
957 $(SET_LIB_PATH) \
958 AR="$(AR_FOR_TARGET)"; export AR; \
959 AS="$(AS_FOR_TARGET)"; export AS; \
960 CC="$(CC_FOR_TARGET)"; export CC; \
961 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
962 CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \[+
963IF raw_cxx +]
964 CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
965 CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \[+
966ELSE normal_cxx +]
967 CXX="$(CXX_FOR_TARGET)"; export CXX; \[+
968ENDIF raw_cxx +]
969 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
970 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
971 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
972 LD="$(LD_FOR_TARGET)"; export LD; \
973 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
974 NM="$(NM_FOR_TARGET)"; export NM; \
975 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
976 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
977 echo Configuring in $(TARGET_SUBDIR)/[+module+]; \
978 cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \
979 case $(srcdir) in \
980 /* | [A-Za-z]:[\\/]*) \
981 topdir=$(srcdir) ;; \
982 *) \
983 case "$(TARGET_SUBDIR)" in \
405ea7a0
NN
984 .) topdir="../$(srcdir)" ;; \
985 *) topdir="../../$(srcdir)" ;; \
bba45b8b
NN
986 esac ;; \
987 esac; \
988 if [ "$(srcdir)" = "." ] ; then \
989 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
990 if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
991 if [ -f Makefile ]; then \
992 if $(MAKE) distclean; then \
993 true; \
994 else \
995 exit 1; \
996 fi; \
405ea7a0 997 else \
bba45b8b 998 true; \
405ea7a0 999 fi; \
405ea7a0 1000 else \
bba45b8b 1001 exit 1; \
405ea7a0 1002 fi; \
bba45b8b
NN
1003 else \
1004 true; \
1005 fi; \
1006 srcdiroption="--srcdir=."; \
1007 libsrcdir="."; \
1008 else \
1009 srcdiroption="--srcdir=$${topdir}/[+module+]"; \
1010 libsrcdir="$$s/[+module+]"; \
1011 fi; \
1012 rm -f no-such-file || : ; \
1013 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1014 $(TARGET_CONFIGARGS) $${srcdiroption} \
1015 --with-target-subdir="$(TARGET_SUBDIR)" \
1016 || exit 1
405ea7a0 1017
930314a4
NN
1018.PHONY: all-target-[+module+] maybe-all-target-[+module+]
1019maybe-all-target-[+module+]:
15723a45 1020all-target-[+module+]: configure-target-[+module+]
b40e3958
L
1021 @r=`${PWD_COMMAND}`; export r; \
1022 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
1023 $(SET_LIB_PATH) \
1024 (cd $(TARGET_SUBDIR)/[+module+] && \
1025 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
1026 IF raw_cxx
1027 +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
1028 ENDIF raw_cxx
1029 +] all)
16ae0395
NN
1030
1031.PHONY: check-target-[+module+] maybe-check-target-[+module+]
1032maybe-check-target-[+module+]:
3866be5d
NN
1033[+ IF no_check +]
1034# Dummy target for uncheckable module.
3866be5d
NN
1035check-target-[+module+]:
1036[+ ELSE check +]
e393202e 1037check-target-[+module+]:
b40e3958
L
1038 @r=`${PWD_COMMAND}`; export r; \
1039 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
1040 $(SET_LIB_PATH) \
1041 (cd $(TARGET_SUBDIR)/[+module+] && \
1042 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
1043 IF raw_cxx
1044 +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
1045 ENDIF raw_cxx
1046 +] check)
e393202e 1047[+ ENDIF no_check +]
16ae0395 1048
930314a4
NN
1049.PHONY: install-target-[+module+] maybe-install-target-[+module+]
1050maybe-install-target-[+module+]:
16ae0395 1051[+ IF no_install +]
930314a4
NN
1052# Dummy target for uninstallable.
1053install-target-[+module+]:
1054[+ ELSE install +]
e393202e 1055install-target-[+module+]: installdirs
b40e3958
L
1056 @r=`${PWD_COMMAND}`; export r; \
1057 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
1058 $(SET_LIB_PATH) \
1059 (cd $(TARGET_SUBDIR)/[+module+] && \
1060 $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
e393202e
NN
1061[+ ENDIF no_install +]
1062[+ ENDFOR target_modules +]
405ea7a0 1063
15723a45
NN
1064# ----------
1065# GCC module
1066# ----------
1067
1068# Unfortunately, while gcc _should_ be a host module,
1069# libgcc is a target module, and gen* programs are
1070# build modules. So GCC is a sort of hybrid.
1071
405ea7a0 1072# gcc is the only module which uses GCC_FLAGS_TO_PASS.
e2b9e2dc
NN
1073.PHONY: configure-gcc maybe-configure-gcc
1074maybe-configure-gcc:
e6bfb94a
AO
1075configure-gcc:
1076 @test ! -f gcc/Makefile || exit 0; \
1077 [ -d gcc ] || mkdir gcc; \
b40e3958
L
1078 r=`${PWD_COMMAND}`; export r; \
1079 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
e2b9e2dc
NN
1080 CC="$(CC)"; export CC; \
1081 CFLAGS="$(CFLAGS)"; export CFLAGS; \
1082 CXX="$(CXX)"; export CXX; \
1083 CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
586c0873 1084 TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
ec7e0995
NN
1085 AR="$(AR)"; export AR; \
1086 AS="$(AS)"; export AS; \
1087 CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
1088 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
1089 LD="$(LD)"; export LD; \
1090 NM="$(NM)"; export NM; \
1091 RANLIB="$(RANLIB)"; export RANLIB; \
1092 WINDRES="$(WINDRES)"; export WINDRES; \
1093 OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
1094 OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
e2b9e2dc
NN
1095 echo Configuring in gcc; \
1096 cd gcc || exit 1; \
1097 case $(srcdir) in \
1098 \.) \
1099 srcdiroption="--srcdir=."; \
1100 libsrcdir=".";; \
1101 /* | [A-Za-z]:[\\/]*) \
1102 srcdiroption="--srcdir=$(srcdir)/gcc"; \
1103 libsrcdir="$$s/gcc";; \
1104 *) \
1105 srcdiroption="--srcdir=../$(srcdir)/gcc"; \
1106 libsrcdir="$$s/gcc";; \
1107 esac; \
1108 $(SHELL) $${libsrcdir}/configure \
1109 $(HOST_CONFIGARGS) $${srcdiroption} \
1110 || exit 1
1111
b72e6a2d
JM
1112# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
1113# causes trouble. This wart will be fixed eventually by moving
db1ac78d 1114# the bootstrap behavior to this file.
930314a4
NN
1115.PHONY: all-gcc maybe-all-gcc
1116maybe-all-gcc:
db1ac78d 1117all-gcc: configure-gcc
b72e6a2d 1118 @if [ -f gcc/stage_last ] ; then \
b40e3958
L
1119 r=`${PWD_COMMAND}`; export r; \
1120 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
b72e6a2d 1121 $(SET_LIB_PATH) \
1086bc09 1122 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
db1ac78d 1123 else \
b40e3958
L
1124 r=`${PWD_COMMAND}`; export r; \
1125 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 1126 $(SET_LIB_PATH) \
1086bc09 1127 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
405ea7a0
NN
1128 fi
1129
1130# Building GCC uses some tools for rebuilding "source" files
1131# like texinfo, bison/byacc, etc. So we must depend on those.
1132#
1133# While building GCC, it may be necessary to run various target
1134# programs like the assembler, linker, etc. So we depend on
1135# those too.
1136#
1137# In theory, on an SMP all those dependencies can be resolved
1138# in parallel.
1139#
5b474aa8
DD
1140GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
1141.PHONY: $(GCC_STRAP_TARGETS)
1142$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
b40e3958
L
1143 @r=`${PWD_COMMAND}`; export r; \
1144 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0
NN
1145 $(SET_LIB_PATH) \
1146 echo "Bootstrapping the compiler"; \
1147 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
b40e3958
L
1148 @r=`${PWD_COMMAND}`; export r; \
1149 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0
NN
1150 case "$@" in \
1151 *bootstrap4-lean ) \
bba45b8b
NN
1152 msg="Comparing stage3 and stage4 of the compiler"; \
1153 compare=compare3-lean ;; \
1154 *bootstrap4 ) \
1155 msg="Comparing stage3 and stage4 of the compiler"; \
1156 compare=compare3 ;; \
1157 *-lean ) \
1158 msg="Comparing stage2 and stage3 of the compiler"; \
1159 compare=compare-lean ;; \
1160 * ) \
1161 msg="Comparing stage2 and stage3 of the compiler"; \
1162 compare=compare ;; \
405ea7a0
NN
1163 esac; \
1164 $(SET_LIB_PATH) \
1165 echo "$$msg"; \
1166 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
b40e3958
L
1167 @r=`${PWD_COMMAND}`; export r; \
1168 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
405ea7a0
NN
1169 $(SET_LIB_PATH) \
1170 echo "Building runtime libraries"; \
1171 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
1172
ec7e0995 1173profiledbootstrap: all-bootstrap configure-gcc
b40e3958
L
1174 @r=`${PWD_COMMAND}`; export r; \
1175 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
ec7e0995
NN
1176 $(SET_LIB_PATH) \
1177 echo "Bootstrapping the compiler"; \
1178 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
b40e3958
L
1179 @r=`${PWD_COMMAND}`; export r; \
1180 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
ec7e0995
NN
1181 $(SET_LIB_PATH) \
1182 echo "Building runtime libraries and training compiler"; \
1183 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
b40e3958
L
1184 @r=`${PWD_COMMAND}`; export r; \
1185 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
ec7e0995
NN
1186 $(SET_LIB_PATH) \
1187 echo "Building feedback based compiler"; \
1188 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
1189
405ea7a0
NN
1190.PHONY: cross
1191cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
b40e3958
L
1192 @r=`${PWD_COMMAND}`; export r; \
1193 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0
NN
1194 $(SET_LIB_PATH) \
1195 echo "Building the C and C++ compiler"; \
1196 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
b40e3958
L
1197 @r=`${PWD_COMMAND}`; export r; \
1198 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
405ea7a0
NN
1199 $(SET_LIB_PATH) \
1200 echo "Building runtime libraries"; \
1201 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
1202 LANGUAGES="c c++" all
1203
8945c6bb 1204.PHONY: check-gcc maybe-check-gcc
44482353 1205maybe-check-gcc:
405ea7a0
NN
1206check-gcc:
1207 @if [ -f ./gcc/Makefile ] ; then \
b40e3958
L
1208 r=`${PWD_COMMAND}`; export r; \
1209 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 1210 $(SET_LIB_PATH) \
1086bc09 1211 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
405ea7a0
NN
1212 else \
1213 true; \
1214 fi
1215
7d695d07
JM
1216.PHONY: check-gcc-c++
1217check-gcc-c++:
405ea7a0 1218 @if [ -f ./gcc/Makefile ] ; then \
b40e3958
L
1219 r=`${PWD_COMMAND}`; export r; \
1220 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 1221 $(SET_LIB_PATH) \
1086bc09 1222 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
405ea7a0
NN
1223 else \
1224 true; \
7d695d07
JM
1225 fi
1226
1227.PHONY: check-c++
ede4fbe4 1228check-c++: check-target-libstdc++-v3 check-gcc-c++
405ea7a0 1229
930314a4
NN
1230.PHONY: install-gcc maybe-install-gcc
1231maybe-install-gcc:
405ea7a0
NN
1232install-gcc:
1233 @if [ -f ./gcc/Makefile ] ; then \
b40e3958
L
1234 r=`${PWD_COMMAND}`; export r; \
1235 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 1236 $(SET_LIB_PATH) \
1086bc09 1237 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
405ea7a0
NN
1238 else \
1239 true; \
1240 fi
1241
15723a45
NN
1242# Install the gcc headers files, but not the fixed include files,
1243# which Cygnus is not allowed to distribute. This rule is very
1244# dependent on the workings of the gcc Makefile.in.
1245.PHONY: gcc-no-fixedincludes
1246gcc-no-fixedincludes:
1247 @if [ -f ./gcc/Makefile ]; then \
1248 rm -rf gcc/tmp-include; \
1249 mv gcc/include gcc/tmp-include 2>/dev/null; \
1250 mkdir gcc/include; \
1251 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1252 touch gcc/stmp-fixinc gcc/include/fixed; \
1253 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
b40e3958
L
1254 r=`${PWD_COMMAND}`; export r; \
1255 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
15723a45 1256 $(SET_LIB_PATH) \
1086bc09 1257 (cd ./gcc && \
15723a45
NN
1258 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1259 rm -rf gcc/include; \
1260 mv gcc/tmp-include gcc/include 2>/dev/null; \
1261 else true; fi
1262
ae831be5
NN
1263# --------------------------------------
1264# Dependencies between different modules
1265# --------------------------------------
405ea7a0 1266
ae831be5
NN
1267# There are two types of dependencies here: 'hard' dependencies, where one
1268# module simply won't build without the other; and 'soft' dependencies, where
1269# if the depended-on module is missing, the depending module will do without
1270# or find a substitute somewhere (perhaps installed). Soft dependencies
1271# are specified by depending on a 'maybe-' target. If you're not sure,
1272# it's safer to use a soft dependency.
1273
1274# Host modules specific to gcc.
e2b9e2dc 1275# GCC needs to identify certain tools.
e5c3f801
NN
1276# GCC also needs the information exported by the intl configure script.
1277configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
1278all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
ae831be5
NN
1279# This is a slightly kludgy method of getting dependencies on
1280# all-build-libiberty correct; it would be better to build it every time.
1281all-gcc: maybe-all-build-libiberty
e5c3f801 1282all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
ae831be5
NN
1283
1284# Host modules specific to gdb.
e2b9e2dc 1285# GDB needs to know that the simulator is being built.
8f32e830 1286configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
ae831be5
NN
1287GDB_TK = @GDB_TK@
1288all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
1289install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
59da4fe6 1290configure-libgui: maybe-configure-tcl maybe-configure-tk
ae831be5
NN
1291all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
1292
1293# Host modules specific to binutils.
b4a77b47 1294configure-bfd: configure-libiberty
930314a4
NN
1295all-bfd: maybe-all-libiberty maybe-all-intl
1296all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
ae831be5
NN
1297# We put install-opcodes before install-binutils because the installed
1298# binutils might be on PATH, and they might need the shared opcodes
1299# library.
1300install-binutils: maybe-install-opcodes
cf662e21
AJ
1301# libopcodes depends on libbfd
1302install-opcodes: maybe-install-bfd
ae831be5
NN
1303all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
1304all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
1305all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
1306all-opcodes: maybe-all-bfd maybe-all-libiberty
1307
1308# Other host modules in the 'src' repository.
930314a4 1309all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
b4a77b47 1310configure-expect: maybe-configure-tcl maybe-configure-tk
930314a4 1311all-expect: maybe-all-tcl maybe-all-tk
b4a77b47 1312configure-itcl: maybe-configure-tcl maybe-configure-tk
ae831be5
NN
1313all-itcl: maybe-all-tcl maybe-all-tk
1314# We put install-tcl before install-itcl because itcl wants to run a
1315# program on installation which uses the Tcl libraries.
1316install-itcl: maybe-install-tcl
122bfa92 1317all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
ae831be5 1318install-sid: maybe-install-tcl maybe-install-tk
a36d530e 1319all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
b4a77b47 1320configure-tk: maybe-configure-tcl
ae831be5 1321all-tk: maybe-all-tcl
b4a77b47 1322configure-tix: maybe-configure-tcl maybe-configure-tk
ae831be5
NN
1323all-tix: maybe-all-tcl maybe-all-tk
1324all-texinfo: maybe-all-libiberty
1325
1326# Other host modules. Warning, these are not well tested.
1327all-autoconf: maybe-all-m4 maybe-all-texinfo
1328all-automake: maybe-all-m4 maybe-all-texinfo
1329all-bison: maybe-all-texinfo
1330all-diff: maybe-all-libiberty
1331all-fastjar: maybe-all-zlib maybe-all-libiberty
930314a4
NN
1332all-fileutils: maybe-all-libiberty
1333all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
930314a4
NN
1334all-gzip: maybe-all-libiberty
1335all-hello: maybe-all-libiberty
930314a4 1336all-m4: maybe-all-libiberty maybe-all-texinfo
b9abda6a 1337all-make: maybe-all-libiberty maybe-all-intl
930314a4
NN
1338all-patch: maybe-all-libiberty
1339all-prms: maybe-all-libiberty
930314a4
NN
1340all-recode: maybe-all-libiberty
1341all-sed: maybe-all-libiberty
1342all-send-pr: maybe-all-prms
930314a4 1343all-tar: maybe-all-libiberty
930314a4 1344all-uudecode: maybe-all-libiberty
ae831be5
NN
1345
1346ALL_GCC = maybe-all-gcc
1347ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
1348ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
1349
1350# Target modules specific to gcc.
b4a77b47
DD
1351configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
1352configure-target-fastjar: maybe-configure-target-zlib
930314a4 1353all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
b4a77b47 1354configure-target-libf2c: $(ALL_GCC_C)
ae831be5 1355all-target-libf2c: maybe-all-target-libiberty
b4a77b47
DD
1356configure-target-libffi: $(ALL_GCC_C)
1357configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
ae831be5 1358all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
b4a77b47 1359configure-target-libobjc: $(ALL_GCC_C)
ae831be5 1360all-target-libobjc: maybe-all-target-libiberty
b4a77b47 1361configure-target-libstdc++-v3: $(ALL_GCC_C)
ae831be5 1362all-target-libstdc++-v3: maybe-all-target-libiberty
b4a77b47 1363configure-target-zlib: $(ALL_GCC_C)
a9590527 1364
ae831be5 1365# Target modules in the 'src' repository.
b4a77b47
DD
1366configure-target-examples: $(ALL_GCC_C)
1367configure-target-libgloss: $(ALL_GCC)
ae831be5 1368all-target-libgloss: maybe-configure-target-newlib
3a12db16 1369configure-target-libiberty: $(ALL_GCC)
b4a77b47
DD
1370configure-target-libtermcap: $(ALL_GCC_C)
1371configure-target-newlib: $(ALL_GCC)
7dda0df6 1372configure-target-rda: $(ALL_GCC_C)
b4a77b47 1373configure-target-winsup: $(ALL_GCC_C)
ae831be5 1374all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
a9590527 1375
ae831be5 1376# Other target modules. Warning, these are not well tested.
b4a77b47 1377configure-target-gperf: $(ALL_GCC_CXX)
ae831be5 1378all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
b4a77b47 1379configure-target-qthreads: $(ALL_GCC_C)
907a7241 1380
930314a4
NN
1381# Dependencies of maybe-foo on foo. These are used because, for example,
1382# all-gcc only depends on all-gas if gas is present and being configured.
1383@maybe_dependencies@
1384
a2cc058a
NN
1385# Serialization dependencies. Host configures don't work well in parallel to
1386# each other, due to contention over config.cache. Target configures and
1387# build configures are similar.
1388@serialization_dependencies@
1389
15723a45
NN
1390# --------------------------------
1391# Regenerating top level configury
1392# --------------------------------
405ea7a0 1393
1086bc09
NN
1394# Multilib.out tells target dirs what multilibs they should build.
1395# There is really only one copy. We use the 'timestamp' method to
1396# work around various timestamp bugs on some systems.
1397# We use move-if-change so that it's only considered updated when it
1398# actually changes, because it has to depend on a phony target.
e6bfb94a 1399multilib.out: maybe-all-gcc
b40e3958 1400 @r=`${PWD_COMMAND}`; export r; \
1086bc09
NN
1401 echo "Checking multilib configuration..."; \
1402 $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
1403 $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
1086bc09 1404
405ea7a0 1405# Rebuilding Makefile.in, using autogen.
43be203f 1406AUTOGEN = autogen
6b784d9f 1407$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
43be203f 1408 cd $(srcdir) && $(AUTOGEN) Makefile.def
405ea7a0 1409
a0da8069 1410# Rebuilding Makefile.
43be203f
AO
1411Makefile: $(srcdir)/Makefile.in config.status
1412 CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
1413
1414config.status: configure $(gcc_version_trigger)
a0da8069 1415 $(SHELL) ./config.status --recheck
405ea7a0 1416
a0da8069 1417# Rebuilding configure.
43be203f 1418AUTOCONF = autoconf
6b784d9f 1419$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4
43be203f 1420 cd $(srcdir) && $(AUTOCONF)
405ea7a0 1421
3728fade
NN
1422# ------------------------------
1423# Special directives to GNU Make
1424# ------------------------------
1425
3728fade
NN
1426# Don't pass command-line variables to submakes.
1427.NOEXPORT:
1428MAKEOVERRIDES=
1429
405ea7a0 1430# end of Makefile.in
This page took 0.142795 seconds and 4 git commands to generate.