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