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 ; \
165 #### host and target specific makefile fragments come in here.
168 # Flags to pass down to sub-makes -- please keep these in alphabetical order
171 "AR_FLAGS=$(AR_FLAGS)" \
173 "CXXFLAGS=$(CXXFLAGS)" \
174 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
176 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
178 "INSTALL=$(INSTALL)" \
179 "INSTALL_DATA=$(INSTALL_DATA)" \
180 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
181 "LDFLAGS=$(LDFLAGS)" \
183 "LOADLIBES=$(LOADLIBES)" \
184 "MAKEINFO=$(MAKEINFO)" \
186 "exec_prefix=$(exec_prefix)" \
190 # Flags that are concerned with the location of the X11 include files
192 X11_FLAGS_TO_PASS = \
193 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
194 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)"
196 # Flags to pass down to makes which are built with the target
197 # environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
198 TARGET_FLAGS_TO_PASS = \
199 "AR=$(AR_FOR_TARGET)" \
200 "AR_FLAGS=$(AR_FLAGS)" \
201 "AS=$(AS_FOR_TARGET)" \
203 "CXX=$(CXX_FOR_TARGET)" \
204 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
205 "CXXFLAGS=$(CXXFLAGS)" \
206 "CC=$(CC_FOR_TARGET)" \
207 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
209 "INSTALL=$(INSTALL)" \
210 "INSTALL_DATA=$(INSTALL_DATA)" \
211 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
212 "LDFLAGS=$(LDFLAGS)" \
214 "LOADLIBES=$(LOADLIBES)" \
215 "MAKEINFO=$(MAKEINFO)" \
216 "NM=$(NM_FOR_TARGET)" \
217 "RANLIB=$(RANLIB_FOR_TARGET)" \
218 "XTRAFLAGS=$(XTRAFLAGS)" \
219 "exec_prefix=$(exec_prefix)" \
223 # The first rule in the file had better be this one. Don't put any above it.
226 .PHONY: all info install-info clean-info distclean mostlyclean realclean
229 info check clean-info distclean mostlyclean realclean:
230 @rootme=`pwd` ; export rootme ; \
231 $(MAKE) $(FLAGS_TO_PASS) DO=info "DODIRS=$(SUBDIRS)" subdir_do
233 install-info: install-info-dirs force
234 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
235 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
236 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
237 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
238 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) dir.info install-dir.info
241 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
242 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
243 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
244 $(INSTALL_DATA) dir.info $(infodir)/dir.info
246 all.normal: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
247 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
248 all-gcc all-binutils all-libg++ all-readline all-z8ksim all-gdb \
249 all-make all-rcs all-cvs all-diff all-grep \
250 all-patch all-emacs all-ispell all-etc \
251 all-tcl all-tk all-expect \
252 all-newlib all-gprof all-send_pr all-libm all-deja-gnu \
253 all-fileutils all-find all-gawk all-sed all-shellutils \
254 all-textutils all-time all-wdiff
257 all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
258 all-opcodes all-z8ksim all-bfd all-readline all-gdb all-binutils all-gcc \
259 all-newlib all-deja-gnu
263 @rootme=`pwd` ; export rootme ; \
264 $(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
265 -rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
268 @echo "the uninstall target is not supported in this tree"
270 install: $(INSTALL_TARGET)
271 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
272 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
273 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
275 install.all: install-no-fixedincludes
276 @if [ -f ./gcc/Makefile ] ; then \
277 rootme=`pwd` ; export rootme ; \
279 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
284 install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
318 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
319 install-textutils install-time install-wdiff
321 gcc-no-fixedincludes:
322 @if [ -f ./gcc/Makefile ] ; then \
323 rootme=`pwd` ; export rootme ; \
325 $(MAKE) $(FLAGS_TO_PASS) install install-man \
326 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
331 install.cross: install-dirs install-libiberty install-mmalloc \
332 install-binutils install-opcodes install-byacc install-flex \
333 install-ld install-gas install-readline \
334 install-glob install-gdb install-mmalloc \
335 install-newlib install-gcc install-etc install-deja-gnu
339 @if [ -f ./deja-gnu/Makefile ] ; then \
340 rootme=`pwd` ; export rootme ; \
341 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
346 install-deja-gnu: force
347 @if [ -f ./deja-gnu/Makefile ] ; then \
348 rootme=`pwd` ; export rootme ; \
349 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
356 @if [ -f ./autoconf/Makefile ] ; then \
357 rootme=`pwd` ; export rootme ; \
358 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
363 install-autoconf: force
364 @if [ -f ./autoconf/Makefile ] ; then \
365 rootme=`pwd` ; export rootme ; \
366 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
373 @if [ -f ./etc/Makefile ] ; then \
374 rootme=`pwd` ; export rootme ; \
375 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
381 @if [ -f ./etc/Makefile ] ; then \
382 rootme=`pwd` ; export rootme ; \
383 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
390 @if [ -f ./libiberty/Makefile ] ; then \
391 rootme=`pwd` ; export rootme ; \
393 $(MAKE) $(FLAGS_TO_PASS) all) ; \
398 install-libiberty: force
399 @if [ -f ./libiberty/Makefile ] ; then \
400 rootme=`pwd` ; export rootme ; \
402 $(MAKE) $(FLAGS_TO_PASS) install) ; \
408 all-xiberty: all-gcc all-newlib
409 @if [ -f ./xiberty/Makefile ] ; then \
410 rootme=`pwd` ; export rootme ; \
411 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
413 $(MAKE) $(FLAGS_TO_PASS) all) ; \
418 install-xiberty: force
419 @if [ -f ./xiberty/Makefile ] ; then \
420 rootme=`pwd` ; export rootme ; \
421 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
423 $(MAKE) $(FLAGS_TO_PASS) install) ; \
430 @if [ -f ./mmalloc/Makefile ] ; then \
431 rootme=`pwd` ; export rootme ; \
433 $(MAKE) $(FLAGS_TO_PASS) all) ; \
438 install-mmalloc: force
439 @if [ -f ./mmalloc/Makefile ] ; then \
440 rootme=`pwd` ; export rootme ; \
442 $(MAKE) $(FLAGS_TO_PASS) install) ; \
448 all-texinfo: all-libiberty
449 @if [ -f ./texinfo/Makefile ] ; then \
450 rootme=`pwd` ; export rootme ; \
452 $(MAKE) $(FLAGS_TO_PASS) all) ; \
457 install-texinfo: force
458 @if [ -f ./texinfo/Makefile ] ; then \
459 rootme=`pwd` ; export rootme ; \
461 $(MAKE) $(FLAGS_TO_PASS) install) ; \
468 @if [ -f ./bfd/Makefile ] ; then \
469 rootme=`pwd` ; export rootme ; \
471 $(MAKE) $(FLAGS_TO_PASS) all) ; \
477 @if [ -f ./bfd/Makefile ] ; then \
478 rootme=`pwd` ; export rootme ; \
480 $(MAKE) $(FLAGS_TO_PASS) install) ; \
488 @if [ -f ./opcodes/Makefile ] ; then \
489 rootme=`pwd` ; export rootme ; \
491 $(MAKE) $(FLAGS_TO_PASS) all) ; \
496 install-opcodes: force
497 @if [ -f ./opcodes/Makefile ] ; then \
498 rootme=`pwd` ; export rootme ; \
500 $(MAKE) $(FLAGS_TO_PASS) install) ; \
506 all-binutils: all-opcodes all-libiberty all-bfd all-flex
507 @if [ -f ./binutils/Makefile ] ; then \
508 rootme=`pwd` ; export rootme ; \
510 $(MAKE) $(FLAGS_TO_PASS) all) ; \
515 install-binutils: force
516 @if [ -f ./binutils/Makefile ] ; then \
517 rootme=`pwd` ; export rootme ; \
519 $(MAKE) $(FLAGS_TO_PASS) install) ; \
525 all-newlib: all-binutils all-ld all-gas all-gcc
526 @if [ -f ./newlib/Makefile ] ; then \
527 rootme=`pwd` ; export rootme ; \
528 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
530 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
535 install-newlib: force
536 @if [ -f ./newlib/Makefile ] ; then \
537 rootme=`pwd` ; export rootme ; \
538 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
540 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
546 all-gprof: all-libiberty all-bfd
547 @if [ -f ./gprof/Makefile ] ; then \
548 rootme=`pwd` ; export rootme ; \
550 $(MAKE) $(FLAGS_TO_PASS) all) ; \
556 @if [ -f ./gprof/Makefile ] ; then \
557 rootme=`pwd` ; export rootme ; \
559 $(MAKE) $(FLAGS_TO_PASS) install) ; \
566 @if [ -f ./byacc/Makefile ] ; then \
567 rootme=`pwd` ; export rootme ; \
569 $(MAKE) $(FLAGS_TO_PASS) all) ; \
575 @if [ -f ./byacc/Makefile ] ; then \
576 rootme=`pwd` ; export rootme ; \
578 $(MAKE) $(FLAGS_TO_PASS) install) ; \
584 all-flex: all-libiberty
585 @if [ -f ./flex/Makefile ] ; then \
586 rootme=`pwd` ; export rootme ; \
588 $(MAKE) $(FLAGS_TO_PASS) all) ; \
594 @if [ -f ./flex/Makefile ] ; then \
595 rootme=`pwd` ; export rootme ; \
597 $(MAKE) $(FLAGS_TO_PASS) install) ; \
602 all-gcc: all-libiberty all-byacc all-binutils
603 @if [ -f ./gcc/Makefile ] ; then \
604 rootme=`pwd` ; export rootme ; \
606 $(MAKE) $(FLAGS_TO_PASS) all) ; \
612 @if [ -f ./gcc/Makefile ] ; then \
613 rootme=`pwd` ; export rootme ; \
615 $(MAKE) $(FLAGS_TO_PASS) install) ; \
622 @if [ -f ./readline/Makefile ] ; then \
623 rootme=`pwd` ; export rootme ; \
625 $(MAKE) $(FLAGS_TO_PASS) all) ; \
630 install-readline: force
631 @if [ -f ./readline/Makefile ] ; then \
632 rootme=`pwd` ; export rootme ; \
634 $(MAKE) $(FLAGS_TO_PASS) install) ; \
641 @if [ -f ./glob/Makefile ] ; then \
642 rootme=`pwd` ; export rootme ; \
644 $(MAKE) $(FLAGS_TO_PASS) all) ; \
650 @if [ -f ./glob/Makefile ] ; then \
651 rootme=`pwd` ; export rootme ; \
653 $(MAKE) $(FLAGS_TO_PASS) install) ; \
659 all-gas: all-libiberty all-opcodes all-bfd
660 @if [ -f ./gas/Makefile ] ; then \
661 rootme=`pwd` ; export rootme ; \
663 $(MAKE) $(FLAGS_TO_PASS) all) ; \
669 @if [ -f ./gas/Makefile ] ; then \
670 rootme=`pwd` ; export rootme ; \
672 $(MAKE) $(FLAGS_TO_PASS) install) ; \
678 all-tgas: all-libiberty all-bfd
679 @if [ -f ./tgas/Makefile ] ; then \
680 rootme=`pwd` ; export rootme ; \
682 $(MAKE) $(FLAGS_TO_PASS) all) ; \
689 all-ld: all-libiberty all-bfd all-byacc all-flex
690 @if [ -f ./ld/Makefile ] ; then \
691 rootme=`pwd` ; export rootme ; \
693 $(MAKE) $(FLAGS_TO_PASS) all) ; \
699 @if [ -f ./ld/Makefile ] ; then \
700 rootme=`pwd` ; export rootme ; \
702 $(MAKE) $(FLAGS_TO_PASS) install) ; \
708 all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
709 @if [ -f ./gdb/Makefile ] ; then \
710 rootme=`pwd` ; export rootme ; \
712 $(MAKE) $(FLAGS_TO_PASS) all) ; \
718 @if [ -f ./gdb/Makefile ] ; then \
719 rootme=`pwd` ; export rootme ; \
721 $(MAKE) $(FLAGS_TO_PASS) install) ; \
727 all-make: all-libiberty
728 @if [ -f ./make/Makefile ] ; then \
729 rootme=`pwd` ; export rootme ; \
731 $(MAKE) $(FLAGS_TO_PASS) all) ; \
737 @if [ -f ./make/Makefile ] ; then \
738 rootme=`pwd` ; export rootme ; \
740 $(MAKE) $(FLAGS_TO_PASS) install) ; \
747 @if [ -f ./diff/Makefile ] ; then \
748 rootme=`pwd` ; export rootme ; \
750 $(MAKE) $(FLAGS_TO_PASS) all) ; \
756 @if [ -f ./diff/Makefile ] ; then \
757 rootme=`pwd` ; export rootme ; \
759 $(MAKE) $(FLAGS_TO_PASS) install) ; \
766 @if [ -f ./grep/Makefile ] ; then \
767 rootme=`pwd` ; export rootme ; \
769 $(MAKE) $(FLAGS_TO_PASS) all) ; \
775 @if [ -f ./grep/Makefile ] ; then \
776 rootme=`pwd` ; export rootme ; \
778 $(MAKE) $(FLAGS_TO_PASS) install) ; \
785 @if [ -f ./rcs/Makefile ] ; then \
786 rootme=`pwd` ; export rootme ; \
788 $(MAKE) $(FLAGS_TO_PASS) all) ; \
794 @if [ -f ./rcs/Makefile ] ; then \
795 rootme=`pwd` ; export rootme ; \
797 $(MAKE) $(FLAGS_TO_PASS) install) ; \
804 @if [ -f ./cvs/Makefile ] ; then \
805 rootme=`pwd` ; export rootme ; \
807 $(MAKE) $(FLAGS_TO_PASS) all) ; \
813 @if [ -f ./cvs/Makefile ] ; then \
814 rootme=`pwd` ; export rootme ; \
816 $(MAKE) $(FLAGS_TO_PASS) install) ; \
823 @if [ -f ./patch/Makefile ] ; then \
824 rootme=`pwd` ; export rootme ; \
826 $(MAKE) $(FLAGS_TO_PASS) all) ; \
832 @if [ -f ./patch/Makefile ] ; then \
833 rootme=`pwd` ; export rootme ; \
835 $(MAKE) $(FLAGS_TO_PASS) \
837 man1dir=$(man1dir) install) ; \
844 @if [ -f ./emacs/Makefile ] ; then \
845 rootme=`pwd` ; export rootme ; \
847 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
853 @if [ -f ./emacs/Makefile ] ; then \
854 rootme=`pwd` ; export rootme ; \
856 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
862 all-ispell: all-emacs
863 @if [ -f ./ispell/Makefile ] ; then \
864 rootme=`pwd` ; export rootme ; \
866 $(MAKE) $(FLAGS_TO_PASS) all) ; \
871 install-ispell: force
872 @if [ -f ./ispell/Makefile ] ; then \
873 rootme=`pwd` ; export rootme ; \
875 $(MAKE) $(FLAGS_TO_PASS) install) ; \
882 @if [ -f ./send_pr/Makefile ] ; then \
883 rootme=`pwd` ; export rootme ; \
885 $(MAKE) $(FLAGS_TO_PASS) all) ; \
890 install-send_pr: force
891 @if [ -f ./send_pr/Makefile ] ; then \
892 rootme=`pwd` ; export rootme ; \
894 $(MAKE) $(FLAGS_TO_PASS) install) ; \
901 @if [ -f ./libm/Makefile ] ; then \
902 rootme=`pwd` ; export rootme ; \
904 $(MAKE) $(FLAGS_TO_PASS) all) ; \
910 @if [ -f ./libm/Makefile ] ; then \
911 rootme=`pwd` ; export rootme ; \
913 $(MAKE) $(FLAGS_TO_PASS) install) ; \
920 all-libg++: all-gas all-ld all-gcc all-xiberty
921 @if [ -f ./libg++/Makefile ] ; then \
922 rootme=`pwd` ; export rootme ; \
923 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
925 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
930 install-libg++: force
931 @if [ -f ./libg++/Makefile ] ; then \
932 rootme=`pwd` ; export rootme ; \
933 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
935 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
941 @if [ -f ./tcl/Makefile ] ; then \
942 rootme=`pwd` ; export rootme ; \
943 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
945 $(MAKE) $(FLAGS_TO_PASS) all) ; \
951 @if [ -f ./tcl/Makefile ] ; then \
952 rootme=`pwd` ; export rootme ; \
953 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
955 $(MAKE) $(FLAGS_TO_PASS) install) ; \
963 @if [ -f ./tk/Makefile ] ; then \
964 rootme=`pwd` ; export rootme ; \
965 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
967 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
973 @if [ -f ./tk/Makefile ] ; then \
974 rootme=`pwd` ; export rootme ; \
975 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
977 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
984 @if [ -f ./expect/Makefile ] ; then \
985 rootme=`pwd` ; export rootme ; \
986 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
988 $(MAKE) $(FLAGS_TO_PASS) all) ; \
993 install-expect: force
994 @if [ -f ./expect/Makefile ] ; then \
995 rootme=`pwd` ; export rootme ; \
996 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
998 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1005 @if [ -f ./z8ksim/Makefile ] ; then \
1006 rootme=`pwd` ; export rootme ; \
1008 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1013 install-z8ksim: force
1014 @if [ -f ./z8ksim/Makefile ] ; then \
1015 rootme=`pwd` ; export rootme ; \
1017 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1023 all-fileutils: force
1024 @if [ -f ./fileutils/Makefile ] ; then \
1025 rootme=`pwd` ; export rootme ; \
1026 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1031 install-fileutils: force
1032 @if [ -f ./fileutils/Makefile ] ; then \
1033 rootme=`pwd` ; export rootme ; \
1034 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1041 @if [ -f ./find/Makefile ] ; then \
1042 rootme=`pwd` ; export rootme ; \
1043 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1049 @if [ -f ./find/Makefile ] ; then \
1050 rootme=`pwd` ; export rootme ; \
1051 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1058 @if [ -f ./gawk/Makefile ] ; then \
1059 rootme=`pwd` ; export rootme ; \
1060 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1066 @if [ -f ./gawk/Makefile ] ; then \
1067 rootme=`pwd` ; export rootme ; \
1068 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1074 all-m4: all-libiberty
1075 @if [ -f ./m4/Makefile ] ; then \
1076 rootme=`pwd` ; export rootme ; \
1077 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1083 @if [ -f ./m4/Makefile ] ; then \
1084 rootme=`pwd` ; export rootme ; \
1085 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1092 @if [ -f ./sed/Makefile ] ; then \
1093 rootme=`pwd` ; export rootme ; \
1094 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1100 @if [ -f ./sed/Makefile ] ; then \
1101 rootme=`pwd` ; export rootme ; \
1102 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1109 @if [ -f ./time/Makefile ] ; then \
1110 rootme=`pwd` ; export rootme ; \
1111 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1117 @if [ -f ./time/Makefile ] ; then \
1118 rootme=`pwd` ; export rootme ; \
1119 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1126 @if [ -f ./wdiff/Makefile ] ; then \
1127 rootme=`pwd` ; export rootme ; \
1128 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1133 install-wdiff: force
1134 @if [ -f ./wdiff/Makefile ] ; then \
1135 rootme=`pwd` ; export rootme ; \
1136 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1142 all-shellutils: force
1143 @if [ -f ./shellutils/Makefile ] ; then \
1144 rootme=`pwd` ; export rootme ; \
1145 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1150 install-shellutils: force
1151 @if [ -f ./shellutils/Makefile ] ; then \
1152 rootme=`pwd` ; export rootme ; \
1153 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1159 all-textutils: force
1160 @if [ -f ./textutils/Makefile ] ; then \
1161 rootme=`pwd` ; export rootme ; \
1162 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1167 install-textutils: force
1168 @if [ -f ./textutils/Makefile ] ; then \
1169 rootme=`pwd` ; export rootme ; \
1170 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1177 ### other supporting targets
1180 @for i in $(DODIRS); do \
1181 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1183 libg++ | xiberty | newlib) \
1184 if (rootme=`pwd` ; export rootme ; \
1185 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1187 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1191 if (rootme=`pwd` ; export rootme ; \
1193 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1200 # The "else true" stuff is for Ultrix; the shell returns the exit code
1201 # of the "if" command, if no commands are run in the "then" or "else" part,
1202 # causing Make to quit.
1226 for i in $(MAKEDIRS) ; do \
1227 echo Making $$i... ; \
1228 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1229 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1230 if [ ! -d $$i ] ; then \
1231 if mkdir $$i ; then \
1242 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
1245 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
1246 mv -f dir.info.new dir.info
1249 @echo "Building a full distribution of this tree isn't done"
1250 @echo "via 'make dist'. Check out the etc/ subdirectory"
1259 @for i in $(SUBDIRS); \
1263 wd=`basename $$pwd`; \
1264 for j in `$(MAKE) ls`; \
1272 # with the gnu make, this is done automatically.
1274 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1275 $(SHELL) ./config.status
1278 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1280 DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
1281 config.sub config configure.man configure.texi move-if-change \
1283 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
1284 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
1289 ./configure -rm sun4
1290 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1292 gdb.tar.Z: setup-dirs
1293 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1294 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1296 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1297 rm -rf proto-toplev; mkdir proto-toplev
1298 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1299 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1302 # Put only one copy (four hard links) of COPYING in the tar file.
1303 rm proto-toplev/bfd/COPYING
1304 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1305 rm proto-toplev/include/COPYING
1306 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1307 rm proto-toplev/readline/COPYING
1308 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
1309 # Take out texinfo from configurable dirs
1310 rm proto-toplev/configure.in
1311 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
1312 # Take out glob from buildable dirs
1313 rm proto-toplev/Makefile.in
1315 sed -e '/^SUBDIRS =/s/glob //' \
1316 -e '/^all\.normal: /s/\all-texinfo //' \
1317 -e '/^clean: /s/clean-texinfo //' \
1318 -e '/^install\.all: /s/install-texinfo //' \
1319 <Makefile.in >proto-toplev/Makefile.in
1321 mkdir proto-toplev/texinfo
1322 mkdir proto-toplev/texinfo/fsf
1323 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
1324 chmod og=u `find proto-toplev -print`
1325 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1326 echo "==> Making gdb-$$VER.tar.Z"; \
1327 ln -s proto-toplev gdb-$$VER; \
1328 tar cfh - gdb-$$VER \
1329 | compress -v >gdb-$$VER.tar.Z)
1332 # end of Makefile.in