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