OSDN Git Service

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