OSDN Git Service

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