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 info install-info
dvi clean-info
231 info check clean-info
dvi distclean mostlyclean realclean:
232 @rootme
=`pwd` ; export rootme
; \
233 $(MAKE
) $(FLAGS_TO_PASS
) DO
=info "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 -rf
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
268 mostlyclean: do_clean
269 @rootme
=`pwd` ; export rootme
; \
270 $(MAKE
) $(FLAGS_TO_PASS
) DO
=mostlyclean "DODIRS=$(SUBDIRS)" subdir_do
273 @rootme
=`pwd` ; export rootme
; \
274 $(MAKE
) $(FLAGS_TO_PASS
) DO
=clean "DODIRS=$(SUBDIRS)" subdir_do
277 @rootme
=`pwd` ; export rootme
; \
278 $(MAKE
) $(FLAGS_TO_PASS
) DO
=distclean "DODIRS=$(SUBDIRS)" subdir_do
279 -rm -rf Makefile config.status
282 @rootme
=`pwd` ; export rootme
; \
283 $(MAKE
) $(FLAGS_TO_PASS
) DO
=realclean "DODIRS=$(SUBDIRS)" subdir_do
284 -rm -rf Makefile config.status
287 @echo
"the uninstall target is not supported in this tree"
289 install: $(INSTALL_TARGET
)
290 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
291 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
292 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
294 install.
all: install-no-fixedincludes
295 @if
[ -f .
/gcc
/Makefile
] ; then \
296 rootme
=`pwd` ; export rootme
; \
298 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
303 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
337 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
338 install-textutils install-time install-wdiff
340 gcc-no-fixedincludes
:
341 @if
[ -f .
/gcc
/Makefile
] ; then \
342 rootme
=`pwd` ; export rootme
; \
344 $(MAKE
) $(FLAGS_TO_PASS
) install install-man \
345 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
350 install.cross
: install-dirs install-libiberty install-mmalloc \
351 install-binutils install-opcodes install-byacc install-flex \
352 install-ld install-gas install-readline \
353 install-glob install-gdb install-mmalloc \
354 install-newlib install-gcc install-etc install-deja-gnu
358 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
359 rootme
=`pwd` ; export rootme
; \
360 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
365 install-deja-gnu
: force
366 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
367 rootme
=`pwd` ; export rootme
; \
368 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
375 @if
[ -f .
/autoconf
/Makefile
] ; then \
376 rootme
=`pwd` ; export rootme
; \
377 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
382 install-autoconf
: force
383 @if
[ -f .
/autoconf
/Makefile
] ; then \
384 rootme
=`pwd` ; export rootme
; \
385 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
392 @if
[ -f .
/etc
/Makefile
] ; then \
393 rootme
=`pwd` ; export rootme
; \
394 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
400 @if
[ -f .
/etc
/Makefile
] ; then \
401 rootme
=`pwd` ; export rootme
; \
402 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
409 @if
[ -f .
/libiberty
/Makefile
] ; then \
410 rootme
=`pwd` ; export rootme
; \
412 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
417 install-libiberty
: force
418 @if
[ -f .
/libiberty
/Makefile
] ; then \
419 rootme
=`pwd` ; export rootme
; \
421 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
427 all-xiberty
: all-gcc all-newlib
428 @if
[ -f .
/xiberty
/Makefile
] ; then \
429 rootme
=`pwd` ; export rootme
; \
430 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
432 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
437 install-xiberty
: force
438 @if
[ -f .
/xiberty
/Makefile
] ; then \
439 rootme
=`pwd` ; export rootme
; \
440 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
442 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
449 @if
[ -f .
/mmalloc
/Makefile
] ; then \
450 rootme
=`pwd` ; export rootme
; \
452 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
457 install-mmalloc
: force
458 @if
[ -f .
/mmalloc
/Makefile
] ; then \
459 rootme
=`pwd` ; export rootme
; \
461 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
467 all-texinfo
: all-libiberty
468 @if
[ -f .
/texinfo
/Makefile
] ; then \
469 rootme
=`pwd` ; export rootme
; \
471 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
476 install-texinfo
: force
477 @if
[ -f .
/texinfo
/Makefile
] ; then \
478 rootme
=`pwd` ; export rootme
; \
480 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
487 @if
[ -f .
/bfd
/Makefile
] ; then \
488 rootme
=`pwd` ; export rootme
; \
490 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
496 @if
[ -f .
/bfd
/Makefile
] ; then \
497 rootme
=`pwd` ; export rootme
; \
499 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
507 @if
[ -f .
/opcodes
/Makefile
] ; then \
508 rootme
=`pwd` ; export rootme
; \
510 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
515 install-opcodes
: force
516 @if
[ -f .
/opcodes
/Makefile
] ; then \
517 rootme
=`pwd` ; export rootme
; \
519 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
525 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
526 @if
[ -f .
/binutils
/Makefile
] ; then \
527 rootme
=`pwd` ; export rootme
; \
529 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
534 install-binutils
: force
535 @if
[ -f .
/binutils
/Makefile
] ; then \
536 rootme
=`pwd` ; export rootme
; \
538 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
544 all-newlib
: all-binutils all-ld all-gas all-gcc
545 @if
[ -f .
/newlib
/Makefile
] ; then \
546 rootme
=`pwd` ; export rootme
; \
547 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
549 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
554 install-newlib
: force
555 @if
[ -f .
/newlib
/Makefile
] ; then \
556 rootme
=`pwd` ; export rootme
; \
557 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
559 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
565 all-gprof
: all-libiberty all-bfd
566 @if
[ -f .
/gprof
/Makefile
] ; then \
567 rootme
=`pwd` ; export rootme
; \
569 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
575 @if
[ -f .
/gprof
/Makefile
] ; then \
576 rootme
=`pwd` ; export rootme
; \
578 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
585 @if
[ -f .
/byacc
/Makefile
] ; then \
586 rootme
=`pwd` ; export rootme
; \
588 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
594 @if
[ -f .
/byacc
/Makefile
] ; then \
595 rootme
=`pwd` ; export rootme
; \
597 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
603 all-flex
: all-libiberty
604 @if
[ -f .
/flex
/Makefile
] ; then \
605 rootme
=`pwd` ; export rootme
; \
607 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
613 @if
[ -f .
/flex
/Makefile
] ; then \
614 rootme
=`pwd` ; export rootme
; \
616 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
621 all-gcc
: all-libiberty all-byacc all-binutils
622 @if
[ -f .
/gcc
/Makefile
] ; then \
623 rootme
=`pwd` ; export rootme
; \
625 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
631 @if
[ -f .
/gcc
/Makefile
] ; then \
632 rootme
=`pwd` ; export rootme
; \
634 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
641 @if
[ -f .
/readline
/Makefile
] ; then \
642 rootme
=`pwd` ; export rootme
; \
644 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
649 install-readline
: force
650 @if
[ -f .
/readline
/Makefile
] ; then \
651 rootme
=`pwd` ; export rootme
; \
653 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
660 @if
[ -f .
/glob
/Makefile
] ; then \
661 rootme
=`pwd` ; export rootme
; \
663 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
669 @if
[ -f .
/glob
/Makefile
] ; then \
670 rootme
=`pwd` ; export rootme
; \
672 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
678 all-gas
: all-libiberty all-opcodes all-bfd
679 @if
[ -f .
/gas
/Makefile
] ; then \
680 rootme
=`pwd` ; export rootme
; \
682 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
688 @if
[ -f .
/gas
/Makefile
] ; then \
689 rootme
=`pwd` ; export rootme
; \
691 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
697 all-tgas
: all-libiberty all-bfd
698 @if
[ -f .
/tgas
/Makefile
] ; then \
699 rootme
=`pwd` ; export rootme
; \
701 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
708 all-ld
: all-libiberty all-bfd all-byacc all-flex
709 @if
[ -f .
/ld/Makefile
] ; then \
710 rootme
=`pwd` ; export rootme
; \
712 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
718 @if
[ -f .
/ld/Makefile
] ; then \
719 rootme
=`pwd` ; export rootme
; \
721 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
727 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
728 @if
[ -f .
/gdb
/Makefile
] ; then \
729 rootme
=`pwd` ; export rootme
; \
731 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
737 @if
[ -f .
/gdb
/Makefile
] ; then \
738 rootme
=`pwd` ; export rootme
; \
740 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
746 all-make
: all-libiberty
747 @if
[ -f .
/make
/Makefile
] ; then \
748 rootme
=`pwd` ; export rootme
; \
750 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
756 @if
[ -f .
/make
/Makefile
] ; then \
757 rootme
=`pwd` ; export rootme
; \
759 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
766 @if
[ -f .
/diff
/Makefile
] ; then \
767 rootme
=`pwd` ; export rootme
; \
769 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
775 @if
[ -f .
/diff
/Makefile
] ; then \
776 rootme
=`pwd` ; export rootme
; \
778 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
785 @if
[ -f .
/grep
/Makefile
] ; then \
786 rootme
=`pwd` ; export rootme
; \
788 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
794 @if
[ -f .
/grep
/Makefile
] ; then \
795 rootme
=`pwd` ; export rootme
; \
797 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
804 @if
[ -f .
/rcs
/Makefile
] ; then \
805 rootme
=`pwd` ; export rootme
; \
807 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
813 @if
[ -f .
/rcs
/Makefile
] ; then \
814 rootme
=`pwd` ; export rootme
; \
816 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
823 @if
[ -f .
/cvs
/Makefile
] ; then \
824 rootme
=`pwd` ; export rootme
; \
826 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
832 @if
[ -f .
/cvs
/Makefile
] ; then \
833 rootme
=`pwd` ; export rootme
; \
835 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
842 @if
[ -f .
/patch
/Makefile
] ; then \
843 rootme
=`pwd` ; export rootme
; \
845 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
851 @if
[ -f .
/patch
/Makefile
] ; then \
852 rootme
=`pwd` ; export rootme
; \
854 $(MAKE
) $(FLAGS_TO_PASS
) \
856 man1dir=$(man1dir) install) ; \
863 @if
[ -f .
/emacs
/Makefile
] ; then \
864 rootme
=`pwd` ; export rootme
; \
866 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
872 @if
[ -f .
/emacs
/Makefile
] ; then \
873 rootme
=`pwd` ; export rootme
; \
875 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
881 all-ispell
: all-emacs
882 @if
[ -f .
/ispell
/Makefile
] ; then \
883 rootme
=`pwd` ; export rootme
; \
885 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
890 install-ispell
: force
891 @if
[ -f .
/ispell
/Makefile
] ; then \
892 rootme
=`pwd` ; export rootme
; \
894 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
901 @if
[ -f .
/send_pr
/Makefile
] ; then \
902 rootme
=`pwd` ; export rootme
; \
904 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
909 install-send_pr
: force
910 @if
[ -f .
/send_pr
/Makefile
] ; then \
911 rootme
=`pwd` ; export rootme
; \
913 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
920 @if
[ -f .
/libm
/Makefile
] ; then \
921 rootme
=`pwd` ; export rootme
; \
923 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
929 @if
[ -f .
/libm
/Makefile
] ; then \
930 rootme
=`pwd` ; export rootme
; \
932 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
939 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
940 @if
[ -f .
/libg
++/Makefile
] ; then \
941 rootme
=`pwd` ; export rootme
; \
942 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
944 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
949 install-libg
++: force
950 @if
[ -f .
/libg
++/Makefile
] ; then \
951 rootme
=`pwd` ; export rootme
; \
952 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
954 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
960 @if
[ -f .
/tcl
/Makefile
] ; then \
961 rootme
=`pwd` ; export rootme
; \
962 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
964 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
970 @if
[ -f .
/tcl
/Makefile
] ; then \
971 rootme
=`pwd` ; export rootme
; \
972 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
974 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
982 @if
[ -f .
/tk
/Makefile
] ; then \
983 rootme
=`pwd` ; export rootme
; \
984 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
986 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
992 @if
[ -f .
/tk
/Makefile
] ; then \
993 rootme
=`pwd` ; export rootme
; \
994 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
996 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1003 @if
[ -f .
/expect
/Makefile
] ; then \
1004 rootme
=`pwd` ; export rootme
; \
1005 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1007 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1012 install-expect
: force
1013 @if
[ -f .
/expect
/Makefile
] ; then \
1014 rootme
=`pwd` ; export rootme
; \
1015 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1017 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1024 @if
[ -f .
/z8ksim
/Makefile
] ; then \
1025 rootme
=`pwd` ; export rootme
; \
1027 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1032 install-z8ksim
: force
1033 @if
[ -f .
/z8ksim
/Makefile
] ; then \
1034 rootme
=`pwd` ; export rootme
; \
1036 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1042 all-fileutils
: force
1043 @if
[ -f .
/fileutils
/Makefile
] ; then \
1044 rootme
=`pwd` ; export rootme
; \
1045 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1050 install-fileutils
: force
1051 @if
[ -f .
/fileutils
/Makefile
] ; then \
1052 rootme
=`pwd` ; export rootme
; \
1053 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1060 @if
[ -f .
/find
/Makefile
] ; then \
1061 rootme
=`pwd` ; export rootme
; \
1062 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1068 @if
[ -f .
/find
/Makefile
] ; then \
1069 rootme
=`pwd` ; export rootme
; \
1070 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1077 @if
[ -f .
/gawk
/Makefile
] ; then \
1078 rootme
=`pwd` ; export rootme
; \
1079 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1085 @if
[ -f .
/gawk
/Makefile
] ; then \
1086 rootme
=`pwd` ; export rootme
; \
1087 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1093 all-m4
: all-libiberty
1094 @if
[ -f .
/m4
/Makefile
] ; then \
1095 rootme
=`pwd` ; export rootme
; \
1096 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1102 @if
[ -f .
/m4
/Makefile
] ; then \
1103 rootme
=`pwd` ; export rootme
; \
1104 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1111 @if
[ -f .
/sed
/Makefile
] ; then \
1112 rootme
=`pwd` ; export rootme
; \
1113 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1119 @if
[ -f .
/sed
/Makefile
] ; then \
1120 rootme
=`pwd` ; export rootme
; \
1121 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1128 @if
[ -f .
/time
/Makefile
] ; then \
1129 rootme
=`pwd` ; export rootme
; \
1130 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1136 @if
[ -f .
/time
/Makefile
] ; then \
1137 rootme
=`pwd` ; export rootme
; \
1138 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1145 @if
[ -f .
/wdiff
/Makefile
] ; then \
1146 rootme
=`pwd` ; export rootme
; \
1147 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1152 install-wdiff
: force
1153 @if
[ -f .
/wdiff
/Makefile
] ; then \
1154 rootme
=`pwd` ; export rootme
; \
1155 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1161 all-shellutils
: force
1162 @if
[ -f .
/shellutils
/Makefile
] ; then \
1163 rootme
=`pwd` ; export rootme
; \
1164 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1169 install-shellutils
: force
1170 @if
[ -f .
/shellutils
/Makefile
] ; then \
1171 rootme
=`pwd` ; export rootme
; \
1172 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1178 all-textutils
: force
1179 @if
[ -f .
/textutils
/Makefile
] ; then \
1180 rootme
=`pwd` ; export rootme
; \
1181 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1186 install-textutils
: force
1187 @if
[ -f .
/textutils
/Makefile
] ; then \
1188 rootme
=`pwd` ; export rootme
; \
1189 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1196 ### other supporting targets
1199 @for i in
$(DODIRS
); do \
1200 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
] ; then \
1202 libg
++ | xiberty | newlib
) \
1203 if
(rootme
=`pwd` ; export rootme
; \
1204 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1206 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1210 if
(rootme
=`pwd` ; export rootme
; \
1212 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1219 # The "else true" stuff is for Ultrix; the shell returns the exit code
1220 # of the "if" command, if no commands are run in the "then" or "else" part,
1221 # causing Make to quit.
1245 for i in
$(MAKEDIRS
) ; do \
1246 echo Making
$$i...
; \
1247 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1248 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1249 if
[ ! -d
$$i ] ; then \
1250 if mkdir
$$i ; then \
1261 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1264 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1265 mv
-f
dir.
info.new
dir.
info
1268 @echo
"Building a full distribution of this tree isn't done"
1269 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1278 @for i in
$(SUBDIRS
); \
1282 wd
=`basename $$pwd`; \
1283 for j in
`$(MAKE) ls`; \
1291 # with the gnu make, this is done automatically.
1293 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1294 $(SHELL
) .
/config.status
1297 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1299 DEVO_SUPPORT
= README cfg-paper.texi Makefile.in configure configure.in \
1300 config.sub config configure.man configure.texi move-if-change \
1302 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1303 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
) texinfo
/fsf
/texinfo.
tex
1308 .
/configure
-rm sun4
1309 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1311 gdb.
tar.Z
: setup-dirs
1312 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1313 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1315 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/fsf
/texinfo.
tex
1316 rm -rf proto-toplev
; mkdir proto-toplev
1317 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1318 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1321 # Put only one copy (four hard links) of COPYING in the tar file.
1322 rm proto-toplev
/bfd
/COPYING
1323 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1324 rm proto-toplev
/include/COPYING
1325 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1326 rm proto-toplev
/readline
/COPYING
1327 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1328 # Take out texinfo from configurable dirs
1329 rm proto-toplev
/configure.in
1330 sed
'/^configdirs=/s/texinfo //' <configure.in
>proto-toplev
/configure.in
1331 # Take out glob from buildable dirs
1332 rm proto-toplev
/Makefile.in
1334 sed
-e
'/^SUBDIRS =/s/glob //' \
1335 -e
'/^all\.normal: /s/\all-texinfo //' \
1336 -e
'/^clean: /s/clean-texinfo //' \
1337 -e
'/^install\.all: /s/install-texinfo //' \
1338 <Makefile.in
>proto-toplev
/Makefile.in
1340 mkdir proto-toplev
/texinfo
1341 mkdir proto-toplev
/texinfo
/fsf
1342 ln
-s ..
/..
/..
/texinfo
/fsf
/texinfo.
tex proto-toplev
/texinfo
/fsf
/
1343 chmod og
=u
`find proto-toplev -print`
1344 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1345 echo
"==> Making gdb-$$VER.tar.Z"; \
1346 ln
-s proto-toplev gdb-
$$VER; \
1347 tar cfh
- gdb-
$$VER \
1348 | compress
-v
>gdb-
$$VER.
tar.Z
)
1351 # end of Makefile.in