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