OSDN Git Service

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