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