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