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