source: trunk/third/gcc/Makefile.in @ 19142

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