2004-01-07 Andrew Cagney <cagney@redhat.com>
[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 +]\
10ecffb9 392 "CONFIG_SHELL=$(SHELL)" \
12f0bd74 393 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
405ea7a0
NN
394
395# For any flags above that may contain shell code that varies from one
396# target library to another. When doing recursive invocations of the
397# top-level Makefile, we don't want the outer make to evaluate them,
398# so we pass these variables down unchanged. They must not contain
399# single nor double quotes.
400RECURSE_FLAGS = \
930314a4
NN
401 CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
402 RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
405ea7a0
NN
403
404# Flags to pass down to most sub-makes, in which we're building with
405# the host environment.
405ea7a0
NN
406EXTRA_HOST_FLAGS = \
407 'AR=$(AR)' \
408 'AS=$(AS)' \
409 'CC=$(CC)' \
410 'CXX=$(CXX)' \
411 'DLLTOOL=$(DLLTOOL)' \
412 'LD=$(LD)' \
413 'NM=$(NM)' \
b9459e83 414 'RANLIB=$(RANLIB)' \
405ea7a0
NN
415 'WINDRES=$(WINDRES)'
416
417FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
418
419# Flags that are concerned with the location of the X11 include files
420# and library files
421#
422# NOTE: until the top-level is getting the values via autoconf, it only
423# causes problems to have this top-level Makefile overriding the autoconf-set
424# values in child directories. Only variables that don't conflict with
425# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
426#
427X11_FLAGS_TO_PASS = \
428 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
429 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
430
431# Flags to pass down to makes which are built with the target environment.
432# The double $ decreases the length of the command line; the variables
433# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
405ea7a0
NN
434EXTRA_TARGET_FLAGS = \
435 'AR=$$(AR_FOR_TARGET)' \
436 'AS=$$(AS_FOR_TARGET)' \
437 'CC=$$(CC_FOR_TARGET)' \
438 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
439 'CXX=$$(CXX_FOR_TARGET)' \
440 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
441 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
442 'LD=$$(LD_FOR_TARGET)' \
443 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
444 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
445 'NM=$$(NM_FOR_TARGET)' \
446 'RANLIB=$$(RANLIB_FOR_TARGET)' \
447 'WINDRES=$$(WINDRES_FOR_TARGET)'
448
449TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
450
451# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
452# unfortunately needs the native compiler and the target ar and
453# ranlib.
454# If any variables are added here, they must be added to do-*, below.
2a4cbe27 455# The BUILD_* variables are a special case, which are used for the gcc
405ea7a0
NN
456# cross-building scheme.
457EXTRA_GCC_FLAGS = \
405ea7a0
NN
458 'BUILD_PREFIX=$(BUILD_PREFIX)' \
459 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
405ea7a0
NN
460 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
461 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
462 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
463 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
464 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
465 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
466 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
467 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
405ea7a0 468 "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
d9441a1f
DD
469 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
470 "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s/.*=$$/XFOO=/`"
405ea7a0 471
f0b24077 472GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
405ea7a0 473
dd12c3a8
NN
474.PHONY: configure-host
475configure-host: maybe-configure-gcc [+
476 FOR host_modules +] \
477 maybe-configure-[+module+][+
478 ENDFOR host_modules +]
479.PHONY: configure-target
480configure-target: [+
481 FOR target_modules +] \
482 maybe-configure-target-[+module+][+
483 ENDFOR target_modules +]
405ea7a0 484
405ea7a0
NN
485# The target built for a native build.
486.PHONY: all.normal
dd12c3a8
NN
487all.normal: @all_build_modules@ all-host all-target
488
489.PHONY: all-host
490all-host: maybe-all-gcc [+
491 FOR host_modules +] \
492 maybe-all-[+module+][+
493 ENDFOR host_modules +]
494.PHONY: all-target
495all-target: [+
496 FOR target_modules +] \
497 maybe-all-target-[+module+][+
498 ENDFOR target_modules +]
405ea7a0
NN
499
500# Do a target for all the subdirectories. A ``make do-X'' will do a
501# ``make X'' in all subdirectories (because, in general, there is a
502# dependency (below) of X upon do-X, a ``make X'' will also do this,
503# but it may do additional work as well).
e393202e 504[+ FOR recursive_targets +]
27b1cc72 505.PHONY: do-[+make_target+]
2a4cbe27
NN
506do-[+make_target+]: [+make_target+]-host [+make_target+]-target
507
508.PHONY: [+make_target+]-host
509[+make_target+]-host: maybe-[+make_target+]-gcc [+
510 FOR host_modules +] \
511 maybe-[+make_target+]-[+module+][+
512 ENDFOR host_modules +]
513
514.PHONY: [+make_target+]-target
515[+make_target+]-target: [+
516 FOR target_modules +] \
517 maybe-[+make_target+]-target-[+module+][+
518 ENDFOR target_modules +]
519
520# GCC, the eternal special case
521.PHONY: maybe-[+make_target+]-gcc [+make_target+]-gcc
522maybe-[+make_target+]-gcc:
523[+make_target+]-gcc: [+
524 FOR depend +]\
525 [+depend+]-gcc [+
526 ENDFOR depend +]
527 @[ -f ./gcc/Makefile ] || exit 0; \
b40e3958
L
528 r=`${PWD_COMMAND}`; export r; \
529 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2a4cbe27
NN
530 $(SET_LIB_PATH) \
531 for flag in $(EXTRA_GCC_FLAGS); do \
532 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
533 done; \
534 echo "Doing [+make_target+] in gcc" ; \
535 (cd gcc && \
536 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
537 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
538 "RANLIB=$${RANLIB}" \
539 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
540 [+make_target+]) \
541 || exit 1
542
543# Host modules.
544[+ FOR host_modules +]
545.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
546maybe-[+make_target+]-[+module+]:
547[+ IF (match-value? = "missing" (get "make_target") ) +]
548# [+module+] doesn't support [+make_target+].
549[+make_target+]-[+module+]:
550[+ ELSE +]
551[+make_target+]-[+module+]: [+
552 FOR depend +]\
553 [+depend+]-[+module+] [+
554 ENDFOR depend +]
555 @[ -f ./[+module+]/Makefile ] || exit 0; \
b40e3958
L
556 r=`${PWD_COMMAND}`; export r; \
557 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 558 $(SET_LIB_PATH) \
2a4cbe27
NN
559 for flag in $(EXTRA_HOST_FLAGS); do \
560 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
561 done; \
562 echo "Doing [+make_target+] in [+module+]" ; \
563 (cd [+module+] && \
564 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
565 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
566 "RANLIB=$${RANLIB}" \
567 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
568 [+make_target+]) \
569 || exit 1
570[+ ENDIF +]
571[+ ENDFOR host_modules +]
572
573# Target modules.
574[+ FOR target_modules +]
575.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
576maybe-[+make_target+]-target-[+module+]:
577[+ IF (match-value? = "missing" (get "make_target") ) +]
578# [+module+] doesn't support [+make_target+].
123494c8 579[+make_target+]-target-[+module+]:
2a4cbe27
NN
580[+ ELSE +]
581[+make_target+]-target-[+module+]: [+
582 FOR depend +]\
583 [+depend+]-target-[+module+] [+
584 ENDFOR depend +]
585 @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
b40e3958
L
586 r=`${PWD_COMMAND}`; export r; \
587 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 588 $(SET_LIB_PATH) \
2a4cbe27
NN
589 echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
590 for flag in $(EXTRA_TARGET_FLAGS); do \
591 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
592 done; \
593 (cd $(TARGET_SUBDIR)/[+module+] && \
594 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
595 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
596 "RANLIB=$${RANLIB}" \
597 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
598 [+make_target+]) \
599 || exit 1
600[+ ENDIF +]
601[+ ENDFOR target_modules +]
e393202e
NN
602[+ ENDFOR recursive_targets +]
603
405ea7a0
NN
604# Here are the targets which correspond to the do-X targets.
605
606.PHONY: info installcheck dvi install-info
607.PHONY: clean distclean mostlyclean maintainer-clean realclean
608.PHONY: local-clean local-distclean local-maintainer-clean
609info: do-info
610installcheck: do-installcheck
611dvi: do-dvi
612
43d92c63
NN
613# Make sure makeinfo is built before we do a `make info', if we're
614# in fact building texinfo.
615do-info: maybe-all-texinfo
405ea7a0
NN
616
617install-info: do-install-info dir.info
b40e3958 618 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 619 if [ -f dir.info ] ; then \
497f816e 620 $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
405ea7a0
NN
621 else true ; fi
622
623local-clean:
624 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
625
626local-distclean:
627 -rm -f Makefile config.status config.cache mh-frag mt-frag
e6bfb94a 628 -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
405ea7a0
NN
629 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
630 rm -rf $(TARGET_SUBDIR); \
631 else true; fi
e4c4d240 632 -rm -rf $(BUILD_SUBDIR)
405ea7a0
NN
633 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
634 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
635 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
636 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
637 -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
638
639local-maintainer-clean:
640 @echo "This command is intended for maintainers to use;"
641 @echo "it deletes files that may require special tools to rebuild."
642
643clean: do-clean local-clean
644mostlyclean: do-mostlyclean local-clean
645distclean: do-distclean local-clean local-distclean
646maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
647maintainer-clean: local-distclean
648realclean: maintainer-clean
649
2a4cbe27
NN
650# Extra dependency for clean-target, owing to the mixed nature of gcc
651clean-target: clean-target-libgcc
405ea7a0
NN
652clean-target-libgcc:
653 test ! -d gcc/libgcc || \
654 (cd gcc/libgcc && find . -type d -print) | \
655 while read d; do rm -f gcc/$$d/libgcc.a || : ; done
656 -rm -rf gcc/libgcc
657
658# Check target.
659
660.PHONY: check do-check
ede4fbe4 661check: do-check
405ea7a0 662
3866be5d 663# Only include modules actually being configured and built.
16ae0395
NN
664do-check: maybe-check-gcc [+
665 FOR host_modules +] \
666 maybe-check-[+module+][+
667 ENDFOR host_modules +][+
668 FOR target_modules +] \
669 maybe-check-target-[+module+][+
670 ENDFOR target_modules +]
405ea7a0
NN
671
672# Automated reporting of test results.
673
674warning.log: build.log
675 $(srcdir)/contrib/warn_summary build.log > $@
676
677mail-report.log:
678 if test x'$(BOOT_CFLAGS)' != x''; then \
679 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
680 fi; \
681 $(srcdir)/contrib/test_summary -t >$@
682 chmod +x $@
683 echo If you really want to send e-mail, run ./$@ now
684
685mail-report-with-warnings.log: warning.log
686 if test x'$(BOOT_CFLAGS)' != x''; then \
687 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
688 fi; \
689 $(srcdir)/contrib/test_summary -t -i warning.log >$@
690 chmod +x $@
691 echo If you really want to send e-mail, run ./$@ now
692
693# Installation targets.
694
ae831be5 695.PHONY: install uninstall
dd12c3a8
NN
696install: installdirs install-host install-target
697
16ae0395
NN
698.PHONY: install-host-nogcc
699install-host-nogcc: [+
700 FOR host_modules +] \
701 maybe-install-[+module+][+
702 ENDFOR host_modules +]
703
dd12c3a8
NN
704.PHONY: install-host
705install-host: maybe-install-gcc [+
706 FOR host_modules +] \
707 maybe-install-[+module+][+
708 ENDFOR host_modules +]
16ae0395 709
dd12c3a8
NN
710.PHONY: install-target
711install-target: [+
712 FOR target_modules +] \
713 maybe-install-target-[+module+][+
714 ENDFOR target_modules +]
405ea7a0
NN
715
716uninstall:
717 @echo "the uninstall target is not supported in this tree"
718
405ea7a0
NN
719.PHONY: install.all
720install.all: install-no-fixedincludes
721 @if [ -f ./gcc/Makefile ] ; then \
b40e3958 722 r=`${PWD_COMMAND}` ; export r ; \
405ea7a0 723 $(SET_LIB_PATH) \
1086bc09 724 (cd ./gcc && \
405ea7a0
NN
725 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
726 else \
727 true ; \
728 fi
729
730# install-no-fixedincludes is used because Cygnus can not distribute
731# the fixed header files.
732.PHONY: install-no-fixedincludes
16ae0395 733install-no-fixedincludes: installdirs install-host-nogcc \
dd12c3a8 734 install-target gcc-no-fixedincludes
405ea7a0 735
15723a45 736### other supporting targets
405ea7a0 737
15723a45
NN
738MAKEDIRS= \
739 $(DESTDIR)$(prefix) \
740 $(DESTDIR)$(exec_prefix)
741.PHONY: installdirs
742installdirs: mkinstalldirs
743 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
744
745dir.info: do-install-info
746 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
497f816e 747 $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
15723a45
NN
748 mv -f dir.info.new dir.info ; \
749 else true ; \
405ea7a0
NN
750 fi
751
15723a45
NN
752dist:
753 @echo "Building a full distribution of this tree isn't done"
754 @echo "via 'make dist'. Check out the etc/ subdirectory"
755
756etags tags: TAGS
757
758# Right now this just builds TAGS in each subdirectory. emacs19 has the
759# ability to use several tags files at once, so there is probably no need
760# to combine them into one big TAGS file (like CVS 1.3 does). We could
761# (if we felt like it) have this Makefile write a piece of elisp which
762# the user could load to tell emacs19 where all the TAGS files we just
763# built are.
764TAGS: do-TAGS
765
15723a45
NN
766# --------------------------------------
767# Modules which run on the build machine
768# --------------------------------------
769[+ FOR build_modules +]
930314a4
NN
770.PHONY: configure-build-[+module+] maybe-configure-build-[+module+]
771maybe-configure-build-[+module+]:
e6bfb94a
AO
772configure-build-[+module+]:
773 @test ! -f $(BUILD_SUBDIR)/[+module+]/Makefile || exit 0; \
9175bfc0 774 $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/[+module+] ; \
b40e3958
L
775 r=`${PWD_COMMAND}`; export r; \
776 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
777 AR="$(AR_FOR_BUILD)"; export AR; \
778 AS="$(AS_FOR_BUILD)"; export AS; \
779 CC="$(CC_FOR_BUILD)"; export CC; \
780 CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
10ecffb9 781 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
bba45b8b
NN
782 CXX="$(CXX_FOR_BUILD)"; export CXX; \
783 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
784 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
785 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
786 LD="$(LD_FOR_BUILD)"; export LD; \
787 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
788 NM="$(NM_FOR_BUILD)"; export NM; \
789 RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
790 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
791 echo Configuring in $(BUILD_SUBDIR)/[+module+]; \
792 cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \
793 case $(srcdir) in \
794 /* | [A-Za-z]:[\\/]*) \
795 topdir=$(srcdir) ;; \
796 *) \
797 case "$(BUILD_SUBDIR)" in \
405ea7a0
NN
798 .) topdir="../$(srcdir)" ;; \
799 *) topdir="../../$(srcdir)" ;; \
bba45b8b
NN
800 esac ;; \
801 esac; \
802 if [ "$(srcdir)" = "." ] ; then \
803 if [ "$(BUILD_SUBDIR)" != "." ] ; then \
804 if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
805 if [ -f Makefile ]; then \
806 if $(MAKE) distclean; then \
807 true; \
808 else \
809 exit 1; \
810 fi; \
405ea7a0 811 else \
bba45b8b 812 true; \
405ea7a0 813 fi; \
405ea7a0 814 else \
bba45b8b 815 exit 1; \
405ea7a0 816 fi; \
bba45b8b
NN
817 else \
818 true; \
819 fi; \
820 srcdiroption="--srcdir=."; \
821 libsrcdir="."; \
822 else \
823 srcdiroption="--srcdir=$${topdir}/[+module+]"; \
824 libsrcdir="$$s/[+module+]"; \
825 fi; \
826 rm -f no-such-file || : ; \
827 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
828 $(BUILD_CONFIGARGS) $${srcdiroption} \
829 --with-build-subdir="$(BUILD_SUBDIR)" \
830 || exit 1
15723a45
NN
831
832.PHONY: all-build-[+module+] maybe-all-build-[+module+]
833maybe-all-build-[+module+]:
834all-build-[+module+]: configure-build-[+module+]
b40e3958
L
835 @r=`${PWD_COMMAND}`; export r; \
836 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b 837 (cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all)
e393202e 838[+ ENDFOR build_modules +]
405ea7a0 839
15723a45
NN
840# --------------------------------------
841# Modules which run on the host machine
842# --------------------------------------
3866be5d 843[+ FOR host_modules +]
e2b9e2dc
NN
844.PHONY: configure-[+module+] maybe-configure-[+module+]
845maybe-configure-[+module+]:
e6bfb94a
AO
846configure-[+module+]:
847 @test ! -f [+module+]/Makefile || exit 0; \
848 [ -d [+module+] ] || mkdir [+module+]; \
b40e3958
L
849 r=`${PWD_COMMAND}`; export r; \
850 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
e2b9e2dc
NN
851 CC="$(CC)"; export CC; \
852 CFLAGS="$(CFLAGS)"; export CFLAGS; \
10ecffb9 853 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
e2b9e2dc
NN
854 CXX="$(CXX)"; export CXX; \
855 CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
ec7e0995
NN
856 AR="$(AR)"; export AR; \
857 AS="$(AS)"; export AS; \
858 CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
859 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
860 LD="$(LD)"; export LD; \
861 NM="$(NM)"; export NM; \
862 RANLIB="$(RANLIB)"; export RANLIB; \
863 WINDRES="$(WINDRES)"; export WINDRES; \
864 OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
865 OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
e2b9e2dc
NN
866 echo Configuring in [+module+]; \
867 cd [+module+] || exit 1; \
868 case $(srcdir) in \
869 \.) \
870 srcdiroption="--srcdir=."; \
871 libsrcdir=".";; \
872 /* | [A-Za-z]:[\\/]*) \
873 srcdiroption="--srcdir=$(srcdir)/[+module+]"; \
874 libsrcdir="$$s/[+module+]";; \
875 *) \
876 srcdiroption="--srcdir=../$(srcdir)/[+module+]"; \
877 libsrcdir="$$s/[+module+]";; \
878 esac; \
879 $(SHELL) $${libsrcdir}/configure \
880 $(HOST_CONFIGARGS) $${srcdiroption} \
881 || exit 1
882
930314a4
NN
883.PHONY: all-[+module+] maybe-all-[+module+]
884maybe-all-[+module+]:
db1ac78d 885all-[+module+]: configure-[+module+]
b40e3958
L
886 @r=`${PWD_COMMAND}`; export r; \
887 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
888 $(SET_LIB_PATH) \
889 (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
890 IF with_x
891 +] $(X11_FLAGS_TO_PASS)[+
892 ENDIF with_x +] all)
405ea7a0 893
16ae0395
NN
894.PHONY: check-[+module+] maybe-check-[+module+]
895maybe-check-[+module+]:
3866be5d 896[+ IF no_check +]
3866be5d
NN
897check-[+module+]:
898[+ ELIF no_check_cross +]
3866be5d
NN
899# This module is only tested in a native toolchain.
900check-[+module+]:
7f121bbf 901 @if [ '$(host)' = '$(target)' ] ; then \
b40e3958
L
902 r=`${PWD_COMMAND}`; export r; \
903 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 904 $(SET_LIB_PATH) \
1086bc09 905 (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
3866be5d
NN
906 IF with_x
907 +] $(X11_FLAGS_TO_PASS)[+
bba45b8b
NN
908 ENDIF with_x +] check); \
909 fi
910[+ ELSE check +]
bba45b8b 911check-[+module+]:
b40e3958
L
912 @r=`${PWD_COMMAND}`; export r; \
913 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
914 $(SET_LIB_PATH) \
915 (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
916 IF with_x
917 +] $(X11_FLAGS_TO_PASS)[+
918 ENDIF with_x +] check)
3866be5d 919[+ ENDIF no_check +]
405ea7a0 920
930314a4
NN
921.PHONY: install-[+module+] maybe-install-[+module+]
922maybe-install-[+module+]:
16ae0395 923[+ IF no_install +]
3866be5d
NN
924install-[+module+]:
925[+ ELSE install +]
3866be5d 926install-[+module+]: installdirs
b40e3958
L
927 @r=`${PWD_COMMAND}`; export r; \
928 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
929 $(SET_LIB_PATH) \
930 (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
931 IF with_x
932 +] $(X11_FLAGS_TO_PASS)[+
933 ENDIF with_x +] install)
3866be5d
NN
934[+ ENDIF no_install +]
935[+ ENDFOR host_modules +]
405ea7a0 936
15723a45
NN
937# ---------------------------------------
938# Modules which run on the target machine
939# ---------------------------------------
e393202e 940[+ FOR target_modules +]
930314a4
NN
941.PHONY: configure-target-[+module+] maybe-configure-target-[+module+]
942maybe-configure-target-[+module+]:
15723a45 943
1086bc09
NN
944# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
945$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
9175bfc0 946 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
e6bfb94a 947 rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \
1086bc09 948 cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out
15723a45 949
e6bfb94a
AO
950configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/multilib.out
951 @test ! -f $(TARGET_SUBDIR)/[+module+]/Makefile || exit 0; \
9175bfc0 952 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
b40e3958
L
953 r=`${PWD_COMMAND}`; export r; \
954 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
955 $(SET_LIB_PATH) \
956 AR="$(AR_FOR_TARGET)"; export AR; \
957 AS="$(AS_FOR_TARGET)"; export AS; \
958 CC="$(CC_FOR_TARGET)"; export CC; \
959 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
10ecffb9 960 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
bba45b8b
NN
961 CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \[+
962IF raw_cxx +]
963 CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
964 CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \[+
965ELSE normal_cxx +]
966 CXX="$(CXX_FOR_TARGET)"; export CXX; \[+
967ENDIF raw_cxx +]
968 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
969 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
970 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
971 LD="$(LD_FOR_TARGET)"; export LD; \
972 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
973 NM="$(NM_FOR_TARGET)"; export NM; \
974 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
975 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
976 echo Configuring in $(TARGET_SUBDIR)/[+module+]; \
977 cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \
978 case $(srcdir) in \
979 /* | [A-Za-z]:[\\/]*) \
980 topdir=$(srcdir) ;; \
981 *) \
982 case "$(TARGET_SUBDIR)" in \
405ea7a0
NN
983 .) topdir="../$(srcdir)" ;; \
984 *) topdir="../../$(srcdir)" ;; \
bba45b8b
NN
985 esac ;; \
986 esac; \
987 if [ "$(srcdir)" = "." ] ; then \
988 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
989 if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
990 if [ -f Makefile ]; then \
991 if $(MAKE) distclean; then \
992 true; \
993 else \
994 exit 1; \
995 fi; \
405ea7a0 996 else \
bba45b8b 997 true; \
405ea7a0 998 fi; \
405ea7a0 999 else \
bba45b8b 1000 exit 1; \
405ea7a0 1001 fi; \
bba45b8b
NN
1002 else \
1003 true; \
1004 fi; \
1005 srcdiroption="--srcdir=."; \
1006 libsrcdir="."; \
1007 else \
1008 srcdiroption="--srcdir=$${topdir}/[+module+]"; \
1009 libsrcdir="$$s/[+module+]"; \
1010 fi; \
1011 rm -f no-such-file || : ; \
1012 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1013 $(TARGET_CONFIGARGS) $${srcdiroption} \
1014 --with-target-subdir="$(TARGET_SUBDIR)" \
1015 || exit 1
405ea7a0 1016
930314a4
NN
1017.PHONY: all-target-[+module+] maybe-all-target-[+module+]
1018maybe-all-target-[+module+]:
15723a45 1019all-target-[+module+]: configure-target-[+module+]
b40e3958
L
1020 @r=`${PWD_COMMAND}`; export r; \
1021 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
1022 $(SET_LIB_PATH) \
1023 (cd $(TARGET_SUBDIR)/[+module+] && \
1024 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
1025 IF raw_cxx
1026 +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
1027 ENDIF raw_cxx
1028 +] all)
16ae0395
NN
1029
1030.PHONY: check-target-[+module+] maybe-check-target-[+module+]
1031maybe-check-target-[+module+]:
3866be5d
NN
1032[+ IF no_check +]
1033# Dummy target for uncheckable module.
3866be5d
NN
1034check-target-[+module+]:
1035[+ ELSE check +]
e393202e 1036check-target-[+module+]:
b40e3958
L
1037 @r=`${PWD_COMMAND}`; export r; \
1038 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
1039 $(SET_LIB_PATH) \
1040 (cd $(TARGET_SUBDIR)/[+module+] && \
1041 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
1042 IF raw_cxx
1043 +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
1044 ENDIF raw_cxx
1045 +] check)
e393202e 1046[+ ENDIF no_check +]
16ae0395 1047
930314a4
NN
1048.PHONY: install-target-[+module+] maybe-install-target-[+module+]
1049maybe-install-target-[+module+]:
16ae0395 1050[+ IF no_install +]
930314a4
NN
1051# Dummy target for uninstallable.
1052install-target-[+module+]:
1053[+ ELSE install +]
e393202e 1054install-target-[+module+]: installdirs
b40e3958
L
1055 @r=`${PWD_COMMAND}`; export r; \
1056 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
bba45b8b
NN
1057 $(SET_LIB_PATH) \
1058 (cd $(TARGET_SUBDIR)/[+module+] && \
1059 $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
e393202e
NN
1060[+ ENDIF no_install +]
1061[+ ENDFOR target_modules +]
405ea7a0 1062
15723a45
NN
1063# ----------
1064# GCC module
1065# ----------
1066
1067# Unfortunately, while gcc _should_ be a host module,
1068# libgcc is a target module, and gen* programs are
1069# build modules. So GCC is a sort of hybrid.
1070
405ea7a0 1071# gcc is the only module which uses GCC_FLAGS_TO_PASS.
ac7b618e
NN
1072# Don't use shared host config.cache, as it will confuse later
1073# directories; GCC wants slightly different values for some
1074# precious variables. *sigh*
e2b9e2dc
NN
1075.PHONY: configure-gcc maybe-configure-gcc
1076maybe-configure-gcc:
e6bfb94a
AO
1077configure-gcc:
1078 @test ! -f gcc/Makefile || exit 0; \
1079 [ -d gcc ] || mkdir gcc; \
b40e3958
L
1080 r=`${PWD_COMMAND}`; export r; \
1081 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
e2b9e2dc
NN
1082 CC="$(CC)"; export CC; \
1083 CFLAGS="$(CFLAGS)"; export CFLAGS; \
10ecffb9 1084 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
e2b9e2dc
NN
1085 CXX="$(CXX)"; export CXX; \
1086 CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
586c0873 1087 TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
ec7e0995
NN
1088 AR="$(AR)"; export AR; \
1089 AS="$(AS)"; export AS; \
1090 CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
1091 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
1092 LD="$(LD)"; export LD; \
1093 NM="$(NM)"; export NM; \
1094 RANLIB="$(RANLIB)"; export RANLIB; \
1095 WINDRES="$(WINDRES)"; export WINDRES; \
1096 OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
1097 OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
e2b9e2dc
NN
1098 echo Configuring in gcc; \
1099 cd gcc || exit 1; \
1100 case $(srcdir) in \
1101 \.) \
1102 srcdiroption="--srcdir=."; \
1103 libsrcdir=".";; \
1104 /* | [A-Za-z]:[\\/]*) \
1105 srcdiroption="--srcdir=$(srcdir)/gcc"; \
1106 libsrcdir="$$s/gcc";; \
1107 *) \
1108 srcdiroption="--srcdir=../$(srcdir)/gcc"; \
1109 libsrcdir="$$s/gcc";; \
1110 esac; \
1111 $(SHELL) $${libsrcdir}/configure \
bb5dca17 1112 $(HOST_CONFIGARGS) $${srcdiroption} \
e2b9e2dc
NN
1113 || exit 1
1114
b72e6a2d
JM
1115# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
1116# causes trouble. This wart will be fixed eventually by moving
db1ac78d 1117# the bootstrap behavior to this file.
930314a4
NN
1118.PHONY: all-gcc maybe-all-gcc
1119maybe-all-gcc:
db1ac78d 1120all-gcc: configure-gcc
b72e6a2d 1121 @if [ -f gcc/stage_last ] ; then \
b40e3958
L
1122 r=`${PWD_COMMAND}`; export r; \
1123 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
b72e6a2d 1124 $(SET_LIB_PATH) \
1086bc09 1125 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
db1ac78d 1126 else \
b40e3958
L
1127 r=`${PWD_COMMAND}`; export r; \
1128 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 1129 $(SET_LIB_PATH) \
1086bc09 1130 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
405ea7a0
NN
1131 fi
1132
1133# Building GCC uses some tools for rebuilding "source" files
1134# like texinfo, bison/byacc, etc. So we must depend on those.
1135#
1136# While building GCC, it may be necessary to run various target
1137# programs like the assembler, linker, etc. So we depend on
1138# those too.
1139#
1140# In theory, on an SMP all those dependencies can be resolved
1141# in parallel.
1142#
5b474aa8
DD
1143GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
1144.PHONY: $(GCC_STRAP_TARGETS)
1145$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
b40e3958
L
1146 @r=`${PWD_COMMAND}`; export r; \
1147 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0
NN
1148 $(SET_LIB_PATH) \
1149 echo "Bootstrapping the compiler"; \
1150 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
b40e3958
L
1151 @r=`${PWD_COMMAND}`; export r; \
1152 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0
NN
1153 case "$@" in \
1154 *bootstrap4-lean ) \
bba45b8b
NN
1155 msg="Comparing stage3 and stage4 of the compiler"; \
1156 compare=compare3-lean ;; \
1157 *bootstrap4 ) \
1158 msg="Comparing stage3 and stage4 of the compiler"; \
1159 compare=compare3 ;; \
1160 *-lean ) \
1161 msg="Comparing stage2 and stage3 of the compiler"; \
1162 compare=compare-lean ;; \
1163 * ) \
1164 msg="Comparing stage2 and stage3 of the compiler"; \
1165 compare=compare ;; \
405ea7a0
NN
1166 esac; \
1167 $(SET_LIB_PATH) \
1168 echo "$$msg"; \
1169 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
b40e3958
L
1170 @r=`${PWD_COMMAND}`; export r; \
1171 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
405ea7a0
NN
1172 $(SET_LIB_PATH) \
1173 echo "Building runtime libraries"; \
1174 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
1175
ec7e0995 1176profiledbootstrap: all-bootstrap configure-gcc
b40e3958
L
1177 @r=`${PWD_COMMAND}`; export r; \
1178 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
ec7e0995
NN
1179 $(SET_LIB_PATH) \
1180 echo "Bootstrapping the compiler"; \
1181 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
b40e3958
L
1182 @r=`${PWD_COMMAND}`; export r; \
1183 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
ec7e0995
NN
1184 $(SET_LIB_PATH) \
1185 echo "Building runtime libraries and training compiler"; \
1186 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
b40e3958
L
1187 @r=`${PWD_COMMAND}`; export r; \
1188 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
ec7e0995
NN
1189 $(SET_LIB_PATH) \
1190 echo "Building feedback based compiler"; \
1191 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
1192
405ea7a0
NN
1193.PHONY: cross
1194cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
b40e3958
L
1195 @r=`${PWD_COMMAND}`; export r; \
1196 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0
NN
1197 $(SET_LIB_PATH) \
1198 echo "Building the C and C++ compiler"; \
1199 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
b40e3958
L
1200 @r=`${PWD_COMMAND}`; export r; \
1201 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
405ea7a0
NN
1202 $(SET_LIB_PATH) \
1203 echo "Building runtime libraries"; \
1204 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
1205 LANGUAGES="c c++" all
1206
8945c6bb 1207.PHONY: check-gcc maybe-check-gcc
44482353 1208maybe-check-gcc:
405ea7a0
NN
1209check-gcc:
1210 @if [ -f ./gcc/Makefile ] ; then \
b40e3958
L
1211 r=`${PWD_COMMAND}`; export r; \
1212 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 1213 $(SET_LIB_PATH) \
1086bc09 1214 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
405ea7a0
NN
1215 else \
1216 true; \
1217 fi
1218
7d695d07
JM
1219.PHONY: check-gcc-c++
1220check-gcc-c++:
405ea7a0 1221 @if [ -f ./gcc/Makefile ] ; then \
b40e3958
L
1222 r=`${PWD_COMMAND}`; export r; \
1223 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 1224 $(SET_LIB_PATH) \
1086bc09 1225 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
405ea7a0
NN
1226 else \
1227 true; \
7d695d07
JM
1228 fi
1229
1230.PHONY: check-c++
ede4fbe4 1231check-c++: check-target-libstdc++-v3 check-gcc-c++
405ea7a0 1232
930314a4
NN
1233.PHONY: install-gcc maybe-install-gcc
1234maybe-install-gcc:
405ea7a0
NN
1235install-gcc:
1236 @if [ -f ./gcc/Makefile ] ; then \
b40e3958
L
1237 r=`${PWD_COMMAND}`; export r; \
1238 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
405ea7a0 1239 $(SET_LIB_PATH) \
1086bc09 1240 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
405ea7a0
NN
1241 else \
1242 true; \
1243 fi
1244
15723a45
NN
1245# Install the gcc headers files, but not the fixed include files,
1246# which Cygnus is not allowed to distribute. This rule is very
1247# dependent on the workings of the gcc Makefile.in.
1248.PHONY: gcc-no-fixedincludes
1249gcc-no-fixedincludes:
1250 @if [ -f ./gcc/Makefile ]; then \
1251 rm -rf gcc/tmp-include; \
1252 mv gcc/include gcc/tmp-include 2>/dev/null; \
1253 mkdir gcc/include; \
1254 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1255 touch gcc/stmp-fixinc gcc/include/fixed; \
1256 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
b40e3958
L
1257 r=`${PWD_COMMAND}`; export r; \
1258 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
15723a45 1259 $(SET_LIB_PATH) \
1086bc09 1260 (cd ./gcc && \
15723a45
NN
1261 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1262 rm -rf gcc/include; \
1263 mv gcc/tmp-include gcc/include 2>/dev/null; \
1264 else true; fi
1265
ae831be5
NN
1266# --------------------------------------
1267# Dependencies between different modules
1268# --------------------------------------
405ea7a0 1269
ae831be5
NN
1270# There are two types of dependencies here: 'hard' dependencies, where one
1271# module simply won't build without the other; and 'soft' dependencies, where
1272# if the depended-on module is missing, the depending module will do without
1273# or find a substitute somewhere (perhaps installed). Soft dependencies
1274# are specified by depending on a 'maybe-' target. If you're not sure,
1275# it's safer to use a soft dependency.
1276
1277# Host modules specific to gcc.
e2b9e2dc 1278# GCC needs to identify certain tools.
e5c3f801
NN
1279# GCC also needs the information exported by the intl configure script.
1280configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
1281all-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
1282# This is a slightly kludgy method of getting dependencies on
1283# all-build-libiberty correct; it would be better to build it every time.
1284all-gcc: maybe-all-build-libiberty
e5c3f801 1285all-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
1286
1287# Host modules specific to gdb.
e2b9e2dc 1288# GDB needs to know that the simulator is being built.
8f32e830 1289configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
ae831be5
NN
1290GDB_TK = @GDB_TK@
1291all-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)
1292install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
59da4fe6 1293configure-libgui: maybe-configure-tcl maybe-configure-tk
ae831be5
NN
1294all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
1295
1296# Host modules specific to binutils.
b4a77b47 1297configure-bfd: configure-libiberty
930314a4
NN
1298all-bfd: maybe-all-libiberty maybe-all-intl
1299all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
ae831be5
NN
1300# We put install-opcodes before install-binutils because the installed
1301# binutils might be on PATH, and they might need the shared opcodes
1302# library.
1303install-binutils: maybe-install-opcodes
cf662e21
AJ
1304# libopcodes depends on libbfd
1305install-opcodes: maybe-install-bfd
ae831be5
NN
1306all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
1307all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
1308all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
1309all-opcodes: maybe-all-bfd maybe-all-libiberty
1310
1311# Other host modules in the 'src' repository.
930314a4 1312all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
b4a77b47 1313configure-expect: maybe-configure-tcl maybe-configure-tk
930314a4 1314all-expect: maybe-all-tcl maybe-all-tk
b4a77b47 1315configure-itcl: maybe-configure-tcl maybe-configure-tk
ae831be5
NN
1316all-itcl: maybe-all-tcl maybe-all-tk
1317# We put install-tcl before install-itcl because itcl wants to run a
1318# program on installation which uses the Tcl libraries.
1319install-itcl: maybe-install-tcl
122bfa92 1320all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk
ae831be5 1321install-sid: maybe-install-tcl maybe-install-tk
a36d530e 1322all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
b4a77b47 1323configure-tk: maybe-configure-tcl
ae831be5 1324all-tk: maybe-all-tcl
b4a77b47 1325configure-tix: maybe-configure-tcl maybe-configure-tk
ae831be5
NN
1326all-tix: maybe-all-tcl maybe-all-tk
1327all-texinfo: maybe-all-libiberty
1328
1329# Other host modules. Warning, these are not well tested.
1330all-autoconf: maybe-all-m4 maybe-all-texinfo
1331all-automake: maybe-all-m4 maybe-all-texinfo
1332all-bison: maybe-all-texinfo
1333all-diff: maybe-all-libiberty
1334all-fastjar: maybe-all-zlib maybe-all-libiberty
930314a4
NN
1335all-fileutils: maybe-all-libiberty
1336all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
930314a4
NN
1337all-gzip: maybe-all-libiberty
1338all-hello: maybe-all-libiberty
930314a4 1339all-m4: maybe-all-libiberty maybe-all-texinfo
b9abda6a 1340all-make: maybe-all-libiberty maybe-all-intl
930314a4
NN
1341all-patch: maybe-all-libiberty
1342all-prms: maybe-all-libiberty
930314a4
NN
1343all-recode: maybe-all-libiberty
1344all-sed: maybe-all-libiberty
1345all-send-pr: maybe-all-prms
930314a4 1346all-tar: maybe-all-libiberty
930314a4 1347all-uudecode: maybe-all-libiberty
ae831be5
NN
1348
1349ALL_GCC = maybe-all-gcc
1350ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
1351ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
1352
1353# Target modules specific to gcc.
b4a77b47
DD
1354configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
1355configure-target-fastjar: maybe-configure-target-zlib
930314a4 1356all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
b4a77b47 1357configure-target-libf2c: $(ALL_GCC_C)
ae831be5 1358all-target-libf2c: maybe-all-target-libiberty
b4a77b47
DD
1359configure-target-libffi: $(ALL_GCC_C)
1360configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
ae831be5 1361all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
b4a77b47 1362configure-target-libobjc: $(ALL_GCC_C)
ae831be5 1363all-target-libobjc: maybe-all-target-libiberty
b4a77b47 1364configure-target-libstdc++-v3: $(ALL_GCC_C)
ae831be5 1365all-target-libstdc++-v3: maybe-all-target-libiberty
b4a77b47 1366configure-target-zlib: $(ALL_GCC_C)
a9590527 1367
ae831be5 1368# Target modules in the 'src' repository.
b4a77b47
DD
1369configure-target-examples: $(ALL_GCC_C)
1370configure-target-libgloss: $(ALL_GCC)
ae831be5 1371all-target-libgloss: maybe-configure-target-newlib
3a12db16 1372configure-target-libiberty: $(ALL_GCC)
b4a77b47
DD
1373configure-target-libtermcap: $(ALL_GCC_C)
1374configure-target-newlib: $(ALL_GCC)
7dda0df6 1375configure-target-rda: $(ALL_GCC_C)
b4a77b47 1376configure-target-winsup: $(ALL_GCC_C)
ae831be5 1377all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
a9590527 1378
ae831be5 1379# Other target modules. Warning, these are not well tested.
b4a77b47 1380configure-target-gperf: $(ALL_GCC_CXX)
ae831be5 1381all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
b4a77b47 1382configure-target-qthreads: $(ALL_GCC_C)
907a7241 1383
930314a4
NN
1384# Dependencies of maybe-foo on foo. These are used because, for example,
1385# all-gcc only depends on all-gas if gas is present and being configured.
1386@maybe_dependencies@
1387
a2cc058a
NN
1388# Serialization dependencies. Host configures don't work well in parallel to
1389# each other, due to contention over config.cache. Target configures and
1390# build configures are similar.
1391@serialization_dependencies@
1392
15723a45
NN
1393# --------------------------------
1394# Regenerating top level configury
1395# --------------------------------
405ea7a0 1396
1086bc09
NN
1397# Multilib.out tells target dirs what multilibs they should build.
1398# There is really only one copy. We use the 'timestamp' method to
1399# work around various timestamp bugs on some systems.
1400# We use move-if-change so that it's only considered updated when it
1401# actually changes, because it has to depend on a phony target.
e6bfb94a 1402multilib.out: maybe-all-gcc
b40e3958 1403 @r=`${PWD_COMMAND}`; export r; \
1086bc09
NN
1404 echo "Checking multilib configuration..."; \
1405 $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
1406 $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
1086bc09 1407
405ea7a0 1408# Rebuilding Makefile.in, using autogen.
43be203f 1409AUTOGEN = autogen
6b784d9f 1410$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
43be203f 1411 cd $(srcdir) && $(AUTOGEN) Makefile.def
405ea7a0 1412
a0da8069 1413# Rebuilding Makefile.
43be203f
AO
1414Makefile: $(srcdir)/Makefile.in config.status
1415 CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
1416
1417config.status: configure $(gcc_version_trigger)
10ecffb9 1418 CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck
405ea7a0 1419
a0da8069 1420# Rebuilding configure.
43be203f 1421AUTOCONF = autoconf
6b784d9f 1422$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4
43be203f 1423 cd $(srcdir) && $(AUTOCONF)
405ea7a0 1424
3728fade
NN
1425# ------------------------------
1426# Special directives to GNU Make
1427# ------------------------------
1428
3728fade
NN
1429# Don't pass command-line variables to submakes.
1430.NOEXPORT:
1431MAKEOVERRIDES=
1432
405ea7a0 1433# end of Makefile.in
This page took 0.158243 seconds and 4 git commands to generate.