2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992 Free Software Foundation
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.
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.
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. */
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
29 program_transform_name =
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
49 INSTALL_PROGRAM = $(INSTALL)
50 INSTALL_DATA = $(INSTALL)
59 BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
60 then echo $${rootme}/byacc/byacc ; \
61 else echo bison -y ; \
64 LEX = `if [ -f $${rootme}/flex/flex ] ; \
65 then echo $${rootme}/flex/flex ; \
68 MAKEINFO = `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
69 then echo $${rootme}/texinfo/C/makeinfo ; \
70 else echo makeinfo ; fi`
72 # C compiler to use to create programs which must be run in the build
76 SUBDIRS = libiberty mmalloc glob readline opcodes bfd gdb binutils ld gas tgas gcc libg++ newlib
80 INSTALL_TARGET = install.all
86 if [ -f $${rootme}/gcc/Makefile ] ; then \
87 echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
89 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
92 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
97 if [ -f $${rootme}/gas/Makefile ] ; then \
98 echo $${rootme}/gas/as.new ; \
100 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
103 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
108 if [ -f $${rootme}/binutils/Makefile ] ; then \
109 echo $${rootme}/binutils/ar ; \
111 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
114 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
118 RANLIB_FOR_TARGET = ` \
119 if [ -f $${rootme}/binutils/Makefile ] ; then \
120 echo $${rootme}/binutils/ranlib ; \
122 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
125 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
130 if [ -f $${rootme}/binutils/Makefile ] ; then \
131 echo $${rootme}/binutils/nm ; \
133 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
136 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
141 if [ -f $${rootme}/gcc/Makefile ] ; then \
142 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
143 echo -I$${rootme}/gcc/include ; \
145 echo -I$${rootme}/gcc/include -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include ; \
151 #### host and target specific makefile fragments come in here.
154 # Flags to pass down to sub-makes
157 "exec_prefix=$(exec_prefix)" \
158 "tooldir=$(tooldir)" \
160 "AR_FLAGS=$(AR_FLAGS)" \
164 "LOADLIBES=$(LOADLIBES)" \
165 "LDFLAGS=$(LDFLAGS)" \
168 "MAKEINFO=$(MAKEINFO)" \
169 "INSTALL=$(INSTALL)" \
170 "INSTALL_DATA=$(INSTALL_DATA)" \
171 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
172 "CC_FOR_BUILD=$(CC_FOR_BUILD)"
174 # Flags to pass down to makes which are built with the target
175 # environment (e.g. libg++, xiberty, newlib).
176 TARGET_FLAGS_TO_PASS = \
178 "exec_prefix=$(exec_prefix)" \
179 "tooldir=$(tooldir)" \
180 "AR_FLAGS=$(AR_FLAGS)" \
182 "LOADLIBES=$(LOADLIBES)" \
183 "LDFLAGS=$(LDFLAGS)" \
186 "MAKEINFO=$(MAKEINFO)" \
187 "INSTALL=$(INSTALL)" \
188 "INSTALL_DATA=$(INSTALL_DATA)" \
189 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
190 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
191 "CC=$(CC_FOR_TARGET)" \
192 "AS=$(AS_FOR_TARGET)" \
193 "AR=$(AR_FOR_TARGET)" \
194 "RANLIB=$(RANLIB_FOR_TARGET)" \
195 "NM=$(NM_FOR_TARGET)" \
196 "XTRAFLAGS=$(XTRAFLAGS)"
198 .PHONY: all info install-info clean-info
204 @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) subdir_do DO=info "DODIRS=$(SUBDIRS)"
207 @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=check "DODIRS=$(SUBDIRS)" subdir_do
210 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=clean-info "DODIRS=$(SUBDIRS)" subdir_do
212 install-info: install-info-dirs force
213 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
214 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
215 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
216 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
217 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) dir.info install-dir.info
220 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
221 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
222 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
223 $(INSTALL_DATA) dir.info $(infodir)/dir.info
225 all.normal: all-autoconf all-libiberty all-mmalloc all-texinfo \
226 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
227 all-gcc all-binutils all-libg++ all-readline all-gdb \
228 all-make all-rcs all-cvs all-diff all-grep \
229 all-patch all-emacs all-ispell all-etc \
230 all-newlib all-gprof all-send_pr all-libm
232 all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
233 all-opcodes all-bfd all-readline all-gdb all-binutils all-gcc \
236 clean: clean-autoconf clean-libiberty clean-mmalloc clean-texinfo \
237 clean-bfd clean-newlib clean-binutils clean-flex \
238 clean-byacc clean-ld clean-gas clean-etc clean-opcodes \
239 clean-gcc clean-readline clean-glob clean-gdb \
240 clean-make clean-diff clean-grep clean-rcs \
241 clean-cvs clean-patch clean-emacs clean-ispell \
242 clean-libg++ clean-gprof clean-send_pr clean-libm
243 -rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
248 install: $(INSTALL_TARGET)
249 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
250 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
251 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
253 install.all: install-no-fixedincludes
254 @if [ -f ./gcc/Makefile ] ; then \
255 rootme=`pwd` ; export rootme ; \
257 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
262 install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
292 gcc-no-fixedincludes:
293 @if [ -f ./gcc/Makefile ] ; then \
294 rootme=`pwd` ; export rootme ; \
296 $(MAKE) $(FLAGS_TO_PASS) install install-man \
297 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
302 install.cross: install-dirs install-libiberty install-mmalloc \
303 install-binutils install-opcodes install-byacc install-flex \
304 install-ld install-gas install-readline \
305 install-glob install-gdb install-mmalloc \
306 install-newlib install-gcc install-etc
310 @if [ -f ./autoconf/Makefile ] ; then \
311 rootme=`pwd` ; export rootme ; \
312 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
317 clean-autoconf: force
318 @if [ -f ./autoconf/Makefile ] ; then \
319 rootme=`pwd` ; export rootme ; \
320 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
325 install-autoconf: force
326 @if [ -f ./autoconf/Makefile ] ; then \
327 rootme=`pwd` ; export rootme ; \
328 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
335 @if [ -f ./etc/Makefile ] ; then \
336 rootme=`pwd` ; export rootme ; \
337 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
343 @if [ -f ./etc/Makefile ] ; then \
344 rootme=`pwd` ; export rootme ; \
345 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
351 @if [ -f ./etc/Makefile ] ; then \
352 rootme=`pwd` ; export rootme ; \
353 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
360 @if [ -f ./libiberty/Makefile ] ; then \
361 rootme=`pwd` ; export rootme ; \
363 $(MAKE) $(FLAGS_TO_PASS) all) ; \
368 clean-libiberty: force
369 @if [ -f ./libiberty/Makefile ] ; then \
370 rootme=`pwd` ; export rootme ; \
372 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
377 install-libiberty: force
378 @if [ -f ./libiberty/Makefile ] ; then \
379 rootme=`pwd` ; export rootme ; \
381 $(MAKE) $(FLAGS_TO_PASS) install) ; \
388 @if [ -f ./mmalloc/Makefile ] ; then \
389 rootme=`pwd` ; export rootme ; \
391 $(MAKE) $(FLAGS_TO_PASS) all) ; \
397 @if [ -f ./mmalloc/Makefile ] ; then \
398 rootme=`pwd` ; export rootme ; \
400 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
405 install-mmalloc: force
406 @if [ -f ./mmalloc/Makefile ] ; then \
407 rootme=`pwd` ; export rootme ; \
409 $(MAKE) $(FLAGS_TO_PASS) install) ; \
415 all-texinfo: all-libiberty
416 @if [ -f ./texinfo/Makefile ] ; then \
417 rootme=`pwd` ; export rootme ; \
419 $(MAKE) $(FLAGS_TO_PASS) all) ; \
425 @if [ -f ./texinfo/Makefile ] ; then \
426 rootme=`pwd` ; export rootme ; \
428 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
433 install-texinfo: force
434 @if [ -f ./texinfo/Makefile ] ; then \
435 rootme=`pwd` ; export rootme ; \
437 $(MAKE) $(FLAGS_TO_PASS) install) ; \
444 @if [ -f ./bfd/Makefile ] ; then \
445 rootme=`pwd` ; export rootme ; \
447 $(MAKE) $(FLAGS_TO_PASS) all) ; \
453 @if [ -f ./bfd/Makefile ] ; then \
454 rootme=`pwd` ; export rootme ; \
456 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
462 @if [ -f ./bfd/Makefile ] ; then \
463 rootme=`pwd` ; export rootme ; \
465 $(MAKE) $(FLAGS_TO_PASS) install) ; \
473 @if [ -f ./opcodes/Makefile ] ; then \
474 rootme=`pwd` ; export rootme ; \
476 $(MAKE) $(FLAGS_TO_PASS) all) ; \
482 @if [ -f ./opcodes/Makefile ] ; then \
483 rootme=`pwd` ; export rootme ; \
485 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
490 install-opcodes: force
491 @if [ -f ./opcodes/Makefile ] ; then \
492 rootme=`pwd` ; export rootme ; \
494 $(MAKE) $(FLAGS_TO_PASS) install) ; \
500 all-binutils: all-opcodes all-libiberty all-bfd all-flex
501 @if [ -f ./binutils/Makefile ] ; then \
502 rootme=`pwd` ; export rootme ; \
504 $(MAKE) $(FLAGS_TO_PASS) all) ; \
509 clean-binutils: force
510 @if [ -f ./binutils/Makefile ] ; then \
511 rootme=`pwd` ; export rootme ; \
513 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
518 install-binutils: force
519 @if [ -f ./binutils/Makefile ] ; then \
520 rootme=`pwd` ; export rootme ; \
522 $(MAKE) $(FLAGS_TO_PASS) install) ; \
528 all-newlib: all-binutils all-ld all-gas all-gcc
529 @if [ -f ./newlib/Makefile ] ; then \
530 rootme=`pwd` ; export rootme ; \
531 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
533 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
539 @if [ -f ./newlib/Makefile ] ; then \
540 rootme=`pwd` ; export rootme ; \
541 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
543 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
548 install-newlib: force
549 @if [ -f ./newlib/Makefile ] ; then \
550 rootme=`pwd` ; export rootme ; \
551 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
553 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
559 all-gprof: all-libiberty all-bfd
560 @if [ -f ./gprof/Makefile ] ; then \
561 rootme=`pwd` ; export rootme ; \
563 $(MAKE) $(FLAGS_TO_PASS) all) ; \
569 @if [ -f ./gprof/Makefile ] ; then \
570 rootme=`pwd` ; export rootme ; \
572 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
578 @if [ -f ./gprof/Makefile ] ; then \
579 rootme=`pwd` ; export rootme ; \
581 $(MAKE) $(FLAGS_TO_PASS) install) ; \
588 @if [ -f ./byacc/Makefile ] ; then \
589 rootme=`pwd` ; export rootme ; \
591 $(MAKE) $(FLAGS_TO_PASS) all) ; \
597 @if [ -f ./byacc/Makefile ] ; then \
598 rootme=`pwd` ; export rootme ; \
600 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
606 @if [ -f ./byacc/Makefile ] ; then \
607 rootme=`pwd` ; export rootme ; \
609 $(MAKE) $(FLAGS_TO_PASS) install) ; \
615 all-flex: all-libiberty
616 @if [ -f ./flex/Makefile ] ; then \
617 rootme=`pwd` ; export rootme ; \
619 $(MAKE) $(FLAGS_TO_PASS) all) ; \
625 @if [ -f ./flex/Makefile ] ; then \
626 rootme=`pwd` ; export rootme ; \
628 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
634 @if [ -f ./flex/Makefile ] ; then \
635 rootme=`pwd` ; export rootme ; \
637 $(MAKE) $(FLAGS_TO_PASS) install) ; \
642 all-gcc: all-libiberty all-byacc
643 @if [ -f ./gcc/Makefile ] ; then \
644 rootme=`pwd` ; export rootme ; \
646 $(MAKE) $(FLAGS_TO_PASS) all) ; \
652 @if [ -f ./gcc/Makefile ] ; then \
653 rootme=`pwd` ; export rootme ; \
655 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
661 @if [ -f ./gcc/Makefile ] ; then \
662 rootme=`pwd` ; export rootme ; \
664 $(MAKE) $(FLAGS_TO_PASS) install) ; \
671 @if [ -f ./readline/Makefile ] ; then \
672 rootme=`pwd` ; export rootme ; \
674 $(MAKE) $(FLAGS_TO_PASS) all) ; \
679 clean-readline: force
680 @if [ -f ./readline/Makefile ] ; then \
681 rootme=`pwd` ; export rootme ; \
683 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
688 install-readline: force
689 @if [ -f ./readline/Makefile ] ; then \
690 rootme=`pwd` ; export rootme ; \
692 $(MAKE) $(FLAGS_TO_PASS) install) ; \
699 @if [ -f ./glob/Makefile ] ; then \
700 rootme=`pwd` ; export rootme ; \
702 $(MAKE) $(FLAGS_TO_PASS) all) ; \
708 @if [ -f ./glob/Makefile ] ; then \
709 rootme=`pwd` ; export rootme ; \
711 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
717 @if [ -f ./glob/Makefile ] ; then \
718 rootme=`pwd` ; export rootme ; \
720 $(MAKE) $(FLAGS_TO_PASS) install) ; \
726 all-gas: all-libiberty all-opcodes all-bfd
727 @if [ -f ./gas/Makefile ] ; then \
728 rootme=`pwd` ; export rootme ; \
730 $(MAKE) $(FLAGS_TO_PASS) all) ; \
736 @if [ -f ./gas/Makefile ] ; then \
737 rootme=`pwd` ; export rootme ; \
739 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
745 @if [ -f ./gas/Makefile ] ; then \
746 rootme=`pwd` ; export rootme ; \
748 $(MAKE) $(FLAGS_TO_PASS) install) ; \
754 all-tgas: all-libiberty all-bfd
755 @if [ -f ./tgas/Makefile ] ; then \
756 rootme=`pwd` ; export rootme ; \
758 $(MAKE) $(FLAGS_TO_PASS) all) ; \
765 all-ld: all-libiberty all-bfd all-byacc all-flex
766 @if [ -f ./ld/Makefile ] ; then \
767 rootme=`pwd` ; export rootme ; \
769 $(MAKE) $(FLAGS_TO_PASS) all) ; \
775 @if [ -f ./ld/Makefile ] ; then \
776 rootme=`pwd` ; export rootme ; \
778 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
784 @if [ -f ./ld/Makefile ] ; then \
785 rootme=`pwd` ; export rootme ; \
787 $(MAKE) $(FLAGS_TO_PASS) install) ; \
793 all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
794 @if [ -f ./gdb/Makefile ] ; then \
795 rootme=`pwd` ; export rootme ; \
797 $(MAKE) $(FLAGS_TO_PASS) all) ; \
803 @if [ -f ./gdb/Makefile ] ; then \
804 rootme=`pwd` ; export rootme ; \
806 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
812 @if [ -f ./gdb/Makefile ] ; then \
813 rootme=`pwd` ; export rootme ; \
815 $(MAKE) $(FLAGS_TO_PASS) install) ; \
821 all-make: all-libiberty
822 @if [ -f ./make/Makefile ] ; then \
823 rootme=`pwd` ; export rootme ; \
825 $(MAKE) $(FLAGS_TO_PASS) all) ; \
831 @if [ -f ./make/Makefile ] ; then \
832 rootme=`pwd` ; export rootme ; \
834 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
840 @if [ -f ./make/Makefile ] ; then \
841 rootme=`pwd` ; export rootme ; \
843 $(MAKE) $(FLAGS_TO_PASS) install) ; \
850 @if [ -f ./diff/Makefile ] ; then \
851 rootme=`pwd` ; export rootme ; \
853 $(MAKE) $(FLAGS_TO_PASS) all) ; \
859 @if [ -f ./diff/Makefile ] ; then \
860 rootme=`pwd` ; export rootme ; \
862 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
868 @if [ -f ./diff/Makefile ] ; then \
869 rootme=`pwd` ; export rootme ; \
871 $(MAKE) $(FLAGS_TO_PASS) install) ; \
878 @if [ -f ./grep/Makefile ] ; then \
879 rootme=`pwd` ; export rootme ; \
881 $(MAKE) $(FLAGS_TO_PASS) all) ; \
887 @if [ -f ./grep/Makefile ] ; then \
888 rootme=`pwd` ; export rootme ; \
890 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
896 @if [ -f ./grep/Makefile ] ; then \
897 rootme=`pwd` ; export rootme ; \
899 $(MAKE) $(FLAGS_TO_PASS) install) ; \
906 @if [ -f ./rcs/Makefile ] ; then \
907 rootme=`pwd` ; export rootme ; \
909 $(MAKE) $(FLAGS_TO_PASS) all) ; \
915 @if [ -f ./rcs/Makefile ] ; then \
916 rootme=`pwd` ; export rootme ; \
918 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
924 @if [ -f ./rcs/Makefile ] ; then \
925 rootme=`pwd` ; export rootme ; \
927 $(MAKE) $(FLAGS_TO_PASS) install) ; \
934 @if [ -f ./cvs/Makefile ] ; then \
935 rootme=`pwd` ; export rootme ; \
937 $(MAKE) $(FLAGS_TO_PASS) all) ; \
943 @if [ -f ./cvs/Makefile ] ; then \
944 rootme=`pwd` ; export rootme ; \
946 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
952 @if [ -f ./cvs/Makefile ] ; then \
953 rootme=`pwd` ; export rootme ; \
955 $(MAKE) $(FLAGS_TO_PASS) install) ; \
962 @if [ -f ./patch/Makefile ] ; then \
963 rootme=`pwd` ; export rootme ; \
965 $(MAKE) $(FLAGS_TO_PASS) all) ; \
971 @if [ -f ./patch/Makefile ] ; then \
972 rootme=`pwd` ; export rootme ; \
974 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
980 @if [ -f ./patch/Makefile ] ; then \
981 rootme=`pwd` ; export rootme ; \
983 $(MAKE) $(FLAGS_TO_PASS) \
985 man1dir=$(man1dir) install) ; \
992 @if [ -f ./emacs/Makefile ] ; then \
993 rootme=`pwd` ; export rootme ; \
995 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1001 @if [ -f ./emacs/Makefile ] ; then \
1002 rootme=`pwd` ; export rootme ; \
1004 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1009 install-emacs: force
1010 @if [ -f ./emacs/Makefile ] ; then \
1011 rootme=`pwd` ; export rootme ; \
1013 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1019 all-ispell: all-emacs
1020 @if [ -f ./ispell/Makefile ] ; then \
1021 rootme=`pwd` ; export rootme ; \
1023 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1029 @if [ -f ./ispell/Makefile ] ; then \
1030 rootme=`pwd` ; export rootme ; \
1032 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1037 install-ispell: force
1038 @if [ -f ./ispell/Makefile ] ; then \
1039 rootme=`pwd` ; export rootme ; \
1041 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1048 @if [ -f ./send_pr/Makefile ] ; then \
1049 rootme=`pwd` ; export rootme ; \
1051 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1056 clean-send_pr: force
1057 @if [ -f ./send_pr/Makefile ] ; then \
1058 rootme=`pwd` ; export rootme ; \
1060 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1065 install-send_pr: force
1066 @if [ -f ./send_pr/Makefile ] ; then \
1067 rootme=`pwd` ; export rootme ; \
1069 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1076 @if [ -f ./libm/Makefile ] ; then \
1077 rootme=`pwd` ; export rootme ; \
1079 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1085 @if [ -f ./libm/Makefile ] ; then \
1086 rootme=`pwd` ; export rootme ; \
1088 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1094 @if [ -f ./libm/Makefile ] ; then \
1095 rootme=`pwd` ; export rootme ; \
1097 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1104 all-libg++: all-gas all-ld all-gcc
1105 @if [ -f ./libg++/Makefile ] ; then \
1106 rootme=`pwd` ; export rootme ; \
1107 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1109 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
1115 @if [ -f ./libg++/Makefile ] ; then \
1116 rootme=`pwd` ; export rootme ; \
1117 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1119 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
1124 install-libg++: force
1125 @if [ -f ./libg++/Makefile ] ; then \
1126 rootme=`pwd` ; export rootme ; \
1127 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1129 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
1134 ### other supporting targets
1135 # this is a bad hack.
1136 all.xclib: all.normal
1137 if [ -f clib/Makefile ] ; then \
1138 (cd clib ; $(MAKE) $(FLAGS_TO_PASS)) ; \
1142 @for i in $(DODIRS); do \
1143 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1145 libg++ | xiberty | newlib) \
1146 if (rootme=`pwd` ; export rootme ; \
1147 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1149 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1153 if (rootme=`pwd` ; export rootme ; \
1155 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1162 # The "else true" stuff is for Ultrix; the shell returns the exit code
1163 # of the "if" command, if no commands are run in the "then" or "else" part,
1164 # causing Make to quit.
1188 for i in $(MAKEDIRS) ; do \
1189 echo Making $$i... ; \
1190 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1191 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1192 if [ ! -d $$i ] ; then \
1193 if mkdir $$i ; then \
1209 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
1210 # if [ -d $(datadir) ] ; then true ; else mkdir $(datadir) ; fi
1211 # if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
1214 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
1215 mv -f dir.info.new dir.info
1224 @for i in $(SUBDIRS); \
1228 wd=`basename $$pwd`; \
1229 for j in `$(MAKE) ls`; \
1237 # with the gnu make, this is done automatically.
1239 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1240 $(SHELL) ./config.status
1243 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1245 DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
1246 config.sub config configure.man move-if-change
1247 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc readline glob
1248 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
1250 setup-dirs: force_update
1253 ./configure -rm sun4
1254 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1256 bfd.ilrt.tar.Z: setup-dirs
1257 rm -f bfd.ilrt.tar.Z
1258 tar cf - $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) \
1259 | compress -v >bfd.ilrt.tar.Z
1261 gdb.tar.Z: setup-dirs
1262 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1263 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1265 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1266 rm -rf proto-toplev; mkdir proto-toplev
1267 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1268 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1271 # Put only one copy (four hard links) of COPYING in the tar file.
1272 rm proto-toplev/bfd/COPYING
1273 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1274 rm proto-toplev/include/COPYING
1275 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1276 rm proto-toplev/readline/COPYING
1277 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
1278 # Take out texinfo from configurable dirs
1279 rm proto-toplev/configure.in
1280 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
1281 # Take out glob from buildable dirs
1282 rm proto-toplev/Makefile.in
1284 sed -e '/^SUBDIRS =/s/glob //' \
1285 -e '/^all\.normal: /s/\all-texinfo //' \
1286 -e '/^clean: /s/clean-texinfo //' \
1287 -e '/^install\.all: /s/install-texinfo //' \
1288 <Makefile.in >proto-toplev/Makefile.in
1290 mkdir proto-toplev/texinfo
1291 mkdir proto-toplev/texinfo/fsf
1292 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
1293 chmod og=u `find proto-toplev -print`
1294 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1295 echo "==> Making gdb-$$VER.tar.Z"; \
1296 ln -s proto-toplev gdb-$$VER; \
1297 tar cfh - gdb-$$VER \
1298 | compress -v >gdb-$$VER.tar.Z)
1304 # end of Makefile.in