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