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
)
59 GCC_FOR_TARGET
= .
/xgcc
-B.
/
63 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
64 then echo $${rootme}/byacc/byacc ; \
68 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
69 then echo $${rootme}/flex/flex ; \
72 MAKEINFO
= `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
73 then echo $${rootme}/texinfo/C/makeinfo ; \
74 else echo makeinfo ; fi`
76 # compilers to use to create programs which must be run in the build
79 CXX_FOR_BUILD
= $(CXX
)
81 SUBDIRS
= "this is set via configure, don't edit this"
85 INSTALL_TARGET
= install.
all
91 if [ -f $${rootme}/gcc/Makefile ] ; then \
92 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
94 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
97 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
102 if [ -f $${rootme}/gcc/Makefile ] ; then \
103 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
105 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
108 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
113 if [ -f $${rootme}/gas/Makefile ] ; then \
114 echo $${rootme}/gas/as.new ; \
116 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
119 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
124 if [ -f $${rootme}/binutils/Makefile ] ; then \
125 echo $${rootme}/binutils/ar ; \
127 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
130 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
134 RANLIB_FOR_TARGET
= ` \
135 if [ -f $${rootme}/binutils/Makefile ] ; then \
136 echo $${rootme}/binutils/ranlib ; \
138 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
141 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
146 if [ -f $${rootme}/binutils/Makefile ] ; then \
147 echo $${rootme}/binutils/nm ; \
149 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
152 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
157 if [ -f $${rootme}/gcc/Makefile ] ; then \
158 if [ -f $${rootme}/newlib/Makefile ] ; then \
159 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
161 echo -I$${rootme}/gcc/include ; \
168 #### host and target specific makefile fragments come in here.
171 # Flags to pass down to sub-makes -- please keep these in alphabetical order
174 "AR_FLAGS=$(AR_FLAGS)" \
175 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
177 "CXXFLAGS=$(CXXFLAGS)" \
178 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
180 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
182 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
183 "INSTALL=$(INSTALL)" \
184 "INSTALL_DATA=$(INSTALL_DATA)" \
185 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
186 "LDFLAGS=$(LDFLAGS)" \
188 "LOADLIBES=$(LOADLIBES)" \
189 "MAKEINFO=$(MAKEINFO)" \
191 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
192 "exec_prefix=$(exec_prefix)" \
196 # Flags that are concerned with the location of the X11 include files
198 X11_FLAGS_TO_PASS
= \
199 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
200 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)"
202 # Flags to pass down to makes which are built with the target
203 # environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
204 TARGET_FLAGS_TO_PASS
= \
205 "AR=$(AR_FOR_TARGET)" \
206 "AR_FLAGS=$(AR_FLAGS)" \
207 "AS=$(AS_FOR_TARGET)" \
209 "CXX=$(CXX_FOR_TARGET)" \
210 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
211 "CXXFLAGS=$(CXXFLAGS)" \
212 "CC=$(CC_FOR_TARGET)" \
213 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
215 "INSTALL=$(INSTALL)" \
216 "INSTALL_DATA=$(INSTALL_DATA)" \
217 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
218 "LDFLAGS=$(LDFLAGS)" \
220 "LOADLIBES=$(LOADLIBES)" \
221 "MAKEINFO=$(MAKEINFO)" \
222 "NM=$(NM_FOR_TARGET)" \
223 "RANLIB=$(RANLIB_FOR_TARGET)" \
224 "XTRAFLAGS=$(XTRAFLAGS)" \
225 "exec_prefix=$(exec_prefix)" \
229 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
230 # unfortunately needs the native compiler and the target ar and
231 # ranlib. Keep these in alphabetical order, please.
232 GCC_FLAGS_TO_PASS
= \
233 "AR=$(AR_FOR_TARGET)" \
234 "AR_FLAGS=$(AR_FLAGS)" \
235 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
239 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
240 "CXXFLAGS=$(CXXFLAGS)" \
242 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
244 "INSTALL=$(INSTALL)" \
245 "INSTALL_DATA=$(INSTALL_DATA)" \
246 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
247 "LDFLAGS=$(LDFLAGS)" \
249 "LOADLIBES=$(LOADLIBES)" \
250 "MAKEINFO=$(MAKEINFO)" \
252 "RANLIB=$(RANLIB_FOR_TARGET)" \
253 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
254 "XTRAFLAGS=$(XTRAFLAGS)" \
255 "exec_prefix=$(exec_prefix)" \
259 # The first rule in the file had better be this one. Don't put any above it.
262 .PHONY
: all check dvi info install-info
266 @rootme
=`pwd` ; export rootme
; \
267 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
269 install-info
: install-info-dirs
force
270 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
271 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
272 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
273 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) DO
=install-info
"DODIRS=$(SUBDIRS)" subdir_do
274 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) dir.
info install-dir.
info
277 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
278 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
279 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
280 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
282 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
283 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
284 all-gcc all-binutils all-libg
++ all-readline all-z8ksim all-h8300sim all-gdb \
285 all-make all-rcs all-cvs all-diff all-grep \
286 all-patch all-emacs all-ispell all-etc \
287 all-tcl all-tk all-expect \
289 $(start-sanitize-chill
) \
291 $(end-sanitize-chill
) \
292 all-gprof all-send_pr all-libm all-deja-gnu \
293 all-fileutils all-find all-gawk all-sed all-shellutils \
294 all-textutils all-time all-wdiff
297 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
298 all-opcodes all-z8ksim all-h8300sim all-bfd all-readline \
299 all-gdb all-binutils all-gcc all-newlib \
300 $(start-sanitize-chill
) \
302 $(end-sanitize-chill
) \
305 .PHONY
: clean distclean mostlyclean realclean do_clean
308 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
310 clean mostlyclean: do_clean
311 @rootme
=`pwd` ; export rootme
; \
312 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
314 distclean realclean: do_clean
315 @rootme
=`pwd` ; export rootme
; \
316 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
317 -rm -f Makefile config.status
320 @echo
"the uninstall target is not supported in this tree"
322 install: $(INSTALL_TARGET
)
323 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
324 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
325 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
327 install.
all: install-no-fixedincludes
328 @if
[ -f .
/gcc
/Makefile
] ; then \
329 rootme
=`pwd` ; export rootme
; \
331 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
336 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
362 $(start-sanitize-chill
) \
364 $(end-sanitize-chill
) \
374 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
375 install-textutils install-time install-wdiff
377 gcc-no-fixedincludes
:
378 @if
[ -f .
/gcc
/Makefile
] ; then \
379 rootme
=`pwd` ; export rootme
; \
381 $(MAKE
) $(FLAGS_TO_PASS
) install install-man \
382 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
387 install.cross
: install-dirs install-libiberty install-mmalloc \
388 install-binutils install-opcodes install-byacc install-flex \
389 install-ld install-gas install-readline \
390 install-glob install-gdb install-mmalloc \
392 $(start-sanitize-chill
) \
394 $(end-sanitize-chill
) \
395 install-gcc install-etc install-deja-gnu
399 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
400 rootme
=`pwd` ; export rootme
; \
401 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
406 install-deja-gnu
: force
407 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
408 rootme
=`pwd` ; export rootme
; \
409 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
416 @if
[ -f .
/autoconf
/Makefile
] ; then \
417 rootme
=`pwd` ; export rootme
; \
418 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
423 install-autoconf
: force
424 @if
[ -f .
/autoconf
/Makefile
] ; then \
425 rootme
=`pwd` ; export rootme
; \
426 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
433 @if
[ -f .
/etc
/Makefile
] ; then \
434 rootme
=`pwd` ; export rootme
; \
435 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
441 @if
[ -f .
/etc
/Makefile
] ; then \
442 rootme
=`pwd` ; export rootme
; \
443 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
450 @if
[ -f .
/libiberty
/Makefile
] ; then \
451 rootme
=`pwd` ; export rootme
; \
453 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
458 install-libiberty
: force
459 @if
[ -f .
/libiberty
/Makefile
] ; then \
460 rootme
=`pwd` ; export rootme
; \
462 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
468 all-xiberty
: all-gcc all-newlib
469 @if
[ -f .
/xiberty
/Makefile
] ; then \
470 rootme
=`pwd` ; export rootme
; \
471 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
473 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
478 install-xiberty
: force
479 @if
[ -f .
/xiberty
/Makefile
] ; then \
480 rootme
=`pwd` ; export rootme
; \
481 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
483 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
490 @if
[ -f .
/mmalloc
/Makefile
] ; then \
491 rootme
=`pwd` ; export rootme
; \
493 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
498 install-mmalloc
: force
499 @if
[ -f .
/mmalloc
/Makefile
] ; then \
500 rootme
=`pwd` ; export rootme
; \
502 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
508 all-texinfo
: all-libiberty
509 @if
[ -f .
/texinfo
/Makefile
] ; then \
510 rootme
=`pwd` ; export rootme
; \
512 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
517 install-texinfo
: force
518 @if
[ -f .
/texinfo
/Makefile
] ; then \
519 rootme
=`pwd` ; export rootme
; \
521 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
528 @if
[ -f .
/bfd
/Makefile
] ; then \
529 rootme
=`pwd` ; export rootme
; \
531 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
537 @if
[ -f .
/bfd
/Makefile
] ; then \
538 rootme
=`pwd` ; export rootme
; \
540 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
548 @if
[ -f .
/opcodes
/Makefile
] ; then \
549 rootme
=`pwd` ; export rootme
; \
551 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
556 install-opcodes
: force
557 @if
[ -f .
/opcodes
/Makefile
] ; then \
558 rootme
=`pwd` ; export rootme
; \
560 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
566 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
567 @if
[ -f .
/binutils
/Makefile
] ; then \
568 rootme
=`pwd` ; export rootme
; \
570 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
575 install-binutils
: force
576 @if
[ -f .
/binutils
/Makefile
] ; then \
577 rootme
=`pwd` ; export rootme
; \
579 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
585 all-newlib
: all-binutils all-ld all-gas all-gcc
586 @if
[ -f .
/newlib
/Makefile
] ; then \
587 rootme
=`pwd` ; export rootme
; \
588 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
590 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
595 install-newlib
: force
596 @if
[ -f .
/newlib
/Makefile
] ; then \
597 rootme
=`pwd` ; export rootme
; \
598 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
600 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
605 ### start-sanitize-chill
607 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
608 @if
[ -f .
/chillrt
/Makefile
] ; then \
609 rootme
=`pwd` ; export rootme
; \
610 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
612 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
617 install-chillrt
: force
618 @if
[ -f .
/chillrt
/Makefile
] ; then \
619 rootme
=`pwd` ; export rootme
; \
620 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
622 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
626 ### end-sanitize-chill
629 all-gprof
: all-libiberty all-bfd
630 @if
[ -f .
/gprof
/Makefile
] ; then \
631 rootme
=`pwd` ; export rootme
; \
633 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
639 @if
[ -f .
/gprof
/Makefile
] ; then \
640 rootme
=`pwd` ; export rootme
; \
642 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
649 @if
[ -f .
/byacc
/Makefile
] ; then \
650 rootme
=`pwd` ; export rootme
; \
652 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
658 @if
[ -f .
/byacc
/Makefile
] ; then \
659 rootme
=`pwd` ; export rootme
; \
661 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
667 all-flex
: all-libiberty
668 @if
[ -f .
/flex
/Makefile
] ; then \
669 rootme
=`pwd` ; export rootme
; \
671 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
677 @if
[ -f .
/flex
/Makefile
] ; then \
678 rootme
=`pwd` ; export rootme
; \
680 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
685 all-gcc
: all-libiberty all-byacc all-binutils
686 @if
[ -f .
/gcc
/Makefile
] ; then \
687 rootme
=`pwd` ; export rootme
; \
688 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
690 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
696 @if
[ -f .
/gcc
/Makefile
] ; then \
697 rootme
=`pwd` ; export rootme
; \
698 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
700 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
707 @if
[ -f .
/readline
/Makefile
] ; then \
708 rootme
=`pwd` ; export rootme
; \
710 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
715 install-readline
: force
716 @if
[ -f .
/readline
/Makefile
] ; then \
717 rootme
=`pwd` ; export rootme
; \
719 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
726 @if
[ -f .
/glob
/Makefile
] ; then \
727 rootme
=`pwd` ; export rootme
; \
729 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
735 @if
[ -f .
/glob
/Makefile
] ; then \
736 rootme
=`pwd` ; export rootme
; \
738 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
744 all-gas
: all-libiberty all-opcodes all-bfd
745 @if
[ -f .
/gas
/Makefile
] ; then \
746 rootme
=`pwd` ; export rootme
; \
748 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
754 @if
[ -f .
/gas
/Makefile
] ; then \
755 rootme
=`pwd` ; export rootme
; \
757 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
763 all-tgas
: all-libiberty all-bfd
764 @if
[ -f .
/tgas
/Makefile
] ; then \
765 rootme
=`pwd` ; export rootme
; \
767 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
774 all-ld
: all-libiberty all-bfd all-byacc all-flex
775 @if
[ -f .
/ld/Makefile
] ; then \
776 rootme
=`pwd` ; export rootme
; \
778 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
784 @if
[ -f .
/ld/Makefile
] ; then \
785 rootme
=`pwd` ; export rootme
; \
787 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
793 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
794 @if
[ -f .
/gdb
/Makefile
] ; then \
795 rootme
=`pwd` ; export rootme
; \
797 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
803 @if
[ -f .
/gdb
/Makefile
] ; then \
804 rootme
=`pwd` ; export rootme
; \
806 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
812 all-make
: all-libiberty
813 @if
[ -f .
/make
/Makefile
] ; then \
814 rootme
=`pwd` ; export rootme
; \
816 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
822 @if
[ -f .
/make
/Makefile
] ; then \
823 rootme
=`pwd` ; export rootme
; \
825 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
832 @if
[ -f .
/diff
/Makefile
] ; then \
833 rootme
=`pwd` ; export rootme
; \
835 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
841 @if
[ -f .
/diff
/Makefile
] ; then \
842 rootme
=`pwd` ; export rootme
; \
844 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
851 @if
[ -f .
/grep
/Makefile
] ; then \
852 rootme
=`pwd` ; export rootme
; \
854 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
860 @if
[ -f .
/grep
/Makefile
] ; then \
861 rootme
=`pwd` ; export rootme
; \
863 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
870 @if
[ -f .
/rcs
/Makefile
] ; then \
871 rootme
=`pwd` ; export rootme
; \
873 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
879 @if
[ -f .
/rcs
/Makefile
] ; then \
880 rootme
=`pwd` ; export rootme
; \
882 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
889 @if
[ -f .
/cvs
/Makefile
] ; then \
890 rootme
=`pwd` ; export rootme
; \
892 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
898 @if
[ -f .
/cvs
/Makefile
] ; then \
899 rootme
=`pwd` ; export rootme
; \
901 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
908 @if
[ -f .
/patch
/Makefile
] ; then \
909 rootme
=`pwd` ; export rootme
; \
911 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
917 @if
[ -f .
/patch
/Makefile
] ; then \
918 rootme
=`pwd` ; export rootme
; \
920 $(MAKE
) $(FLAGS_TO_PASS
) \
922 man1dir=$(man1dir) install) ; \
929 @if
[ -f .
/emacs
/Makefile
] ; then \
930 rootme
=`pwd` ; export rootme
; \
932 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
938 @if
[ -f .
/emacs
/Makefile
] ; then \
939 rootme
=`pwd` ; export rootme
; \
941 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
947 all-ispell
: all-emacs
948 @if
[ -f .
/ispell
/Makefile
] ; then \
949 rootme
=`pwd` ; export rootme
; \
951 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
956 install-ispell
: force
957 @if
[ -f .
/ispell
/Makefile
] ; then \
958 rootme
=`pwd` ; export rootme
; \
960 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
967 @if
[ -f .
/send_pr
/Makefile
] ; then \
968 rootme
=`pwd` ; export rootme
; \
970 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
975 install-send_pr
: force
976 @if
[ -f .
/send_pr
/Makefile
] ; then \
977 rootme
=`pwd` ; export rootme
; \
979 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
986 @if
[ -f .
/libm
/Makefile
] ; then \
987 rootme
=`pwd` ; export rootme
; \
989 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
995 @if
[ -f .
/libm
/Makefile
] ; then \
996 rootme
=`pwd` ; export rootme
; \
998 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1005 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1006 @if
[ -f .
/libg
++/Makefile
] ; then \
1007 rootme
=`pwd` ; export rootme
; \
1008 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1010 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1015 install-libg
++: force
1016 @if
[ -f .
/libg
++/Makefile
] ; then \
1017 rootme
=`pwd` ; export rootme
; \
1018 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1020 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1026 @if
[ -f .
/tcl
/Makefile
] ; then \
1027 rootme
=`pwd` ; export rootme
; \
1028 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1030 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1036 @if
[ -f .
/tcl
/Makefile
] ; then \
1037 rootme
=`pwd` ; export rootme
; \
1038 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1040 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1048 @if
[ -f .
/tk
/Makefile
] ; then \
1049 rootme
=`pwd` ; export rootme
; \
1050 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1052 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1058 @if
[ -f .
/tk
/Makefile
] ; then \
1059 rootme
=`pwd` ; export rootme
; \
1060 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1062 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1069 @if
[ -f .
/expect
/Makefile
] ; then \
1070 rootme
=`pwd` ; export rootme
; \
1071 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1073 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1078 install-expect
: force
1079 @if
[ -f .
/expect
/Makefile
] ; then \
1080 rootme
=`pwd` ; export rootme
; \
1081 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1083 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1090 @if
[ -f .
/z8ksim
/Makefile
] ; then \
1091 rootme
=`pwd` ; export rootme
; \
1093 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1098 install-z8ksim
: force
1099 @if
[ -f .
/z8ksim
/Makefile
] ; then \
1100 rootme
=`pwd` ; export rootme
; \
1102 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1108 all-h8300sim
: all-bfd
1109 @if
[ -f .
/h8300sim
/Makefile
] ; then \
1110 rootme
=`pwd` ; export rootme
; \
1112 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1117 install-h8300sim
: force
1118 @if
[ -f .
/h8300sim
/Makefile
] ; then \
1119 rootme
=`pwd` ; export rootme
; \
1121 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1128 all-fileutils
: force
1129 @if
[ -f .
/fileutils
/Makefile
] ; then \
1130 rootme
=`pwd` ; export rootme
; \
1131 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1136 install-fileutils
: force
1137 @if
[ -f .
/fileutils
/Makefile
] ; then \
1138 rootme
=`pwd` ; export rootme
; \
1139 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1146 @if
[ -f .
/find
/Makefile
] ; then \
1147 rootme
=`pwd` ; export rootme
; \
1148 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1154 @if
[ -f .
/find
/Makefile
] ; then \
1155 rootme
=`pwd` ; export rootme
; \
1156 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1163 @if
[ -f .
/gawk
/Makefile
] ; then \
1164 rootme
=`pwd` ; export rootme
; \
1165 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1171 @if
[ -f .
/gawk
/Makefile
] ; then \
1172 rootme
=`pwd` ; export rootme
; \
1173 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1179 all-m4
: all-libiberty
1180 @if
[ -f .
/m4
/Makefile
] ; then \
1181 rootme
=`pwd` ; export rootme
; \
1182 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1188 @if
[ -f .
/m4
/Makefile
] ; then \
1189 rootme
=`pwd` ; export rootme
; \
1190 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1197 @if
[ -f .
/sed
/Makefile
] ; then \
1198 rootme
=`pwd` ; export rootme
; \
1199 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1205 @if
[ -f .
/sed
/Makefile
] ; then \
1206 rootme
=`pwd` ; export rootme
; \
1207 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1214 @if
[ -f .
/time
/Makefile
] ; then \
1215 rootme
=`pwd` ; export rootme
; \
1216 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1222 @if
[ -f .
/time
/Makefile
] ; then \
1223 rootme
=`pwd` ; export rootme
; \
1224 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1231 @if
[ -f .
/wdiff
/Makefile
] ; then \
1232 rootme
=`pwd` ; export rootme
; \
1233 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1238 install-wdiff
: force
1239 @if
[ -f .
/wdiff
/Makefile
] ; then \
1240 rootme
=`pwd` ; export rootme
; \
1241 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1247 all-shellutils
: force
1248 @if
[ -f .
/shellutils
/Makefile
] ; then \
1249 rootme
=`pwd` ; export rootme
; \
1250 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1255 install-shellutils
: force
1256 @if
[ -f .
/shellutils
/Makefile
] ; then \
1257 rootme
=`pwd` ; export rootme
; \
1258 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1264 all-textutils
: force
1265 @if
[ -f .
/textutils
/Makefile
] ; then \
1266 rootme
=`pwd` ; export rootme
; \
1267 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1272 install-textutils
: force
1273 @if
[ -f .
/textutils
/Makefile
] ; then \
1274 rootme
=`pwd` ; export rootme
; \
1275 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1282 ### other supporting targets
1285 ### start-sanitize-chill
1287 ### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
1289 ### if you change the code for libg++ et al, also change the
1290 ### code for chillrt
1292 ### end-sanitize-chill
1293 @for i in
$(DODIRS
); do \
1294 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
] ; then \
1296 libg
++ | xiberty | newlib
) \
1297 if
(rootme
=`pwd` ; export rootme
; \
1298 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1300 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1303 $(start-sanitize-chill
) \
1305 if
(rootme
=`pwd` ; export rootme
; \
1306 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1308 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1311 $(end-sanitize-chill
) \
1313 if
(rootme
=`pwd` ; export rootme
; \
1314 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1316 $(MAKE
) $(GCC_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1320 if
(rootme
=`pwd` ; export rootme
; \
1322 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1329 # The "else true" stuff is for Ultrix; the shell returns the exit code
1330 # of the "if" command, if no commands are run in the "then" or "else" part,
1331 # causing Make to quit.
1355 for i in
$(MAKEDIRS
) ; do \
1356 echo Making
$$i...
; \
1357 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1358 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1359 if
[ ! -d
$$i ] ; then \
1360 if mkdir
$$i ; then \
1371 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1374 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1375 mv
-f
dir.
info.new
dir.
info
1378 @echo
"Building a full distribution of this tree isn't done"
1379 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1388 @for i in
$(SUBDIRS
); \
1392 wd
=`basename $$pwd`; \
1393 for j in
`$(MAKE) ls`; \
1401 # with the gnu make, this is done automatically.
1403 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1404 $(SHELL
) .
/config.status
1407 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1409 DEVO_SUPPORT
= README cfg-paper.texi Makefile.in configure configure.in \
1410 config.sub config configure.man configure.texi move-if-change \
1412 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1413 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
) texinfo
/fsf
/texinfo.
tex
1418 .
/configure
-rm sun4
1419 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1421 gdb.
tar.Z
: setup-dirs
1422 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1423 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1425 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/fsf
/texinfo.
tex
1426 rm -rf proto-toplev
; mkdir proto-toplev
1427 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1428 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1431 # Put only one copy (four hard links) of COPYING in the tar file.
1432 rm proto-toplev
/bfd
/COPYING
1433 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1434 rm proto-toplev
/include/COPYING
1435 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1436 rm proto-toplev
/readline
/COPYING
1437 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1438 # Take out texinfo from configurable dirs
1439 rm proto-toplev
/configure.in
1440 sed
'/^configdirs=/s/texinfo //' <configure.in
>proto-toplev
/configure.in
1441 # Take out glob from buildable dirs
1442 rm proto-toplev
/Makefile.in
1444 sed
-e
'/^SUBDIRS =/s/glob //' \
1445 -e
'/^all\.normal: /s/\all-texinfo //' \
1446 -e
'/^clean: /s/clean-texinfo //' \
1447 -e
'/^install\.all: /s/install-texinfo //' \
1448 <Makefile.in
>proto-toplev
/Makefile.in
1450 mkdir proto-toplev
/texinfo
1451 mkdir proto-toplev
/texinfo
/fsf
1452 ln
-s ..
/..
/..
/texinfo
/fsf
/texinfo.
tex proto-toplev
/texinfo
/fsf
/
1453 chmod og
=u
`find proto-toplev -print`
1454 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1455 echo
"==> Making gdb-$$VER.tar.Z"; \
1456 ln
-s proto-toplev gdb-
$$VER; \
1457 tar cfh
- gdb-
$$VER \
1458 | compress
-v
>gdb-
$$VER.
tar.Z
)
1461 # end of Makefile.in