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