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