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 [ -f $${rootme}/newlib/Makefile ] ; then \
143 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
145 echo -I$${rootme}/gcc/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 clean-xiberty
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) ; \
387 all-xiberty: all-gcc all-newlib
388 @if [ -f ./xiberty/Makefile ] ; then \
389 rootme=`pwd` ; export rootme ; \
390 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
392 $(MAKE) $(FLAGS_TO_PASS) all) ; \
398 @if [ -f ./xiberty/Makefile ] ; then \
399 rootme=`pwd` ; export rootme ; \
400 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
402 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
407 install-xiberty: force
408 @if [ -f ./xiberty/Makefile ] ; then \
409 rootme=`pwd` ; export rootme ; \
410 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
412 $(MAKE) $(FLAGS_TO_PASS) install) ; \
419 @if [ -f ./mmalloc/Makefile ] ; then \
420 rootme=`pwd` ; export rootme ; \
422 $(MAKE) $(FLAGS_TO_PASS) all) ; \
428 @if [ -f ./mmalloc/Makefile ] ; then \
429 rootme=`pwd` ; export rootme ; \
431 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
436 install-mmalloc: force
437 @if [ -f ./mmalloc/Makefile ] ; then \
438 rootme=`pwd` ; export rootme ; \
440 $(MAKE) $(FLAGS_TO_PASS) install) ; \
446 all-texinfo: all-libiberty
447 @if [ -f ./texinfo/Makefile ] ; then \
448 rootme=`pwd` ; export rootme ; \
450 $(MAKE) $(FLAGS_TO_PASS) all) ; \
456 @if [ -f ./texinfo/Makefile ] ; then \
457 rootme=`pwd` ; export rootme ; \
459 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
464 install-texinfo: force
465 @if [ -f ./texinfo/Makefile ] ; then \
466 rootme=`pwd` ; export rootme ; \
468 $(MAKE) $(FLAGS_TO_PASS) install) ; \
475 @if [ -f ./bfd/Makefile ] ; then \
476 rootme=`pwd` ; export rootme ; \
478 $(MAKE) $(FLAGS_TO_PASS) all) ; \
484 @if [ -f ./bfd/Makefile ] ; then \
485 rootme=`pwd` ; export rootme ; \
487 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
493 @if [ -f ./bfd/Makefile ] ; then \
494 rootme=`pwd` ; export rootme ; \
496 $(MAKE) $(FLAGS_TO_PASS) install) ; \
504 @if [ -f ./opcodes/Makefile ] ; then \
505 rootme=`pwd` ; export rootme ; \
507 $(MAKE) $(FLAGS_TO_PASS) all) ; \
513 @if [ -f ./opcodes/Makefile ] ; then \
514 rootme=`pwd` ; export rootme ; \
516 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
521 install-opcodes: force
522 @if [ -f ./opcodes/Makefile ] ; then \
523 rootme=`pwd` ; export rootme ; \
525 $(MAKE) $(FLAGS_TO_PASS) install) ; \
531 all-binutils: all-opcodes all-libiberty all-bfd all-flex
532 @if [ -f ./binutils/Makefile ] ; then \
533 rootme=`pwd` ; export rootme ; \
535 $(MAKE) $(FLAGS_TO_PASS) all) ; \
540 clean-binutils: force
541 @if [ -f ./binutils/Makefile ] ; then \
542 rootme=`pwd` ; export rootme ; \
544 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
549 install-binutils: force
550 @if [ -f ./binutils/Makefile ] ; then \
551 rootme=`pwd` ; export rootme ; \
553 $(MAKE) $(FLAGS_TO_PASS) install) ; \
559 all-newlib: all-binutils all-ld all-gas all-gcc
560 @if [ -f ./newlib/Makefile ] ; then \
561 rootme=`pwd` ; export rootme ; \
562 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
564 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
570 @if [ -f ./newlib/Makefile ] ; then \
571 rootme=`pwd` ; export rootme ; \
572 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
574 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
579 install-newlib: force
580 @if [ -f ./newlib/Makefile ] ; then \
581 rootme=`pwd` ; export rootme ; \
582 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
584 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
590 all-gprof: all-libiberty all-bfd
591 @if [ -f ./gprof/Makefile ] ; then \
592 rootme=`pwd` ; export rootme ; \
594 $(MAKE) $(FLAGS_TO_PASS) all) ; \
600 @if [ -f ./gprof/Makefile ] ; then \
601 rootme=`pwd` ; export rootme ; \
603 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
609 @if [ -f ./gprof/Makefile ] ; then \
610 rootme=`pwd` ; export rootme ; \
612 $(MAKE) $(FLAGS_TO_PASS) install) ; \
619 @if [ -f ./byacc/Makefile ] ; then \
620 rootme=`pwd` ; export rootme ; \
622 $(MAKE) $(FLAGS_TO_PASS) all) ; \
628 @if [ -f ./byacc/Makefile ] ; then \
629 rootme=`pwd` ; export rootme ; \
631 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
637 @if [ -f ./byacc/Makefile ] ; then \
638 rootme=`pwd` ; export rootme ; \
640 $(MAKE) $(FLAGS_TO_PASS) install) ; \
646 all-flex: all-libiberty
647 @if [ -f ./flex/Makefile ] ; then \
648 rootme=`pwd` ; export rootme ; \
650 $(MAKE) $(FLAGS_TO_PASS) all) ; \
656 @if [ -f ./flex/Makefile ] ; then \
657 rootme=`pwd` ; export rootme ; \
659 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
665 @if [ -f ./flex/Makefile ] ; then \
666 rootme=`pwd` ; export rootme ; \
668 $(MAKE) $(FLAGS_TO_PASS) install) ; \
673 all-gcc: all-libiberty all-byacc
674 @if [ -f ./gcc/Makefile ] ; then \
675 rootme=`pwd` ; export rootme ; \
677 $(MAKE) $(FLAGS_TO_PASS) all) ; \
683 @if [ -f ./gcc/Makefile ] ; then \
684 rootme=`pwd` ; export rootme ; \
686 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
692 @if [ -f ./gcc/Makefile ] ; then \
693 rootme=`pwd` ; export rootme ; \
695 $(MAKE) $(FLAGS_TO_PASS) install) ; \
702 @if [ -f ./readline/Makefile ] ; then \
703 rootme=`pwd` ; export rootme ; \
705 $(MAKE) $(FLAGS_TO_PASS) all) ; \
710 clean-readline: force
711 @if [ -f ./readline/Makefile ] ; then \
712 rootme=`pwd` ; export rootme ; \
714 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
719 install-readline: force
720 @if [ -f ./readline/Makefile ] ; then \
721 rootme=`pwd` ; export rootme ; \
723 $(MAKE) $(FLAGS_TO_PASS) install) ; \
730 @if [ -f ./glob/Makefile ] ; then \
731 rootme=`pwd` ; export rootme ; \
733 $(MAKE) $(FLAGS_TO_PASS) all) ; \
739 @if [ -f ./glob/Makefile ] ; then \
740 rootme=`pwd` ; export rootme ; \
742 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
748 @if [ -f ./glob/Makefile ] ; then \
749 rootme=`pwd` ; export rootme ; \
751 $(MAKE) $(FLAGS_TO_PASS) install) ; \
757 all-gas: all-libiberty all-opcodes all-bfd
758 @if [ -f ./gas/Makefile ] ; then \
759 rootme=`pwd` ; export rootme ; \
761 $(MAKE) $(FLAGS_TO_PASS) all) ; \
767 @if [ -f ./gas/Makefile ] ; then \
768 rootme=`pwd` ; export rootme ; \
770 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
776 @if [ -f ./gas/Makefile ] ; then \
777 rootme=`pwd` ; export rootme ; \
779 $(MAKE) $(FLAGS_TO_PASS) install) ; \
785 all-tgas: all-libiberty all-bfd
786 @if [ -f ./tgas/Makefile ] ; then \
787 rootme=`pwd` ; export rootme ; \
789 $(MAKE) $(FLAGS_TO_PASS) all) ; \
796 all-ld: all-libiberty all-bfd all-byacc all-flex
797 @if [ -f ./ld/Makefile ] ; then \
798 rootme=`pwd` ; export rootme ; \
800 $(MAKE) $(FLAGS_TO_PASS) all) ; \
806 @if [ -f ./ld/Makefile ] ; then \
807 rootme=`pwd` ; export rootme ; \
809 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
815 @if [ -f ./ld/Makefile ] ; then \
816 rootme=`pwd` ; export rootme ; \
818 $(MAKE) $(FLAGS_TO_PASS) install) ; \
824 all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
825 @if [ -f ./gdb/Makefile ] ; then \
826 rootme=`pwd` ; export rootme ; \
828 $(MAKE) $(FLAGS_TO_PASS) all) ; \
834 @if [ -f ./gdb/Makefile ] ; then \
835 rootme=`pwd` ; export rootme ; \
837 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
843 @if [ -f ./gdb/Makefile ] ; then \
844 rootme=`pwd` ; export rootme ; \
846 $(MAKE) $(FLAGS_TO_PASS) install) ; \
852 all-make: all-libiberty
853 @if [ -f ./make/Makefile ] ; then \
854 rootme=`pwd` ; export rootme ; \
856 $(MAKE) $(FLAGS_TO_PASS) all) ; \
862 @if [ -f ./make/Makefile ] ; then \
863 rootme=`pwd` ; export rootme ; \
865 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
871 @if [ -f ./make/Makefile ] ; then \
872 rootme=`pwd` ; export rootme ; \
874 $(MAKE) $(FLAGS_TO_PASS) install) ; \
881 @if [ -f ./diff/Makefile ] ; then \
882 rootme=`pwd` ; export rootme ; \
884 $(MAKE) $(FLAGS_TO_PASS) all) ; \
890 @if [ -f ./diff/Makefile ] ; then \
891 rootme=`pwd` ; export rootme ; \
893 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
899 @if [ -f ./diff/Makefile ] ; then \
900 rootme=`pwd` ; export rootme ; \
902 $(MAKE) $(FLAGS_TO_PASS) install) ; \
909 @if [ -f ./grep/Makefile ] ; then \
910 rootme=`pwd` ; export rootme ; \
912 $(MAKE) $(FLAGS_TO_PASS) all) ; \
918 @if [ -f ./grep/Makefile ] ; then \
919 rootme=`pwd` ; export rootme ; \
921 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
927 @if [ -f ./grep/Makefile ] ; then \
928 rootme=`pwd` ; export rootme ; \
930 $(MAKE) $(FLAGS_TO_PASS) install) ; \
937 @if [ -f ./rcs/Makefile ] ; then \
938 rootme=`pwd` ; export rootme ; \
940 $(MAKE) $(FLAGS_TO_PASS) all) ; \
946 @if [ -f ./rcs/Makefile ] ; then \
947 rootme=`pwd` ; export rootme ; \
949 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
955 @if [ -f ./rcs/Makefile ] ; then \
956 rootme=`pwd` ; export rootme ; \
958 $(MAKE) $(FLAGS_TO_PASS) install) ; \
965 @if [ -f ./cvs/Makefile ] ; then \
966 rootme=`pwd` ; export rootme ; \
968 $(MAKE) $(FLAGS_TO_PASS) all) ; \
974 @if [ -f ./cvs/Makefile ] ; then \
975 rootme=`pwd` ; export rootme ; \
977 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
983 @if [ -f ./cvs/Makefile ] ; then \
984 rootme=`pwd` ; export rootme ; \
986 $(MAKE) $(FLAGS_TO_PASS) install) ; \
993 @if [ -f ./patch/Makefile ] ; then \
994 rootme=`pwd` ; export rootme ; \
996 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1002 @if [ -f ./patch/Makefile ] ; then \
1003 rootme=`pwd` ; export rootme ; \
1005 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1010 install-patch: force
1011 @if [ -f ./patch/Makefile ] ; then \
1012 rootme=`pwd` ; export rootme ; \
1014 $(MAKE) $(FLAGS_TO_PASS) \
1016 man1dir=$(man1dir) install) ; \
1023 @if [ -f ./emacs/Makefile ] ; then \
1024 rootme=`pwd` ; export rootme ; \
1026 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1032 @if [ -f ./emacs/Makefile ] ; then \
1033 rootme=`pwd` ; export rootme ; \
1035 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1040 install-emacs: force
1041 @if [ -f ./emacs/Makefile ] ; then \
1042 rootme=`pwd` ; export rootme ; \
1044 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1050 all-ispell: all-emacs
1051 @if [ -f ./ispell/Makefile ] ; then \
1052 rootme=`pwd` ; export rootme ; \
1054 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1060 @if [ -f ./ispell/Makefile ] ; then \
1061 rootme=`pwd` ; export rootme ; \
1063 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1068 install-ispell: force
1069 @if [ -f ./ispell/Makefile ] ; then \
1070 rootme=`pwd` ; export rootme ; \
1072 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1079 @if [ -f ./send_pr/Makefile ] ; then \
1080 rootme=`pwd` ; export rootme ; \
1082 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1087 clean-send_pr: force
1088 @if [ -f ./send_pr/Makefile ] ; then \
1089 rootme=`pwd` ; export rootme ; \
1091 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1096 install-send_pr: force
1097 @if [ -f ./send_pr/Makefile ] ; then \
1098 rootme=`pwd` ; export rootme ; \
1100 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1107 @if [ -f ./libm/Makefile ] ; then \
1108 rootme=`pwd` ; export rootme ; \
1110 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1116 @if [ -f ./libm/Makefile ] ; then \
1117 rootme=`pwd` ; export rootme ; \
1119 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1125 @if [ -f ./libm/Makefile ] ; then \
1126 rootme=`pwd` ; export rootme ; \
1128 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1135 all-libg++: all-gas all-ld all-gcc
1136 @if [ -f ./libg++/Makefile ] ; then \
1137 rootme=`pwd` ; export rootme ; \
1138 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1140 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
1146 @if [ -f ./libg++/Makefile ] ; then \
1147 rootme=`pwd` ; export rootme ; \
1148 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1150 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
1155 install-libg++: force
1156 @if [ -f ./libg++/Makefile ] ; then \
1157 rootme=`pwd` ; export rootme ; \
1158 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1160 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
1165 ### other supporting targets
1166 # this is a bad hack.
1167 all.xclib: all.normal
1168 if [ -f clib/Makefile ] ; then \
1169 (cd clib ; $(MAKE) $(FLAGS_TO_PASS)) ; \
1173 @for i in $(DODIRS); do \
1174 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1176 libg++ | xiberty | newlib) \
1177 if (rootme=`pwd` ; export rootme ; \
1178 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1180 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1184 if (rootme=`pwd` ; export rootme ; \
1186 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1193 # The "else true" stuff is for Ultrix; the shell returns the exit code
1194 # of the "if" command, if no commands are run in the "then" or "else" part,
1195 # causing Make to quit.
1219 for i in $(MAKEDIRS) ; do \
1220 echo Making $$i... ; \
1221 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1222 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1223 if [ ! -d $$i ] ; then \
1224 if mkdir $$i ; then \
1240 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
1241 # if [ -d $(datadir) ] ; then true ; else mkdir $(datadir) ; fi
1242 # if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
1245 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
1246 mv -f dir.info.new dir.info
1255 @for i in $(SUBDIRS); \
1259 wd=`basename $$pwd`; \
1260 for j in `$(MAKE) ls`; \
1268 # with the gnu make, this is done automatically.
1270 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1271 $(SHELL) ./config.status
1274 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1276 DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
1277 config.sub config configure.man configure.texi move-if-change
1278 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
1279 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
1281 setup-dirs: force_update
1284 ./configure -rm sun4
1285 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1287 gdb.tar.Z: setup-dirs
1288 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1289 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1291 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1292 rm -rf proto-toplev; mkdir proto-toplev
1293 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1294 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1297 # Put only one copy (four hard links) of COPYING in the tar file.
1298 rm proto-toplev/bfd/COPYING
1299 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1300 rm proto-toplev/include/COPYING
1301 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1302 rm proto-toplev/readline/COPYING
1303 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
1304 # Take out texinfo from configurable dirs
1305 rm proto-toplev/configure.in
1306 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
1307 # Take out glob from buildable dirs
1308 rm proto-toplev/Makefile.in
1310 sed -e '/^SUBDIRS =/s/glob //' \
1311 -e '/^all\.normal: /s/\all-texinfo //' \
1312 -e '/^clean: /s/clean-texinfo //' \
1313 -e '/^install\.all: /s/install-texinfo //' \
1314 <Makefile.in >proto-toplev/Makefile.in
1316 mkdir proto-toplev/texinfo
1317 mkdir proto-toplev/texinfo/fsf
1318 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
1319 chmod og=u `find proto-toplev -print`
1320 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1321 echo "==> Making gdb-$$VER.tar.Z"; \
1322 ln -s proto-toplev gdb-$$VER; \
1323 tar cfh - gdb-$$VER \
1324 | compress -v >gdb-$$VER.tar.Z)
1330 # end of Makefile.in