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