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