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 ; \
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 z8ksim 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_canonical)" = "$(target_canonical)" ] ; 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_canonical)" = "$(target_canonical)" ] ; 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_canonical)" = "$(target_canonical)" ] ; 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_canonical)" = "$(target_canonical)" ] ; 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 -- please keep these in alphabetical order
170 "AR_FLAGS=$(AR_FLAGS)" \
172 "CXXFLAGS=$(CXXFLAGS)" \
173 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
175 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
177 "INSTALL=$(INSTALL)" \
178 "INSTALL_DATA=$(INSTALL_DATA)" \
179 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
180 "LDFLAGS=$(LDFLAGS)" \
182 "LOADLIBES=$(LOADLIBES)" \
183 "MAKEINFO=$(MAKEINFO)" \
185 "exec_prefix=$(exec_prefix)" \
189 # Flags that are concerned with the location of the X11 include files
191 X11_FLAGS_TO_PASS = \
192 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
193 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)"
195 # Flags to pass down to makes which are built with the target
196 # environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
197 TARGET_FLAGS_TO_PASS = \
198 "AR=$(AR_FOR_TARGET)" \
199 "AR_FLAGS=$(AR_FLAGS)" \
200 "AS=$(AS_FOR_TARGET)" \
202 "CXX=$(CXX_FOR_TARGET)" \
203 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
204 "CXXFLAGS=$(CXXFLAGS)" \
205 "CC=$(CC_FOR_TARGET)" \
206 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
208 "INSTALL=$(INSTALL)" \
209 "INSTALL_DATA=$(INSTALL_DATA)" \
210 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
211 "LDFLAGS=$(LDFLAGS)" \
213 "LOADLIBES=$(LOADLIBES)" \
214 "MAKEINFO=$(MAKEINFO)" \
215 "NM=$(NM_FOR_TARGET)" \
216 "RANLIB=$(RANLIB_FOR_TARGET)" \
217 "XTRAFLAGS=$(XTRAFLAGS)" \
218 "exec_prefix=$(exec_prefix)" \
222 # The first rule in the file had better be this one. Don't put any above it.
225 .PHONY: all info install-info clean-info
229 @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) subdir_do DO=info "DODIRS=$(SUBDIRS)"
232 @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=check "DODIRS=$(SUBDIRS)" subdir_do
235 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=clean-info "DODIRS=$(SUBDIRS)" subdir_do
237 install-info: install-info-dirs force
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 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
242 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) dir.info install-dir.info
245 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
246 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
247 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
248 $(INSTALL_DATA) dir.info $(infodir)/dir.info
250 all.normal: all-autoconf all-libiberty all-mmalloc all-texinfo \
251 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
252 all-gcc all-binutils all-libg++ all-readline all-z8ksim all-gdb \
253 all-make all-rcs all-cvs all-diff all-grep \
254 all-patch all-emacs all-ispell all-etc \
255 all-tcl all-tk all-expect \
256 all-newlib all-gprof all-send_pr all-libm all-deja-gnu
258 all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
259 all-opcodes all-z8ksim all-bfd all-readline all-gdb all-binutils all-gcc \
260 all-newlib all-deja-gnu
262 clean: clean-autoconf clean-libiberty clean-mmalloc clean-texinfo \
263 clean-bfd clean-newlib clean-binutils clean-flex \
264 clean-byacc clean-ld clean-gas clean-etc clean-opcodes \
265 clean-gcc clean-readline clean-glob clean-gdb clean-z8ksim \
266 clean-make clean-diff clean-grep clean-rcs \
267 clean-cvs clean-patch clean-emacs clean-ispell \
268 clean-tcl clean-tk clean-expect \
269 clean-libg++ clean-gprof clean-send_pr clean-libm clean-xiberty \
271 -rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
276 install: $(INSTALL_TARGET)
277 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
278 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
279 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
281 install.all: install-no-fixedincludes
282 @if [ -f ./gcc/Makefile ] ; then \
283 rootme=`pwd` ; export rootme ; \
285 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
290 install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
325 gcc-no-fixedincludes:
326 @if [ -f ./gcc/Makefile ] ; then \
327 rootme=`pwd` ; export rootme ; \
329 $(MAKE) $(FLAGS_TO_PASS) install install-man \
330 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
335 install.cross: install-dirs install-libiberty install-mmalloc \
336 install-binutils install-opcodes install-byacc install-flex \
337 install-ld install-gas install-readline \
338 install-glob install-gdb install-mmalloc \
339 install-newlib install-gcc install-etc install-deja-gnu
343 @if [ -f ./deja-gnu/Makefile ] ; then \
344 rootme=`pwd` ; export rootme ; \
345 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
350 clean-deja-gnu: force
351 @if [ -f ./deja-gnu/Makefile ] ; then \
352 rootme=`pwd` ; export rootme ; \
353 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
358 install-deja-gnu: force
359 @if [ -f ./deja-gnu/Makefile ] ; then \
360 rootme=`pwd` ; export rootme ; \
361 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
368 @if [ -f ./autoconf/Makefile ] ; then \
369 rootme=`pwd` ; export rootme ; \
370 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
375 clean-autoconf: force
376 @if [ -f ./autoconf/Makefile ] ; then \
377 rootme=`pwd` ; export rootme ; \
378 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
383 install-autoconf: force
384 @if [ -f ./autoconf/Makefile ] ; then \
385 rootme=`pwd` ; export rootme ; \
386 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
393 @if [ -f ./etc/Makefile ] ; then \
394 rootme=`pwd` ; export rootme ; \
395 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
401 @if [ -f ./etc/Makefile ] ; then \
402 rootme=`pwd` ; export rootme ; \
403 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
409 @if [ -f ./etc/Makefile ] ; then \
410 rootme=`pwd` ; export rootme ; \
411 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
418 @if [ -f ./libiberty/Makefile ] ; then \
419 rootme=`pwd` ; export rootme ; \
421 $(MAKE) $(FLAGS_TO_PASS) all) ; \
426 clean-libiberty: force
427 @if [ -f ./libiberty/Makefile ] ; then \
428 rootme=`pwd` ; export rootme ; \
430 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
435 install-libiberty: force
436 @if [ -f ./libiberty/Makefile ] ; then \
437 rootme=`pwd` ; export rootme ; \
439 $(MAKE) $(FLAGS_TO_PASS) install) ; \
445 all-xiberty: all-gcc all-newlib
446 @if [ -f ./xiberty/Makefile ] ; then \
447 rootme=`pwd` ; export rootme ; \
448 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
450 $(MAKE) $(FLAGS_TO_PASS) all) ; \
456 @if [ -f ./xiberty/Makefile ] ; then \
457 rootme=`pwd` ; export rootme ; \
458 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
460 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
465 install-xiberty: force
466 @if [ -f ./xiberty/Makefile ] ; then \
467 rootme=`pwd` ; export rootme ; \
468 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
470 $(MAKE) $(FLAGS_TO_PASS) install) ; \
477 @if [ -f ./mmalloc/Makefile ] ; then \
478 rootme=`pwd` ; export rootme ; \
480 $(MAKE) $(FLAGS_TO_PASS) all) ; \
486 @if [ -f ./mmalloc/Makefile ] ; then \
487 rootme=`pwd` ; export rootme ; \
489 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
494 install-mmalloc: force
495 @if [ -f ./mmalloc/Makefile ] ; then \
496 rootme=`pwd` ; export rootme ; \
498 $(MAKE) $(FLAGS_TO_PASS) install) ; \
504 all-texinfo: all-libiberty
505 @if [ -f ./texinfo/Makefile ] ; then \
506 rootme=`pwd` ; export rootme ; \
508 $(MAKE) $(FLAGS_TO_PASS) all) ; \
514 @if [ -f ./texinfo/Makefile ] ; then \
515 rootme=`pwd` ; export rootme ; \
517 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
522 install-texinfo: force
523 @if [ -f ./texinfo/Makefile ] ; then \
524 rootme=`pwd` ; export rootme ; \
526 $(MAKE) $(FLAGS_TO_PASS) install) ; \
533 @if [ -f ./bfd/Makefile ] ; then \
534 rootme=`pwd` ; export rootme ; \
536 $(MAKE) $(FLAGS_TO_PASS) all) ; \
542 @if [ -f ./bfd/Makefile ] ; then \
543 rootme=`pwd` ; export rootme ; \
545 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
551 @if [ -f ./bfd/Makefile ] ; then \
552 rootme=`pwd` ; export rootme ; \
554 $(MAKE) $(FLAGS_TO_PASS) install) ; \
562 @if [ -f ./opcodes/Makefile ] ; then \
563 rootme=`pwd` ; export rootme ; \
565 $(MAKE) $(FLAGS_TO_PASS) all) ; \
571 @if [ -f ./opcodes/Makefile ] ; then \
572 rootme=`pwd` ; export rootme ; \
574 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
579 install-opcodes: force
580 @if [ -f ./opcodes/Makefile ] ; then \
581 rootme=`pwd` ; export rootme ; \
583 $(MAKE) $(FLAGS_TO_PASS) install) ; \
589 all-binutils: all-opcodes all-libiberty all-bfd all-flex
590 @if [ -f ./binutils/Makefile ] ; then \
591 rootme=`pwd` ; export rootme ; \
593 $(MAKE) $(FLAGS_TO_PASS) all) ; \
598 clean-binutils: force
599 @if [ -f ./binutils/Makefile ] ; then \
600 rootme=`pwd` ; export rootme ; \
602 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
607 install-binutils: force
608 @if [ -f ./binutils/Makefile ] ; then \
609 rootme=`pwd` ; export rootme ; \
611 $(MAKE) $(FLAGS_TO_PASS) install) ; \
617 all-newlib: all-binutils all-ld all-gas all-gcc
618 @if [ -f ./newlib/Makefile ] ; then \
619 rootme=`pwd` ; export rootme ; \
620 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
622 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
628 @if [ -f ./newlib/Makefile ] ; then \
629 rootme=`pwd` ; export rootme ; \
630 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
632 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
637 install-newlib: force
638 @if [ -f ./newlib/Makefile ] ; then \
639 rootme=`pwd` ; export rootme ; \
640 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
642 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
648 all-gprof: all-libiberty all-bfd
649 @if [ -f ./gprof/Makefile ] ; then \
650 rootme=`pwd` ; export rootme ; \
652 $(MAKE) $(FLAGS_TO_PASS) all) ; \
658 @if [ -f ./gprof/Makefile ] ; then \
659 rootme=`pwd` ; export rootme ; \
661 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
667 @if [ -f ./gprof/Makefile ] ; then \
668 rootme=`pwd` ; export rootme ; \
670 $(MAKE) $(FLAGS_TO_PASS) install) ; \
677 @if [ -f ./byacc/Makefile ] ; then \
678 rootme=`pwd` ; export rootme ; \
680 $(MAKE) $(FLAGS_TO_PASS) all) ; \
686 @if [ -f ./byacc/Makefile ] ; then \
687 rootme=`pwd` ; export rootme ; \
689 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
695 @if [ -f ./byacc/Makefile ] ; then \
696 rootme=`pwd` ; export rootme ; \
698 $(MAKE) $(FLAGS_TO_PASS) install) ; \
704 all-flex: all-libiberty
705 @if [ -f ./flex/Makefile ] ; then \
706 rootme=`pwd` ; export rootme ; \
708 $(MAKE) $(FLAGS_TO_PASS) all) ; \
714 @if [ -f ./flex/Makefile ] ; then \
715 rootme=`pwd` ; export rootme ; \
717 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
723 @if [ -f ./flex/Makefile ] ; then \
724 rootme=`pwd` ; export rootme ; \
726 $(MAKE) $(FLAGS_TO_PASS) install) ; \
731 all-gcc: all-libiberty all-byacc all-binutils
732 @if [ -f ./gcc/Makefile ] ; then \
733 rootme=`pwd` ; export rootme ; \
735 $(MAKE) $(FLAGS_TO_PASS) all) ; \
741 @if [ -f ./gcc/Makefile ] ; then \
742 rootme=`pwd` ; export rootme ; \
744 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
750 @if [ -f ./gcc/Makefile ] ; then \
751 rootme=`pwd` ; export rootme ; \
753 $(MAKE) $(FLAGS_TO_PASS) install) ; \
760 @if [ -f ./readline/Makefile ] ; then \
761 rootme=`pwd` ; export rootme ; \
763 $(MAKE) $(FLAGS_TO_PASS) all) ; \
768 clean-readline: force
769 @if [ -f ./readline/Makefile ] ; then \
770 rootme=`pwd` ; export rootme ; \
772 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
777 install-readline: force
778 @if [ -f ./readline/Makefile ] ; then \
779 rootme=`pwd` ; export rootme ; \
781 $(MAKE) $(FLAGS_TO_PASS) install) ; \
788 @if [ -f ./glob/Makefile ] ; then \
789 rootme=`pwd` ; export rootme ; \
791 $(MAKE) $(FLAGS_TO_PASS) all) ; \
797 @if [ -f ./glob/Makefile ] ; then \
798 rootme=`pwd` ; export rootme ; \
800 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
806 @if [ -f ./glob/Makefile ] ; then \
807 rootme=`pwd` ; export rootme ; \
809 $(MAKE) $(FLAGS_TO_PASS) install) ; \
815 all-gas: all-libiberty all-opcodes all-bfd
816 @if [ -f ./gas/Makefile ] ; then \
817 rootme=`pwd` ; export rootme ; \
819 $(MAKE) $(FLAGS_TO_PASS) all) ; \
825 @if [ -f ./gas/Makefile ] ; then \
826 rootme=`pwd` ; export rootme ; \
828 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
834 @if [ -f ./gas/Makefile ] ; then \
835 rootme=`pwd` ; export rootme ; \
837 $(MAKE) $(FLAGS_TO_PASS) install) ; \
843 all-tgas: all-libiberty all-bfd
844 @if [ -f ./tgas/Makefile ] ; then \
845 rootme=`pwd` ; export rootme ; \
847 $(MAKE) $(FLAGS_TO_PASS) all) ; \
854 all-ld: all-libiberty all-bfd all-byacc all-flex
855 @if [ -f ./ld/Makefile ] ; then \
856 rootme=`pwd` ; export rootme ; \
858 $(MAKE) $(FLAGS_TO_PASS) all) ; \
864 @if [ -f ./ld/Makefile ] ; then \
865 rootme=`pwd` ; export rootme ; \
867 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
873 @if [ -f ./ld/Makefile ] ; then \
874 rootme=`pwd` ; export rootme ; \
876 $(MAKE) $(FLAGS_TO_PASS) install) ; \
882 all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
883 @if [ -f ./gdb/Makefile ] ; then \
884 rootme=`pwd` ; export rootme ; \
886 $(MAKE) $(FLAGS_TO_PASS) all) ; \
892 @if [ -f ./gdb/Makefile ] ; then \
893 rootme=`pwd` ; export rootme ; \
895 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
901 @if [ -f ./gdb/Makefile ] ; then \
902 rootme=`pwd` ; export rootme ; \
904 $(MAKE) $(FLAGS_TO_PASS) install) ; \
910 all-make: all-libiberty
911 @if [ -f ./make/Makefile ] ; then \
912 rootme=`pwd` ; export rootme ; \
914 $(MAKE) $(FLAGS_TO_PASS) all) ; \
920 @if [ -f ./make/Makefile ] ; then \
921 rootme=`pwd` ; export rootme ; \
923 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
929 @if [ -f ./make/Makefile ] ; then \
930 rootme=`pwd` ; export rootme ; \
932 $(MAKE) $(FLAGS_TO_PASS) install) ; \
939 @if [ -f ./diff/Makefile ] ; then \
940 rootme=`pwd` ; export rootme ; \
942 $(MAKE) $(FLAGS_TO_PASS) all) ; \
948 @if [ -f ./diff/Makefile ] ; then \
949 rootme=`pwd` ; export rootme ; \
951 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
957 @if [ -f ./diff/Makefile ] ; then \
958 rootme=`pwd` ; export rootme ; \
960 $(MAKE) $(FLAGS_TO_PASS) install) ; \
967 @if [ -f ./grep/Makefile ] ; then \
968 rootme=`pwd` ; export rootme ; \
970 $(MAKE) $(FLAGS_TO_PASS) all) ; \
976 @if [ -f ./grep/Makefile ] ; then \
977 rootme=`pwd` ; export rootme ; \
979 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
985 @if [ -f ./grep/Makefile ] ; then \
986 rootme=`pwd` ; export rootme ; \
988 $(MAKE) $(FLAGS_TO_PASS) install) ; \
995 @if [ -f ./rcs/Makefile ] ; then \
996 rootme=`pwd` ; export rootme ; \
998 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1004 @if [ -f ./rcs/Makefile ] ; then \
1005 rootme=`pwd` ; export rootme ; \
1007 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1013 @if [ -f ./rcs/Makefile ] ; then \
1014 rootme=`pwd` ; export rootme ; \
1016 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1023 @if [ -f ./cvs/Makefile ] ; then \
1024 rootme=`pwd` ; export rootme ; \
1026 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1032 @if [ -f ./cvs/Makefile ] ; then \
1033 rootme=`pwd` ; export rootme ; \
1035 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1041 @if [ -f ./cvs/Makefile ] ; then \
1042 rootme=`pwd` ; export rootme ; \
1044 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1051 @if [ -f ./patch/Makefile ] ; then \
1052 rootme=`pwd` ; export rootme ; \
1054 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1060 @if [ -f ./patch/Makefile ] ; then \
1061 rootme=`pwd` ; export rootme ; \
1063 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1068 install-patch: force
1069 @if [ -f ./patch/Makefile ] ; then \
1070 rootme=`pwd` ; export rootme ; \
1072 $(MAKE) $(FLAGS_TO_PASS) \
1074 man1dir=$(man1dir) install) ; \
1081 @if [ -f ./emacs/Makefile ] ; then \
1082 rootme=`pwd` ; export rootme ; \
1084 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
1090 @if [ -f ./emacs/Makefile ] ; then \
1091 rootme=`pwd` ; export rootme ; \
1093 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1098 install-emacs: force
1099 @if [ -f ./emacs/Makefile ] ; then \
1100 rootme=`pwd` ; export rootme ; \
1102 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
1108 all-ispell: all-emacs
1109 @if [ -f ./ispell/Makefile ] ; then \
1110 rootme=`pwd` ; export rootme ; \
1112 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1118 @if [ -f ./ispell/Makefile ] ; then \
1119 rootme=`pwd` ; export rootme ; \
1121 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1126 install-ispell: force
1127 @if [ -f ./ispell/Makefile ] ; then \
1128 rootme=`pwd` ; export rootme ; \
1130 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1137 @if [ -f ./send_pr/Makefile ] ; then \
1138 rootme=`pwd` ; export rootme ; \
1140 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1145 clean-send_pr: force
1146 @if [ -f ./send_pr/Makefile ] ; then \
1147 rootme=`pwd` ; export rootme ; \
1149 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1154 install-send_pr: force
1155 @if [ -f ./send_pr/Makefile ] ; then \
1156 rootme=`pwd` ; export rootme ; \
1158 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1165 @if [ -f ./libm/Makefile ] ; then \
1166 rootme=`pwd` ; export rootme ; \
1168 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1174 @if [ -f ./libm/Makefile ] ; then \
1175 rootme=`pwd` ; export rootme ; \
1177 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1183 @if [ -f ./libm/Makefile ] ; then \
1184 rootme=`pwd` ; export rootme ; \
1186 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1193 all-libg++: all-gas all-ld all-gcc all-xiberty
1194 @if [ -f ./libg++/Makefile ] ; then \
1195 rootme=`pwd` ; export rootme ; \
1196 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1198 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
1204 @if [ -f ./libg++/Makefile ] ; then \
1205 rootme=`pwd` ; export rootme ; \
1206 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1208 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
1213 install-libg++: force
1214 @if [ -f ./libg++/Makefile ] ; then \
1215 rootme=`pwd` ; export rootme ; \
1216 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1218 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
1224 @if [ -f ./tcl/Makefile ] ; then \
1225 rootme=`pwd` ; export rootme ; \
1226 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1228 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1234 @if [ -f ./tcl/Makefile ] ; then \
1235 rootme=`pwd` ; export rootme ; \
1236 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1238 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1244 @if [ -f ./tcl/Makefile ] ; then \
1245 rootme=`pwd` ; export rootme ; \
1246 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1248 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1256 @if [ -f ./tk/Makefile ] ; then \
1257 rootme=`pwd` ; export rootme ; \
1258 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1260 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
1266 @if [ -f ./tk/Makefile ] ; then \
1267 rootme=`pwd` ; export rootme ; \
1268 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1270 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1276 @if [ -f ./tk/Makefile ] ; then \
1277 rootme=`pwd` ; export rootme ; \
1278 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1280 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
1287 @if [ -f ./expect/Makefile ] ; then \
1288 rootme=`pwd` ; export rootme ; \
1289 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1291 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1297 @if [ -f ./expect/Makefile ] ; then \
1298 rootme=`pwd` ; export rootme ; \
1299 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1301 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1306 install-expect: force
1307 @if [ -f ./expect/Makefile ] ; then \
1308 rootme=`pwd` ; export rootme ; \
1309 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1311 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1319 @if [ -f ./z8ksim/Makefile ] ; then \
1320 rootme=`pwd` ; export rootme ; \
1322 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1328 @if [ -f ./z8ksim/Makefile ] ; then \
1329 rootme=`pwd` ; export rootme ; \
1331 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1336 install-z8ksim: force
1337 @if [ -f ./z8ksim/Makefile ] ; then \
1338 rootme=`pwd` ; export rootme ; \
1340 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1346 ### other supporting targets
1349 @for i in $(DODIRS); do \
1350 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1352 libg++ | xiberty | newlib) \
1353 if (rootme=`pwd` ; export rootme ; \
1354 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1356 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1360 if (rootme=`pwd` ; export rootme ; \
1362 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1369 # The "else true" stuff is for Ultrix; the shell returns the exit code
1370 # of the "if" command, if no commands are run in the "then" or "else" part,
1371 # causing Make to quit.
1395 for i in $(MAKEDIRS) ; do \
1396 echo Making $$i... ; \
1397 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1398 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1399 if [ ! -d $$i ] ; then \
1400 if mkdir $$i ; then \
1414 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
1417 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
1418 mv -f dir.info.new dir.info
1427 @for i in $(SUBDIRS); \
1431 wd=`basename $$pwd`; \
1432 for j in `$(MAKE) ls`; \
1440 # with the gnu make, this is done automatically.
1442 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1443 $(SHELL) ./config.status
1446 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1448 DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
1449 config.sub config configure.man configure.texi move-if-change \
1451 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
1452 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
1454 setup-dirs: force_update
1457 ./configure -rm sun4
1458 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1460 gdb.tar.Z: setup-dirs
1461 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1462 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1464 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1465 rm -rf proto-toplev; mkdir proto-toplev
1466 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1467 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1470 # Put only one copy (four hard links) of COPYING in the tar file.
1471 rm proto-toplev/bfd/COPYING
1472 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1473 rm proto-toplev/include/COPYING
1474 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1475 rm proto-toplev/readline/COPYING
1476 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
1477 # Take out texinfo from configurable dirs
1478 rm proto-toplev/configure.in
1479 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
1480 # Take out glob from buildable dirs
1481 rm proto-toplev/Makefile.in
1483 sed -e '/^SUBDIRS =/s/glob //' \
1484 -e '/^all\.normal: /s/\all-texinfo //' \
1485 -e '/^clean: /s/clean-texinfo //' \
1486 -e '/^install\.all: /s/install-texinfo //' \
1487 <Makefile.in >proto-toplev/Makefile.in
1489 mkdir proto-toplev/texinfo
1490 mkdir proto-toplev/texinfo/fsf
1491 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
1492 chmod og=u `find proto-toplev -print`
1493 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1494 echo "==> Making gdb-$$VER.tar.Z"; \
1495 ln -s proto-toplev gdb-$$VER; \
1496 tar cfh - gdb-$$VER \
1497 | compress -v >gdb-$$VER.tar.Z)
1503 # end of Makefile.in