* configure.in (gxx_include_dir): Change to match versioned
[deliverable/binutils-gdb.git] / Makefile.in
CommitLineData
252b5132
RH
1#
2# Makefile for directory with subdirs to build.
5cec67bf 3# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
d5de0a84 4# 1999, 2000, 2001, 2002 Free Software Foundation
252b5132
RH
5#
6# This file is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19#
20
80413487 21# Tell GNU make 3.79 not to run the top level in parallel. This
3daeddf6
RH
22# prevents contention for $builddir/$target/config.cache, as well
23# as minimizing scatter in file system caches.
80413487
RH
24NOTPARALLEL = .NOTPARALLEL
25$(NOTPARALLEL):
3daeddf6 26
252b5132
RH
27srcdir = .
28
29prefix = /usr/local
30exec_prefix = $(prefix)
31
32bindir=${exec_prefix}/bin
33sbindir=${exec_prefix}/sbin
34libexecdir=${exec_prefix}/libexec
35datadir=${prefix}/share
36sysconfdir=${prefix}/etc
37sharedstatedir=${prefix}/com
38localstatedir=${prefix}/var
39libdir=${exec_prefix}/lib
40includedir=${prefix}/include
41oldincludedir=/usr/include
42infodir=${prefix}/info
43mandir=${prefix}/man
44gxx_include_dir=${includedir}/g++
45
ba73c63f
JM
46tooldir = $(exec_prefix)/$(target_alias)
47build_tooldir = $(exec_prefix)/$(target_alias)
252b5132
RH
48
49program_transform_name =
50
51man1dir = $(mandir)/man1
52man2dir = $(mandir)/man2
53man3dir = $(mandir)/man3
54man4dir = $(mandir)/man4
55man5dir = $(mandir)/man5
56man6dir = $(mandir)/man6
57man7dir = $(mandir)/man7
58man8dir = $(mandir)/man8
59man9dir = $(mandir)/man9
60infodir = $(prefix)/info
61includedir = $(prefix)/include
62# Directory in which the compiler finds executables, libraries, etc.
63libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
64GDB_NLM_DEPS =
65
66SHELL = /bin/sh
67
d5de0a84
NC
68# pwd command to use. Allow user to override default by setting PWDCMD in
69# the environment to account for automounters. The make variable must not
70# be called PWDCMD, otherwise the value set here is passed to make
71# subprocesses and overrides the setting from the user's environment.
72PWD = $${PWDCMD-pwd}
73
252b5132
RH
74# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
75# cygwin host.
76INSTALL_PROGRAM_ARGS =
77
78INSTALL = $(SHELL) $$s/install-sh -c
79INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
80INSTALL_SCRIPT = $(INSTALL)
81INSTALL_DATA = $(INSTALL) -m 644
82
83INSTALL_DOSREL = install-dosrel-fake
84
85AS = as
86AR = ar
87AR_FLAGS = rc
88CC = cc
89
90# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
91# here so that they can be overridden by Makefile fragments.
92HOST_CC = $(CC_FOR_BUILD)
27f15fdd
DD
93BUILD_PREFIX =
94BUILD_PREFIX_1 = loser-
252b5132
RH
95
96# These flag values are normally overridden by the configure script.
97CFLAGS = -g
98CXXFLAGS = -g -O2
99
c363de44 100LDFLAGS =
252b5132 101LIBCFLAGS = $(CFLAGS)
75205f78 102CFLAGS_FOR_BUILD = $(CFLAGS)
6c5e141a
DD
103# During gcc bootstrap, if we use some random cc for stage1 then
104# CFLAGS will be just -g. We want to ensure that TARGET libraries
105# (which we know are built with gcc) are built with optimizations so
106# prepend -O2 when setting CFLAGS_FOR_TARGET.
107CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
252b5132
RH
108LDFLAGS_FOR_TARGET =
109LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
110PICFLAG =
111PICFLAG_FOR_TARGET =
112
252b5132
RH
113CXX = c++
114
115# Use -O2 to stress test the compiler.
ba73c63f 116LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
252b5132 117CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
ba73c63f 118LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
252b5132 119
252b5132
RH
120DLLTOOL = dlltool
121WINDRES = windres
122
123NM = nm
124
125LD = ld
126
c376f4ed 127BZIPPROG = bzip2
b35ece4e 128MD5PROG = md5sum
252b5132
RH
129
130# These values are substituted by configure.
131DEFAULT_YACC = yacc
132DEFAULT_LEX = lex
133DEFAULT_M4 = m4
134
135BISON = `if [ -f $$r/bison/bison ] ; then \
136 echo $$r/bison/bison -L $$s/bison/ ; \
137 else \
138 echo bison ; \
139 fi`
140
141YACC = `if [ -f $$r/bison/bison ] ; then \
142 echo $$r/bison/bison -y -L $$s/bison/ ; \
143 elif [ -f $$r/byacc/byacc ] ; then \
144 echo $$r/byacc/byacc ; \
145 else \
146 echo ${DEFAULT_YACC} ; \
147 fi`
148
149LEX = `if [ -f $$r/flex/flex ] ; \
150 then echo $$r/flex/flex ; \
151 else echo ${DEFAULT_LEX} ; fi`
152
153M4 = `if [ -f $$r/m4/m4 ] ; \
154 then echo $$r/m4/m4 ; \
155 else echo ${DEFAULT_M4} ; fi`
156
f08fa01d
HPN
157# For an installed makeinfo, we require it to be from texinfo 4 or
158# higher, else we use the "missing" dummy.
081ff160 159MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
252b5132 160 then echo $$r/texinfo/makeinfo/makeinfo ; \
f08fa01d
HPN
161 else if (makeinfo --version \
162 | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \
163 then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
252b5132
RH
164
165# This just becomes part of the MAKEINFO definition passed down to
166# sub-makes. It lets flags be given on the command line while still
167# using the makeinfo from the object tree.
168MAKEINFOFLAGS =
169
170EXPECT = `if [ -f $$r/expect/expect ] ; \
171 then echo $$r/expect/expect ; \
172 else echo expect ; fi`
173
174RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
175 then echo $$s/dejagnu/runtest ; \
176 else echo runtest ; fi`
177
178
179# compilers to use to create programs which must be run in the build
180# environment.
181CC_FOR_BUILD = $(CC)
182CXX_FOR_BUILD = $(CXX)
183
184SUBDIRS = "this is set via configure, don't edit this"
185OTHERS =
186
187# This is set by the configure script to the list of directories which
188# should be built using the target tools.
e3b0c936 189TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib winsup opcodes bsp libstub cygmon libf2c libobjc
252b5132
RH
190
191# Target libraries are put under this directory:
192# Changed by configure to $(target_alias) if cross.
193TARGET_SUBDIR = .
194
49b7683b
DD
195BUILD_CONFIGDIRS = libiberty
196BUILD_SUBDIR = .
197
198# This is set by the configure script to the arguments to use when configuring
199# directories built for the target.
200TARGET_CONFIGARGS =
201
202# This is set by the configure script to the arguments to use when configuring
203# directories built for the build system.
204BUILD_CONFIGARGS =
252b5132
RH
205
206# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
207# was used.
208SET_LIB_PATH =
209
210# This is the name of the environment variable used for the path to
211# the libraries. This may be changed by configure.in.
212RPATH_ENVVAR = LD_LIBRARY_PATH
213
0da52010
AO
214# This is the list of directories that may be needed in RPATH_ENVVAR
215# so that programs built for the host machine work.
216HOST_LIB_PATH = $$r/bfd:$$r/opcodes
217
218# This is the list of directories that may be needed in RPATH_ENVVAR
219# so that prorgams built for the target machine work.
75205f78 220TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
0da52010 221
252b5132 222# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
0da52010
AO
223# Some platforms don't like blank entries, so we remove duplicate,
224# leading and trailing colons.
252b5132 225REALLY_SET_LIB_PATH = \
0da52010 226 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
252b5132
RH
227
228ALL = all.normal
229INSTALL_TARGET = installdirs \
230 install-gcc \
231 $(INSTALL_MODULES) \
232 $(INSTALL_TARGET_MODULES) \
233 $(INSTALL_X11_MODULES) \
234 $(INSTALL_DOSREL)
235
236INSTALL_TARGET_CROSS = installdirs \
237 install-gcc-cross \
238 $(INSTALL_MODULES) \
239 $(INSTALL_TARGET_MODULES) \
240 $(INSTALL_X11_MODULES) \
241 $(INSTALL_DOSREL)
242
9e449d3e
AO
243# Should be substed by configure.in
244FLAGS_FOR_TARGET =
245CC_FOR_TARGET =
9e449d3e 246CXX_FOR_TARGET =
dec0cb0c 247CXX_FOR_TARGET_FOR_RECURSIVE_MAKE =
75205f78 248GCJ_FOR_TARGET =
252b5132 249
9e449d3e 250# If GCC_FOR_TARGET is not overriden on the command line, then this
252b5132
RH
251# variable is passed down to the gcc Makefile, where it is used to
252# build libgcc2.a. We define it here so that it can itself be
253# overridden on the command line.
5cec67bf 254GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
252b5132
RH
255
256AS_FOR_TARGET = ` \
257 if [ -f $$r/gas/as-new ] ; then \
258 echo $$r/gas/as-new ; \
dc70af01
AO
259 elif [ -f $$r/gcc/xgcc ]; then \
260 $(CC_FOR_TARGET) -print-prog-name=as ; \
252b5132 261 else \
3f152009 262 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
263 echo $(AS); \
264 else \
265 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
266 fi; \
267 fi`
268
269LD_FOR_TARGET = ` \
270 if [ -f $$r/ld/ld-new ] ; then \
271 echo $$r/ld/ld-new ; \
dc70af01
AO
272 elif [ -f $$r/gcc/xgcc ]; then \
273 $(CC_FOR_TARGET) -print-prog-name=ld ; \
252b5132 274 else \
3f152009 275 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
276 echo $(LD); \
277 else \
278 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
279 fi; \
280 fi`
281
282DLLTOOL_FOR_TARGET = ` \
283 if [ -f $$r/binutils/dlltool ] ; then \
284 echo $$r/binutils/dlltool ; \
285 else \
3f152009 286 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
287 echo $(DLLTOOL); \
288 else \
289 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
290 fi; \
291 fi`
292
293WINDRES_FOR_TARGET = ` \
294 if [ -f $$r/binutils/windres ] ; then \
295 echo $$r/binutils/windres ; \
296 else \
3f152009 297 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
298 echo $(WINDRES); \
299 else \
300 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
301 fi; \
302 fi`
303
304AR_FOR_TARGET = ` \
305 if [ -f $$r/binutils/ar ] ; then \
306 echo $$r/binutils/ar ; \
307 else \
3f152009 308 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
309 echo $(AR); \
310 else \
311 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
312 fi; \
313 fi`
314
315RANLIB_FOR_TARGET = ` \
316 if [ -f $$r/binutils/ranlib ] ; then \
317 echo $$r/binutils/ranlib ; \
318 else \
3f152009
AO
319 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
320 if [ x'$(RANLIB)' != x ]; then \
321 echo $(RANLIB); \
322 else \
323 echo ranlib; \
324 fi; \
252b5132
RH
325 else \
326 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
327 fi; \
328 fi`
329
330NM_FOR_TARGET = ` \
331 if [ -f $$r/binutils/nm-new ] ; then \
332 echo $$r/binutils/nm-new ; \
dc70af01
AO
333 elif [ -f $$r/gcc/xgcc ]; then \
334 $(CC_FOR_TARGET) -print-prog-name=nm ; \
252b5132 335 else \
3f152009 336 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
337 echo $(NM); \
338 else \
339 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
340 fi; \
341 fi`
342
343# The first rule in the file had better be this one. Don't put any above it.
344# This lives here to allow makefile fragments to contain dependencies.
345all: all.normal
346.PHONY: all
347
348# These can be overridden by config/mt-*.
349# The _TARGET_ is because they're specified in mt-foo.
350# The _HOST_ is because they're programs that run on the host.
351EXTRA_TARGET_HOST_ALL_MODULES =
352EXTRA_TARGET_HOST_INSTALL_MODULES =
353EXTRA_TARGET_HOST_CHECK_MODULES =
354
355#### host and target specific makefile fragments come in here.
356###
357
358# Flags to pass down to all sub-makes.
359# Please keep these in alphabetical order.
360BASE_FLAGS_TO_PASS = \
361 "AR_FLAGS=$(AR_FLAGS)" \
362 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
363 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
364 "BISON=$(BISON)" \
365 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
366 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
367 "CFLAGS=$(CFLAGS)" \
368 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
75205f78 369 "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
252b5132
RH
370 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
371 "CXXFLAGS=$(CXXFLAGS)" \
372 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
373 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
374 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
375 "INSTALL=$(INSTALL)" \
376 "INSTALL_DATA=$(INSTALL_DATA)" \
377 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
378 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
379 "LDFLAGS=$(LDFLAGS)" \
380 "LEX=$(LEX)" \
381 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
382 "LIBCFLAGS=$(LIBCFLAGS)" \
383 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
384 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
385 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
386 "M4=$(M4)" \
387 "MAKE=$(MAKE)" \
388 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
389 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
390 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
391 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
392 "SHELL=$(SHELL)" \
393 "EXPECT=$(EXPECT)" \
394 "RUNTEST=$(RUNTEST)" \
395 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
396 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
397 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
398 "YACC=$(YACC)" \
399 "bindir=$(bindir)" \
400 "datadir=$(datadir)" \
401 "exec_prefix=$(exec_prefix)" \
402 "includedir=$(includedir)" \
403 "infodir=$(infodir)" \
404 "libdir=$(libdir)" \
405 "libexecdir=$(libexecdir)" \
406 "lispdir=$(lispdir)" \
75205f78
DD
407 "libstdcxx_incdir=$(libstdcxx_incdir)" \
408 "libsubdir=$(libsubdir)" \
252b5132
RH
409 "localstatedir=$(localstatedir)" \
410 "mandir=$(mandir)" \
411 "oldincludedir=$(oldincludedir)" \
412 "prefix=$(prefix)" \
413 "sbindir=$(sbindir)" \
414 "sharedstatedir=$(sharedstatedir)" \
415 "sysconfdir=$(sysconfdir)" \
416 "tooldir=$(tooldir)" \
ba73c63f 417 "build_tooldir=$(build_tooldir)" \
252b5132
RH
418 "gxx_include_dir=$(gxx_include_dir)" \
419 "gcc_version=$(gcc_version)" \
420 "gcc_version_trigger=$(gcc_version_trigger)" \
75205f78 421 "target_alias=$(target_alias)"
252b5132 422
dec0cb0c
AO
423# For any flags above that may contain shell code that varies from one
424# target library to another. When doing recursive invocations of the
425# top-level Makefile, we don't want the outer make to evaluate them,
426# so we pass these variables down unchanged. They must not contain
427# single nor double quotes.
428RECURSE_FLAGS = \
429 CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)'
430
252b5132
RH
431# Flags to pass down to most sub-makes, in which we're building with
432# the host environment.
433# If any variables are added here, they must be added to do-*, below.
434EXTRA_HOST_FLAGS = \
435 'AR=$(AR)' \
436 'AS=$(AS)' \
437 'CC=$(CC)' \
438 'CXX=$(CXX)' \
439 'DLLTOOL=$(DLLTOOL)' \
440 'LD=$(LD)' \
441 'NM=$(NM)' \
75205f78 442 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
443 'WINDRES=$(WINDRES)'
444
445FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
446
447# Flags that are concerned with the location of the X11 include files
448# and library files
449#
450# NOTE: until the top-level is getting the values via autoconf, it only
451# causes problems to have this top-level Makefile overriding the autoconf-set
452# values in child directories. Only variables that don't conflict with
453# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
454#
455X11_FLAGS_TO_PASS = \
456 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
457 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
458
459# Flags to pass down to makes which are built with the target environment.
460# The double $ decreases the length of the command line; the variables
461# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
462# If any variables are added here, they must be added to do-*, below.
463EXTRA_TARGET_FLAGS = \
464 'AR=$$(AR_FOR_TARGET)' \
465 'AS=$$(AS_FOR_TARGET)' \
466 'CC=$$(CC_FOR_TARGET)' \
467 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
468 'CXX=$$(CXX_FOR_TARGET)' \
469 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
470 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
471 'LD=$$(LD_FOR_TARGET)' \
472 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
473 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
474 'NM=$$(NM_FOR_TARGET)' \
475 'RANLIB=$$(RANLIB_FOR_TARGET)' \
476 'WINDRES=$$(WINDRES_FOR_TARGET)'
477
478TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
479
480# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
481# unfortunately needs the native compiler and the target ar and
482# ranlib.
483# If any variables are added here, they must be added to do-*, below.
484# The HOST_* variables are a special case, which are used for the gcc
485# cross-building scheme.
486EXTRA_GCC_FLAGS = \
487 'AR=$(AR)' \
488 'AS=$(AS)' \
489 'CC=$(CC)' \
490 'CXX=$(CXX)' \
491 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
492 'HOST_CC=$(CC_FOR_BUILD)' \
27f15fdd
DD
493 'BUILD_PREFIX=$(BUILD_PREFIX)' \
494 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
252b5132 495 'NM=$(NM)' \
75205f78 496 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
497 'WINDRES=$$(WINDRES_FOR_TARGET)' \
498 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
75205f78 499 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
252b5132
RH
500 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
501 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
502 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
503 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
504 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
505 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
506 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
75205f78 507 "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
508 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
509
510GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
511
49b7683b
DD
512# This is a list of the targets for all of the modules which are compiled
513# using the build machine's native compiler. Configure edits the second
514# macro for build!=host builds.
515ALL_BUILD_MODULES_LIST = \
516 all-build-libiberty
517ALL_BUILD_MODULES =
518
519# This is a list of the configure targets for all of the modules which
520# are compiled using the native tools.
521CONFIGURE_BUILD_MODULES = \
522 configure-build-libiberty
523
252b5132
RH
524# This is a list of the targets for all of the modules which are compiled
525# using $(FLAGS_TO_PASS).
526ALL_MODULES = \
252b5132
RH
527 all-ash \
528 all-autoconf \
529 all-automake \
530 all-bash \
531 all-bfd \
532 all-binutils \
533 all-bison \
534 all-byacc \
535 all-bzip2 \
252b5132
RH
536 all-db \
537 all-dejagnu \
538 all-diff \
539 all-dosutils \
540 all-etc \
75205f78 541 all-fastjar \
252b5132
RH
542 all-fileutils \
543 all-findutils \
544 all-find \
545 all-flex \
546 all-gas \
547 all-gawk \
548 all-gettext \
549 all-gnuserv \
550 all-gprof \
551 all-grep \
552 all-grez \
553 all-gzip \
554 all-hello \
555 all-indent \
252b5132 556 all-intl \
252b5132
RH
557 all-itcl \
558 all-ld \
559 all-libgui \
560 all-libiberty \
561 all-libtool \
562 all-m4 \
563 all-make \
564 all-mmalloc \
565 all-opcodes \
566 all-patch \
567 all-perl \
568 all-prms \
569 all-rcs \
570 all-readline \
571 all-release \
572 all-recode \
573 all-sed \
574 all-send-pr \
575 all-shellutils \
8817b92e 576 all-sid \
252b5132 577 all-sim \
ba73c63f 578 all-snavigator \
252b5132
RH
579 all-tar \
580 all-tcl \
252b5132
RH
581 all-texinfo \
582 all-textutils \
252b5132
RH
583 all-time \
584 all-uudecode \
585 all-wdiff \
586 all-zip \
5cec67bf 587 all-zlib \
252b5132
RH
588 $(EXTRA_TARGET_HOST_ALL_MODULES)
589
590# This is a list of the check targets for all of the modules which are
591# compiled using $(FLAGS_TO_PASS).
592#
593# The list is in two parts. The first lists those tools which
594# are tested as part of the host's native tool-chain, and not
595# tested in a cross configuration.
596NATIVE_CHECK_MODULES = \
597 check-bison \
598 check-byacc \
75205f78 599 check-fastjar \
252b5132
RH
600 check-flex \
601 check-zip
602
603CROSS_CHECK_MODULES = \
252b5132
RH
604 check-ash \
605 check-autoconf \
606 check-automake \
607 check-bash \
608 check-bfd \
609 check-binutils \
610 check-bzip2 \
252b5132
RH
611 check-db \
612 check-dejagnu \
613 check-diff \
614 check-etc \
615 check-fileutils \
616 check-findutils \
617 check-find \
618 check-gas \
619 check-gawk \
620 check-gettext \
621 check-gnuserv \
622 check-gprof \
623 check-grep \
624 check-gzip \
625 check-hello \
626 check-indent \
252b5132 627 check-intl \
252b5132
RH
628 check-itcl \
629 check-ld \
630 check-libgui \
631 check-libiberty \
632 check-libtool \
633 check-m4 \
634 check-make \
635 check-mmcheckoc \
636 check-opcodes \
637 check-patch \
638 check-perl \
639 check-prms \
640 check-rcs \
641 check-readline \
642 check-recode \
643 check-sed \
644 check-send-pr \
645 check-shellutils \
ba73c63f 646 check-snavigator \
8817b92e 647 check-sid \
252b5132
RH
648 check-sim \
649 check-tar \
650 check-tcl \
651 check-texinfo \
652 check-textutils \
252b5132
RH
653 check-time \
654 check-uudecode \
655 check-wdiff \
656 $(EXTRA_TARGET_HOST_CHECK_MODULES)
657
658CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
659
660# This is a list of the install targets for all of the modules which are
661# compiled using $(FLAGS_TO_PASS).
662# We put install-opcodes before install-binutils because the installed
663# binutils might be on PATH, and they might need the shared opcodes
664# library.
665# We put install-tcl before install-itcl because itcl wants to run a
666# program on installation which uses the Tcl libraries.
667INSTALL_MODULES = \
252b5132
RH
668 install-ash \
669 install-autoconf \
670 install-automake \
671 install-bash \
672 install-bfd \
673 install-bzip2 \
674 install-opcodes \
675 install-binutils \
676 install-bison \
677 install-byacc \
252b5132
RH
678 install-db \
679 install-dejagnu \
680 install-diff \
681 install-dosutils \
682 install-etc \
75205f78 683 install-fastjar \
252b5132
RH
684 install-fileutils \
685 install-findutils \
686 install-find \
687 install-flex \
688 install-gas \
689 install-gawk \
690 install-gettext \
691 install-gnuserv \
692 install-gprof \
693 install-grep \
694 install-grez \
695 install-gzip \
696 install-hello \
697 install-indent \
252b5132 698 install-intl \
252b5132 699 install-tcl \
252b5132
RH
700 install-itcl \
701 install-ld \
702 install-libgui \
703 install-libiberty \
704 install-libtool \
705 install-m4 \
706 install-make \
707 install-mmalloc \
708 install-patch \
709 install-perl \
710 install-prms \
711 install-rcs \
712 install-readline \
713 install-recode \
714 install-sed \
715 install-send-pr \
716 install-shellutils \
8817b92e 717 install-sid \
252b5132 718 install-sim \
ba73c63f 719 install-snavigator \
252b5132 720 install-tar \
252b5132 721 install-textutils \
252b5132
RH
722 install-time \
723 install-uudecode \
724 install-wdiff \
725 install-zip \
726 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
727
728# This is a list of the targets for all of the modules which are compiled
729# using $(X11_FLAGS_TO_PASS).
730ALL_X11_MODULES = \
252b5132
RH
731 all-gdb \
732 all-expect \
252b5132
RH
733 all-guile \
734 all-tclX \
735 all-tk \
252b5132
RH
736 all-tix
737
738# This is a list of the check targets for all of the modules which are
739# compiled using $(X11_FLAGS_TO_PASS).
740CHECK_X11_MODULES = \
252b5132
RH
741 check-gdb \
742 check-guile \
743 check-expect \
252b5132
RH
744 check-tclX \
745 check-tk \
746 check-tix
747
748# This is a list of the install targets for all the modules which are
749# compiled using $(X11_FLAGS_TO_PASS).
750INSTALL_X11_MODULES = \
252b5132
RH
751 install-gdb \
752 install-guile \
753 install-expect \
252b5132
RH
754 install-tclX \
755 install-tk \
252b5132
RH
756 install-tix
757
758# This is a list of the targets for all of the modules which are compiled
759# using $(TARGET_FLAGS_TO_PASS).
760ALL_TARGET_MODULES = \
ba73c63f 761 all-target-libstdc++-v3 \
252b5132 762 all-target-newlib \
ba73c63f 763 all-target-libf2c \
ba73c63f 764 all-target-libobjc \
252b5132
RH
765 all-target-libtermcap \
766 all-target-winsup \
767 all-target-libgloss \
768 all-target-libiberty \
769 all-target-gperf \
770 all-target-examples \
771 all-target-libstub \
ba73c63f
JM
772 all-target-libffi \
773 all-target-libjava \
774 all-target-zlib \
775 all-target-boehm-gc \
776 all-target-qthreads \
252b5132
RH
777 all-target-bsp \
778 all-target-cygmon
779
780# This is a list of the configure targets for all of the modules which
781# are compiled using the target tools.
782CONFIGURE_TARGET_MODULES = \
ba73c63f 783 configure-target-libstdc++-v3 \
252b5132 784 configure-target-newlib \
ba73c63f 785 configure-target-libf2c \
ba73c63f 786 configure-target-libobjc \
252b5132
RH
787 configure-target-libtermcap \
788 configure-target-winsup \
789 configure-target-libgloss \
790 configure-target-libiberty \
791 configure-target-gperf \
792 configure-target-examples \
793 configure-target-libstub \
ba73c63f
JM
794 configure-target-libffi \
795 configure-target-libjava \
796 configure-target-zlib \
797 configure-target-boehm-gc \
798 configure-target-qthreads \
252b5132
RH
799 configure-target-bsp \
800 configure-target-cygmon
801
802# This is a list of the check targets for all of the modules which are
803# compiled using $(TARGET_FLAGS_TO_PASS).
804CHECK_TARGET_MODULES = \
ba73c63f 805 check-target-libstdc++-v3 \
252b5132 806 check-target-newlib \
ba73c63f 807 check-target-libf2c \
ba73c63f 808 check-target-libobjc \
252b5132
RH
809 check-target-winsup \
810 check-target-libiberty \
ba73c63f
JM
811 check-target-libffi \
812 check-target-libjava \
813 check-target-zlib \
814 check-target-boehm-gc \
815 check-target-qthreads \
252b5132
RH
816 check-target-gperf
817
818# This is a list of the install targets for all of the modules which are
819# compiled using $(TARGET_FLAGS_TO_PASS).
820INSTALL_TARGET_MODULES = \
ba73c63f 821 install-target-libstdc++-v3 \
252b5132 822 install-target-newlib \
ba73c63f 823 install-target-libf2c \
ba73c63f 824 install-target-libobjc \
252b5132
RH
825 install-target-libtermcap \
826 install-target-winsup \
827 install-target-libgloss \
828 install-target-libiberty \
829 install-target-bsp \
ba73c63f
JM
830 install-target-libjava \
831 install-target-zlib \
832 install-target-boehm-gc \
833 install-target-qthreads \
252b5132
RH
834 install-target-gperf
835
836# This is a list of the targets for which we can do a clean-{target}.
837CLEAN_MODULES = \
252b5132
RH
838 clean-ash \
839 clean-autoconf \
840 clean-automake \
841 clean-bash \
842 clean-bfd \
843 clean-binutils \
844 clean-bison \
845 clean-byacc \
846 clean-bzip2 \
252b5132
RH
847 clean-db \
848 clean-dejagnu \
849 clean-diff \
850 clean-dosutils \
851 clean-etc \
75205f78 852 clean-fastjar \
252b5132
RH
853 clean-fileutils \
854 clean-findutils \
855 clean-find \
856 clean-flex \
857 clean-gas \
858 clean-gawk \
859 clean-gettext \
860 clean-gnuserv \
861 clean-gprof \
862 clean-grep \
863 clean-grez \
864 clean-gzip \
865 clean-hello \
866 clean-indent \
252b5132 867 clean-intl \
252b5132
RH
868 clean-itcl \
869 clean-ld \
870 clean-libgui \
871 clean-libiberty \
872 clean-libtool \
873 clean-m4 \
874 clean-make \
875 clean-mmalloc \
876 clean-opcodes \
877 clean-patch \
878 clean-perl \
879 clean-prms \
880 clean-rcs \
881 clean-readline \
882 clean-release \
883 clean-recode \
884 clean-sed \
885 clean-send-pr \
886 clean-shellutils \
8817b92e 887 clean-sid \
252b5132 888 clean-sim \
ba73c63f 889 clean-snavigator \
252b5132
RH
890 clean-tar \
891 clean-tcl \
892 clean-texinfo \
893 clean-textutils \
252b5132
RH
894 clean-time \
895 clean-uudecode \
896 clean-wdiff \
5cec67bf
AO
897 clean-zip \
898 clean-zlib
252b5132
RH
899
900# All of the target modules that can be cleaned
901CLEAN_TARGET_MODULES = \
ba73c63f 902 clean-target-libstdc++-v3 \
252b5132 903 clean-target-newlib \
ba73c63f 904 clean-target-libf2c \
ba73c63f 905 clean-target-libobjc \
252b5132
RH
906 clean-target-winsup \
907 clean-target-libgloss \
908 clean-target-libiberty \
909 clean-target-gperf \
910 clean-target-examples \
911 clean-target-libstub \
ba73c63f
JM
912 clean-target-libffi \
913 clean-target-libjava \
914 clean-target-zlib \
915 clean-target-boehm-gc \
916 clean-target-qthreads \
252b5132
RH
917 clean-target-bsp \
918 clean-target-cygmon
919
920# All of the x11 modules that can be cleaned
921CLEAN_X11_MODULES = \
252b5132
RH
922 clean-gdb \
923 clean-expect \
252b5132
RH
924 clean-guile \
925 clean-tclX \
926 clean-tk \
927 clean-tix
928
929# The target built for a native build.
930.PHONY: all.normal
931all.normal: \
49b7683b 932 $(ALL_BUILD_MODULES) \
252b5132
RH
933 $(ALL_MODULES) \
934 $(ALL_X11_MODULES) \
935 $(ALL_TARGET_MODULES) \
936 all-gcc
937
938# Do a target for all the subdirectories. A ``make do-X'' will do a
939# ``make X'' in all subdirectories (because, in general, there is a
940# dependency (below) of X upon do-X, a ``make X'' will also do this,
941# but it may do additional work as well).
942# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
943# because it is so large that it can easily overflow the command line
944# length limit on some systems.
945DO_X = \
946 do-clean \
947 do-distclean \
948 do-dvi \
949 do-info \
950 do-install-info \
951 do-installcheck \
952 do-mostlyclean \
953 do-maintainer-clean \
954 do-TAGS
955.PHONY: $(DO_X)
956$(DO_X):
957 @target=`echo $@ | sed -e 's/^do-//'`; \
d5de0a84
NC
958 r=`${PWD}`; export r; \
959 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
960 $(SET_LIB_PATH) \
961 for i in $(SUBDIRS) -dummy-; do \
962 if [ -f ./$$i/Makefile ]; then \
963 case $$i in \
964 gcc) \
965 for flag in $(EXTRA_GCC_FLAGS); do \
3f152009 966 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
252b5132
RH
967 done; \
968 ;; \
969 *) \
970 for flag in $(EXTRA_HOST_FLAGS); do \
3f152009 971 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
252b5132
RH
972 done; \
973 ;; \
974 esac ; \
252b5132
RH
975 if (cd ./$$i; \
976 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
977 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
75205f78 978 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
252b5132
RH
979 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
980 $${target}); \
981 then true; else exit 1; fi; \
982 else true; fi; \
983 done
984 @target=`echo $@ | sed -e 's/^do-//'`; \
d5de0a84
NC
985 r=`${PWD}`; export r; \
986 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
987 $(SET_LIB_PATH) \
988 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
989 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
990 for flag in $(EXTRA_TARGET_FLAGS); do \
3f152009 991 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
252b5132 992 done; \
252b5132
RH
993 if (cd $(TARGET_SUBDIR)/$$i; \
994 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
995 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
75205f78 996 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
252b5132
RH
997 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
998 $${target}); \
999 then true; else exit 1; fi; \
1000 else true; fi; \
1001 done
1002
1003# Here are the targets which correspond to the do-X targets.
1004
1005.PHONY: info installcheck dvi install-info
1006.PHONY: clean distclean mostlyclean maintainer-clean realclean
1007.PHONY: local-clean local-distclean local-maintainer-clean
1008info: do-info
1009installcheck: do-installcheck
1010dvi: do-dvi
1011
1012# Make sure makeinfo is built before we do a `make info'.
1013do-info: all-texinfo
1014
1015install-info: do-install-info dir.info
d5de0a84 1016 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1017 if [ -f dir.info ] ; then \
1018 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1019 else true ; fi
1020
1021local-clean:
1022 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
1023
1024local-distclean:
1025 -rm -f Makefile config.status config.cache mh-frag mt-frag
1026 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1027 rm -rf $(TARGET_SUBDIR); \
1028 else true; fi
75205f78
DD
1029 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
1030 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
1031 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
1032 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
1033 -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
252b5132
RH
1034
1035local-maintainer-clean:
1036 @echo "This command is intended for maintainers to use;"
1037 @echo "it deletes files that may require special tools to rebuild."
1038
1039clean: do-clean local-clean
1040mostlyclean: do-mostlyclean local-clean
1041distclean: do-distclean local-clean local-distclean
1042maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1043maintainer-clean: local-distclean
1044realclean: maintainer-clean
1045
1046# This rule is used to clean specific modules.
1047.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1048$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1049 @dir=`echo $@ | sed -e 's/clean-//'`; \
1050 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1051 r=`${PWD}`; export r; \
1052 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1053 $(SET_LIB_PATH) \
1054 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1055 else \
1056 true; \
1057 fi
1058
1059.PHONY: $(CLEAN_TARGET_MODULES)
1060$(CLEAN_TARGET_MODULES):
1061 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1062 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1063 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
d5de0a84
NC
1064 r=`${PWD}`; export r; \
1065 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1066 $(SET_LIB_PATH) \
1067 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1068 else \
1069 true; \
1070 fi
1071
5cec67bf
AO
1072clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
1073clean-target-libgcc:
1074 test ! -d gcc/libgcc || \
1075 (cd gcc/libgcc && find . -type d -print) | \
1076 while read d; do rm -f gcc/$$d/libgcc.a || : ; done
1077 -rm -rf gcc/libgcc
252b5132
RH
1078
1079# Check target.
1080
80413487
RH
1081.PHONY: check do-check
1082check:
1083 $(MAKE) do-check NOTPARALLEL=parallel-ok
1084
1085do-check: $(CHECK_MODULES) \
252b5132
RH
1086 $(CHECK_TARGET_MODULES) \
1087 $(CHECK_X11_MODULES) \
1088 check-gcc
1089
1090# Automated reporting of test results.
1091
1092warning.log: build.log
1093 $(srcdir)/contrib/warn_summary build.log > $@
1094
1095mail-report.log:
1096 if test x'$(BOOT_CFLAGS)' != x''; then \
1097 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1098 fi; \
1099 $(srcdir)/contrib/test_summary -t >$@
1100 chmod +x $@
1101 echo If you really want to send e-mail, run ./$@ now
1102
1103mail-report-with-warnings.log: warning.log
1104 if test x'$(BOOT_CFLAGS)' != x''; then \
1105 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1106 fi; \
1107 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1108 chmod +x $@
1109 echo If you really want to send e-mail, run ./$@ now
1110
1111# Installation targets.
1112
1113.PHONY: install install-cross uninstall source-vault binary-vault vault-install
1114install: $(INSTALL_TARGET)
1115install-cross: $(INSTALL_TARGET_CROSS)
1116
1117uninstall:
1118 @echo "the uninstall target is not supported in this tree"
1119
1120source-vault:
1121 $(MAKE) -f ./release/Build-A-Release \
1122 host=$(host_alias) source-vault
1123
1124binary-vault:
1125 $(MAKE) -f ./release/Build-A-Release \
1126 host=$(host_alias) target=$(target_alias)
1127
1128vault-install:
1129 @if [ -f ./release/vault-install ] ; then \
1130 ./release/vault-install $(host_alias) $(target_alias) ; \
1131 else \
1132 true ; \
1133 fi
1134
1135.PHONY: install.all
1136install.all: install-no-fixedincludes
1137 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84 1138 r=`${PWD}` ; export r ; \
252b5132
RH
1139 $(SET_LIB_PATH) \
1140 (cd ./gcc; \
1141 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1142 else \
1143 true ; \
1144 fi
1145
252b5132
RH
1146# install-no-fixedincludes is used because Cygnus can not distribute
1147# the fixed header files.
1148.PHONY: install-no-fixedincludes
1149install-no-fixedincludes: \
1150 installdirs \
1151 $(INSTALL_MODULES) \
1152 $(INSTALL_TARGET_MODULES) \
1153 $(INSTALL_X11_MODULES) \
1154 gcc-no-fixedincludes
1155
1156# Install the gcc headers files, but not the fixed include files,
1157# which Cygnus is not allowed to distribute. This rule is very
1158# dependent on the workings of the gcc Makefile.in.
1159.PHONY: gcc-no-fixedincludes
1160gcc-no-fixedincludes:
1161 @if [ -f ./gcc/Makefile ]; then \
1162 rm -rf gcc/tmp-include; \
1163 mv gcc/include gcc/tmp-include 2>/dev/null; \
1164 mkdir gcc/include; \
1165 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1166 touch gcc/stmp-fixinc gcc/include/fixed; \
1167 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
d5de0a84
NC
1168 r=`${PWD}`; export r; \
1169 s=`cd $(srcdir); ${PWD}` ; export s; \
252b5132
RH
1170 $(SET_LIB_PATH) \
1171 (cd ./gcc; \
1172 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1173 rm -rf gcc/include; \
1174 mv gcc/tmp-include gcc/include 2>/dev/null; \
1175 else true; fi
1176
49b7683b
DD
1177# This rule is used to build the modules which are built with the
1178# build machine's native compiler.
1179.PHONY: $(ALL_BUILD_MODULES)
1180$(ALL_BUILD_MODULES):
1181 dir=`echo $@ | sed -e 's/all-build-//'`; \
1182 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1183 r=`${PWD}`; export r; \
1184 s=`cd $(srcdir); ${PWD}`; export s; \
49b7683b
DD
1185 (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \
1186 else \
1187 true; \
1188 fi
1189
1190# This rule is used to configure the modules which are built with the
1191# native tools.
1192.PHONY: $(CONFIGURE_BUILD_MODULES)
1193$(CONFIGURE_BUILD_MODULES):
1194 @dir=`echo $@ | sed -e 's/configure-build-//'`; \
1195 if [ ! -d $(BUILD_SUBDIR) ]; then \
1196 true; \
1197 elif [ -f $(BUILD_SUBDIR)/$${dir}/Makefile ] ; then \
1198 true; \
1199 elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1200 if [ -d $(srcdir)/$${dir} ]; then \
1201 [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\
d5de0a84
NC
1202 r=`${PWD}`; export r; \
1203 s=`cd $(srcdir); ${PWD}`; export s; \
49b7683b
DD
1204 AR="$(AR_FOR_BUILD)"; export AR; \
1205 AS="$(AS_FOR_BUILD)"; export AS; \
1206 CC="$(CC_FOR_BUILD)"; export CC; \
1207 CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
1208 CXX="$(CXX_FOR_BUILD)"; export CXX; \
1209 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
1210 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
1211 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
1212 LD="$(LD_FOR_BUILD)"; export LD; \
1213 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
1214 NM="$(NM_FOR_BUILD)"; export NM; \
1215 RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
1216 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
1217 echo Configuring in $(BUILD_SUBDIR)/$${dir}; \
1218 cd "$(BUILD_SUBDIR)/$${dir}" || exit 1; \
1219 case $(srcdir) in \
1220 /* | [A-Za-z]:[\\/]*) \
1221 topdir=$(srcdir) ;; \
1222 *) \
1223 case "$(BUILD_SUBDIR)" in \
1224 .) topdir="../$(srcdir)" ;; \
1225 *) topdir="../../$(srcdir)" ;; \
1226 esac ;; \
1227 esac; \
1228 if [ "$(srcdir)" = "." ] ; then \
1229 if [ "$(BUILD_SUBDIR)" != "." ] ; then \
1230 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1231 if [ -f Makefile ]; then \
1232 if $(MAKE) distclean; then \
1233 true; \
1234 else \
1235 exit 1; \
1236 fi; \
1237 else \
1238 true; \
1239 fi; \
1240 else \
1241 exit 1; \
1242 fi; \
1243 else \
1244 true; \
1245 fi; \
1246 srcdiroption="--srcdir=."; \
1247 libsrcdir="."; \
1248 else \
1249 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1250 libsrcdir="$$s/$${dir}"; \
1251 fi; \
1252 if [ -f $${libsrcdir}/configure ] ; then \
1253 rm -f no-such-file skip-this-dir; \
1254 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1255 $(BUILD_CONFIGARGS) $${srcdiroption} \
1256 --with-build-subdir="$(BUILD_SUBDIR)"; \
1257 else \
1258 rm -f no-such-file skip-this-dir; \
1259 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1260 $(BUILD_CONFIGARGS) $${srcdiroption} \
1261 --with-build-subdir="$(BUILD_SUBDIR)"; \
1262 fi || exit 1; \
1263 if [ -f skip-this-dir ] ; then \
1264 sh skip-this-dir; \
1265 rm -f skip-this-dir; \
1266 cd ..; rmdir $${dir} || true; \
1267 else \
1268 true; \
1269 fi; \
1270 else \
1271 true; \
1272 fi; \
1273 else \
1274 true; \
1275 fi
1276
252b5132
RH
1277# This rule is used to build the modules which use FLAGS_TO_PASS. To
1278# build a target all-X means to cd to X and make all.
1279#
1280# all-gui, and all-libproc are handled specially because
1281# they are still experimental, and if they fail to build, that
1282# shouldn't stop "make all".
1283.PHONY: $(ALL_MODULES) all-gui all-libproc
1284$(ALL_MODULES) all-gui all-libproc:
1285 @dir=`echo $@ | sed -e 's/all-//'`; \
1286 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1287 r=`${PWD}`; export r; \
1288 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1289 $(SET_LIB_PATH) \
1290 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1291 else \
1292 true; \
1293 fi
1294
1295# These rules are used to check the modules which use FLAGS_TO_PASS.
1296# To build a target check-X means to cd to X and make check. Some
1297# modules are only tested in a native toolchain.
1298
1299.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1300$(NATIVE_CHECK_MODULES):
3f152009 1301 @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
1302 dir=`echo $@ | sed -e 's/check-//'`; \
1303 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1304 r=`${PWD}`; export r; \
1305 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1306 $(SET_LIB_PATH) \
1307 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1308 else \
1309 true; \
1310 fi; \
1311 fi
1312
1313$(CROSS_CHECK_MODULES):
1314 @dir=`echo $@ | sed -e 's/check-//'`; \
1315 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1316 r=`${PWD}`; export r; \
1317 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1318 $(SET_LIB_PATH) \
1319 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1320 else \
1321 true; \
1322 fi
1323
1324# This rule is used to install the modules which use FLAGS_TO_PASS.
1325# To build a target install-X means to cd to X and make install.
1326.PHONY: $(INSTALL_MODULES)
1327$(INSTALL_MODULES): installdirs
1328 @dir=`echo $@ | sed -e 's/install-//'`; \
1329 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1330 r=`${PWD}`; export r; \
1331 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1332 $(SET_LIB_PATH) \
1333 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1334 else \
1335 true; \
1336 fi
1337
1338# This rule is used to configure the modules which are built with the
1339# target tools.
1340.PHONY: $(CONFIGURE_TARGET_MODULES)
1341$(CONFIGURE_TARGET_MODULES):
1342 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1343 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
d5de0a84 1344 r=`${PWD}`; export r; \
252b5132
RH
1345 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1346 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1347 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1348 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1349 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1350 else \
1351 echo "Multilibs changed for $${dir}, reconfiguring"; \
1352 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1353 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1354 fi; \
1355 else \
1356 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1357 fi; \
1358 fi; \
1359 fi; exit 0 # break command into two pieces
1360 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1361 if [ ! -d $(TARGET_SUBDIR) ]; then \
1362 true; \
1363 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1364 true; \
1365 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1366 if [ -d $(srcdir)/$${dir} ]; then \
1367 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
d5de0a84
NC
1368 r=`${PWD}`; export r; \
1369 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1370 $(SET_LIB_PATH) \
1371 AR="$(AR_FOR_TARGET)"; export AR; \
1372 AS="$(AS_FOR_TARGET)"; export AS; \
1373 CC="$(CC_FOR_TARGET)"; export CC; \
1374 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1375 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1376 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
75205f78 1377 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
252b5132
RH
1378 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1379 LD="$(LD_FOR_TARGET)"; export LD; \
1380 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1381 NM="$(NM_FOR_TARGET)"; export NM; \
1382 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1383 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1384 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
75205f78 1385 cd "$(TARGET_SUBDIR)/$${dir}" || exit 1; \
252b5132 1386 case $(srcdir) in \
75205f78 1387 /* | [A-Za-z]:[\\/]*) \
252b5132
RH
1388 topdir=$(srcdir) ;; \
1389 *) \
1390 case "$(TARGET_SUBDIR)" in \
1391 .) topdir="../$(srcdir)" ;; \
1392 *) topdir="../../$(srcdir)" ;; \
1393 esac ;; \
1394 esac; \
1395 if [ "$(srcdir)" = "." ] ; then \
1396 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1397 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1398 if [ -f Makefile ]; then \
1399 if $(MAKE) distclean; then \
1400 true; \
1401 else \
1402 exit 1; \
1403 fi; \
1404 else \
1405 true; \
1406 fi; \
1407 else \
1408 exit 1; \
1409 fi; \
1410 else \
1411 true; \
1412 fi; \
1413 srcdiroption="--srcdir=."; \
1414 libsrcdir="."; \
1415 else \
1416 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1417 libsrcdir="$$s/$${dir}"; \
1418 fi; \
1419 if [ -f $${libsrcdir}/configure ] ; then \
1420 rm -f no-such-file skip-this-dir; \
1421 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
49b7683b 1422 $(TARGET_CONFIGARGS) $${srcdiroption} \
252b5132
RH
1423 --with-target-subdir="$(TARGET_SUBDIR)"; \
1424 else \
1425 rm -f no-such-file skip-this-dir; \
1426 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
49b7683b 1427 $(TARGET_CONFIGARGS) $${srcdiroption} \
252b5132 1428 --with-target-subdir="$(TARGET_SUBDIR)"; \
75205f78 1429 fi || exit 1; \
252b5132
RH
1430 if [ -f skip-this-dir ] ; then \
1431 sh skip-this-dir; \
1432 rm -f skip-this-dir; \
1433 cd ..; rmdir $${dir} || true; \
1434 else \
1435 true; \
1436 fi; \
1437 else \
1438 true; \
1439 fi; \
1440 else \
1441 true; \
1442 fi
1443
1444# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1445# To build a target all-X means to cd to X and make all.
1446.PHONY: $(ALL_TARGET_MODULES)
1447$(ALL_TARGET_MODULES):
1448 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1449 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
d5de0a84
NC
1450 r=`${PWD}`; export r; \
1451 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 1452 $(SET_LIB_PATH) \
dec0cb0c
AO
1453 (cd $(TARGET_SUBDIR)/$${dir}; \
1454 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
252b5132
RH
1455 else \
1456 true; \
1457 fi
1458
1459# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1460# To build a target install-X means to cd to X and make install.
1461.PHONY: $(CHECK_TARGET_MODULES)
1462$(CHECK_TARGET_MODULES):
1463 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1464 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
d5de0a84
NC
1465 r=`${PWD}`; export r; \
1466 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 1467 $(SET_LIB_PATH) \
dec0cb0c
AO
1468 (cd $(TARGET_SUBDIR)/$${dir}; \
1469 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
252b5132
RH
1470 else \
1471 true; \
1472 fi
1473
1474# This rule is used to install the modules which use
1475# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1476# and make install.
1477.PHONY: $(INSTALL_TARGET_MODULES)
1478$(INSTALL_TARGET_MODULES): installdirs
1479 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1480 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
d5de0a84
NC
1481 r=`${PWD}`; export r; \
1482 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1483 $(SET_LIB_PATH) \
1484 (cd $(TARGET_SUBDIR)/$${dir}; \
1485 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1486 else \
1487 true; \
1488 fi
1489
1490# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1491# To build a target all-X means to cd to X and make all.
1492.PHONY: $(ALL_X11_MODULES)
1493$(ALL_X11_MODULES):
1494 @dir=`echo $@ | sed -e 's/all-//'`; \
1495 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1496 r=`${PWD}`; export r; \
1497 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1498 $(SET_LIB_PATH) \
1499 (cd $${dir}; \
1500 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1501 else \
1502 true; \
1503 fi
1504
1505# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1506# To build a target check-X means to cd to X and make all.
1507.PHONY: $(CHECK_X11_MODULES)
1508$(CHECK_X11_MODULES):
1509 @dir=`echo $@ | sed -e 's/check-//'`; \
1510 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1511 r=`${PWD}`; export r; \
1512 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1513 $(SET_LIB_PATH) \
1514 (cd $${dir}; \
1515 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1516 else \
1517 true; \
1518 fi
1519
1520# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1521# To build a target install-X means to cd to X and make install.
1522.PHONY: $(INSTALL_X11_MODULES)
1523$(INSTALL_X11_MODULES): installdirs
1524 @dir=`echo $@ | sed -e 's/install-//'`; \
1525 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1526 r=`${PWD}`; export r; \
1527 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1528 $(SET_LIB_PATH) \
1529 (cd $${dir}; \
1530 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1531 else \
1532 true; \
1533 fi
1534
1535# gcc is the only module which uses GCC_FLAGS_TO_PASS.
1536.PHONY: all-gcc
1537all-gcc:
1538 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1539 r=`${PWD}`; export r; \
1540 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1541 $(SET_LIB_PATH) \
1542 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1543 else \
1544 true; \
1545 fi
1546
1547# Building GCC uses some tools for rebuilding "source" files
1548# like texinfo, bison/byacc, etc. So we must depend on those.
1549#
1550# While building GCC, it may be necessary to run various target
1551# programs like the assembler, linker, etc. So we depend on
1552# those too.
1553#
1554# In theory, on an SMP all those dependencies can be resolved
1555# in parallel.
1556#
1557.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
2809b4b9 1558bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-bootstrap
d5de0a84
NC
1559 @r=`${PWD}`; export r; \
1560 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1561 $(SET_LIB_PATH) \
1562 echo "Bootstrapping the compiler"; \
5cec67bf 1563 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
d5de0a84
NC
1564 @r=`${PWD}`; export r; \
1565 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1566 case "$@" in \
1567 *bootstrap4-lean ) \
1568 msg="Comparing stage3 and stage4 of the compiler"; \
1569 compare=compare3-lean ;; \
1570 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1571 compare=compare3 ;; \
1572 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
1573 compare=compare-lean ;; \
1574 * ) msg="Comparing stage2 and stage3 of the compiler"; \
1575 compare=compare ;; \
1576 esac; \
1577 $(SET_LIB_PATH) \
1578 echo "$$msg"; \
5cec67bf 1579 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
d5de0a84
NC
1580 @r=`${PWD}`; export r; \
1581 s=`cd $(srcdir); ${PWD}` ; export s; \
252b5132
RH
1582 $(SET_LIB_PATH) \
1583 echo "Building runtime libraries"; \
dec0cb0c 1584 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
252b5132
RH
1585
1586.PHONY: cross
1587cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
d5de0a84
NC
1588 @r=`${PWD}`; export r; \
1589 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1590 $(SET_LIB_PATH) \
1591 echo "Building the C and C++ compiler"; \
5cec67bf 1592 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
d5de0a84
NC
1593 @r=`${PWD}`; export r; \
1594 s=`cd $(srcdir); ${PWD}` ; export s; \
252b5132
RH
1595 $(SET_LIB_PATH) \
1596 echo "Building runtime libraries"; \
dec0cb0c
AO
1597 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
1598 LANGUAGES="c c++" all
252b5132
RH
1599
1600.PHONY: check-gcc
1601check-gcc:
1602 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1603 r=`${PWD}`; export r; \
1604 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1605 $(SET_LIB_PATH) \
1606 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1607 else \
1608 true; \
1609 fi
1610
75205f78
DD
1611.PHONY: check-c++
1612check-c++:
1613 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1614 r=`${PWD}`; export r; \
1615 s=`cd $(srcdir); ${PWD}`; export s; \
75205f78
DD
1616 $(SET_LIB_PATH) \
1617 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
1618 $(MAKE) check-target-libstdc++-v3; \
1619 else \
1620 true; \
1621 fi
1622
252b5132
RH
1623.PHONY: install-gcc
1624install-gcc:
1625 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1626 r=`${PWD}`; export r; \
1627 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1628 $(SET_LIB_PATH) \
1629 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1630 else \
1631 true; \
1632 fi
1633
1634.PHONY: install-gcc-cross
1635install-gcc-cross:
1636 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
1637 r=`${PWD}`; export r; \
1638 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1639 $(SET_LIB_PATH) \
1640 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1641 else \
1642 true; \
1643 fi
1644# EXPERIMENTAL STUFF
1645# This rule is used to install the modules which use FLAGS_TO_PASS.
1646# To build a target install-X means to cd to X and make install.
1647.PHONY: install-dosrel
1648install-dosrel: installdirs info
1649 @dir=`echo $@ | sed -e 's/install-//'`; \
1650 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1651 r=`${PWD}`; export r; \
1652 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1653 $(SET_LIB_PATH) \
1654 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1655 else \
1656 true; \
1657 fi
1658
1659install-dosrel-fake:
1660
c559bb17
AO
1661ALL_GCC = all-gcc
1662ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss
75205f78 1663ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3
252b5132
RH
1664
1665# This is a list of inter-dependencies among modules.
252b5132
RH
1666all-ash:
1667all-autoconf: all-m4 all-texinfo
1668all-automake: all-m4 all-texinfo
1669all-bash:
1670all-bfd: all-libiberty all-intl
1671all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
227b9953 1672all-bison: all-texinfo
75205f78 1673configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads
ba73c63f 1674all-target-boehm-gc: configure-target-boehm-gc
5cec67bf
AO
1675configure-target-bsp: $(ALL_GCC_C)
1676all-target-bsp: configure-target-bsp
252b5132
RH
1677all-byacc:
1678all-bzip2:
5cec67bf 1679configure-target-cygmon: $(ALL_GCC_C)
75205f78 1680all-target-cygmon: configure-target-cygmon all-target-libiberty all-target-libstub all-target-bsp
252b5132
RH
1681all-db:
1682all-dejagnu: all-tcl all-expect all-tk
1683all-diff: all-libiberty
252b5132 1684all-etc:
5cec67bf 1685configure-target-examples: $(ALL_GCC_C)
252b5132
RH
1686all-target-examples: configure-target-examples
1687all-expect: all-tcl all-tk
1688all-fileutils: all-libiberty
1689all-findutils:
1690all-find:
1691all-flex: all-libiberty all-bison all-byacc
1692all-gas: all-libiberty all-opcodes all-bfd all-intl
252b5132 1693all-gawk:
5cec67bf 1694all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib
2809b4b9 1695all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
252b5132
RH
1696GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1697all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1698all-gettext:
1699all-gnuserv:
373688ac
AO
1700configure-target-gperf: $(ALL_GCC_CXX)
1701all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++-v3
252b5132 1702all-gprof: all-libiberty all-bfd all-opcodes all-intl
ba73c63f 1703all-grep: all-libiberty
252b5132 1704all-grez: all-libiberty all-bfd all-opcodes
e3b0c936 1705all-gui: all-gdb all-libproc
252b5132
RH
1706all-guile:
1707all-gzip: all-libiberty
1708all-hello: all-libiberty
1709all-indent:
252b5132 1710all-intl:
fd8958d5 1711all-itcl: all-tcl all-tk
252b5132 1712all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
252b5132
RH
1713configure-target-libgloss: $(ALL_GCC)
1714all-target-libgloss: configure-target-libgloss configure-target-newlib
fd8958d5 1715all-libgui: all-tcl all-tk all-itcl
252b5132 1716all-libiberty:
49b7683b
DD
1717
1718all-build-libiberty: configure-build-libiberty
1719
5cec67bf 1720configure-target-libffi: $(ALL_GCC_C)
ba73c63f 1721all-target-libffi: configure-target-libffi
75205f78
DD
1722configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
1723all-target-libjava: configure-target-libjava all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
5cec67bf
AO
1724configure-target-libstdc++-v3: $(ALL_GCC_C)
1725all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-libiberty
1726configure-target-libstub: $(ALL_GCC_C)
252b5132
RH
1727all-target-libstub: configure-target-libstub
1728all-libtool:
5cec67bf
AO
1729configure-target-libf2c: $(ALL_GCC_C)
1730all-target-libf2c: configure-target-libf2c all-target-libiberty
5cec67bf
AO
1731configure-target-libobjc: $(ALL_GCC_C)
1732all-target-libobjc: configure-target-libobjc all-target-libiberty
b0dad762 1733all-m4: all-libiberty all-texinfo
252b5132
RH
1734all-make: all-libiberty
1735all-mmalloc:
1736configure-target-newlib: $(ALL_GCC)
5cec67bf
AO
1737all-target-newlib: configure-target-newlib
1738configure-target-libtermcap: $(ALL_GCC_C)
1739all-target-libtermcap: configure-target-libtermcap
cdb9e2b8 1740all-opcodes: all-bfd all-libiberty
252b5132
RH
1741all-patch: all-libiberty
1742all-perl:
1743all-prms: all-libiberty
5cec67bf 1744configure-target-qthreads: $(ALL_GCC_C)
ba73c63f 1745all-target-qthreads: configure-target-qthreads
252b5132
RH
1746all-rcs:
1747all-readline:
1748all-recode: all-libiberty
1749all-sed: all-libiberty
1750all-send-pr: all-prms
1751all-shellutils:
8817b92e 1752all-sid: all-tcl all-tk
cdb9e2b8 1753all-sim: all-libiberty all-bfd all-opcodes all-readline
48d19748 1754all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui
252b5132
RH
1755all-tar: all-libiberty
1756all-tcl:
252b5132
RH
1757all-tclX: all-tcl all-tk
1758all-tk: all-tcl
252b5132
RH
1759all-texinfo: all-libiberty
1760all-textutils:
252b5132 1761all-time:
fd8958d5 1762all-tix: all-tcl all-tk
252b5132 1763all-wdiff:
5cec67bf
AO
1764configure-target-winsup: $(ALL_GCC_C)
1765all-target-winsup: all-target-libiberty all-target-libtermcap configure-target-winsup
252b5132
RH
1766all-uudecode: all-libiberty
1767all-zip:
51601921 1768all-zlib:
5cec67bf 1769configure-target-zlib: $(ALL_GCC_C)
ba73c63f 1770all-target-zlib: configure-target-zlib
75205f78
DD
1771all-fastjar: all-zlib all-libiberty
1772configure-target-fastjar: configure-target-zlib
1773all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty
5cec67bf
AO
1774configure-target-libiberty: $(ALL_GCC_C)
1775all-target-libiberty: configure-target-libiberty
252b5132
RH
1776all-target: $(ALL_TARGET_MODULES)
1777install-target: $(INSTALL_TARGET_MODULES)
afb8d725 1778install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
8817b92e 1779install-sid: install-tcl install-tk
252b5132
RH
1780### other supporting targets
1781
1782MAKEDIRS= \
d3d8a9ee
NC
1783 $(DESTDIR)$(prefix) \
1784 $(DESTDIR)$(exec_prefix)
252b5132
RH
1785.PHONY: installdirs
1786installdirs: mkinstalldirs
1787 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1788
1789dir.info: do-install-info
1790 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1791 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1792 mv -f dir.info.new dir.info ; \
1793 else true ; \
1794 fi
1795
1796dist:
1797 @echo "Building a full distribution of this tree isn't done"
1798 @echo "via 'make dist'. Check out the etc/ subdirectory"
1799
1800etags tags: TAGS
1801
1802# Right now this just builds TAGS in each subdirectory. emacs19 has the
1803# ability to use several tags files at once, so there is probably no need
1804# to combine them into one big TAGS file (like CVS 1.3 does). We could
1805# (if we felt like it) have this Makefile write a piece of elisp which
1806# the user could load to tell emacs19 where all the TAGS files we just
1807# built are.
1808TAGS: do-TAGS
1809
1810# with the gnu make, this is done automatically.
1811
1812Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
1813 $(SHELL) ./config.status
1814
1815#
1816# Support for building net releases
1817
1818# Files in devo used in any net release.
1819# ChangeLog omitted because it may refer to files which are not in this
1820# distribution (perhaps it would be better to include it anyway).
1821DEVO_SUPPORT= README Makefile.in configure configure.in \
1822 config.guess config.if config.sub config move-if-change \
1823 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1824 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
97f60b31 1825 mkinstalldirs ltconfig ltmain.sh missing ylwrap \
5cec67bf 1826 libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh
252b5132
RH
1827
1828# Files in devo/etc used in any net release.
1829# ChangeLog omitted because it may refer to files which are not in this
1830# distribution (perhaps it would be better to include it anyway).
1831ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
ebf0fa2e
AJ
1832 make-stds.texi standards.info* configure.texi configure.info* \
1833 configbuild.* configdev.*
1834
252b5132
RH
1835
1836# When you use `make setup-dirs' or `make taz' you should always redefine
1837# this macro.
1838SUPPORT_FILES = list-of-support-files-for-tool-in-question
1839
b35ece4e
AC
1840# NOTE: No double quotes in the below. It is used within shell script
1841# as VER="$(VER)"
1107dce2
AM
1842VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \
1843 sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
1844 elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
b35ece4e 1845 sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
31a8b634
AC
1846 elif test -f $(TOOL)/version.in; then \
1847 head -1 $(TOOL)/version.in; \
1848 elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
b35ece4e 1849 sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
31a8b634
AC
1850 else \
1851 echo VERSION; \
b35ece4e
AC
1852 fi`
1853PACKAGE = $(TOOL)
252b5132 1854
b35ece4e 1855.PHONY: taz
c1b640f7 1856taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
b35ece4e
AC
1857 $(MAKE) -f Makefile.in do-proto-toplev \
1858 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
fd751128 1859 MD5PROG="$(MD5PROG)" \
b35ece4e
AC
1860 SUPPORT_FILES="$(SUPPORT_FILES)"
1861 $(MAKE) -f Makefile.in do-md5sum \
1862 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
fd751128 1863 MD5PROG="$(MD5PROG)" \
b35ece4e 1864 SUPPORT_FILES="$(SUPPORT_FILES)"
bbf6e9e3
AC
1865 $(MAKE) -f Makefile.in do-tar \
1866 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1867 MD5PROG="$(MD5PROG)" \
1868 SUPPORT_FILES="$(SUPPORT_FILES)"
1869 $(MAKE) -f Makefile.in do-bz2 \
b35ece4e 1870 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
fd751128 1871 MD5PROG="$(MD5PROG)" \
b35ece4e
AC
1872 SUPPORT_FILES="$(SUPPORT_FILES)"
1873
bbf6e9e3
AC
1874.PHONY: gdb-tar
1875gdb-tar: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
b5a23627
AC
1876 $(MAKE) -f Makefile.in do-proto-toplev \
1877 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1878 MD5PROG="$(MD5PROG)" \
1879 SUPPORT_FILES="$(SUPPORT_FILES)"
1880 $(MAKE) -f Makefile.in do-md5sum \
1881 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1882 MD5PROG="$(MD5PROG)" \
1883 SUPPORT_FILES="$(SUPPORT_FILES)"
1884 $(MAKE) -f Makefile.in do-djunpack \
1885 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1886 MD5PROG="$(MD5PROG)" \
1887 SUPPORT_FILES="$(SUPPORT_FILES)"
bbf6e9e3
AC
1888 $(MAKE) -f Makefile.in do-tar \
1889 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1890 MD5PROG="$(MD5PROG)" \
1891 SUPPORT_FILES="$(SUPPORT_FILES)"
1892
1893.PHONY: gdb-taz
1894gdb-taz: gdb-tar $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1895 $(MAKE) -f Makefile.in gdb-tar \
1896 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1897 MD5PROG="$(MD5PROG)" \
1898 SUPPORT_FILES="$(SUPPORT_FILES)"
1899 $(MAKE) -f Makefile.in do-bz2 \
b35ece4e 1900 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
fd751128 1901 MD5PROG="$(MD5PROG)" \
b35ece4e
AC
1902 SUPPORT_FILES="$(SUPPORT_FILES)"
1903
1904.PHONY: do-proto-toplev
1905do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1906 echo "==> Making $(PACKAGE)-$(VER)/"
252b5132
RH
1907 # Take out texinfo from a few places.
1908 sed -e '/^all\.normal: /s/\all-texinfo //' \
1909 -e '/^ install-texinfo /d' \
1910 <Makefile.in >tmp
1911 mv -f tmp Makefile.in
1912 #
1913 ./configure sun4
1914 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
5cec67bf
AO
1915 || $(MAKE) $(CONFIGURE_TARGET_MODULES) \
1916 ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \
252b5132
RH
1917 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1918 # Make links, and run "make diststuff" or "make info" when needed.
1919 rm -rf proto-toplev ; mkdir proto-toplev
1920 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1921 for d in $$dirs ; do \
1922 if [ -d $$d ]; then \
1923 if [ ! -f $$d/Makefile ] ; then true ; \
1924 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1925 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1926 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1927 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1928 fi ; \
1929 if [ -d $$d/proto-$$d.dir ]; then \
1930 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1931 else \
1932 ln -s ../$$d proto-toplev/$$d ; \
1933 fi ; \
1934 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1935 done
5cec67bf 1936 cd etc && $(MAKE) info
252b5132
RH
1937 $(MAKE) distclean
1938 #
1939 mkdir proto-toplev/etc
1940 (cd proto-toplev/etc; \
1941 for i in $(ETC_SUPPORT); do \
1942 ln -s ../../etc/$$i . ; \
1943 done)
1944 #
1945 # Take out texinfo from configurable dirs
1946 rm proto-toplev/configure.in
1947 sed -e '/^host_tools=/s/texinfo //' \
1948 <configure.in >proto-toplev/configure.in
1949 #
1950 mkdir proto-toplev/texinfo
1951 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
252b5132
RH
1952 if test -r texinfo/util/tex3patch ; then \
1953 mkdir proto-toplev/texinfo/util && \
1954 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1955 else true; fi
1956 chmod -R og=u . || chmod og=u `find . -print`
b35ece4e 1957 #
43e64072
NC
1958 # Create .gmo files from .po files.
1959 for f in `find . -name '*.po' -type f -print`; do \
1960 msgfmt -o `echo $$f | sed -e 's/\.po$$/.gmo/'` $$f ; \
1961 done
1962 #
b35ece4e
AC
1963 -rm -f $(PACKAGE)-$(VER)
1964 ln -s proto-toplev $(PACKAGE)-$(VER)
252b5132 1965
bbf6e9e3
AC
1966.PHONY: do-tar
1967do-tar:
1968 echo "==> Making $(PACKAGE)-$(VER).tar"
1969 -rm -f $(PACKAGE)-$(VER).tar
82b43a09
AC
1970 find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \
1971 | tar cTfh - $(PACKAGE)-$(VER).tar
bbf6e9e3
AC
1972
1973.PHONY: do-bz2
1974do-bz2:
1975 echo "==> Bzipping $(PACKAGE)-$(VER).tar.bz2"
1976 -rm -f $(PACKAGE)-$(VER).tar.bz2
6dcbc97b 1977 $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar
252b5132 1978
b35ece4e
AC
1979.PHONY: do-md5sum
1980do-md5sum:
1981 echo "==> Adding md5 checksum to top-level directory"
82b43a09
AC
1982 cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \
1983 | xargs $(MD5PROG) > ../md5.sum
b35ece4e
AC
1984 mv md5.sum proto-toplev
1985
b5a23627
AC
1986.PHONY: do-djunpack
1987do-djunpack:
1988 echo "==> Adding updated djunpack.bat to top-level directory"
1989 echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/'
1990 sed < djunpack.bat > djunpack.new \
1991 -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/'
1992 mv djunpack.new djunpack.bat
1993 -rm -f proto-toplev/djunpack.bat
1994 ln -s ../djunpack.bat proto-toplev/djunpack.bat
1995
c376f4ed 1996TEXINFO_SUPPORT= texinfo/texinfo.tex
252b5132
RH
1997DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1998
c376f4ed 1999.PHONY: gas.tar.bz2
71141bb6 2000GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep
c376f4ed 2001gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1107dce2 2002 $(MAKE) -f Makefile.in taz TOOL=gas \
fd751128 2003 MD5PROG="$(MD5PROG)" \
252b5132
RH
2004 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
2005
2006# The FSF "binutils" release includes gprof and ld.
c376f4ed 2007.PHONY: binutils.tar.bz2
71141bb6 2008BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep
c376f4ed 2009binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1107dce2 2010 $(MAKE) -f Makefile.in taz TOOL=binutils \
fd751128 2011 MD5PROG="$(MD5PROG)" \
08d836d6 2012 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)"
252b5132 2013
c376f4ed 2014.PHONY: gas+binutils.tar.bz2
252b5132 2015GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
c376f4ed 2016gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1107dce2 2017 $(MAKE) -f Makefile.in taz TOOL=gas \
fd751128 2018 MD5PROG="$(MD5PROG)" \
08d836d6 2019 SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
252b5132 2020
252b5132 2021GNATS_SUPPORT_DIRS=include libiberty send-pr
c376f4ed 2022gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
252b5132 2023 $(MAKE) -f Makefile.in taz TOOL=gnats \
fd751128 2024 MD5PROG="$(MD5PROG)" \
252b5132
RH
2025 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
2026
c376f4ed 2027.PHONY: gdb.tar.bz2
252b5132 2028GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
c376f4ed 2029gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
b35ece4e 2030 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \
fd751128 2031 MD5PROG="$(MD5PROG)" \
6dcbc97b 2032 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
bbf6e9e3
AC
2033.PHONY: gdb.tar
2034gdb.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
2035 $(MAKE) -f Makefile.in gdb-tar TOOL=gdb \
2036 MD5PROG="$(MD5PROG)" \
2037 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
6dcbc97b 2038
6dcbc97b 2039DEJAGNU_SUPPORT_DIRS= tcl expect libiberty
bbf6e9e3 2040.PHONY: dejagnu.tar.bz2
6dcbc97b
AC
2041dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu
2042 $(MAKE) -f Makefile.in taz TOOL=dejagnu \
fd751128 2043 MD5PROG="$(MD5PROG)" \
6dcbc97b
AC
2044 SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)"
2045
2046.PHONY: gdb+dejagnu.tar.bz2
2047GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu
2048gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
b35ece4e 2049 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \
fd751128 2050 MD5PROG="$(MD5PROG)" \
6dcbc97b 2051 SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
bbf6e9e3
AC
2052.PHONY: gdb+dejagnu.tar
2053gdb+dejagnu.tar: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
2054 $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE=gdb+dejagnu \
2055 MD5PROG="$(MD5PROG)" \
2056 SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
6dcbc97b
AC
2057
2058.PHONY: insight.tar.bz2
2059INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui
2060insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
b35ece4e 2061 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \
fd751128 2062 MD5PROG="$(MD5PROG)" \
6dcbc97b 2063 SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
bbf6e9e3
AC
2064.PHONY: insight.tar
2065insight.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
2066 $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE=insight \
2067 MD5PROG="$(MD5PROG)" \
2068 SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
6dcbc97b
AC
2069
2070.PHONY: insight+dejagnu.tar.bz2
2071INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu
2072insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb
b35ece4e 2073 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \
fd751128 2074 MD5PROG="$(MD5PROG)" \
6dcbc97b 2075 SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
bbf6e9e3
AC
2076.PHONY: insight+dejagnu.tar
2077insight+dejagnu.tar: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb
2078 $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE="insight+dejagnu" \
2079 MD5PROG="$(MD5PROG)" \
2080 SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
252b5132 2081
c376f4ed 2082.PHONY: newlib.tar.bz2
252b5132
RH
2083NEWLIB_SUPPORT_DIRS=libgloss
2084# taz configures for the sun4 target which won't configure newlib.
2085# We need newlib configured so that the .info files are made.
2086# Unfortunately, it is not enough to just configure newlib separately:
2087# taz will build the .info files but since SUBDIRS won't contain newlib,
2088# distclean won't be run (leaving Makefile, config.status, and the tmp files
2089# used in building the .info files, eg: *.def, *.ref).
2090# The problem isn't solvable however without a lot of extra work because
2091# target libraries are built in subdir $(target_alias) which gets nuked during
2092# the make distclean. For now punt on the issue of shipping newlib info files
2093# with newlib net releases and wait for a day when some native target (sun4?)
2094# supports newlib (if only minimally).
c376f4ed 2095newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
252b5132 2096 $(MAKE) -f Makefile.in taz TOOL=newlib \
fd751128 2097 MD5PROG="$(MD5PROG)" \
252b5132
RH
2098 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
2099 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
2100
2101.NOEXPORT:
2102MAKEOVERRIDES=
2103
2104# end of Makefile.in
This page took 0.294028 seconds and 4 git commands to generate.