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