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