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
)
62 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
63 then echo $${rootme}/byacc/byacc ; \
67 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
68 then echo $${rootme}/flex/flex ; \
71 MAKEINFO
= `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
72 then echo $${rootme}/texinfo/C/makeinfo ; \
73 else echo makeinfo ; fi`
75 # compilers to use to create programs which must be run in the build
78 CXX_FOR_BUILD
= $(CXX
)
80 SUBDIRS
= libiberty mmalloc glob readline opcodes bfd z8ksim gdb binutils
ld gas tgas gcc libg
++ newlib deja-gnu
84 INSTALL_TARGET
= install.
all
90 if [ -f $${rootme}/gcc/Makefile ] ; then \
91 echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
93 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
96 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
101 if [ -f $${rootme}/gcc/Makefile ] ; then \
102 echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
104 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
107 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
112 if [ -f $${rootme}/gas/Makefile ] ; then \
113 echo $${rootme}/gas/as.new ; \
115 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
118 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
123 if [ -f $${rootme}/binutils/Makefile ] ; then \
124 echo $${rootme}/binutils/ar ; \
126 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
129 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
133 RANLIB_FOR_TARGET
= ` \
134 if [ -f $${rootme}/binutils/Makefile ] ; then \
135 echo $${rootme}/binutils/ranlib ; \
137 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
140 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
145 if [ -f $${rootme}/binutils/Makefile ] ; then \
146 echo $${rootme}/binutils/nm ; \
148 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
151 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
156 if [ -f $${rootme}/gcc/Makefile ] ; then \
157 if [ -f $${rootme}/newlib/Makefile ] ; then \
158 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
160 echo -I$${rootme}/gcc/include ; \
167 #### host and target specific makefile fragments come in here.
170 # Flags to pass down to sub-makes -- please keep these in alphabetical order
173 "AR_FLAGS=$(AR_FLAGS)" \
175 "CXXFLAGS=$(CXXFLAGS)" \
176 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
178 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
180 "INSTALL=$(INSTALL)" \
181 "INSTALL_DATA=$(INSTALL_DATA)" \
182 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
183 "LDFLAGS=$(LDFLAGS)" \
185 "LOADLIBES=$(LOADLIBES)" \
186 "MAKEINFO=$(MAKEINFO)" \
188 "exec_prefix=$(exec_prefix)" \
192 # Flags that are concerned with the location of the X11 include files
194 X11_FLAGS_TO_PASS
= \
195 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
196 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)"
198 # Flags to pass down to makes which are built with the target
199 # environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
200 TARGET_FLAGS_TO_PASS
= \
201 "AR=$(AR_FOR_TARGET)" \
202 "AR_FLAGS=$(AR_FLAGS)" \
203 "AS=$(AS_FOR_TARGET)" \
205 "CXX=$(CXX_FOR_TARGET)" \
206 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
207 "CXXFLAGS=$(CXXFLAGS)" \
208 "CC=$(CC_FOR_TARGET)" \
209 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
211 "INSTALL=$(INSTALL)" \
212 "INSTALL_DATA=$(INSTALL_DATA)" \
213 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
214 "LDFLAGS=$(LDFLAGS)" \
216 "LOADLIBES=$(LOADLIBES)" \
217 "MAKEINFO=$(MAKEINFO)" \
218 "NM=$(NM_FOR_TARGET)" \
219 "RANLIB=$(RANLIB_FOR_TARGET)" \
220 "XTRAFLAGS=$(XTRAFLAGS)" \
221 "exec_prefix=$(exec_prefix)" \
225 # The first rule in the file had better be this one. Don't put any above it.
228 .PHONY
: all check dvi info install-info
232 @rootme
=`pwd` ; export rootme
; \
233 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
235 install-info
: install-info-dirs
force
236 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
237 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
238 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
239 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) DO
=install-info
"DODIRS=$(SUBDIRS)" subdir_do
240 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) dir.
info install-dir.
info
243 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
244 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
245 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
246 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
248 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
249 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
250 all-gcc all-binutils all-libg
++ all-readline all-z8ksim all-gdb \
251 all-make all-rcs all-cvs all-diff all-grep \
252 all-patch all-emacs all-ispell all-etc \
253 all-tcl all-tk all-expect \
254 all-newlib all-gprof all-send_pr all-libm all-deja-gnu \
255 all-fileutils all-find all-gawk all-sed all-shellutils \
256 all-textutils all-time all-wdiff
259 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
260 all-opcodes all-z8ksim all-bfd all-readline all-gdb all-binutils all-gcc \
261 all-newlib all-deja-gnu
263 .PHONY
: clean distclean mostlyclean realclean do_clean
266 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
268 clean mostlyclean: do_clean
269 @rootme
=`pwd` ; export rootme
; \
270 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
272 distclean realclean: do_clean
273 @rootme
=`pwd` ; export rootme
; \
274 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
275 -rm -f Makefile config.status
278 @echo
"the uninstall target is not supported in this tree"
280 install: $(INSTALL_TARGET
)
281 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
282 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
283 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
285 install.
all: install-no-fixedincludes
286 @if
[ -f .
/gcc
/Makefile
] ; then \
287 rootme
=`pwd` ; export rootme
; \
289 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
294 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
328 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
329 install-textutils install-time install-wdiff
331 gcc-no-fixedincludes
:
332 @if
[ -f .
/gcc
/Makefile
] ; then \
333 rootme
=`pwd` ; export rootme
; \
335 $(MAKE
) $(FLAGS_TO_PASS
) install install-man \
336 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
341 install.cross
: install-dirs install-libiberty install-mmalloc \
342 install-binutils install-opcodes install-byacc install-flex \
343 install-ld install-gas install-readline \
344 install-glob install-gdb install-mmalloc \
345 install-newlib install-gcc install-etc install-deja-gnu
349 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
350 rootme
=`pwd` ; export rootme
; \
351 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
356 install-deja-gnu
: force
357 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
358 rootme
=`pwd` ; export rootme
; \
359 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
366 @if
[ -f .
/autoconf
/Makefile
] ; then \
367 rootme
=`pwd` ; export rootme
; \
368 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
373 install-autoconf
: force
374 @if
[ -f .
/autoconf
/Makefile
] ; then \
375 rootme
=`pwd` ; export rootme
; \
376 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
383 @if
[ -f .
/etc
/Makefile
] ; then \
384 rootme
=`pwd` ; export rootme
; \
385 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
391 @if
[ -f .
/etc
/Makefile
] ; then \
392 rootme
=`pwd` ; export rootme
; \
393 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
400 @if
[ -f .
/libiberty
/Makefile
] ; then \
401 rootme
=`pwd` ; export rootme
; \
403 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
408 install-libiberty
: force
409 @if
[ -f .
/libiberty
/Makefile
] ; then \
410 rootme
=`pwd` ; export rootme
; \
412 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
418 all-xiberty
: all-gcc all-newlib
419 @if
[ -f .
/xiberty
/Makefile
] ; then \
420 rootme
=`pwd` ; export rootme
; \
421 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
423 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
428 install-xiberty
: force
429 @if
[ -f .
/xiberty
/Makefile
] ; then \
430 rootme
=`pwd` ; export rootme
; \
431 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
433 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
440 @if
[ -f .
/mmalloc
/Makefile
] ; then \
441 rootme
=`pwd` ; export rootme
; \
443 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
448 install-mmalloc
: force
449 @if
[ -f .
/mmalloc
/Makefile
] ; then \
450 rootme
=`pwd` ; export rootme
; \
452 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
458 all-texinfo
: all-libiberty
459 @if
[ -f .
/texinfo
/Makefile
] ; then \
460 rootme
=`pwd` ; export rootme
; \
462 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
467 install-texinfo
: force
468 @if
[ -f .
/texinfo
/Makefile
] ; then \
469 rootme
=`pwd` ; export rootme
; \
471 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
478 @if
[ -f .
/bfd
/Makefile
] ; then \
479 rootme
=`pwd` ; export rootme
; \
481 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
487 @if
[ -f .
/bfd
/Makefile
] ; then \
488 rootme
=`pwd` ; export rootme
; \
490 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
498 @if
[ -f .
/opcodes
/Makefile
] ; then \
499 rootme
=`pwd` ; export rootme
; \
501 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
506 install-opcodes
: force
507 @if
[ -f .
/opcodes
/Makefile
] ; then \
508 rootme
=`pwd` ; export rootme
; \
510 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
516 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
517 @if
[ -f .
/binutils
/Makefile
] ; then \
518 rootme
=`pwd` ; export rootme
; \
520 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
525 install-binutils
: force
526 @if
[ -f .
/binutils
/Makefile
] ; then \
527 rootme
=`pwd` ; export rootme
; \
529 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
535 all-newlib
: all-binutils all-ld all-gas all-gcc
536 @if
[ -f .
/newlib
/Makefile
] ; then \
537 rootme
=`pwd` ; export rootme
; \
538 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
540 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
545 install-newlib
: force
546 @if
[ -f .
/newlib
/Makefile
] ; then \
547 rootme
=`pwd` ; export rootme
; \
548 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
550 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
556 all-gprof
: all-libiberty all-bfd
557 @if
[ -f .
/gprof
/Makefile
] ; then \
558 rootme
=`pwd` ; export rootme
; \
560 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
566 @if
[ -f .
/gprof
/Makefile
] ; then \
567 rootme
=`pwd` ; export rootme
; \
569 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
576 @if
[ -f .
/byacc
/Makefile
] ; then \
577 rootme
=`pwd` ; export rootme
; \
579 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
585 @if
[ -f .
/byacc
/Makefile
] ; then \
586 rootme
=`pwd` ; export rootme
; \
588 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
594 all-flex
: all-libiberty
595 @if
[ -f .
/flex
/Makefile
] ; then \
596 rootme
=`pwd` ; export rootme
; \
598 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
604 @if
[ -f .
/flex
/Makefile
] ; then \
605 rootme
=`pwd` ; export rootme
; \
607 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
612 all-gcc
: all-libiberty all-byacc all-binutils
613 @if
[ -f .
/gcc
/Makefile
] ; then \
614 rootme
=`pwd` ; export rootme
; \
616 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
622 @if
[ -f .
/gcc
/Makefile
] ; then \
623 rootme
=`pwd` ; export rootme
; \
625 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
632 @if
[ -f .
/readline
/Makefile
] ; then \
633 rootme
=`pwd` ; export rootme
; \
635 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
640 install-readline
: force
641 @if
[ -f .
/readline
/Makefile
] ; then \
642 rootme
=`pwd` ; export rootme
; \
644 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
651 @if
[ -f .
/glob
/Makefile
] ; then \
652 rootme
=`pwd` ; export rootme
; \
654 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
660 @if
[ -f .
/glob
/Makefile
] ; then \
661 rootme
=`pwd` ; export rootme
; \
663 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
669 all-gas
: all-libiberty all-opcodes all-bfd
670 @if
[ -f .
/gas
/Makefile
] ; then \
671 rootme
=`pwd` ; export rootme
; \
673 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
679 @if
[ -f .
/gas
/Makefile
] ; then \
680 rootme
=`pwd` ; export rootme
; \
682 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
688 all-tgas
: all-libiberty all-bfd
689 @if
[ -f .
/tgas
/Makefile
] ; then \
690 rootme
=`pwd` ; export rootme
; \
692 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
699 all-ld
: all-libiberty all-bfd all-byacc all-flex
700 @if
[ -f .
/ld/Makefile
] ; then \
701 rootme
=`pwd` ; export rootme
; \
703 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
709 @if
[ -f .
/ld/Makefile
] ; then \
710 rootme
=`pwd` ; export rootme
; \
712 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
718 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
719 @if
[ -f .
/gdb
/Makefile
] ; then \
720 rootme
=`pwd` ; export rootme
; \
722 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
728 @if
[ -f .
/gdb
/Makefile
] ; then \
729 rootme
=`pwd` ; export rootme
; \
731 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
737 all-make
: all-libiberty
738 @if
[ -f .
/make
/Makefile
] ; then \
739 rootme
=`pwd` ; export rootme
; \
741 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
747 @if
[ -f .
/make
/Makefile
] ; then \
748 rootme
=`pwd` ; export rootme
; \
750 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
757 @if
[ -f .
/diff
/Makefile
] ; then \
758 rootme
=`pwd` ; export rootme
; \
760 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
766 @if
[ -f .
/diff
/Makefile
] ; then \
767 rootme
=`pwd` ; export rootme
; \
769 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
776 @if
[ -f .
/grep
/Makefile
] ; then \
777 rootme
=`pwd` ; export rootme
; \
779 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
785 @if
[ -f .
/grep
/Makefile
] ; then \
786 rootme
=`pwd` ; export rootme
; \
788 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
795 @if
[ -f .
/rcs
/Makefile
] ; then \
796 rootme
=`pwd` ; export rootme
; \
798 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
804 @if
[ -f .
/rcs
/Makefile
] ; then \
805 rootme
=`pwd` ; export rootme
; \
807 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
814 @if
[ -f .
/cvs
/Makefile
] ; then \
815 rootme
=`pwd` ; export rootme
; \
817 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
823 @if
[ -f .
/cvs
/Makefile
] ; then \
824 rootme
=`pwd` ; export rootme
; \
826 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
833 @if
[ -f .
/patch
/Makefile
] ; then \
834 rootme
=`pwd` ; export rootme
; \
836 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
842 @if
[ -f .
/patch
/Makefile
] ; then \
843 rootme
=`pwd` ; export rootme
; \
845 $(MAKE
) $(FLAGS_TO_PASS
) \
847 man1dir=$(man1dir) install) ; \
854 @if
[ -f .
/emacs
/Makefile
] ; then \
855 rootme
=`pwd` ; export rootme
; \
857 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
863 @if
[ -f .
/emacs
/Makefile
] ; then \
864 rootme
=`pwd` ; export rootme
; \
866 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
872 all-ispell
: all-emacs
873 @if
[ -f .
/ispell
/Makefile
] ; then \
874 rootme
=`pwd` ; export rootme
; \
876 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
881 install-ispell
: force
882 @if
[ -f .
/ispell
/Makefile
] ; then \
883 rootme
=`pwd` ; export rootme
; \
885 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
892 @if
[ -f .
/send_pr
/Makefile
] ; then \
893 rootme
=`pwd` ; export rootme
; \
895 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
900 install-send_pr
: force
901 @if
[ -f .
/send_pr
/Makefile
] ; then \
902 rootme
=`pwd` ; export rootme
; \
904 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
911 @if
[ -f .
/libm
/Makefile
] ; then \
912 rootme
=`pwd` ; export rootme
; \
914 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
920 @if
[ -f .
/libm
/Makefile
] ; then \
921 rootme
=`pwd` ; export rootme
; \
923 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
930 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
931 @if
[ -f .
/libg
++/Makefile
] ; then \
932 rootme
=`pwd` ; export rootme
; \
933 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
935 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
940 install-libg
++: force
941 @if
[ -f .
/libg
++/Makefile
] ; then \
942 rootme
=`pwd` ; export rootme
; \
943 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
945 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
951 @if
[ -f .
/tcl
/Makefile
] ; then \
952 rootme
=`pwd` ; export rootme
; \
953 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
955 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
961 @if
[ -f .
/tcl
/Makefile
] ; then \
962 rootme
=`pwd` ; export rootme
; \
963 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
965 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
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
) all) ; \
983 @if
[ -f .
/tk
/Makefile
] ; then \
984 rootme
=`pwd` ; export rootme
; \
985 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
987 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
994 @if
[ -f .
/expect
/Makefile
] ; then \
995 rootme
=`pwd` ; export rootme
; \
996 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
998 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1003 install-expect
: force
1004 @if
[ -f .
/expect
/Makefile
] ; then \
1005 rootme
=`pwd` ; export rootme
; \
1006 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1008 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1015 @if
[ -f .
/z8ksim
/Makefile
] ; then \
1016 rootme
=`pwd` ; export rootme
; \
1018 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1023 install-z8ksim
: force
1024 @if
[ -f .
/z8ksim
/Makefile
] ; then \
1025 rootme
=`pwd` ; export rootme
; \
1027 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1033 all-fileutils
: force
1034 @if
[ -f .
/fileutils
/Makefile
] ; then \
1035 rootme
=`pwd` ; export rootme
; \
1036 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1041 install-fileutils
: force
1042 @if
[ -f .
/fileutils
/Makefile
] ; then \
1043 rootme
=`pwd` ; export rootme
; \
1044 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1051 @if
[ -f .
/find
/Makefile
] ; then \
1052 rootme
=`pwd` ; export rootme
; \
1053 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1059 @if
[ -f .
/find
/Makefile
] ; then \
1060 rootme
=`pwd` ; export rootme
; \
1061 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1068 @if
[ -f .
/gawk
/Makefile
] ; then \
1069 rootme
=`pwd` ; export rootme
; \
1070 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1076 @if
[ -f .
/gawk
/Makefile
] ; then \
1077 rootme
=`pwd` ; export rootme
; \
1078 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1084 all-m4
: all-libiberty
1085 @if
[ -f .
/m4
/Makefile
] ; then \
1086 rootme
=`pwd` ; export rootme
; \
1087 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1093 @if
[ -f .
/m4
/Makefile
] ; then \
1094 rootme
=`pwd` ; export rootme
; \
1095 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1102 @if
[ -f .
/sed
/Makefile
] ; then \
1103 rootme
=`pwd` ; export rootme
; \
1104 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1110 @if
[ -f .
/sed
/Makefile
] ; then \
1111 rootme
=`pwd` ; export rootme
; \
1112 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1119 @if
[ -f .
/time
/Makefile
] ; then \
1120 rootme
=`pwd` ; export rootme
; \
1121 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1127 @if
[ -f .
/time
/Makefile
] ; then \
1128 rootme
=`pwd` ; export rootme
; \
1129 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1136 @if
[ -f .
/wdiff
/Makefile
] ; then \
1137 rootme
=`pwd` ; export rootme
; \
1138 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1143 install-wdiff
: force
1144 @if
[ -f .
/wdiff
/Makefile
] ; then \
1145 rootme
=`pwd` ; export rootme
; \
1146 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1152 all-shellutils
: force
1153 @if
[ -f .
/shellutils
/Makefile
] ; then \
1154 rootme
=`pwd` ; export rootme
; \
1155 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1160 install-shellutils
: force
1161 @if
[ -f .
/shellutils
/Makefile
] ; then \
1162 rootme
=`pwd` ; export rootme
; \
1163 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1169 all-textutils
: force
1170 @if
[ -f .
/textutils
/Makefile
] ; then \
1171 rootme
=`pwd` ; export rootme
; \
1172 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1177 install-textutils
: force
1178 @if
[ -f .
/textutils
/Makefile
] ; then \
1179 rootme
=`pwd` ; export rootme
; \
1180 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1187 ### other supporting targets
1190 @for i in
$(DODIRS
); do \
1191 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
] ; then \
1193 libg
++ | xiberty | newlib
) \
1194 if
(rootme
=`pwd` ; export rootme
; \
1195 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1197 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1201 if
(rootme
=`pwd` ; export rootme
; \
1203 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1210 # The "else true" stuff is for Ultrix; the shell returns the exit code
1211 # of the "if" command, if no commands are run in the "then" or "else" part,
1212 # causing Make to quit.
1236 for i in
$(MAKEDIRS
) ; do \
1237 echo Making
$$i...
; \
1238 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1239 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1240 if
[ ! -d
$$i ] ; then \
1241 if mkdir
$$i ; then \
1252 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1255 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1256 mv
-f
dir.
info.new
dir.
info
1259 @echo
"Building a full distribution of this tree isn't done"
1260 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1269 @for i in
$(SUBDIRS
); \
1273 wd
=`basename $$pwd`; \
1274 for j in
`$(MAKE) ls`; \
1282 # with the gnu make, this is done automatically.
1284 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1285 $(SHELL
) .
/config.status
1288 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1290 DEVO_SUPPORT
= README cfg-paper.texi Makefile.in configure configure.in \
1291 config.sub config configure.man configure.texi move-if-change \
1293 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1294 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
) texinfo
/fsf
/texinfo.
tex
1299 .
/configure
-rm sun4
1300 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1302 gdb.
tar.Z
: setup-dirs
1303 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1304 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1306 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/fsf
/texinfo.
tex
1307 rm -rf proto-toplev
; mkdir proto-toplev
1308 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1309 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1312 # Put only one copy (four hard links) of COPYING in the tar file.
1313 rm proto-toplev
/bfd
/COPYING
1314 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1315 rm proto-toplev
/include/COPYING
1316 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1317 rm proto-toplev
/readline
/COPYING
1318 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1319 # Take out texinfo from configurable dirs
1320 rm proto-toplev
/configure.in
1321 sed
'/^configdirs=/s/texinfo //' <configure.in
>proto-toplev
/configure.in
1322 # Take out glob from buildable dirs
1323 rm proto-toplev
/Makefile.in
1325 sed
-e
'/^SUBDIRS =/s/glob //' \
1326 -e
'/^all\.normal: /s/\all-texinfo //' \
1327 -e
'/^clean: /s/clean-texinfo //' \
1328 -e
'/^install\.all: /s/install-texinfo //' \
1329 <Makefile.in
>proto-toplev
/Makefile.in
1331 mkdir proto-toplev
/texinfo
1332 mkdir proto-toplev
/texinfo
/fsf
1333 ln
-s ..
/..
/..
/texinfo
/fsf
/texinfo.
tex proto-toplev
/texinfo
/fsf
/
1334 chmod og
=u
`find proto-toplev -print`
1335 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1336 echo
"==> Making gdb-$$VER.tar.Z"; \
1337 ln
-s proto-toplev gdb-
$$VER; \
1338 tar cfh
- gdb-
$$VER \
1339 | compress
-v
>gdb-
$$VER.
tar.Z
)
1342 # end of Makefile.in