* Makfile.in (DLLTOOL_FOR_TARGET): New name, pass it down.
[platform/upstream/binutils.git] / Makefile.in
1 #
2 # Makefile for directory with subdirs to build.
3 #   Copyright (C) 1990, 1991, 1992, 1993 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., 675 Mass Ave, Cambridge, MA 02139, 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)/lib
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 docdir = $(datadir)/doc
45 GDB_NLM_DEPS = 
46
47 SHELL = /bin/sh
48
49 INSTALL = $${srcroot}/install.sh -c
50 INSTALL_PROGRAM = $(INSTALL)
51 INSTALL_DATA = $(INSTALL) -m 644
52 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
53
54 INSTALL_DOSREL = install-dosrel-fake
55
56 AS = as
57 AR = ar
58 AR_FLAGS = rc
59 CC = cc
60
61 # Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
62 # here so that they can be overridden by Makefile fragments.
63 HOST_CC = $(CC_FOR_BUILD)
64 HOST_PREFIX = 
65 HOST_PREFIX_1 = loser-
66
67 # We don't specify -g -O because many compilers don't support -g -O,
68 # and/or -O is broken in and of itself.
69 CFLAGS = -g
70 LIBCFLAGS = $(CFLAGS)
71 CFLAGS_FOR_TARGET = $(CFLAGS)
72 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
73 PICFLAG = 
74 PICFLAG_FOR_TARGET = 
75
76 # start-sanitize-chill
77 CHILLFLAGS = $(CFLAGS)
78 CHILL_LIB = -lchill
79 # end-sanitize-chill
80 CXX = gcc
81
82 # Use -O2 to stress test the compiler.
83 CXXFLAGS = -g -O2
84 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
85 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
86 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
87
88 RANLIB = ranlib
89 NM = nm
90 # Not plain GZIP, since gzip looks there for extra command-line options.
91 GZIPPROG = gzip
92
93 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
94 BISON = `if [ -f $$r/byacc/byacc ] ; \
95             then echo $$r/byacc/byacc ; \
96             else echo byacc ; \
97         fi`
98
99 LEX = `if [ -f $$r/flex/flex ] ; \
100         then echo $$r/flex/flex ; \
101         else echo flex ; fi`
102
103 M4 = `if [ -f $$r/m4/m4 ] ; \
104         then echo $$r/m4/m4 ; \
105         else echo m4 ; fi`
106
107 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
108         then echo $$r/texinfo/makeinfo/makeinfo ; \
109         else echo makeinfo ; fi`
110
111 # This just becomes part of the MAKEINFO definition passed down to
112 # sub-makes.  It lets flags be given on the command line while still
113 # using the makeinfo from the object tree.
114 MAKEINFOFLAGS =
115
116 EXPECT = `if [ -f $$r/expect/expect ] ; \
117         then echo $$r/expect/expect ; \
118         else echo expect ; fi`
119
120 RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
121         then echo $${srcroot}/dejagnu/runtest ; \
122         else echo runtest ; fi`
123
124
125 # libraries that may need to be augmented on a system-by-system basis
126 X11_LIB = -lX11
127
128 # compilers to use to create programs which must be run in the build
129 # environment.
130 CC_FOR_BUILD = $(CC)
131 CXX_FOR_BUILD = $(CXX)
132
133 SUBDIRS = "this is set via configure, don't edit this"
134 OTHERS = 
135
136 ALL = all.normal
137 INSTALL_TARGET = install-dirs \
138         $(INSTALL_MODULES) \
139         $(INSTALL_TARGET_MODULES) \
140         $(INSTALL_X11_MODULES) \
141         install-gcc \
142         $(INSTALL_DOSREL)
143
144
145 CC_FOR_TARGET = ` \
146   if [ -f $$r/gcc/Makefile ] ; then \
147     if [ -f $$r/newlib/Makefile ] ; then \
148       echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
149     else \
150       echo $$r/gcc/xgcc -B$$r/gcc/; \
151     fi; \
152   else \
153     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
154       echo $(CC); \
155     else \
156       t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
157     fi; \
158   fi`
159
160 # start-sanitize-chill
161 CHILL_FOR_TARGET = ` \
162   if [ -f $$r/gcc/Makefile ] ; then \
163     echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
164   else \
165     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
166       echo $(CC); \
167     else \
168       t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
169     fi; \
170   fi`
171
172 # end-sanitize-chill
173
174 CXX_FOR_TARGET = ` \
175   if [ -f $$r/gcc/Makefile ] ; then \
176     if [ -f $$r/newlib/Makefile ] ; then \
177       echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
178     else \
179       echo $$r/gcc/xgcc -B$$r/gcc/; \
180     fi; \
181   else \
182     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
183       echo $(CXX); \
184     else \
185       t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
186     fi; \
187   fi`
188
189 AS_FOR_TARGET = ` \
190   if [ -f $$r/gas/as.new ] ; then \
191     echo $$r/gas/as.new ; \
192   else \
193     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
194       echo $(AS); \
195     else \
196        t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
197     fi; \
198   fi`
199
200 DLLTOOL_FOR_TARGET = ` \
201   if [ -f $$r/binutils/dlltool ] ; then \
202     echo $$r/binutils/dlltool ; \
203   else \
204     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
205       echo $(DLLTOOL); \
206     else \
207        t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
208     fi; \
209   fi`
210
211 AR_FOR_TARGET = ` \
212   if [ -f $$r/binutils/ar ] ; then \
213     echo $$r/binutils/ar ; \
214   else \
215     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
216       echo $(AR); \
217     else \
218        t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
219     fi; \
220   fi`
221
222 RANLIB_FOR_TARGET = ` \
223   if [ -f $$r/binutils/ranlib ] ; then \
224     echo $$r/binutils/ranlib ; \
225   else \
226     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
227       echo $(RANLIB); \
228     else \
229        t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
230     fi; \
231   fi`
232
233 NM_FOR_TARGET = ` \
234   if [ -f $$r/binutils/nm.new ] ; then \
235     echo $$r/binutils/nm.new ; \
236   else \
237     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
238       echo $(NM); \
239     else \
240        t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
241     fi; \
242   fi`
243
244 #### host and target specific makefile fragments come in here.
245 ###
246
247 # Flags to pass down to all sub-makes.
248 # Please keep these in alphabetical order.
249 BASE_FLAGS_TO_PASS = \
250         "AR_FLAGS=$(AR_FLAGS)" \
251         "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
252         "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
253         "BISON=$(BISON)" \
254         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
255         "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
256         "CFLAGS=$(CFLAGS)" \
257         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
258         $(start-sanitize-chill)\
259         "CHILLFLAGS=$(CHILLFLAGS)" \
260         "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
261         "CHILL_LIB=$(CHILL_LIB)" \
262         $(end-sanitize-chill)\
263         "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
264         "CXXFLAGS=$(CXXFLAGS)" \
265         "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
266         "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
267         "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
268         "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
269         "INSTALL=$(INSTALL)" \
270         "INSTALL_DATA=$(INSTALL_DATA)" \
271         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
272         "INSTALL_XFORM=$(INSTALL_XFORM)" \
273         "LDFLAGS=$(LDFLAGS)" \
274         "LEX=$(LEX)" \
275         "LIBCFLAGS=$(LIBCFLAGS)" \
276         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
277         "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
278         "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
279         "M4=$(M4)" \
280         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
281         "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
282         "PICFLAG=$(PICFLAG)" \
283         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
284         "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
285         "SHELL=$(SHELL)" \
286         "EXPECT=$(EXPECT)" \
287         "RUNTEST=$(RUNTEST)" \
288         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
289         "YACC=$(BISON)" \
290         "exec_prefix=$(exec_prefix)" \
291         "prefix=$(prefix)" \
292         "tooldir=$(tooldir)" 
293
294 # Flags to pass down to most sub-makes, in which we're building with
295 # the host environment.
296 # If any variables are added here, they must be added to do-*, below.
297 EXTRA_HOST_FLAGS = \
298         'AR=$(AR)' \
299         'AS=$(AS)' \
300         'CC=$(CC)' \
301         'CXX=$(CXX)' \
302         'NM=$(NM)' \
303         'RANLIB=$(RANLIB)'
304
305 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
306
307 # Flags that are concerned with the location of the X11 include files
308 # and library files
309 X11_FLAGS_TO_PASS = \
310         "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
311         "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
312         "X11_LIB=$(X11_LIB)"
313
314 # Flags to pass down to makes which are built with the target environment.
315 # The double $ decreases the length of the command line; the variables
316 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
317 # If any variables are added here, they must be added to do-*, below.
318 EXTRA_TARGET_FLAGS = \
319         'AR=$$(AR_FOR_TARGET)' \
320         'AS=$$(AS_FOR_TARGET)' \
321         'CC=$$(CC_FOR_TARGET)' \
322         'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
323         'CXX=$$(CXX_FOR_TARGET)' \
324         'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
325         'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
326         'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
327         'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
328         'NM=$$(NM_FOR_TARGET)' \
329         'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
330         'RANLIB=$$(RANLIB_FOR_TARGET)'
331
332 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
333
334 # Flags to pass down to gcc.  gcc builds a library, libgcc.a, so it
335 # unfortunately needs the native compiler and the target ar and
336 # ranlib.
337 # If any variables are added here, they must be added to do-*, below.
338 # The HOST_* variables are a special case, which are used for the gcc
339 # cross-building scheme.
340 EXTRA_GCC_FLAGS = \
341         'AR=$$(AR_FOR_TARGET)' \
342         'AS=$(AS)' \
343         'CC=$(CC)' \
344         'CXX=$(CXX)' \
345         'HOST_CC=$(CC_FOR_BUILD)' \
346         'HOST_PREFIX=$(HOST_PREFIX)' \
347         'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
348         'NM=$(NM)' \
349         'RANLIB=$$(RANLIB_FOR_TARGET)'
350
351 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
352
353 # This is a list of the targets for all of the modules which are compiled
354 # using $(FLAGS_TO_PASS).
355 ALL_MODULES = \
356         all-autoconf \
357         all-bfd \
358         all-binutils \
359         all-byacc \
360         all-cvs \
361         all-dejagnu \
362         all-diff \
363         all-dosutils \
364         all-etc \
365         all-fileutils \
366         all-find \
367         all-flex \
368         all-gas \
369         all-gawk \
370         all-gprof \
371         all-grep \
372         all-gzip \
373         all-hello \
374         all-indent \
375         all-ispell \
376         all-ld \
377         all-libiberty \
378         all-m4 \
379         all-make \
380         all-mmalloc \
381         all-opcodes \
382         all-patch \
383         all-prms \
384         all-rcs \
385         all-readline \
386         all-release \
387         all-recode \
388         all-sed \
389         all-send-pr \
390         all-shellutils \
391         all-sim \
392         all-tar \
393         all-tcl \
394         all-texinfo \
395         all-textutils \
396         all-tgas \
397         all-time \
398         all-uudecode \
399         all-wdiff 
400
401 # This is a list of the check targets for all of the modules which are
402 # compiled using $(FLAGS_TO_PASS).
403 # This is a list of the check targets for all of the modules which are
404 # compiled using $(FLAGS_TO_PASS).
405 #
406 # The list is in two parts.  The first lists those tools which
407 # are tested as part of the host's native tool-chain, and not
408 # tested in a cross configuration.
409 NATIVE_CHECK_MODULES = \
410         check-byacc \
411         check-flex
412
413 CROSS_CHECK_MODULES = \
414         check-autoconf \
415         check-bfd \
416         check-binutils \
417         check-cvs \
418         check-dejagnu \
419         check-diff \
420         check-etc \
421         check-fileutils \
422         check-find \
423         check-gas \
424         check-gawk \
425         check-gprof \
426         check-grep \
427         check-gzip \
428         check-hello \
429         check-indent \
430         check-ispell \
431         check-ld \
432         check-libiberty \
433         check-m4 \
434         check-make \
435         check-mmcheckoc \
436         check-opcodes \
437         check-patch \
438         check-prms \
439         check-rcs \
440         check-readline \
441         check-recode \
442         check-sed \
443         check-send-pr \
444         check-shellutils \
445         check-sim \
446         check-tar \
447         check-tcl \
448         check-texinfo \
449         check-textutils \
450         check-tgas \
451         check-time \
452         check-uudecode \
453         check-wdiff
454
455 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
456
457 # This is a list of the install targets for all of the modules which are
458 # compiled using $(FLAGS_TO_PASS).
459 INSTALL_MODULES = \
460         install-autoconf \
461         install-bfd \
462         install-binutils \
463         install-byacc \
464         install-cvs \
465         install-dejagnu \
466         install-diff \
467         install-dosutils \
468         install-etc \
469         install-fileutils \
470         install-find \
471         install-flex \
472         install-gas \
473         install-gawk \
474         install-gprof \
475         install-grep \
476         install-gzip \
477         install-hello \
478         install-indent \
479         install-ispell \
480         install-ld \
481         install-libiberty \
482         install-m4 \
483         install-make \
484         install-mmalloc \
485         install-opcodes \
486         install-patch \
487         install-prms \
488         install-rcs \
489         install-readline \
490         install-recode \
491         install-sed \
492         install-send-pr \
493         install-shellutils \
494         install-sim \
495         install-tar \
496         install-tcl \
497         install-texinfo \
498         install-textutils \
499         install-tgas \
500         install-time \
501         install-uudecode \
502         install-wdiff
503
504 # This is a list of the targets for all of the modules which are compiled
505 # using $(X11_FLAGS_TO_PASS).
506 ALL_X11_MODULES = \
507         all-emacs \
508         all-emacs19 \
509         all-gdb \
510         all-expect \
511         all-gash \
512         all-tclX \
513         all-tk
514
515 # This is a list of the check targets for all of the modules which are
516 # compiled using $(X11_FLAGS_TO_PASS).
517 CHECK_X11_MODULES = \
518         check-emacs \
519         check-gdb \
520         check-expect \
521         check-gash \
522         check-tclX \
523         check-tk
524
525 # This is a list of the install targets for all the modules which are
526 # compiled using $(X11_FLAGS_TO_PASS).
527 INSTALL_X11_MODULES = \
528         install-emacs \
529         install-emacs19 \
530         install-gdb \
531         install-expect \
532         install-gash \
533         install-tclX \
534         install-tk
535
536 # This is a list of the targets for all of the modules which are compiled
537 # using $(TARGET_FLAGS_TO_PASS).
538 ALL_TARGET_MODULES = \
539         $(start-sanitize-chill) \
540         all-chillrt \
541         $(end-sanitize-chill) \
542         all-libio \
543         all-libstdc++ \
544         all-librx \
545         all-libg++ \
546         all-newlib \
547         all-libgloss \
548         all-xiberty
549
550 # This is a list of the check targets for all of the modules which are
551 # compiled using $(TARGET_FLAGS_TO_PASS).
552 CHECK_TARGET_MODULES = \
553         $(start-sanitize-chill) \
554         check-chillrt \
555         $(end-sanitize-chill) \
556         check-libio \
557         check-libstdc++ \
558         check-libg++ \
559         check-newlib \
560         check-xiberty
561
562 # This is a list of the install targets for all of the modules which are
563 # compiled using $(TARGET_FLAGS_TO_PASS).
564 INSTALL_TARGET_MODULES = \
565         $(start-sanitize-chill) \
566         install-chillrt \
567         $(end-sanitize-chill) \
568         install-libio \
569         install-libstdc++ \
570         install-libg++ \
571         install-newlib \
572         install-libgloss \
573         install-xiberty
574
575 # This is a shell case of all modules which are compiled using
576 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
577 TARGET_LIBS = libio | libstdc++ | librx | libg++ | newlib | xiberty
578 # start-sanitize-chill
579 TARGET_LIBS = chillrt | libio | libstdc++ | librx | libg++ | newlib | xiberty
580 # end-sanitize-chill
581
582 # The first rule in the file had better be this one.  Don't put any above it.
583 all: all.normal
584 .PHONY: all
585
586 # The target built for a native build.
587 .PHONY: all.normal
588 all.normal: \
589         $(ALL_MODULES) \
590         $(ALL_TARGET_MODULES) \
591         $(ALL_X11_MODULES) \
592         all-gcc
593
594 # Do a target for all the subdirectories.  A ``make do-X'' will do a
595 # ``make X'' in all subdirectories (because, in general, there is a
596 # dependency (below) of X upon do-X, a ``make X'' will also do this,
597 # but it may do additional work as well).
598 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
599 # because it is so large that it can easily overflow the command line
600 # length limit on some systems.
601 DO_X = \
602         do-clean \
603         do-distclean \
604         do-dvi \
605         do-info \
606         do-install-info \
607         do-installcheck \
608         do-mostlyclean \
609         do-realclean \
610         do-TAGS
611 .PHONY: $(DO_X)
612 $(DO_X):
613         @target=`echo $@ | sed -e 's/^do-//'`; \
614         r=`pwd`; export r; \
615         srcroot=`cd $(srcdir); pwd`; export srcroot; \
616         for i in $(SUBDIRS); do \
617           if [ -f ./$$i/Makefile ]; then \
618             case $$i in \
619             $(TARGET_LIBS) ) \
620               for flag in $(EXTRA_TARGET_FLAGS); do \
621                 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
622               done; \
623               ;; \
624             gcc) \
625               for flag in $(EXTRA_GCC_FLAGS); do \
626                 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
627               done; \
628               ;; \
629             *) \
630               for flag in $(EXTRA_HOST_FLAGS); do \
631                 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
632               done; \
633               ;; \
634             esac ; \
635             export AR AS CC CXX NM RANLIB; \
636             if (cd ./$$i; \
637                 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
638                         "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
639                         "RANLIB=$${RANLIB}" \
640                         $${target}); \
641             then true; else exit 1; fi; \
642           else true; fi; \
643         done
644
645 # Here are the targets which correspond to the do-X targets.
646
647 .PHONY: info installcheck dvi install-info
648 .PHONY: clean distclean mostlyclean realclean local-clean local-distclean
649 info: do-info
650 installcheck: do-installcheck
651 dvi: do-dvi
652
653 install-info: do-install-info dir.info
654         srcroot=`cd $(srcdir); pwd`; export srcroot; \
655         if [ -f dir.info ] ; then \
656           $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
657         else true ; fi
658
659 local-clean:
660         -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
661
662 local-distclean:
663         -rm -f Makefile config.status
664
665 clean: do-clean local-clean
666 mostlyclean: do-mostlyclean local-clean
667 distclean: do-distclean local-clean local-distclean
668 realclean: do-realclean local-clean local-distclean
669
670 # Check target.
671
672 .PHONY: check
673 check: $(CHECK_MODULES) \
674         $(CHECK_TARGET_MODULES) \
675         $(CHECK_X11_MODULES) \
676         check-gcc
677
678 # Installation targets.
679
680 .PHONY: install uninstall source-vault binary-vault vault-install
681 install: $(INSTALL_TARGET) 
682
683 uninstall:
684         @echo "the uninstall target is not supported in this tree"
685
686 source-vault:
687         $(MAKE) -f ./release/Build-A-Release \
688                 host=$(host_alias) source-vault
689
690 binary-vault:
691         $(MAKE) -f ./release/Build-A-Release \
692                 host=$(host_alias) target=$(target_alias)
693
694 vault-install:
695         @if [ -f ./release/vault-install ] ; then \
696           ./release/vault-install $(host_alias) $(target_alias) ; \
697         else \
698           true ; \
699         fi
700
701 .PHONY: install.all
702 install.all: install-no-fixedincludes
703         @if [ -f ./gcc/Makefile ] ; then \
704                 r=`pwd` ; export r ; \
705                 (cd ./gcc; \
706                 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
707         else \
708                 true ; \
709         fi
710
711 # install-no-fixedincludes is used because Cygnus can not distribute
712 # the fixed header files.
713 .PHONY: install-no-fixedincludes
714 install-no-fixedincludes: \
715         install-dirs \
716         $(INSTALL_MODULES) \
717         $(INSTALL_TARGET_MODULES) \
718         $(INSTALL_X11_MODULES) \
719         gcc-no-fixedincludes 
720
721 # Install the gcc headers files, but not the fixed include files,
722 # which Cygnus is not allowed to distribute.  This rule is very
723 # dependent on the workings of the gcc Makefile.in.
724 .PHONY: gcc-no-fixedincludes
725 gcc-no-fixedincludes:
726         @if [ -f ./gcc/Makefile ]; then \
727           rm -rf gcc/tmp-include; \
728           mv gcc/include gcc/tmp-include 2>/dev/null; \
729           mkdir gcc/include; \
730           cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
731           touch gcc/stmp-fixinc gcc/include/fixed; \
732           rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
733           r=`pwd`; export r; \
734           srcroot=`cd $(srcdir); pwd` ; export srcroot; \
735           (cd ./gcc; \
736            $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
737           rm -rf gcc/include; \
738           mv gcc/tmp-include gcc/include 2>/dev/null; \
739         else true; fi
740
741 # This rule is used to build the modules which use FLAGS_TO_PASS.  To
742 # build a target all-X means to cd to X and make all.
743 #
744 # all-gui, and all-libproc are handled specially because
745 # they are still experimental, and if they fail to build, that
746 # shouldn't stop "make all".
747 .PHONY: $(ALL_MODULES) all-gui all-libproc
748 $(ALL_MODULES) all-gui all-libproc:
749         @dir=`echo $@ | sed -e 's/all-//'`; \
750         if [ -f ./$${dir}/Makefile ] ; then \
751           r=`pwd`; export r; \
752           srcroot=`cd $(srcdir); pwd`; export srcroot; \
753           (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
754         else \
755           true; \
756         fi
757
758 # These rules are used to check the modules which use FLAGS_TO_PASS.
759 # To build a target check-X means to cd to X and make check.  Some
760 # modules are only tested in a native toolchain.
761
762 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
763 $(NATIVE_CHECK_MODULES):
764         @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
765           dir=`echo $@ | sed -e 's/check-//'`; \
766           if [ -f ./$${dir}/Makefile ] ; then \
767             r=`pwd`; export r; \
768             srcroot=`cd $(srcdir); pwd`; export srcroot; \
769             (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
770           else \
771             true; \
772           fi; \
773         fi
774
775 $(CROSS_CHECK_MODULES):
776         @dir=`echo $@ | sed -e 's/check-//'`; \
777         if [ -f ./$${dir}/Makefile ] ; then \
778           r=`pwd`; export r; \
779           srcroot=`cd $(srcdir); pwd`; export srcroot; \
780           (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
781         else \
782           true; \
783         fi
784
785 # This rule is used to install the modules which use FLAGS_TO_PASS.
786 # To build a target install-X means to cd to X and make install.
787 .PHONY: $(INSTALL_MODULES)
788 $(INSTALL_MODULES): install-dirs
789         @dir=`echo $@ | sed -e 's/install-//'`; \
790         if [ -f ./$${dir}/Makefile ] ; then \
791           r=`pwd`; export r; \
792           srcroot=`cd $(srcdir); pwd`; export srcroot; \
793           (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
794         else \
795           true; \
796         fi
797
798 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
799 # To build a target all-X means to cd to X and make all.
800 .PHONY: $(ALL_TARGET_MODULES)
801 $(ALL_TARGET_MODULES):
802         @dir=`echo $@ | sed -e 's/all-//'`; \
803         if [ -f ./$${dir}/Makefile ] ; then \
804           r=`pwd`; export r; \
805           srcroot=`cd $(srcdir); pwd`; export srcroot; \
806           (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
807         else \
808           true; \
809         fi
810
811 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
812 # To build a target install-X means to cd to X and make install.
813 .PHONY: $(CHECK_TARGET_MODULES)
814 $(CHECK_TARGET_MODULES):
815         @dir=`echo $@ | sed -e 's/check-//'`; \
816         if [ -f ./$${dir}/Makefile ] ; then \
817           r=`pwd`; export r; \
818           srcroot=`cd $(srcdir); pwd`; export srcroot; \
819           (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \
820         else \
821           true; \
822         fi
823
824 # This rule is used to install the modules which use
825 # TARGET_FLAGS_TO_PASS.  To build a target install-X means to cd to X
826 # and make install.
827 .PHONY: $(INSTALL_TARGET_MODULES)
828 $(INSTALL_TARGET_MODULES): install-dirs
829         @dir=`echo $@ | sed -e 's/install-//'`; \
830         if [ -f ./$${dir}/Makefile ] ; then \
831           r=`pwd`; export r; \
832           srcroot=`cd $(srcdir); pwd`; export srcroot; \
833           (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
834         else \
835           true; \
836         fi
837
838 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
839 # To build a target all-X means to cd to X and make all.
840 .PHONY: $(ALL_X11_MODULES)
841 $(ALL_X11_MODULES):
842         @dir=`echo $@ | sed -e 's/all-//'`; \
843         if [ -f ./$${dir}/Makefile ] ; then \
844           r=`pwd`; export r; \
845           srcroot=`cd $(srcdir); pwd`; export srcroot; \
846           (cd $${dir}; \
847            $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
848         else \
849           true; \
850         fi
851
852 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
853 # To build a target check-X means to cd to X and make all.
854 .PHONY: $(CHECK_X11_MODULES)
855 $(CHECK_X11_MODULES):
856         @dir=`echo $@ | sed -e 's/check-//'`; \
857         if [ -f ./$${dir}/Makefile ] ; then \
858           r=`pwd`; export r; \
859           srcroot=`cd $(srcdir); pwd`; export srcroot; \
860           (cd $${dir}; \
861            $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
862         else \
863           true; \
864         fi
865
866 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
867 # To build a target install-X means to cd to X and make install.
868 .PHONY: $(INSTALL_X11_MODULES)
869 $(INSTALL_X11_MODULES):
870         @dir=`echo $@ | sed -e 's/install-//'`; \
871         if [ -f ./$${dir}/Makefile ] ; then \
872           r=`pwd`; export r; \
873           srcroot=`cd $(srcdir); pwd`; export srcroot; \
874           (cd $${dir}; \
875            $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
876         else \
877           true; \
878         fi
879
880 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
881 .PHONY: all-gcc
882 all-gcc:
883         @if [ -f ./gcc/Makefile ] ; then \
884           r=`pwd`; export r; \
885           srcroot=`cd $(srcdir); pwd`; export srcroot; \
886           (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
887         else \
888           true; \
889         fi
890
891 .PHONY: check-gcc
892 check-gcc:
893         @if [ -f ./gcc/Makefile ] ; then \
894           r=`pwd`; export r; \
895           srcroot=`cd $(srcdir); pwd`; export srcroot; \
896           (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
897         else \
898           true; \
899         fi
900
901 .PHONY: install-gcc
902 install-gcc:
903         @if [ -f ./gcc/Makefile ] ; then \
904           r=`pwd`; export r; \
905           srcroot=`cd $(srcdir); pwd`; export srcroot; \
906           (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
907         else \
908           true; \
909         fi
910
911
912 # EXPERIMENTAL STUFF
913 # This rule is used to install the modules which use FLAGS_TO_PASS.
914 # To build a target install-X means to cd to X and make install.
915 .PHONY: install-dosrel
916 install-dosrel: install-dirs info
917         @dir=`echo $@ | sed -e 's/install-//'`; \
918         if [ -f ./$${dir}/Makefile ] ; then \
919           r=`pwd`; export r; \
920           srcroot=`cd $(srcdir); pwd`; export srcroot; \
921           (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
922         else \
923           true; \
924         fi
925
926 install-dosrel-fake:
927
928
929 # This is a list of inter-dependencies among modules.
930 all-autoconf: all-m4
931 all-bfd:
932 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
933 all-byacc:
934 # start-sanitize-chill
935 all-chillrt: all-binutils all-gas all-gcc all-newlib
936 # end-sanitize-chill
937 all-cvs:
938 all-dejagnu: all-tcl all-expect all-tk
939 all-diff: all-libiberty
940 all-emacs:
941 all-emacs19: all-byacc
942 all-etc:
943 all-expect: all-tcl all-tk
944 all-fileutils: all-libiberty
945 all-find:
946 all-flex: all-libiberty all-byacc
947 all-gas: all-libiberty all-opcodes all-bfd
948 all-gash: all-tcl
949 all-gawk:
950 all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld
951 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements)
952 all-gprof: all-libiberty all-bfd
953 all-grep: all-libiberty
954 all-gui: all-gdb all-libproc all-librx
955 all-gzip: all-libiberty
956 all-hello: all-libiberty
957 all-indent:
958 all-ispell: all-emacs19
959 all-ld: all-libiberty all-bfd all-byacc all-flex
960 all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-librx all-libstdc++
961 all-libio: all-gas all-ld all-gcc all-xiberty all-newlib 
962 all-libiberty:
963 all-libstdc++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio
964 all-m4: all-libiberty
965 all-make: all-libiberty
966 all-mmalloc:
967 all-newlib: all-binutils all-gas all-gcc
968 all-opcodes: all-bfd
969 all-patch:
970 all-prms: all-libiberty
971 all-rcs:
972 all-readline:
973 all-recode: all-libiberty
974 all-sed: all-libiberty
975 all-send-pr: all-prms
976 all-shellutils:
977 all-sim: all-libiberty all-bfd
978 all-tar: all-libiberty
979 all-tcl:
980 all-tclX: all-tcl all-tk
981 all-tk: all-tcl
982 all-texinfo: all-libiberty
983 all-textutils:
984 all-tgas: all-libiberty all-bfd
985 all-time:
986 all-wdiff:
987 all-uudecode: all-libiberty
988 all-xiberty: all-gcc all-ld all-newlib
989
990 ### other supporting targets
991
992 MAKEDIRS= \
993         $(prefix) \
994         $(exec_prefix) \
995         $(tooldir)
996
997 .PHONY: install-dirs
998 install-dirs:
999         @for i in $(MAKEDIRS) ; do \
1000                 echo Making $$i... ; \
1001                 parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
1002                 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1003                 if [ ! -d $$i ] ; then \
1004                         if mkdir $$i ; then \
1005                                 true ; \
1006                         else \
1007                                 exit 1 ; \
1008                         fi ; \
1009                 else \
1010                         true ; \
1011                 fi ; \
1012         done
1013
1014
1015 dir.info: do-install-info
1016         if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1017           $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1018           mv -f dir.info.new dir.info ; \
1019         else true ; \
1020         fi
1021
1022 dist:
1023         @echo "Building a full distribution of this tree isn't done"
1024         @echo "via 'make dist'.  Check out the etc/ subdirectory" 
1025
1026 etags tags: TAGS
1027
1028 # Right now this just builds TAGS in each subdirectory.  emacs19 has the
1029 # ability to use several tags files at once, so there is probably no need
1030 # to combine them into one big TAGS file (like CVS 1.3 does).  We could
1031 # (if we felt like it) have this Makefile write a piece of elisp which
1032 # the user could load to tell emacs19 where all the TAGS files we just
1033 # built are.
1034 TAGS: do-TAGS
1035
1036 # with the gnu make, this is done automatically.
1037
1038 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1039         $(SHELL) ./config.status
1040
1041 #
1042 # Support for building net releases
1043
1044 # Files in devo used in any net release.
1045 # ChangeLog omitted because it may refer to files which are not in this
1046 # distribution (perhaps it would be better to include it anyway).
1047 DEVO_SUPPORT= README Makefile.in configure configure.in \
1048         config.guess config.sub config move-if-change \
1049         COPYING COPYING.LIB install.sh
1050
1051 # Files in devo/etc used in any net release.
1052 # ChangeLog omitted because it may refer to files which are not in this
1053 # distribution (perhaps it would be better to include it anyway).
1054 ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
1055         configure.texi standards.texi make-stds.texi
1056 ETC_SUPPORT_PFX=configure.info standards.info cfg-paper.info
1057
1058 # When you use `make setup-dirs' or `make taz' you should always redefine
1059 # this macro.
1060 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1061 # Directories that might want `make diststuff' run.
1062 DISTSTUFFDIRS= ld gprof gdb libg++ binutils gnats gas
1063 # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1064 DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in
1065 # Directories where "info" should be built.
1066 DISTDOCDIRS= ld gprof binutils gas bfd libg++ libio gdb gnats send-pr etc
1067
1068 .PHONY: taz
1069
1070 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1071   texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1072         # Make sure "diststuff" files get built properly.
1073         for f in $(DISTBISONFILES) ; do \
1074           if [ -r $$f ]; then \
1075             sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \
1076             mv -f tmp $$f ; \
1077           else true; fi ; \
1078         done
1079         # Take out texinfo from a few places; make simple BISON=bison line.
1080         sed -e '/^all\.normal: /s/\all-texinfo //' \
1081             -e '/^      install-texinfo /d' \
1082             -e '/^BISON = /,/^$$/d' \
1083             -e '/^# BISON:/s/.*/BISON = bison -y/' \
1084         <Makefile.in >tmp
1085         mv -f tmp Makefile.in
1086         #
1087         $(start-sanitize-Sanitize)
1088         @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1089         $(end-sanitize-Sanitize)
1090         ./configure sun4
1091         # Doc files don't change; include them in distribution.
1092         for f in $(DISTDOCDIRS) ; do \
1093           if [ -r $$f/Makefile ]; then \
1094             (cd $$f ; $(MAKE) info) || exit 1 ; \
1095           else true ; fi ; \
1096         done
1097         # Make links, and run "make diststuff" when needed.
1098         # The `echo' for setting `p' is to convert all whitespace to spaces.
1099         # Then the `case' further below should tell whether $$d is in
1100         # DISTSTUFFDIRS.
1101         rm -rf proto-toplev ; mkdir proto-toplev
1102         set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1103         p=" `echo $(DISTSTUFFDIRS)` " ; \
1104         for d in $$dirs ; do \
1105           if [ -d $$d ]; then \
1106             case " $$p " in \
1107             *" $$d "*)  \
1108                 (cd $$d ; $(MAKE) diststuff ) || exit 1  ;; \
1109             esac ; \
1110             if [ -d $$d/proto-$$d.dir ]; then \
1111               ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1112             else \
1113               ln -s ../$$d proto-toplev/$$d ; \
1114             fi ; \
1115           else ln -s ../$$d proto-toplev/$$d ; fi ; \
1116         done
1117         $(MAKE) distclean
1118         #
1119         mkdir proto-toplev/etc
1120         (cd proto-toplev/etc; \
1121          for i in $(ETC_SUPPORT); do \
1122                 ln -s ../../etc/$$i . ; \
1123          done ; \
1124          for i in $(ETC_SUPPORT_PFX); do \
1125                 ln -s ../../etc/$$i* . ; \
1126          done)
1127         #
1128         # Take out texinfo from configurable dirs
1129         rm proto-toplev/configure.in
1130         sed -e '/^host_tools=/s/texinfo //' \
1131             <configure.in >proto-toplev/configure.in
1132         #
1133         mkdir proto-toplev/texinfo
1134         ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1135         ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1136         ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1137         ln -s ../../texinfo/tex3patch   proto-toplev/texinfo/
1138         chmod og=u `find . -print`
1139         (VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1140                 echo "==> Making $(TOOL)-$$VER.tar.gz"; \
1141                 rm -f $(TOOL)-$$VER; ln -s proto-toplev $(TOOL)-$$VER; \
1142                 tar cfh - $(TOOL)-$$VER \
1143                 | $(GZIPPROG) -v -9 >$(TOOL)-$$VER.tar.gz )
1144
1145 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1146 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1147
1148 .PHONY: gas.tar.gz
1149 GAS_SUPPORT_DIRS= bfd include libiberty opcodes
1150 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1151         $(MAKE) -f Makefile.in taz TOOL=gas \
1152                 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1153
1154 # The FSF "binutils" release includes gprof and ld.
1155 .PHONY: binutils.tar.gz
1156 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof
1157 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1158         $(MAKE) -f Makefile.in taz TOOL=binutils \
1159                 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1160
1161 .PHONY: gas+binutils.tar.gz
1162 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1163 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1164         $(MAKE) -f Makefile.in taz TOOL=gas \
1165                 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1166
1167 .PHONY: libg++.tar.gz
1168 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty xiberty
1169 libg++.tar.gz: $(DIST_SUPPORT) libg++
1170         $(MAKE) -f Makefile.in taz TOOL=libg++ \
1171                 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1172
1173 GNATS_SUPPORT_DIRS=include libiberty send-pr
1174 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1175         $(MAKE) -f  Makefile.in taz TOOL=gnats \
1176                 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1177
1178 .PHONY: gdb.tar.gz
1179 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim
1180 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1181         $(MAKE) -f Makefile.in taz TOOL=gdb \
1182                 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
1183
1184 .PHONY: newlib.tar.gz
1185 NEWLIB_SUPPORT_DIRS=libgloss
1186 # taz configures for the sun4 target which won't configure newlib.
1187 # We need newlib configured so that the .info files are made.
1188 # Unfortunately, it is not enough to just configure newlib separately:
1189 # taz will build the .info files but since SUBDIRS won't contain newlib,
1190 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1191 # used in building the .info files, eg: *.def, *.ref).
1192 # Compensate here by configuring newlib for a simple (no multilib support)
1193 # cross target (sparc64), building the info files, and doing make distclean
1194 # ourselves.
1195 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1196         rootme=`pwd` ; \
1197           cd newlib && ../configure --srcdir $$rootme/newlib \
1198                 --host sun4 --target sparc64-elf
1199         cd newlib ; make info
1200         cd newlib ; make distclean
1201         $(MAKE) -f Makefile.in taz TOOL=newlib \
1202                 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1203                 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" \
1204                 DISTDOCDIRS="$(DISTDOCDIRS) newlib"
1205
1206 .NOEXPORT:
1207 MAKEOVERRIDES=
1208
1209 # start-sanitize-chill
1210 ## This is ugly, but I don't want GNU make to put these variables in
1211 ## the environment.  Older makes will see this as a set of targets
1212 ## with no dependencies and no actions.
1213 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1214 # end-sanitize-chill
1215
1216 # end of Makefile.in