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 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 "C++FLAGS=$(C++FLAGS)" \
173 "C++_FOR_BUILD=$(C++_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 to pass down to makes which are built with the target
190 # environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
191 TARGET_FLAGS_TO_PASS
= \
192 "AR=$(AR_FOR_TARGET)" \
193 "AR_FLAGS=$(AR_FLAGS)" \
194 "AS=$(AS_FOR_TARGET)" \
196 "C++=$(C++_FOR_TARGET)" \
197 "C++_FOR_BUILD=$(C++_FOR_BUILD)" \
198 "CC=$(CC_FOR_TARGET)" \
199 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
201 "INSTALL=$(INSTALL)" \
202 "INSTALL_DATA=$(INSTALL_DATA)" \
203 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
204 "LDFLAGS=$(LDFLAGS)" \
206 "LOADLIBES=$(LOADLIBES)" \
207 "MAKEINFO=$(MAKEINFO)" \
208 "NM=$(NM_FOR_TARGET)" \
209 "RANLIB=$(RANLIB_FOR_TARGET)" \
210 "XTRAFLAGS=$(XTRAFLAGS)" \
211 "exec_prefix=$(exec_prefix)" \
215 # The first rule in the file had better be this one. Don't put any above it.
218 .PHONY
: all info install-info clean-info
222 @rootme
=`pwd` ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) subdir_do DO
=info "DODIRS=$(SUBDIRS)"
225 @rootme
=`pwd` ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) DO
=check "DODIRS=$(SUBDIRS)" subdir_do
228 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) DO
=clean-info
"DODIRS=$(SUBDIRS)" subdir_do
230 install-info
: install-info-dirs
force
231 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
232 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
233 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
234 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) DO
=install-info
"DODIRS=$(SUBDIRS)" subdir_do
235 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) dir.
info install-dir.
info
238 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
239 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
240 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
241 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
243 all.normal
: all-autoconf all-libiberty all-mmalloc all-texinfo \
244 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
245 all-gcc all-binutils all-libg
++ all-readline all-gdb \
246 all-make all-rcs all-cvs all-diff all-grep \
247 all-patch all-emacs all-ispell all-etc \
248 all-tcl all-tk all-expect \
249 all-newlib all-gprof all-send_pr all-libm all-deja-gnu
251 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
252 all-opcodes all-bfd all-readline all-gdb all-binutils all-gcc \
253 all-newlib all-deja-gnu
255 clean: clean-autoconf clean-libiberty clean-mmalloc clean-texinfo \
256 clean-bfd clean-newlib clean-binutils clean-flex \
257 clean-byacc clean-ld clean-gas clean-etc clean-opcodes \
258 clean-gcc clean-readline clean-glob clean-gdb \
259 clean-make clean-diff clean-grep clean-rcs \
260 clean-cvs clean-patch clean-emacs clean-ispell \
261 clean-tcl clean-tk clean-expect \
262 clean-libg
++ clean-gprof clean-send_pr clean-libm clean-xiberty \
264 -rm -rf
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
269 install: $(INSTALL_TARGET
)
270 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
271 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
272 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
274 install.
all: install-no-fixedincludes
275 @if
[ -f .
/gcc
/Makefile
] ; then \
276 rootme
=`pwd` ; export rootme
; \
278 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
283 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
317 gcc-no-fixedincludes
:
318 @if
[ -f .
/gcc
/Makefile
] ; then \
319 rootme
=`pwd` ; export rootme
; \
321 $(MAKE
) $(FLAGS_TO_PASS
) install install-man \
322 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
327 install.cross
: install-dirs install-libiberty install-mmalloc \
328 install-binutils install-opcodes install-byacc install-flex \
329 install-ld install-gas install-readline \
330 install-glob install-gdb install-mmalloc \
331 install-newlib install-gcc install-etc install-deja-gnu
335 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
336 rootme
=`pwd` ; export rootme
; \
337 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
342 clean-deja-gnu
: force
343 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
344 rootme
=`pwd` ; export rootme
; \
345 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
350 install-deja-gnu
: force
351 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
352 rootme
=`pwd` ; export rootme
; \
353 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
360 @if
[ -f .
/autoconf
/Makefile
] ; then \
361 rootme
=`pwd` ; export rootme
; \
362 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
367 clean-autoconf
: force
368 @if
[ -f .
/autoconf
/Makefile
] ; then \
369 rootme
=`pwd` ; export rootme
; \
370 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
375 install-autoconf
: force
376 @if
[ -f .
/autoconf
/Makefile
] ; then \
377 rootme
=`pwd` ; export rootme
; \
378 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
385 @if
[ -f .
/etc
/Makefile
] ; then \
386 rootme
=`pwd` ; export rootme
; \
387 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
393 @if
[ -f .
/etc
/Makefile
] ; then \
394 rootme
=`pwd` ; export rootme
; \
395 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
401 @if
[ -f .
/etc
/Makefile
] ; then \
402 rootme
=`pwd` ; export rootme
; \
403 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
410 @if
[ -f .
/libiberty
/Makefile
] ; then \
411 rootme
=`pwd` ; export rootme
; \
413 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
418 clean-libiberty
: force
419 @if
[ -f .
/libiberty
/Makefile
] ; then \
420 rootme
=`pwd` ; export rootme
; \
422 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
427 install-libiberty
: force
428 @if
[ -f .
/libiberty
/Makefile
] ; then \
429 rootme
=`pwd` ; export rootme
; \
431 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
437 all-xiberty
: all-gcc all-newlib
438 @if
[ -f .
/xiberty
/Makefile
] ; then \
439 rootme
=`pwd` ; export rootme
; \
440 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
442 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
448 @if
[ -f .
/xiberty
/Makefile
] ; then \
449 rootme
=`pwd` ; export rootme
; \
450 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
452 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
457 install-xiberty
: force
458 @if
[ -f .
/xiberty
/Makefile
] ; then \
459 rootme
=`pwd` ; export rootme
; \
460 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
462 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
469 @if
[ -f .
/mmalloc
/Makefile
] ; then \
470 rootme
=`pwd` ; export rootme
; \
472 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
478 @if
[ -f .
/mmalloc
/Makefile
] ; then \
479 rootme
=`pwd` ; export rootme
; \
481 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
486 install-mmalloc
: force
487 @if
[ -f .
/mmalloc
/Makefile
] ; then \
488 rootme
=`pwd` ; export rootme
; \
490 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
496 all-texinfo
: all-libiberty
497 @if
[ -f .
/texinfo
/Makefile
] ; then \
498 rootme
=`pwd` ; export rootme
; \
500 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
506 @if
[ -f .
/texinfo
/Makefile
] ; then \
507 rootme
=`pwd` ; export rootme
; \
509 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
514 install-texinfo
: force
515 @if
[ -f .
/texinfo
/Makefile
] ; then \
516 rootme
=`pwd` ; export rootme
; \
518 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
525 @if
[ -f .
/bfd
/Makefile
] ; then \
526 rootme
=`pwd` ; export rootme
; \
528 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
534 @if
[ -f .
/bfd
/Makefile
] ; then \
535 rootme
=`pwd` ; export rootme
; \
537 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
543 @if
[ -f .
/bfd
/Makefile
] ; then \
544 rootme
=`pwd` ; export rootme
; \
546 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
554 @if
[ -f .
/opcodes
/Makefile
] ; then \
555 rootme
=`pwd` ; export rootme
; \
557 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
563 @if
[ -f .
/opcodes
/Makefile
] ; then \
564 rootme
=`pwd` ; export rootme
; \
566 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
571 install-opcodes
: force
572 @if
[ -f .
/opcodes
/Makefile
] ; then \
573 rootme
=`pwd` ; export rootme
; \
575 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
581 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
582 @if
[ -f .
/binutils
/Makefile
] ; then \
583 rootme
=`pwd` ; export rootme
; \
585 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
590 clean-binutils
: force
591 @if
[ -f .
/binutils
/Makefile
] ; then \
592 rootme
=`pwd` ; export rootme
; \
594 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
599 install-binutils
: force
600 @if
[ -f .
/binutils
/Makefile
] ; then \
601 rootme
=`pwd` ; export rootme
; \
603 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
609 all-newlib
: all-binutils all-ld all-gas all-gcc
610 @if
[ -f .
/newlib
/Makefile
] ; then \
611 rootme
=`pwd` ; export rootme
; \
612 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
614 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
620 @if
[ -f .
/newlib
/Makefile
] ; then \
621 rootme
=`pwd` ; export rootme
; \
622 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
624 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean) ; \
629 install-newlib
: force
630 @if
[ -f .
/newlib
/Makefile
] ; then \
631 rootme
=`pwd` ; export rootme
; \
632 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
634 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
640 all-gprof
: all-libiberty all-bfd
641 @if
[ -f .
/gprof
/Makefile
] ; then \
642 rootme
=`pwd` ; export rootme
; \
644 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
650 @if
[ -f .
/gprof
/Makefile
] ; then \
651 rootme
=`pwd` ; export rootme
; \
653 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
659 @if
[ -f .
/gprof
/Makefile
] ; then \
660 rootme
=`pwd` ; export rootme
; \
662 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
669 @if
[ -f .
/byacc
/Makefile
] ; then \
670 rootme
=`pwd` ; export rootme
; \
672 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
678 @if
[ -f .
/byacc
/Makefile
] ; then \
679 rootme
=`pwd` ; export rootme
; \
681 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
687 @if
[ -f .
/byacc
/Makefile
] ; then \
688 rootme
=`pwd` ; export rootme
; \
690 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
696 all-flex
: all-libiberty
697 @if
[ -f .
/flex
/Makefile
] ; then \
698 rootme
=`pwd` ; export rootme
; \
700 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
706 @if
[ -f .
/flex
/Makefile
] ; then \
707 rootme
=`pwd` ; export rootme
; \
709 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
715 @if
[ -f .
/flex
/Makefile
] ; then \
716 rootme
=`pwd` ; export rootme
; \
718 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
723 all-gcc
: all-libiberty all-byacc all-binutils
724 @if
[ -f .
/gcc
/Makefile
] ; then \
725 rootme
=`pwd` ; export rootme
; \
727 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
733 @if
[ -f .
/gcc
/Makefile
] ; then \
734 rootme
=`pwd` ; export rootme
; \
736 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
742 @if
[ -f .
/gcc
/Makefile
] ; then \
743 rootme
=`pwd` ; export rootme
; \
745 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
752 @if
[ -f .
/readline
/Makefile
] ; then \
753 rootme
=`pwd` ; export rootme
; \
755 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
760 clean-readline
: force
761 @if
[ -f .
/readline
/Makefile
] ; then \
762 rootme
=`pwd` ; export rootme
; \
764 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
769 install-readline
: force
770 @if
[ -f .
/readline
/Makefile
] ; then \
771 rootme
=`pwd` ; export rootme
; \
773 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
780 @if
[ -f .
/glob
/Makefile
] ; then \
781 rootme
=`pwd` ; export rootme
; \
783 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
789 @if
[ -f .
/glob
/Makefile
] ; then \
790 rootme
=`pwd` ; export rootme
; \
792 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
798 @if
[ -f .
/glob
/Makefile
] ; then \
799 rootme
=`pwd` ; export rootme
; \
801 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
807 all-gas
: all-libiberty all-opcodes all-bfd
808 @if
[ -f .
/gas
/Makefile
] ; then \
809 rootme
=`pwd` ; export rootme
; \
811 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
817 @if
[ -f .
/gas
/Makefile
] ; then \
818 rootme
=`pwd` ; export rootme
; \
820 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
826 @if
[ -f .
/gas
/Makefile
] ; then \
827 rootme
=`pwd` ; export rootme
; \
829 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
835 all-tgas
: all-libiberty all-bfd
836 @if
[ -f .
/tgas
/Makefile
] ; then \
837 rootme
=`pwd` ; export rootme
; \
839 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
846 all-ld
: all-libiberty all-bfd all-byacc all-flex
847 @if
[ -f .
/ld/Makefile
] ; then \
848 rootme
=`pwd` ; export rootme
; \
850 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
856 @if
[ -f .
/ld/Makefile
] ; then \
857 rootme
=`pwd` ; export rootme
; \
859 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
865 @if
[ -f .
/ld/Makefile
] ; then \
866 rootme
=`pwd` ; export rootme
; \
868 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
874 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
875 @if
[ -f .
/gdb
/Makefile
] ; then \
876 rootme
=`pwd` ; export rootme
; \
878 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
884 @if
[ -f .
/gdb
/Makefile
] ; then \
885 rootme
=`pwd` ; export rootme
; \
887 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
893 @if
[ -f .
/gdb
/Makefile
] ; then \
894 rootme
=`pwd` ; export rootme
; \
896 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
902 all-make
: all-libiberty
903 @if
[ -f .
/make
/Makefile
] ; then \
904 rootme
=`pwd` ; export rootme
; \
906 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
912 @if
[ -f .
/make
/Makefile
] ; then \
913 rootme
=`pwd` ; export rootme
; \
915 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
921 @if
[ -f .
/make
/Makefile
] ; then \
922 rootme
=`pwd` ; export rootme
; \
924 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
931 @if
[ -f .
/diff
/Makefile
] ; then \
932 rootme
=`pwd` ; export rootme
; \
934 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
940 @if
[ -f .
/diff
/Makefile
] ; then \
941 rootme
=`pwd` ; export rootme
; \
943 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
949 @if
[ -f .
/diff
/Makefile
] ; then \
950 rootme
=`pwd` ; export rootme
; \
952 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
959 @if
[ -f .
/grep
/Makefile
] ; then \
960 rootme
=`pwd` ; export rootme
; \
962 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
968 @if
[ -f .
/grep
/Makefile
] ; then \
969 rootme
=`pwd` ; export rootme
; \
971 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
977 @if
[ -f .
/grep
/Makefile
] ; then \
978 rootme
=`pwd` ; export rootme
; \
980 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
987 @if
[ -f .
/rcs
/Makefile
] ; then \
988 rootme
=`pwd` ; export rootme
; \
990 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
996 @if
[ -f .
/rcs
/Makefile
] ; then \
997 rootme
=`pwd` ; export rootme
; \
999 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1005 @if
[ -f .
/rcs
/Makefile
] ; then \
1006 rootme
=`pwd` ; export rootme
; \
1008 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1015 @if
[ -f .
/cvs
/Makefile
] ; then \
1016 rootme
=`pwd` ; export rootme
; \
1018 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1024 @if
[ -f .
/cvs
/Makefile
] ; then \
1025 rootme
=`pwd` ; export rootme
; \
1027 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1033 @if
[ -f .
/cvs
/Makefile
] ; then \
1034 rootme
=`pwd` ; export rootme
; \
1036 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1043 @if
[ -f .
/patch
/Makefile
] ; then \
1044 rootme
=`pwd` ; export rootme
; \
1046 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1052 @if
[ -f .
/patch
/Makefile
] ; then \
1053 rootme
=`pwd` ; export rootme
; \
1055 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1060 install-patch
: force
1061 @if
[ -f .
/patch
/Makefile
] ; then \
1062 rootme
=`pwd` ; export rootme
; \
1064 $(MAKE
) $(FLAGS_TO_PASS
) \
1066 man1dir=$(man1dir) install) ; \
1073 @if
[ -f .
/emacs
/Makefile
] ; then \
1074 rootme
=`pwd` ; export rootme
; \
1076 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1082 @if
[ -f .
/emacs
/Makefile
] ; then \
1083 rootme
=`pwd` ; export rootme
; \
1085 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1090 install-emacs
: force
1091 @if
[ -f .
/emacs
/Makefile
] ; then \
1092 rootme
=`pwd` ; export rootme
; \
1094 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1100 all-ispell
: all-emacs
1101 @if
[ -f .
/ispell
/Makefile
] ; then \
1102 rootme
=`pwd` ; export rootme
; \
1104 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1110 @if
[ -f .
/ispell
/Makefile
] ; then \
1111 rootme
=`pwd` ; export rootme
; \
1113 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1118 install-ispell
: force
1119 @if
[ -f .
/ispell
/Makefile
] ; then \
1120 rootme
=`pwd` ; export rootme
; \
1122 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1129 @if
[ -f .
/send_pr
/Makefile
] ; then \
1130 rootme
=`pwd` ; export rootme
; \
1132 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1137 clean-send_pr
: force
1138 @if
[ -f .
/send_pr
/Makefile
] ; then \
1139 rootme
=`pwd` ; export rootme
; \
1141 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1146 install-send_pr
: force
1147 @if
[ -f .
/send_pr
/Makefile
] ; then \
1148 rootme
=`pwd` ; export rootme
; \
1150 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1157 @if
[ -f .
/libm
/Makefile
] ; then \
1158 rootme
=`pwd` ; export rootme
; \
1160 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1166 @if
[ -f .
/libm
/Makefile
] ; then \
1167 rootme
=`pwd` ; export rootme
; \
1169 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1175 @if
[ -f .
/libm
/Makefile
] ; then \
1176 rootme
=`pwd` ; export rootme
; \
1178 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1185 all-libg
++: all-gas all-ld all-gcc all-xiberty
1186 @if
[ -f .
/libg
++/Makefile
] ; then \
1187 rootme
=`pwd` ; export rootme
; \
1188 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1190 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1196 @if
[ -f .
/libg
++/Makefile
] ; then \
1197 rootme
=`pwd` ; export rootme
; \
1198 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1200 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean) ; \
1205 install-libg
++: force
1206 @if
[ -f .
/libg
++/Makefile
] ; then \
1207 rootme
=`pwd` ; export rootme
; \
1208 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1210 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1216 @if
[ -f .
/tcl
/Makefile
] ; then \
1217 rootme
=`pwd` ; export rootme
; \
1218 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1220 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1226 @if
[ -f .
/tcl
/Makefile
] ; then \
1227 rootme
=`pwd` ; export rootme
; \
1228 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1230 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1236 @if
[ -f .
/tcl
/Makefile
] ; then \
1237 rootme
=`pwd` ; export rootme
; \
1238 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1240 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1248 @if
[ -f .
/tk
/Makefile
] ; then \
1249 rootme
=`pwd` ; export rootme
; \
1250 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1252 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1258 @if
[ -f .
/tk
/Makefile
] ; then \
1259 rootme
=`pwd` ; export rootme
; \
1260 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1262 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1268 @if
[ -f .
/tk
/Makefile
] ; then \
1269 rootme
=`pwd` ; export rootme
; \
1270 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1272 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1279 @if
[ -f .
/expect
/Makefile
] ; then \
1280 rootme
=`pwd` ; export rootme
; \
1281 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1283 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1289 @if
[ -f .
/expect
/Makefile
] ; then \
1290 rootme
=`pwd` ; export rootme
; \
1291 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1293 $(MAKE
) $(FLAGS_TO_PASS
) clean) ; \
1298 install-expect
: force
1299 @if
[ -f .
/expect
/Makefile
] ; then \
1300 rootme
=`pwd` ; export rootme
; \
1301 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1303 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1309 ### other supporting targets
1312 @for i in
$(DODIRS
); do \
1313 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
] ; then \
1315 libg
++ | xiberty | newlib
) \
1316 if
(rootme
=`pwd` ; export rootme
; \
1317 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1319 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1323 if
(rootme
=`pwd` ; export rootme
; \
1325 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1332 # The "else true" stuff is for Ultrix; the shell returns the exit code
1333 # of the "if" command, if no commands are run in the "then" or "else" part,
1334 # causing Make to quit.
1358 for i in
$(MAKEDIRS
) ; do \
1359 echo Making
$$i...
; \
1360 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1361 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1362 if
[ ! -d
$$i ] ; then \
1363 if mkdir
$$i ; then \
1377 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1380 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1381 mv
-f
dir.
info.new
dir.
info
1390 @for i in
$(SUBDIRS
); \
1394 wd
=`basename $$pwd`; \
1395 for j in
`$(MAKE) ls`; \
1403 # with the gnu make, this is done automatically.
1405 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1406 $(SHELL
) .
/config.status
1409 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1411 DEVO_SUPPORT
= README cfg-paper.texi Makefile.in configure configure.in \
1412 config.sub config configure.man configure.texi move-if-change \
1414 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1415 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
) texinfo
/fsf
/texinfo.
tex
1417 setup-dirs
: force_update
1420 .
/configure
-rm sun4
1421 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1423 gdb.
tar.Z
: setup-dirs
1424 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1425 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1427 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/fsf
/texinfo.
tex
1428 rm -rf proto-toplev
; mkdir proto-toplev
1429 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1430 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1433 # Put only one copy (four hard links) of COPYING in the tar file.
1434 rm proto-toplev
/bfd
/COPYING
1435 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1436 rm proto-toplev
/include/COPYING
1437 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1438 rm proto-toplev
/readline
/COPYING
1439 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1440 # Take out texinfo from configurable dirs
1441 rm proto-toplev
/configure.in
1442 sed
'/^configdirs=/s/texinfo //' <configure.in
>proto-toplev
/configure.in
1443 # Take out glob from buildable dirs
1444 rm proto-toplev
/Makefile.in
1446 sed
-e
'/^SUBDIRS =/s/glob //' \
1447 -e
'/^all\.normal: /s/\all-texinfo //' \
1448 -e
'/^clean: /s/clean-texinfo //' \
1449 -e
'/^install\.all: /s/install-texinfo //' \
1450 <Makefile.in
>proto-toplev
/Makefile.in
1452 mkdir proto-toplev
/texinfo
1453 mkdir proto-toplev
/texinfo
/fsf
1454 ln
-s ..
/..
/..
/texinfo
/fsf
/texinfo.
tex proto-toplev
/texinfo
/fsf
/
1455 chmod og
=u
`find proto-toplev -print`
1456 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1457 echo
"==> Making gdb-$$VER.tar.Z"; \
1458 ln
-s proto-toplev gdb-
$$VER; \
1459 tar cfh
- gdb-
$$VER \
1460 | compress
-v
>gdb-
$$VER.
tar.Z
)
1466 # end of Makefile.in