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 datadir = $(prefix)/lib
30 mandir = $(prefix)/man
31 man1dir = $(mandir)/man1
32 man2dir = $(mandir)/man2
33 man3dir = $(mandir)/man3
34 man4dir = $(mandir)/man4
35 man5dir = $(mandir)/man5
36 man6dir = $(mandir)/man6
37 man7dir = $(mandir)/man7
38 man8dir = $(mandir)/man8
39 man9dir = $(mandir)/man9
40 infodir = $(prefix)/info
41 includedir = $(prefix)/include
42 docdir = $(datadir)/doc
47 INSTALL_PROGRAM = $(INSTALL)
48 INSTALL_DATA = $(INSTALL)
55 BISON = `if [ -d $${rootme}/byacc ] ; \
56 then echo $${rootme}/byacc/byacc ; \
59 LEX = `if [ -d $${rootme}/flex ] ; \
60 then echo $${rootme}/flex/flex -S$${rootme}/flex/flex.skel ; \
63 MAKEINFO = `if [ -d $${rootme}/texinfo/C ] ; \
64 then echo $${rootme}/texinfo/C/makeinfo ; \
65 else echo makeinfo ; fi`
67 SUBDIRS = libiberty mmalloc glob readline bfd gdb binutils ld gas gcc libg++ libgcc clib newlib
71 INSTALL_TARGET = install.all
76 GXX = `if [ -d $${rootme}/gcc ] ; \
77 then echo $${rootme}/gcc/gcc -B$${rootme}/gcc/ ; \
80 XTRAFLAGS = `if [ -d $${rootme}/gcc ] ; \
81 then echo -I$${rootme}/gcc/include ; \
84 #### host and target specific makefile fragments come in here.
89 "exec_prefix=$(exec_prefix)" \
90 "tooldir=$(tooldir)" \
92 "AR_FLAGS=$(AR_FLAGS)" \
96 "LOADLIBES=$(LOADLIBES)" \
97 "LDFLAGS=$(LDFLAGS)" \
100 "MAKEINFO=$(MAKEINFO)" \
101 "INSTALL=$(INSTALL)" \
102 "INSTALL_DATA=$(INSTALL_DATA)" \
103 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
105 .PHONY: all info install-info clean-info
110 info: cfg-paper.info configure.info standards.info
111 @rootme=`pwd` ; export rootme ; $(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
113 # Note libg++ has to be handled specially (we can't compile it with CC=cc).
115 @rootme=`pwd` ; export rootme ; $(MAKE) subdir_do DO=check \
116 "DODIRS=`echo $(SUBDIRS) | sed -e \"s/libg\+\+//\"" $(FLAGS_TO_PASS)
117 @rootme=`pwd` ; export rootme ; $(MAKE) subdir_do DO=check \
118 "DODIRS=libg++" $(FLAGS_TO_PASS) "CC=${GXX}" "XTRAFLAGS=${XTRAFLAGS}"
121 @$(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)"
124 cfg-paper.info: cfg-paper.texi
125 rootme=`pwd` ; export rootme ; $(MAKEINFO) -o cfg-paper.info $(srcdir)/cfg-paper.texi
127 configure.info: configure.texi
128 rootme=`pwd` ; export rootme ; $(MAKEINFO) -o configure.info $(srcdir)/configure.texi
130 standards.info: standards.texi
131 rootme=`pwd` ; export rootme ; $(MAKEINFO) -o standards.info $(srcdir)/standards.texi
133 install-info: install-info-dirs force
134 [ -d $(infodir) ] || mkdir $(infodir)
135 @$(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
136 $(INSTALL_DATA) cfg-paper.info $(infodir)/cfg-paper.info
137 $(INSTALL_DATA) configure.info $(infodir)/configure.info
138 $(INSTALL_DATA) standards.info $(infodir)/standards.info
139 @$(MAKE) dir.info install-dir.info
142 $(INSTALL_DATA) dir.info $(infodir)/dir.info
144 all.normal: all-autoconf all-libiberty all-mmalloc all-texinfo \
145 all-bison all-byacc all-flex all-bfd all-ld all-gas all-gcc \
146 all-binutils all-libg++ all-readline all-gdb \
147 all-make all-rcs all-cvs all-diff all-grep \
148 all-patch all-emacs all-ispell \
149 all-newlib all-gprof all-send_pr
151 all.cross: all-libiberty all-mmalloc all-gas all-byacc all-ld \
152 all-bfd all-libgcc all-readline all-gdb
153 # $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
155 clean: clean-autoconf clean-libiberty clean-mmalloc clean-texinfo \
156 clean-bfd clean-newlib clean-binutils clean-flex \
157 clean-bison clean-byacc clean-ld clean-gas \
158 clean-gcc clean-libgcc clean-readline clean-glob clean-gdb \
159 clean-make clean-diff clean-grep clean-rcs \
160 clean-cvs clean-patch clean-emacs clean-ispell \
161 clean-libg++ clean-gprof clean-send_pr
162 -rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
167 install: $(INSTALL_TARGET) $(srcdir)/configure.man
168 $(INSTALL_DATA) $(srcdir)/configure.man $(man1dir)/configure.1
171 install.all: install-dirs install-autoconf install-texinfo \
172 install-mmalloc install-libiberty install-bfd install-binutils \
173 install-bison install-byacc install-flex install-ld \
174 install-gas install-gcc install-gprof install-libgcc \
175 install-readline install-glob install-gdb install-make \
176 install-cvs install-patch install-emacs install-ispell \
177 install-libg++ install-newlib \
180 install.cross: install-dirs install-libiberty install-mmalloc \
181 install-binutils install-bison install-byacc install-flex \
182 install-ld install-gas install-libgcc install-readline \
183 install-glob install-gdb install-mmalloc install-gprof
187 @if [ -d ./autoconf ] ; then \
188 rootme=`pwd` ; export rootme ; \
190 $(MAKE) $(FLAGS_TO_PASS) all) ; \
195 clean-autoconf: force
196 @if [ -d ./autoconf ] ; then \
197 rootme=`pwd` ; export rootme ; \
199 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
204 install-autoconf: force
205 @if [ -d ./autoconf ] ; then \
206 rootme=`pwd` ; export rootme ; \
208 $(MAKE) $(FLAGS_TO_PASS) install) ; \
215 @if [ -d ./libiberty ] ; then \
216 rootme=`pwd` ; export rootme ; \
218 $(MAKE) $(FLAGS_TO_PASS) all) ; \
223 clean-libiberty: force
224 @if [ -d ./libiberty ] ; then \
225 rootme=`pwd` ; export rootme ; \
227 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
232 install-libiberty: force
233 @if [ -d ./libiberty ] ; then \
234 rootme=`pwd` ; export rootme ; \
236 $(MAKE) $(FLAGS_TO_PASS) install) ; \
243 @if [ -d ./mmalloc ] ; then \
244 rootme=`pwd` ; export rootme ; \
246 $(MAKE) $(FLAGS_TO_PASS) all) ; \
252 @if [ -d ./mmalloc ] ; then \
253 rootme=`pwd` ; export rootme ; \
255 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
260 install-mmalloc: force
261 @if [ -d ./mmalloc ] ; then \
262 rootme=`pwd` ; export rootme ; \
264 $(MAKE) $(FLAGS_TO_PASS) install) ; \
270 all-texinfo: all-libiberty
271 @if [ -d ./texinfo ] ; then \
272 rootme=`pwd` ; export rootme ; \
273 rootme=`pwd` ; export rootme ; \
275 $(MAKE) $(FLAGS_TO_PASS) all) ; \
281 @if [ -d ./texinfo ] ; then \
282 rootme=`pwd` ; export rootme ; \
284 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
289 install-texinfo: force
290 @if [ -d ./texinfo ] ; then \
291 rootme=`pwd` ; export rootme ; \
293 $(MAKE) $(FLAGS_TO_PASS) install) ; \
300 @if [ -d ./bfd ] ; then \
301 rootme=`pwd` ; export rootme ; \
303 $(MAKE) $(FLAGS_TO_PASS) all) ; \
309 @if [ -d ./bfd ] ; then \
310 rootme=`pwd` ; export rootme ; \
312 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
318 @if [ -d ./bfd ] ; then \
319 rootme=`pwd` ; export rootme ; \
321 $(MAKE) $(FLAGS_TO_PASS) install) ; \
327 all-binutils: all-libiberty all-bfd all-flex
328 @if [ -d ./binutils ] ; then \
329 rootme=`pwd` ; export rootme ; \
331 $(MAKE) $(FLAGS_TO_PASS) all) ; \
336 clean-binutils: force
337 @if [ -d ./binutils ] ; then \
338 rootme=`pwd` ; export rootme ; \
340 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
345 install-binutils: force
346 @if [ -d ./binutils ] ; then \
347 rootme=`pwd` ; export rootme ; \
349 $(MAKE) $(FLAGS_TO_PASS) install) ; \
356 @if [ -d ./newlib ] ; then \
357 rootme=`pwd` ; export rootme ; \
359 $(MAKE) $(FLAGS_TO_PASS) all) ; \
365 @if [ -d ./newlib ] ; then \
366 rootme=`pwd` ; export rootme ; \
368 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
373 install-newlib: force
374 @if [ -d ./newlib ] ; then \
375 rootme=`pwd` ; export rootme ; \
377 $(MAKE) $(FLAGS_TO_PASS) install) ; \
383 all-gprof: all-libiberty all-bfd
384 @if [ -d ./gprof ] ; then \
385 rootme=`pwd` ; export rootme ; \
387 $(MAKE) $(FLAGS_TO_PASS) all) ; \
393 @if [ -d ./gprof ] ; then \
394 rootme=`pwd` ; export rootme ; \
396 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
402 @if [ -d ./gprof ] ; then \
403 rootme=`pwd` ; export rootme ; \
405 $(MAKE) $(FLAGS_TO_PASS) install) ; \
412 @if [ -d ./byacc ] ; then \
413 rootme=`pwd` ; export rootme ; \
415 $(MAKE) $(FLAGS_TO_PASS) all) ; \
421 @if [ -d ./byacc ] ; then \
422 rootme=`pwd` ; export rootme ; \
424 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
430 @if [ -d ./byacc ] ; then \
431 rootme=`pwd` ; export rootme ; \
433 $(MAKE) $(FLAGS_TO_PASS) install) ; \
439 all-bison: all-libiberty
440 @if [ -d ./bison ] ; then \
441 rootme=`pwd` ; export rootme ; \
443 $(MAKE) $(FLAGS_TO_PASS) all) ; \
449 @if [ -d ./bison ] ; then \
450 rootme=`pwd` ; export rootme ; \
452 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
458 @if [ -d ./bison ] ; then \
459 rootme=`pwd` ; export rootme ; \
461 $(MAKE) $(FLAGS_TO_PASS) install) ; \
467 all-flex: all-libiberty
468 @if [ -d ./flex ] ; then \
469 rootme=`pwd` ; export rootme ; \
471 $(MAKE) $(FLAGS_TO_PASS) all) ; \
477 @if [ -d ./flex ] ; then \
478 rootme=`pwd` ; export rootme ; \
480 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
486 @if [ -d ./flex ] ; then \
487 rootme=`pwd` ; export rootme ; \
489 $(MAKE) $(FLAGS_TO_PASS) install) ; \
494 all-gcc: all-libiberty all-byacc
495 @if [ -d ./gcc ] ; then \
496 rootme=`pwd` ; export rootme ; \
498 $(MAKE) $(FLAGS_TO_PASS) all) ; \
504 @if [ -d ./gcc ] ; then \
505 rootme=`pwd` ; export rootme ; \
507 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
513 @if [ -d ./gcc ] ; then \
514 rootme=`pwd` ; export rootme ; \
516 $(MAKE) $(FLAGS_TO_PASS) install) ; \
523 @if [ -d ./readline ] ; then \
524 rootme=`pwd` ; export rootme ; \
526 $(MAKE) $(FLAGS_TO_PASS) all) ; \
531 clean-readline: force
532 @if [ -d ./readline ] ; then \
533 rootme=`pwd` ; export rootme ; \
535 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
540 install-readline: force
541 @if [ -d ./readline ] ; then \
542 rootme=`pwd` ; export rootme ; \
544 $(MAKE) $(FLAGS_TO_PASS) install) ; \
551 @if [ -d ./glob ] ; then \
552 rootme=`pwd` ; export rootme ; \
554 $(MAKE) $(FLAGS_TO_PASS) all) ; \
560 @if [ -d ./glob ] ; then \
561 rootme=`pwd` ; export rootme ; \
563 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
569 @if [ -d ./glob ] ; then \
570 rootme=`pwd` ; export rootme ; \
572 $(MAKE) $(FLAGS_TO_PASS) install) ; \
578 all-gas: all-libiberty all-bfd
579 @if [ -d ./gas ] ; then \
580 rootme=`pwd` ; export rootme ; \
582 $(MAKE) $(FLAGS_TO_PASS) all) ; \
588 @if [ -d ./gas ] ; then \
589 rootme=`pwd` ; export rootme ; \
591 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
597 @if [ -d ./gas ] ; then \
598 rootme=`pwd` ; export rootme ; \
600 $(MAKE) $(FLAGS_TO_PASS) install) ; \
606 all-ld: all-libiberty all-bfd all-byacc all-flex
607 @if [ -d ./ld ] ; then \
608 rootme=`pwd` ; export rootme ; \
610 $(MAKE) $(FLAGS_TO_PASS) all) ; \
616 @if [ -d ./ld ] ; then \
617 rootme=`pwd` ; export rootme ; \
619 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
625 @if [ -d ./ld ] ; then \
626 rootme=`pwd` ; export rootme ; \
628 $(MAKE) $(FLAGS_TO_PASS) install) ; \
633 ### libgcc (and libgcc1)
634 all-libgcc1: all-gas all-binutils
635 @if [ -d ./libgcc ] ; then \
636 rootme=`pwd` ; export rootme ; \
638 $(MAKE) $(FLAGS_TO_PASS) libgcc1.a) ; \
644 @if [ -d ./libgcc ] ; then \
645 rootme=`pwd` ; export rootme ; \
647 $(MAKE) $(FLAGS_TO_PASS) clean-libgcc1) ; \
652 install-libgcc1: force
653 echo libgcc1 is a component, not an installable target
655 all-libgcc: all-gas all-gcc all-binutils
657 @if [ -d ./libgcc ] ; then \
658 rootme=`pwd` ; export rootme ; \
660 $(MAKE) $(FLAGS_TO_PASS) all) ; \
666 @if [ -d ./libgcc ] ; then \
667 rootme=`pwd` ; export rootme ; \
669 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
674 install-libgcc: force
675 @if [ -d ./libgcc ] ; then \
676 rootme=`pwd` ; export rootme ; \
678 $(MAKE) $(FLAGS_TO_PASS) install) ; \
684 all-gdb: all-bfd all-libiberty all-mmalloc all-readline all-glob all-byacc
685 @if [ -d ./gdb ] ; then \
686 rootme=`pwd` ; export rootme ; \
688 $(MAKE) $(FLAGS_TO_PASS) all) ; \
694 @if [ -d ./gdb ] ; then \
695 rootme=`pwd` ; export rootme ; \
697 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
703 @if [ -d ./gdb ] ; then \
704 rootme=`pwd` ; export rootme ; \
706 $(MAKE) $(FLAGS_TO_PASS) install) ; \
712 all-make: all-libiberty
713 @if [ -d ./make ] ; then \
714 rootme=`pwd` ; export rootme ; \
716 $(MAKE) $(FLAGS_TO_PASS) all) ; \
722 @if [ -d ./make ] ; then \
723 rootme=`pwd` ; export rootme ; \
725 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
731 @if [ -d ./make ] ; then \
732 rootme=`pwd` ; export rootme ; \
734 $(MAKE) $(FLAGS_TO_PASS) install) ; \
741 @if [ -d ./diff ] ; then \
742 rootme=`pwd` ; export rootme ; \
744 $(MAKE) $(FLAGS_TO_PASS) all) ; \
750 @if [ -d ./diff ] ; then \
751 rootme=`pwd` ; export rootme ; \
753 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
759 @if [ -d ./diff ] ; then \
760 rootme=`pwd` ; export rootme ; \
762 $(MAKE) $(FLAGS_TO_PASS) install) ; \
769 @if [ -d ./grep ] ; then \
770 rootme=`pwd` ; export rootme ; \
772 $(MAKE) $(FLAGS_TO_PASS) all) ; \
778 @if [ -d ./grep ] ; then \
779 rootme=`pwd` ; export rootme ; \
781 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
787 @if [ -d ./grep ] ; then \
788 rootme=`pwd` ; export rootme ; \
790 $(MAKE) $(FLAGS_TO_PASS) install) ; \
797 @if [ -d ./rcs ] ; then \
798 rootme=`pwd` ; export rootme ; \
800 $(MAKE) $(FLAGS_TO_PASS) all) ; \
806 @if [ -d ./rcs ] ; then \
807 rootme=`pwd` ; export rootme ; \
809 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
815 @if [ -d ./rcs ] ; then \
816 rootme=`pwd` ; export rootme ; \
818 $(MAKE) $(FLAGS_TO_PASS) install) ; \
825 @if [ -d ./cvs ] ; then \
826 rootme=`pwd` ; export rootme ; \
828 $(MAKE) $(FLAGS_TO_PASS) all) ; \
834 @if [ -d ./cvs ] ; then \
835 rootme=`pwd` ; export rootme ; \
837 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
843 @if [ -d ./cvs ] ; then \
844 rootme=`pwd` ; export rootme ; \
846 $(MAKE) $(FLAGS_TO_PASS) install) ; \
853 @if [ -d ./patch ] ; then \
854 rootme=`pwd` ; export rootme ; \
856 $(MAKE) $(FLAGS_TO_PASS) all) ; \
862 @if [ -d ./patch ] ; then \
863 rootme=`pwd` ; export rootme ; \
865 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
871 @if [ -d ./patch ] ; then \
872 rootme=`pwd` ; export rootme ; \
874 $(MAKE) $(FLAGS_TO_PASS) \
876 man1dir=$(man1dir) install) ; \
883 @if [ -d ./emacs ] ; then \
884 rootme=`pwd` ; export rootme ; \
886 $(MAKE) $(FLAGS_TO_PASS) all) ; \
892 @if [ -d ./emacs ] ; then \
893 rootme=`pwd` ; export rootme ; \
895 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
901 @if [ -d ./emacs ] ; then \
902 rootme=`pwd` ; export rootme ; \
904 $(MAKE) $(FLAGS_TO_PASS) install) ; \
910 all-ispell: all-emacs
911 @if [ -d ./ispell ] ; then \
912 rootme=`pwd` ; export rootme ; \
914 $(MAKE) $(FLAGS_TO_PASS) all) ; \
920 @if [ -d ./ispell ] ; then \
921 rootme=`pwd` ; export rootme ; \
923 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
928 install-ispell: force
929 @if [ -d ./ispell ] ; then \
930 rootme=`pwd` ; export rootme ; \
932 $(MAKE) $(FLAGS_TO_PASS) install) ; \
939 @if [ -d ./send_pr ] ; then \
940 rootme=`pwd` ; export rootme ; \
942 $(MAKE) $(FLAGS_TO_PASS) all) ; \
948 @if [ -d ./send_pr ] ; then \
949 rootme=`pwd` ; export rootme ; \
951 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
956 install-send_pr: force
957 @if [ -d ./send_pr ] ; then \
958 rootme=`pwd` ; export rootme ; \
960 $(MAKE) $(FLAGS_TO_PASS) install) ; \
967 all-libg++: all-gas all-ld all-gcc
968 @if [ -d ./libg++ ] ; then \
969 rootme=`pwd` ; export rootme ; \
971 $(MAKE) $(FLAGS_TO_PASS) "CC=${GXX}" all) ; \
977 @if [ -d ./libg++ ] ; then \
978 rootme=`pwd` ; export rootme ; \
980 $(MAKE) $(FLAGS_TO_PASS) "CC=${GXX}" clean) ; \
985 install-libg++: force
986 @if [ -d ./libg++ ] ; then \
987 rootme=`pwd` ; export rootme ; \
989 $(MAKE) $(FLAGS_TO_PASS) "CC=${GXX}" install) ; \
994 ### other supporting targets
995 # this is a bad hack.
996 all.xclib: all.normal
997 if [ -d clib ] ; then \
998 (cd clib ; $(MAKE) $(FLAGS_TO_PASS)) ; \
1002 @for i in $(DODIRS); do \
1003 if [ -f ./$$i/localenv ] ; then \
1004 if (rootme=`pwd` ; export rootme ; cd ./$$i; \
1005 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1006 else exit 1 ; fi ; \
1007 else if [ -d ./$$i ] ; then \
1008 if (rootme=`pwd` ; export rootme ; cd ./$$i; \
1009 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1010 else exit 1 ; fi ; \
1015 # The "else true" stuff is for Ultrix; the shell returns the exit code
1016 # of the "if" command, if no commands are run in the "then" or "else" part,
1017 # causing Make to quit.
1040 for i in $(MAKEDIRS) ; do \
1041 echo Making $$i... ; \
1042 [ -d $$i ] || mkdir $$i || exit 1 ; \
1050 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
1051 if [ -d $(datadir) ] ; then true ; else mkdir $(datadir) ; fi
1052 if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
1055 $(srcdir)/texinfo/gen-info-dir $(infodir) > dir.info.new
1056 mv -f dir.info.new dir.info
1065 @for i in $(SUBDIRS); \
1069 wd=`basename $$pwd`; \
1070 for j in `$(MAKE) ls`; \
1078 # with the gnu make, this is done automatically.
1080 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1081 $(SHELL) ./config.status
1084 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1086 DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
1087 config.sub config configure.man move-if-change
1088 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc readline glob
1089 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
1091 setup-dirs: force_update
1094 ./configure -rm sun4
1095 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1097 bfd.ilrt.tar.Z: setup-dirs
1098 rm -f bfd.ilrt.tar.Z
1099 tar cf - $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) \
1100 | compress -v >bfd.ilrt.tar.Z
1102 gdb.tar.Z: setup-dirs
1103 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1104 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1106 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1107 rm -rf proto-toplev; mkdir proto-toplev
1108 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1109 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1112 # Put only one copy (four hard links) of COPYING in the tar file.
1113 rm proto-toplev/bfd/COPYING
1114 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1115 rm proto-toplev/include/COPYING
1116 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1117 rm proto-toplev/readline/COPYING
1118 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
1119 # Take out texinfo from configurable dirs
1120 rm proto-toplev/configure.in
1121 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
1122 # Take out glob from buildable dirs
1123 rm proto-toplev/Makefile.in
1125 sed -e '/^SUBDIRS =/s/glob //' \
1126 -e '/^all\.normal: /s/\all-texinfo //' \
1127 -e '/^clean: /s/clean-texinfo //' \
1128 -e '/^install\.all: /s/install-texinfo //' \
1129 <Makefile.in >proto-toplev/Makefile.in
1131 mkdir proto-toplev/texinfo
1132 mkdir proto-toplev/texinfo/fsf
1133 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
1134 chmod og=u `find proto-toplev -print`
1135 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1136 echo "==> Making gdb-$$VER.tar.Z"; \
1137 ln -s proto-toplev gdb-$$VER; \
1138 tar cfh - gdb-$$VER \
1139 | compress -v >gdb-$$VER.tar.Z)
1145 # end of Makefile.in