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)
60 BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
61 then echo $${rootme}/byacc/byacc ; \
62 else echo bison -y ; \
65 LEX = `if [ -f $${rootme}/flex/flex ] ; \
66 then echo $${rootme}/flex/flex ; \
69 MAKEINFO = `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
70 then echo $${rootme}/texinfo/C/makeinfo ; \
71 else echo makeinfo ; fi`
73 # C compiler to use to create programs which must be run in the build
78 SUBDIRS = libiberty mmalloc glob readline opcodes bfd gdb binutils ld gas tgas gcc libg++ newlib deja-gnu
82 INSTALL_TARGET = install.all
88 if [ -f $${rootme}/gcc/Makefile ] ; then \
89 echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
91 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
94 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
99 if [ -f $${rootme}/gcc/Makefile ] ; then \
100 echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
102 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
105 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
110 if [ -f $${rootme}/gas/Makefile ] ; then \
111 echo $${rootme}/gas/as.new ; \
113 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
116 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
121 if [ -f $${rootme}/binutils/Makefile ] ; then \
122 echo $${rootme}/binutils/ar ; \
124 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
127 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
131 RANLIB_FOR_TARGET = ` \
132 if [ -f $${rootme}/binutils/Makefile ] ; then \
133 echo $${rootme}/binutils/ranlib ; \
135 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
138 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
143 if [ -f $${rootme}/binutils/Makefile ] ; then \
144 echo $${rootme}/binutils/nm ; \
146 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
149 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
154 if [ -f $${rootme}/gcc/Makefile ] ; then \
155 if [ -f $${rootme}/newlib/Makefile ] ; then \
156 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
158 echo -I$${rootme}/gcc/include ; \
164 #### host and target specific makefile fragments come in here.
167 # Flags to pass down to sub-makes
170 "exec_prefix=$(exec_prefix)" \
171 "tooldir=$(tooldir)" \
173 "AR_FLAGS=$(AR_FLAGS)" \
176 "C++FLAGS=$(C++FLAGS)" \
178 "LOADLIBES=$(LOADLIBES)" \
179 "LDFLAGS=$(LDFLAGS)" \
182 "MAKEINFO=$(MAKEINFO)" \
183 "INSTALL=$(INSTALL)" \
184 "INSTALL_DATA=$(INSTALL_DATA)" \
185 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
186 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
187 "C++_FOR_BUILD=$(C++_FOR_BUILD)"
189 # Flags to pass down to makes which are built with the target
190 # environment (e.g. libg++, xiberty, newlib).
191 TARGET_FLAGS_TO_PASS = \
193 "exec_prefix=$(exec_prefix)" \
194 "tooldir=$(tooldir)" \
195 "AR_FLAGS=$(AR_FLAGS)" \
197 "LOADLIBES=$(LOADLIBES)" \
198 "LDFLAGS=$(LDFLAGS)" \
201 "MAKEINFO=$(MAKEINFO)" \
202 "INSTALL=$(INSTALL)" \
203 "INSTALL_DATA=$(INSTALL_DATA)" \
204 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
205 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
206 "C++_FOR_BUILD=$(C++_FOR_BUILD)" \
207 "CC=$(CC_FOR_TARGET)" \
208 "C++=$(C++_FOR_TARGET)" \
209 "AS=$(AS_FOR_TARGET)" \
210 "AR=$(AR_FOR_TARGET)" \
211 "RANLIB=$(RANLIB_FOR_TARGET)" \
212 "NM=$(NM_FOR_TARGET)" \
213 "XTRAFLAGS=$(XTRAFLAGS)"
215 # The first rule in the file had better be this one. Don't put any above it.
218 .PHONY: all info install-info clean-info
222 @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) subdir_do DO=info "DODIRS=$(SUBDIRS)"
225 @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=check "DODIRS=$(SUBDIRS)" subdir_do
228 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=clean-info "DODIRS=$(SUBDIRS)" subdir_do
230 install-info: install-info-dirs force
231 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
232 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
233 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
234 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
235 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) dir.info install-dir.info
238 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
239 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
240 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
241 $(INSTALL_DATA) dir.info $(infodir)/dir.info
243 all.normal: all-autoconf all-libiberty all-mmalloc all-texinfo \
244 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
245 all-gcc all-binutils all-libg++ all-readline all-gdb \
246 all-make all-rcs all-cvs all-diff all-grep \
247 all-patch all-emacs all-ispell all-etc \
248 all-newlib all-gprof all-send_pr all-libm all-deja-gnu
250 all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
251 all-opcodes all-bfd all-readline all-gdb all-binutils all-gcc \
252 all-newlib all-deja-gnu
254 clean: clean-autoconf clean-libiberty clean-mmalloc clean-texinfo \
255 clean-bfd clean-newlib clean-binutils clean-flex \
256 clean-byacc clean-ld clean-gas clean-etc clean-opcodes \
257 clean-gcc clean-readline clean-glob clean-gdb \
258 clean-make clean-diff clean-grep clean-rcs \
259 clean-cvs clean-patch clean-emacs clean-ispell \
260 clean-libg++ clean-gprof clean-send_pr clean-libm clean-xiberty \
262 -rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
267 install: $(INSTALL_TARGET)
268 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
269 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
270 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
272 install.all: install-no-fixedincludes
273 @if [ -f ./gcc/Makefile ] ; then \
274 rootme=`pwd` ; export rootme ; \
276 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
281 install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
312 gcc-no-fixedincludes:
313 @if [ -f ./gcc/Makefile ] ; then \
314 rootme=`pwd` ; export rootme ; \
316 $(MAKE) $(FLAGS_TO_PASS) install install-man \
317 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
322 install.cross: install-dirs install-libiberty install-mmalloc \
323 install-binutils install-opcodes install-byacc install-flex \
324 install-ld install-gas install-readline \
325 install-glob install-gdb install-mmalloc \
326 install-newlib install-gcc install-etc install-deja-gnu
330 @if [ -f ./deja-gnu/Makefile ] ; then \
331 rootme=`pwd` ; export rootme ; \
332 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
337 clean-deja-gnu: force
338 @if [ -f ./deja-gnu/Makefile ] ; then \
339 rootme=`pwd` ; export rootme ; \
340 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
345 install-deja-gnu: force
346 @if [ -f ./deja-gnu/Makefile ] ; then \
347 rootme=`pwd` ; export rootme ; \
348 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
355 @if [ -f ./autoconf/Makefile ] ; then \
356 rootme=`pwd` ; export rootme ; \
357 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
362 clean-autoconf: force
363 @if [ -f ./autoconf/Makefile ] ; then \
364 rootme=`pwd` ; export rootme ; \
365 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
370 install-autoconf: force
371 @if [ -f ./autoconf/Makefile ] ; then \
372 rootme=`pwd` ; export rootme ; \
373 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
380 @if [ -f ./etc/Makefile ] ; then \
381 rootme=`pwd` ; export rootme ; \
382 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
388 @if [ -f ./etc/Makefile ] ; then \
389 rootme=`pwd` ; export rootme ; \
390 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
396 @if [ -f ./etc/Makefile ] ; then \
397 rootme=`pwd` ; export rootme ; \
398 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
405 @if [ -f ./libiberty/Makefile ] ; then \
406 rootme=`pwd` ; export rootme ; \
408 $(MAKE) $(FLAGS_TO_PASS) all) ; \
413 clean-libiberty: force
414 @if [ -f ./libiberty/Makefile ] ; then \
415 rootme=`pwd` ; export rootme ; \
417 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
422 install-libiberty: force
423 @if [ -f ./libiberty/Makefile ] ; then \
424 rootme=`pwd` ; export rootme ; \
426 $(MAKE) $(FLAGS_TO_PASS) install) ; \
432 all-xiberty: all-gcc all-newlib
433 @if [ -f ./xiberty/Makefile ] ; then \
434 rootme=`pwd` ; export rootme ; \
435 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
437 $(MAKE) $(FLAGS_TO_PASS) all) ; \
443 @if [ -f ./xiberty/Makefile ] ; then \
444 rootme=`pwd` ; export rootme ; \
445 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
447 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
452 install-xiberty: force
453 @if [ -f ./xiberty/Makefile ] ; then \
454 rootme=`pwd` ; export rootme ; \
455 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
457 $(MAKE) $(FLAGS_TO_PASS) install) ; \
464 @if [ -f ./mmalloc/Makefile ] ; then \
465 rootme=`pwd` ; export rootme ; \
467 $(MAKE) $(FLAGS_TO_PASS) all) ; \
473 @if [ -f ./mmalloc/Makefile ] ; then \
474 rootme=`pwd` ; export rootme ; \
476 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
481 install-mmalloc: force
482 @if [ -f ./mmalloc/Makefile ] ; then \
483 rootme=`pwd` ; export rootme ; \
485 $(MAKE) $(FLAGS_TO_PASS) install) ; \
491 all-texinfo: all-libiberty
492 @if [ -f ./texinfo/Makefile ] ; then \
493 rootme=`pwd` ; export rootme ; \
495 $(MAKE) $(FLAGS_TO_PASS) all) ; \
501 @if [ -f ./texinfo/Makefile ] ; then \
502 rootme=`pwd` ; export rootme ; \
504 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
509 install-texinfo: force
510 @if [ -f ./texinfo/Makefile ] ; then \
511 rootme=`pwd` ; export rootme ; \
513 $(MAKE) $(FLAGS_TO_PASS) install) ; \
520 @if [ -f ./bfd/Makefile ] ; then \
521 rootme=`pwd` ; export rootme ; \
523 $(MAKE) $(FLAGS_TO_PASS) all) ; \
529 @if [ -f ./bfd/Makefile ] ; then \
530 rootme=`pwd` ; export rootme ; \
532 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
538 @if [ -f ./bfd/Makefile ] ; then \
539 rootme=`pwd` ; export rootme ; \
541 $(MAKE) $(FLAGS_TO_PASS) install) ; \
549 @if [ -f ./opcodes/Makefile ] ; then \
550 rootme=`pwd` ; export rootme ; \
552 $(MAKE) $(FLAGS_TO_PASS) all) ; \
558 @if [ -f ./opcodes/Makefile ] ; then \
559 rootme=`pwd` ; export rootme ; \
561 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
566 install-opcodes: force
567 @if [ -f ./opcodes/Makefile ] ; then \
568 rootme=`pwd` ; export rootme ; \
570 $(MAKE) $(FLAGS_TO_PASS) install) ; \
576 all-binutils: all-opcodes all-libiberty all-bfd all-flex
577 @if [ -f ./binutils/Makefile ] ; then \
578 rootme=`pwd` ; export rootme ; \
580 $(MAKE) $(FLAGS_TO_PASS) all) ; \
585 clean-binutils: force
586 @if [ -f ./binutils/Makefile ] ; then \
587 rootme=`pwd` ; export rootme ; \
589 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
594 install-binutils: force
595 @if [ -f ./binutils/Makefile ] ; then \
596 rootme=`pwd` ; export rootme ; \
598 $(MAKE) $(FLAGS_TO_PASS) install) ; \
604 all-newlib: all-binutils all-ld all-gas all-gcc
605 @if [ -f ./newlib/Makefile ] ; then \
606 rootme=`pwd` ; export rootme ; \
607 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
609 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
615 @if [ -f ./newlib/Makefile ] ; then \
616 rootme=`pwd` ; export rootme ; \
617 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
619 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
624 install-newlib: force
625 @if [ -f ./newlib/Makefile ] ; then \
626 rootme=`pwd` ; export rootme ; \
627 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
629 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
635 all-gprof: all-libiberty all-bfd
636 @if [ -f ./gprof/Makefile ] ; then \
637 rootme=`pwd` ; export rootme ; \
639 $(MAKE) $(FLAGS_TO_PASS) all) ; \
645 @if [ -f ./gprof/Makefile ] ; then \
646 rootme=`pwd` ; export rootme ; \
648 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
654 @if [ -f ./gprof/Makefile ] ; then \
655 rootme=`pwd` ; export rootme ; \
657 $(MAKE) $(FLAGS_TO_PASS) install) ; \
664 @if [ -f ./byacc/Makefile ] ; then \
665 rootme=`pwd` ; export rootme ; \
667 $(MAKE) $(FLAGS_TO_PASS) all) ; \
673 @if [ -f ./byacc/Makefile ] ; then \
674 rootme=`pwd` ; export rootme ; \
676 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
682 @if [ -f ./byacc/Makefile ] ; then \
683 rootme=`pwd` ; export rootme ; \
685 $(MAKE) $(FLAGS_TO_PASS) install) ; \
691 all-flex: all-libiberty
692 @if [ -f ./flex/Makefile ] ; then \
693 rootme=`pwd` ; export rootme ; \
695 $(MAKE) $(FLAGS_TO_PASS) all) ; \
701 @if [ -f ./flex/Makefile ] ; then \
702 rootme=`pwd` ; export rootme ; \
704 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
710 @if [ -f ./flex/Makefile ] ; then \
711 rootme=`pwd` ; export rootme ; \
713 $(MAKE) $(FLAGS_TO_PASS) install) ; \
718 all-gcc: all-libiberty all-byacc
719 @if [ -f ./gcc/Makefile ] ; then \
720 rootme=`pwd` ; export rootme ; \
722 $(MAKE) $(FLAGS_TO_PASS) all) ; \
728 @if [ -f ./gcc/Makefile ] ; then \
729 rootme=`pwd` ; export rootme ; \
731 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
737 @if [ -f ./gcc/Makefile ] ; then \
738 rootme=`pwd` ; export rootme ; \
740 $(MAKE) $(FLAGS_TO_PASS) install) ; \
747 @if [ -f ./readline/Makefile ] ; then \
748 rootme=`pwd` ; export rootme ; \
750 $(MAKE) $(FLAGS_TO_PASS) all) ; \
755 clean-readline: force
756 @if [ -f ./readline/Makefile ] ; then \
757 rootme=`pwd` ; export rootme ; \
759 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
764 install-readline: force
765 @if [ -f ./readline/Makefile ] ; then \
766 rootme=`pwd` ; export rootme ; \
768 $(MAKE) $(FLAGS_TO_PASS) install) ; \
775 @if [ -f ./glob/Makefile ] ; then \
776 rootme=`pwd` ; export rootme ; \
778 $(MAKE) $(FLAGS_TO_PASS) all) ; \
784 @if [ -f ./glob/Makefile ] ; then \
785 rootme=`pwd` ; export rootme ; \
787 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
793 @if [ -f ./glob/Makefile ] ; then \
794 rootme=`pwd` ; export rootme ; \
796 $(MAKE) $(FLAGS_TO_PASS) install) ; \
802 all-gas: all-libiberty all-opcodes all-bfd
803 @if [ -f ./gas/Makefile ] ; then \
804 rootme=`pwd` ; export rootme ; \
806 $(MAKE) $(FLAGS_TO_PASS) all) ; \
812 @if [ -f ./gas/Makefile ] ; then \
813 rootme=`pwd` ; export rootme ; \
815 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
821 @if [ -f ./gas/Makefile ] ; then \
822 rootme=`pwd` ; export rootme ; \
824 $(MAKE) $(FLAGS_TO_PASS) install) ; \
830 all-tgas: all-libiberty all-bfd
831 @if [ -f ./tgas/Makefile ] ; then \
832 rootme=`pwd` ; export rootme ; \
834 $(MAKE) $(FLAGS_TO_PASS) all) ; \
841 all-ld: all-libiberty all-bfd all-byacc all-flex
842 @if [ -f ./ld/Makefile ] ; then \
843 rootme=`pwd` ; export rootme ; \
845 $(MAKE) $(FLAGS_TO_PASS) all) ; \
851 @if [ -f ./ld/Makefile ] ; then \
852 rootme=`pwd` ; export rootme ; \
854 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
860 @if [ -f ./ld/Makefile ] ; then \
861 rootme=`pwd` ; export rootme ; \
863 $(MAKE) $(FLAGS_TO_PASS) install) ; \
869 all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
870 @if [ -f ./gdb/Makefile ] ; then \
871 rootme=`pwd` ; export rootme ; \
873 $(MAKE) $(FLAGS_TO_PASS) all) ; \
879 @if [ -f ./gdb/Makefile ] ; then \
880 rootme=`pwd` ; export rootme ; \
882 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
888 @if [ -f ./gdb/Makefile ] ; then \
889 rootme=`pwd` ; export rootme ; \
891 $(MAKE) $(FLAGS_TO_PASS) install) ; \
897 all-make: all-libiberty
898 @if [ -f ./make/Makefile ] ; then \
899 rootme=`pwd` ; export rootme ; \
901 $(MAKE) $(FLAGS_TO_PASS) all) ; \
907 @if [ -f ./make/Makefile ] ; then \
908 rootme=`pwd` ; export rootme ; \
910 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
916 @if [ -f ./make/Makefile ] ; then \
917 rootme=`pwd` ; export rootme ; \
919 $(MAKE) $(FLAGS_TO_PASS) install) ; \
926 @if [ -f ./diff/Makefile ] ; then \
927 rootme=`pwd` ; export rootme ; \
929 $(MAKE) $(FLAGS_TO_PASS) all) ; \
935 @if [ -f ./diff/Makefile ] ; then \
936 rootme=`pwd` ; export rootme ; \
938 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
944 @if [ -f ./diff/Makefile ] ; then \
945 rootme=`pwd` ; export rootme ; \
947 $(MAKE) $(FLAGS_TO_PASS) install) ; \
954 @if [ -f ./grep/Makefile ] ; then \
955 rootme=`pwd` ; export rootme ; \
957 $(MAKE) $(FLAGS_TO_PASS) all) ; \
963 @if [ -f ./grep/Makefile ] ; then \
964 rootme=`pwd` ; export rootme ; \
966 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
972 @if [ -f ./grep/Makefile ] ; then \
973 rootme=`pwd` ; export rootme ; \
975 $(MAKE) $(FLAGS_TO_PASS) install) ; \
982 @if [ -f ./rcs/Makefile ] ; then \
983 rootme=`pwd` ; export rootme ; \
985 $(MAKE) $(FLAGS_TO_PASS) all) ; \
991 @if [ -f ./rcs/Makefile ] ; then \
992 rootme=`pwd` ; export rootme ; \
994 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1000 @if [ -f ./rcs/Makefile ] ; then \
1001 rootme=`pwd` ; export rootme ; \
1003 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1010 @if [ -f ./cvs/Makefile ] ; then \
1011 rootme=`pwd` ; export rootme ; \
1013 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1019 @if [ -f ./cvs/Makefile ] ; then \
1020 rootme=`pwd` ; export rootme ; \
1022 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1028 @if [ -f ./cvs/Makefile ] ; then \
1029 rootme=`pwd` ; export rootme ; \
1031 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1038 @if [ -f ./patch/Makefile ] ; then \
1039 rootme=`pwd` ; export rootme ; \
1041 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1047 @if [ -f ./patch/Makefile ] ; then \
1048 rootme=`pwd` ; export rootme ; \
1050 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1055 install-patch: force
1056 @if [ -f ./patch/Makefile ] ; then \
1057 rootme=`pwd` ; export rootme ; \
1059 $(MAKE) $(FLAGS_TO_PASS) \
1061 man1dir=$(man1dir) install) ; \
1068 @if [ -f ./emacs/Makefile ] ; then \
1069 rootme=`pwd` ; export rootme ; \
1071 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1077 @if [ -f ./emacs/Makefile ] ; then \
1078 rootme=`pwd` ; export rootme ; \
1080 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1085 install-emacs: force
1086 @if [ -f ./emacs/Makefile ] ; then \
1087 rootme=`pwd` ; export rootme ; \
1089 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1095 all-ispell: all-emacs
1096 @if [ -f ./ispell/Makefile ] ; then \
1097 rootme=`pwd` ; export rootme ; \
1099 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1105 @if [ -f ./ispell/Makefile ] ; then \
1106 rootme=`pwd` ; export rootme ; \
1108 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1113 install-ispell: force
1114 @if [ -f ./ispell/Makefile ] ; then \
1115 rootme=`pwd` ; export rootme ; \
1117 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1124 @if [ -f ./send_pr/Makefile ] ; then \
1125 rootme=`pwd` ; export rootme ; \
1127 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1132 clean-send_pr: force
1133 @if [ -f ./send_pr/Makefile ] ; then \
1134 rootme=`pwd` ; export rootme ; \
1136 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1141 install-send_pr: force
1142 @if [ -f ./send_pr/Makefile ] ; then \
1143 rootme=`pwd` ; export rootme ; \
1145 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1152 @if [ -f ./libm/Makefile ] ; then \
1153 rootme=`pwd` ; export rootme ; \
1155 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1161 @if [ -f ./libm/Makefile ] ; then \
1162 rootme=`pwd` ; export rootme ; \
1164 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1170 @if [ -f ./libm/Makefile ] ; then \
1171 rootme=`pwd` ; export rootme ; \
1173 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1180 all-libg++: all-gas all-ld all-gcc
1181 @if [ -f ./libg++/Makefile ] ; then \
1182 rootme=`pwd` ; export rootme ; \
1183 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1185 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
1191 @if [ -f ./libg++/Makefile ] ; then \
1192 rootme=`pwd` ; export rootme ; \
1193 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1195 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
1200 install-libg++: force
1201 @if [ -f ./libg++/Makefile ] ; then \
1202 rootme=`pwd` ; export rootme ; \
1203 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1205 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
1210 ### other supporting targets
1211 # this is a bad hack.
1212 all.xclib: all.normal
1213 if [ -f clib/Makefile ] ; then \
1214 (cd clib ; $(MAKE) $(FLAGS_TO_PASS)) ; \
1218 @for i in $(DODIRS); do \
1219 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1221 libg++ | xiberty | newlib) \
1222 if (rootme=`pwd` ; export rootme ; \
1223 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1225 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1229 if (rootme=`pwd` ; export rootme ; \
1231 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1238 # The "else true" stuff is for Ultrix; the shell returns the exit code
1239 # of the "if" command, if no commands are run in the "then" or "else" part,
1240 # causing Make to quit.
1264 for i in $(MAKEDIRS) ; do \
1265 echo Making $$i... ; \
1266 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1267 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1268 if [ ! -d $$i ] ; then \
1269 if mkdir $$i ; then \
1285 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
1286 # if [ -d $(datadir) ] ; then true ; else mkdir $(datadir) ; fi
1287 # if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
1290 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
1291 mv -f dir.info.new dir.info
1300 @for i in $(SUBDIRS); \
1304 wd=`basename $$pwd`; \
1305 for j in `$(MAKE) ls`; \
1313 # with the gnu make, this is done automatically.
1315 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1316 $(SHELL) ./config.status
1319 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1321 DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
1322 config.sub config configure.man configure.texi move-if-change \
1324 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
1325 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
1327 setup-dirs: force_update
1330 ./configure -rm sun4
1331 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1333 gdb.tar.Z: setup-dirs
1334 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1335 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1337 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1338 rm -rf proto-toplev; mkdir proto-toplev
1339 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1340 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1343 # Put only one copy (four hard links) of COPYING in the tar file.
1344 rm proto-toplev/bfd/COPYING
1345 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1346 rm proto-toplev/include/COPYING
1347 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1348 rm proto-toplev/readline/COPYING
1349 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
1350 # Take out texinfo from configurable dirs
1351 rm proto-toplev/configure.in
1352 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
1353 # Take out glob from buildable dirs
1354 rm proto-toplev/Makefile.in
1356 sed -e '/^SUBDIRS =/s/glob //' \
1357 -e '/^all\.normal: /s/\all-texinfo //' \
1358 -e '/^clean: /s/clean-texinfo //' \
1359 -e '/^install\.all: /s/install-texinfo //' \
1360 <Makefile.in >proto-toplev/Makefile.in
1362 mkdir proto-toplev/texinfo
1363 mkdir proto-toplev/texinfo/fsf
1364 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
1365 chmod og=u `find proto-toplev -print`
1366 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1367 echo "==> Making gdb-$$VER.tar.Z"; \
1368 ln -s proto-toplev gdb-$$VER; \
1369 tar cfh - gdb-$$VER \
1370 | compress -v >gdb-$$VER.tar.Z)
1376 # end of Makefile.in