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
)
56 $(start-sanitize-chill
)
58 CHILLFLAGS
= $(CFLAGS
)
66 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
67 then echo $${rootme}/byacc/byacc ; \
71 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
72 then echo $${rootme}/flex/flex ; \
75 MAKEINFO
= `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
76 then echo $${rootme}/texinfo/C/makeinfo ; \
77 else echo makeinfo ; fi`
79 # compilers to use to create programs which must be run in the build
82 CXX_FOR_BUILD
= $(CXX
)
84 SUBDIRS
= "this is set via configure, don't edit this"
88 INSTALL_TARGET
= install.
all
94 if [ -f $${rootme}/gcc/Makefile ] ; then \
95 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
97 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
100 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
105 if [ -f $${rootme}/gcc/Makefile ] ; then \
106 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
108 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
111 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
115 $(start-sanitize-chill
)
116 CHILL_FOR_TARGET
= ` \
117 if [ -f $${rootme}/gcc/Makefile ] ; then \
118 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
120 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
123 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
126 $(end-sanitize-chill
)
129 if [ -f $${rootme}/gcc/Makefile ] ; then \
130 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
132 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
135 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
140 if [ -f $${rootme}/gas/Makefile ] ; then \
141 echo $${rootme}/gas/as.new ; \
143 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
146 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
151 if [ -f $${rootme}/binutils/Makefile ] ; then \
152 echo $${rootme}/binutils/ar ; \
154 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
157 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
161 RANLIB_FOR_TARGET
= ` \
162 if [ -f $${rootme}/binutils/Makefile ] ; then \
163 echo $${rootme}/binutils/ranlib ; \
165 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
168 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
173 if [ -f $${rootme}/binutils/Makefile ] ; then \
174 echo $${rootme}/binutils/nm ; \
176 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
179 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
184 if [ -f $${rootme}/gcc/Makefile ] ; then \
185 if [ -f $${rootme}/newlib/Makefile ] ; then \
186 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
188 echo -I$${rootme}/gcc/include ; \
195 #### host and target specific makefile fragments come in here.
198 # Flags to pass down to sub-makes -- please keep these in alphabetical order
201 "AR_FLAGS=$(AR_FLAGS)" \
202 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
204 "CXXFLAGS=$(CXXFLAGS)" \
205 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
207 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
209 $(start-sanitize-chill
)\
210 "CHILLFLAGS=$(CHILLFLAGS)" \
211 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
212 "CHILL_LIB=$(CHILL_LIB)" \
213 $(end-sanitize-chill
)\
214 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
215 "INSTALL=$(INSTALL)" \
216 "INSTALL_DATA=$(INSTALL_DATA)" \
217 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
218 "LDFLAGS=$(LDFLAGS)" \
220 "LOADLIBES=$(LOADLIBES)" \
221 "MAKEINFO=$(MAKEINFO)" \
223 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
224 "exec_prefix=$(exec_prefix)" \
228 # Flags that are concerned with the location of the X11 include files
230 X11_FLAGS_TO_PASS
= \
231 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
232 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)"
234 # Flags to pass down to makes which are built with the target
235 # environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
236 TARGET_FLAGS_TO_PASS
= \
237 "AR=$(AR_FOR_TARGET)" \
238 "AR_FLAGS=$(AR_FLAGS)" \
239 "AS=$(AS_FOR_TARGET)" \
241 "CXX=$(CXX_FOR_TARGET)" \
242 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
243 "CXXFLAGS=$(CXXFLAGS)" \
244 "CC=$(CC_FOR_TARGET)" \
245 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
247 "INSTALL=$(INSTALL)" \
248 "INSTALL_DATA=$(INSTALL_DATA)" \
249 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
250 "LDFLAGS=$(LDFLAGS)" \
252 "LOADLIBES=$(LOADLIBES)" \
253 "MAKEINFO=$(MAKEINFO)" \
254 "NM=$(NM_FOR_TARGET)" \
255 "RANLIB=$(RANLIB_FOR_TARGET)" \
256 "XTRAFLAGS=$(XTRAFLAGS)" \
257 "exec_prefix=$(exec_prefix)" \
261 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
262 # unfortunately needs the native compiler and the target ar and
263 # ranlib. Keep these in alphabetical order, please.
264 GCC_FLAGS_TO_PASS
= \
265 "AR=$(AR_FOR_TARGET)" \
266 "AR_FLAGS=$(AR_FLAGS)" \
267 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
271 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
272 "CXXFLAGS=$(CXXFLAGS)" \
274 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
276 "INSTALL=$(INSTALL)" \
277 "INSTALL_DATA=$(INSTALL_DATA)" \
278 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
279 "LDFLAGS=$(LDFLAGS)" \
281 "LOADLIBES=$(LOADLIBES)" \
282 "MAKEINFO=$(MAKEINFO)" \
284 "RANLIB=$(RANLIB_FOR_TARGET)" \
285 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
286 "XTRAFLAGS=$(XTRAFLAGS)" \
287 "exec_prefix=$(exec_prefix)" \
291 # The first rule in the file had better be this one. Don't put any above it.
294 .PHONY
: all check dvi info install-info
298 @rootme
=`pwd` ; export rootme
; \
299 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
301 install-info
: install-info-dirs
force
302 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
303 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
304 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
305 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) DO
=install-info
"DODIRS=$(SUBDIRS)" subdir_do
306 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) dir.
info install-dir.
info
309 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
310 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
311 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
312 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
314 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
315 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
316 all-gcc all-binutils all-libg
++ all-readline all-z8ksim all-h8300sim all-gdb \
317 all-make all-rcs all-cvs all-diff all-grep \
318 all-patch all-emacs all-ispell all-etc \
319 all-tcl all-tk all-expect \
321 $(start-sanitize-chill
) \
323 $(end-sanitize-chill
) \
324 all-gprof all-send_pr all-libm all-deja-gnu \
325 all-fileutils all-find all-gawk all-sed all-shellutils \
326 all-textutils all-time all-wdiff
329 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
330 all-opcodes all-z8ksim all-h8300sim all-bfd all-readline \
331 all-gdb all-binutils all-gcc all-newlib \
332 $(start-sanitize-chill
) \
334 $(end-sanitize-chill
) \
337 .PHONY
: clean distclean mostlyclean realclean do_clean
340 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
342 clean mostlyclean: do_clean
343 @rootme
=`pwd` ; export rootme
; \
344 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
346 distclean realclean: do_clean
347 @rootme
=`pwd` ; export rootme
; \
348 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
349 -rm -f Makefile config.status
352 @echo
"the uninstall target is not supported in this tree"
354 install: $(INSTALL_TARGET
)
355 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
356 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
357 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
359 install.
all: install-no-fixedincludes
360 @if
[ -f .
/gcc
/Makefile
] ; then \
361 rootme
=`pwd` ; export rootme
; \
363 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
368 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
394 $(start-sanitize-chill
) \
396 $(end-sanitize-chill
) \
406 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
407 install-textutils install-time install-wdiff
409 gcc-no-fixedincludes
:
410 @if
[ -f .
/gcc
/Makefile
] ; then \
411 rootme
=`pwd` ; export rootme
; \
413 $(MAKE
) $(FLAGS_TO_PASS
) install install-man \
414 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
419 install.cross
: install-dirs install-libiberty install-mmalloc \
420 install-binutils install-opcodes install-byacc install-flex \
421 install-ld install-gas install-readline \
422 install-glob install-gdb install-mmalloc \
424 $(start-sanitize-chill
) \
426 $(end-sanitize-chill
) \
427 install-gcc install-etc install-deja-gnu
431 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
432 rootme
=`pwd` ; export rootme
; \
433 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
438 install-deja-gnu
: force
439 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
440 rootme
=`pwd` ; export rootme
; \
441 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
448 @if
[ -f .
/autoconf
/Makefile
] ; then \
449 rootme
=`pwd` ; export rootme
; \
450 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
455 install-autoconf
: force
456 @if
[ -f .
/autoconf
/Makefile
] ; then \
457 rootme
=`pwd` ; export rootme
; \
458 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
465 @if
[ -f .
/etc
/Makefile
] ; then \
466 rootme
=`pwd` ; export rootme
; \
467 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
473 @if
[ -f .
/etc
/Makefile
] ; then \
474 rootme
=`pwd` ; export rootme
; \
475 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
482 @if
[ -f .
/libiberty
/Makefile
] ; then \
483 rootme
=`pwd` ; export rootme
; \
485 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
490 install-libiberty
: force
491 @if
[ -f .
/libiberty
/Makefile
] ; then \
492 rootme
=`pwd` ; export rootme
; \
494 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
500 all-xiberty
: all-gcc all-newlib
501 @if
[ -f .
/xiberty
/Makefile
] ; then \
502 rootme
=`pwd` ; export rootme
; \
503 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
505 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
510 install-xiberty
: force
511 @if
[ -f .
/xiberty
/Makefile
] ; then \
512 rootme
=`pwd` ; export rootme
; \
513 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
515 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
522 @if
[ -f .
/mmalloc
/Makefile
] ; then \
523 rootme
=`pwd` ; export rootme
; \
525 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
530 install-mmalloc
: force
531 @if
[ -f .
/mmalloc
/Makefile
] ; then \
532 rootme
=`pwd` ; export rootme
; \
534 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
540 all-texinfo
: all-libiberty
541 @if
[ -f .
/texinfo
/Makefile
] ; then \
542 rootme
=`pwd` ; export rootme
; \
544 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
549 install-texinfo
: force
550 @if
[ -f .
/texinfo
/Makefile
] ; then \
551 rootme
=`pwd` ; export rootme
; \
553 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
560 @if
[ -f .
/bfd
/Makefile
] ; then \
561 rootme
=`pwd` ; export rootme
; \
563 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
569 @if
[ -f .
/bfd
/Makefile
] ; then \
570 rootme
=`pwd` ; export rootme
; \
572 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
580 @if
[ -f .
/opcodes
/Makefile
] ; then \
581 rootme
=`pwd` ; export rootme
; \
583 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
588 install-opcodes
: force
589 @if
[ -f .
/opcodes
/Makefile
] ; then \
590 rootme
=`pwd` ; export rootme
; \
592 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
598 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
599 @if
[ -f .
/binutils
/Makefile
] ; then \
600 rootme
=`pwd` ; export rootme
; \
602 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
607 install-binutils
: force
608 @if
[ -f .
/binutils
/Makefile
] ; then \
609 rootme
=`pwd` ; export rootme
; \
611 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
617 all-newlib
: all-binutils all-ld all-gas all-gcc
618 @if
[ -f .
/newlib
/Makefile
] ; then \
619 rootme
=`pwd` ; export rootme
; \
620 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
622 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
627 install-newlib
: force
628 @if
[ -f .
/newlib
/Makefile
] ; then \
629 rootme
=`pwd` ; export rootme
; \
630 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
632 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
637 ### start-sanitize-chill
639 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
640 @if
[ -f .
/chillrt
/Makefile
] ; then \
641 rootme
=`pwd` ; export rootme
; \
642 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
644 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
649 install-chillrt
: force
650 @if
[ -f .
/chillrt
/Makefile
] ; then \
651 rootme
=`pwd` ; export rootme
; \
652 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
654 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
658 ### end-sanitize-chill
661 all-gprof
: all-libiberty all-bfd
662 @if
[ -f .
/gprof
/Makefile
] ; then \
663 rootme
=`pwd` ; export rootme
; \
665 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
671 @if
[ -f .
/gprof
/Makefile
] ; then \
672 rootme
=`pwd` ; export rootme
; \
674 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
681 @if
[ -f .
/byacc
/Makefile
] ; then \
682 rootme
=`pwd` ; export rootme
; \
684 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
690 @if
[ -f .
/byacc
/Makefile
] ; then \
691 rootme
=`pwd` ; export rootme
; \
693 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
699 all-flex
: all-libiberty
700 @if
[ -f .
/flex
/Makefile
] ; then \
701 rootme
=`pwd` ; export rootme
; \
703 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
709 @if
[ -f .
/flex
/Makefile
] ; then \
710 rootme
=`pwd` ; export rootme
; \
712 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
717 all-gcc
: all-libiberty all-byacc all-binutils
718 @if
[ -f .
/gcc
/Makefile
] ; then \
719 rootme
=`pwd` ; export rootme
; \
720 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
722 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
728 @if
[ -f .
/gcc
/Makefile
] ; then \
729 rootme
=`pwd` ; export rootme
; \
730 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
732 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
739 @if
[ -f .
/readline
/Makefile
] ; then \
740 rootme
=`pwd` ; export rootme
; \
742 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
747 install-readline
: force
748 @if
[ -f .
/readline
/Makefile
] ; then \
749 rootme
=`pwd` ; export rootme
; \
751 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
758 @if
[ -f .
/glob
/Makefile
] ; then \
759 rootme
=`pwd` ; export rootme
; \
761 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
767 @if
[ -f .
/glob
/Makefile
] ; then \
768 rootme
=`pwd` ; export rootme
; \
770 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
776 all-gas
: all-libiberty all-opcodes all-bfd
777 @if
[ -f .
/gas
/Makefile
] ; then \
778 rootme
=`pwd` ; export rootme
; \
780 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
786 @if
[ -f .
/gas
/Makefile
] ; then \
787 rootme
=`pwd` ; export rootme
; \
789 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
795 all-tgas
: all-libiberty all-bfd
796 @if
[ -f .
/tgas
/Makefile
] ; then \
797 rootme
=`pwd` ; export rootme
; \
799 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
806 all-ld
: all-libiberty all-bfd all-byacc all-flex
807 @if
[ -f .
/ld/Makefile
] ; then \
808 rootme
=`pwd` ; export rootme
; \
810 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
816 @if
[ -f .
/ld/Makefile
] ; then \
817 rootme
=`pwd` ; export rootme
; \
819 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
825 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
826 @if
[ -f .
/gdb
/Makefile
] ; then \
827 rootme
=`pwd` ; export rootme
; \
829 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
835 @if
[ -f .
/gdb
/Makefile
] ; then \
836 rootme
=`pwd` ; export rootme
; \
838 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
844 all-make
: all-libiberty
845 @if
[ -f .
/make
/Makefile
] ; then \
846 rootme
=`pwd` ; export rootme
; \
848 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
854 @if
[ -f .
/make
/Makefile
] ; then \
855 rootme
=`pwd` ; export rootme
; \
857 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
864 @if
[ -f .
/diff
/Makefile
] ; then \
865 rootme
=`pwd` ; export rootme
; \
867 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
873 @if
[ -f .
/diff
/Makefile
] ; then \
874 rootme
=`pwd` ; export rootme
; \
876 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
883 @if
[ -f .
/grep
/Makefile
] ; then \
884 rootme
=`pwd` ; export rootme
; \
886 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
892 @if
[ -f .
/grep
/Makefile
] ; then \
893 rootme
=`pwd` ; export rootme
; \
895 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
902 @if
[ -f .
/rcs
/Makefile
] ; then \
903 rootme
=`pwd` ; export rootme
; \
905 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
911 @if
[ -f .
/rcs
/Makefile
] ; then \
912 rootme
=`pwd` ; export rootme
; \
914 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
921 @if
[ -f .
/cvs
/Makefile
] ; then \
922 rootme
=`pwd` ; export rootme
; \
924 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
930 @if
[ -f .
/cvs
/Makefile
] ; then \
931 rootme
=`pwd` ; export rootme
; \
933 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
940 @if
[ -f .
/patch
/Makefile
] ; then \
941 rootme
=`pwd` ; export rootme
; \
943 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
949 @if
[ -f .
/patch
/Makefile
] ; then \
950 rootme
=`pwd` ; export rootme
; \
952 $(MAKE
) $(FLAGS_TO_PASS
) \
954 man1dir=$(man1dir) install) ; \
961 @if
[ -f .
/emacs
/Makefile
] ; then \
962 rootme
=`pwd` ; export rootme
; \
964 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
970 @if
[ -f .
/emacs
/Makefile
] ; then \
971 rootme
=`pwd` ; export rootme
; \
973 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
979 all-ispell
: all-emacs
980 @if
[ -f .
/ispell
/Makefile
] ; then \
981 rootme
=`pwd` ; export rootme
; \
983 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
988 install-ispell
: force
989 @if
[ -f .
/ispell
/Makefile
] ; then \
990 rootme
=`pwd` ; export rootme
; \
992 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
999 @if
[ -f .
/send_pr
/Makefile
] ; then \
1000 rootme
=`pwd` ; export rootme
; \
1002 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1007 install-send_pr
: force
1008 @if
[ -f .
/send_pr
/Makefile
] ; then \
1009 rootme
=`pwd` ; export rootme
; \
1011 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1018 @if
[ -f .
/libm
/Makefile
] ; then \
1019 rootme
=`pwd` ; export rootme
; \
1021 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1027 @if
[ -f .
/libm
/Makefile
] ; then \
1028 rootme
=`pwd` ; export rootme
; \
1030 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1037 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1038 @if
[ -f .
/libg
++/Makefile
] ; then \
1039 rootme
=`pwd` ; export rootme
; \
1040 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1042 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1047 install-libg
++: force
1048 @if
[ -f .
/libg
++/Makefile
] ; then \
1049 rootme
=`pwd` ; export rootme
; \
1050 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1052 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1058 @if
[ -f .
/tcl
/Makefile
] ; then \
1059 rootme
=`pwd` ; export rootme
; \
1060 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1062 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1068 @if
[ -f .
/tcl
/Makefile
] ; then \
1069 rootme
=`pwd` ; export rootme
; \
1070 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1072 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1080 @if
[ -f .
/tk
/Makefile
] ; then \
1081 rootme
=`pwd` ; export rootme
; \
1082 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1084 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1090 @if
[ -f .
/tk
/Makefile
] ; then \
1091 rootme
=`pwd` ; export rootme
; \
1092 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1094 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1101 @if
[ -f .
/expect
/Makefile
] ; then \
1102 rootme
=`pwd` ; export rootme
; \
1103 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1105 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1110 install-expect
: force
1111 @if
[ -f .
/expect
/Makefile
] ; then \
1112 rootme
=`pwd` ; export rootme
; \
1113 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1115 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1122 @if
[ -f .
/z8ksim
/Makefile
] ; then \
1123 rootme
=`pwd` ; export rootme
; \
1125 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1130 install-z8ksim
: force
1131 @if
[ -f .
/z8ksim
/Makefile
] ; then \
1132 rootme
=`pwd` ; export rootme
; \
1134 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1140 all-h8300sim
: all-bfd
1141 @if
[ -f .
/h8300sim
/Makefile
] ; then \
1142 rootme
=`pwd` ; export rootme
; \
1144 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1149 install-h8300sim
: force
1150 @if
[ -f .
/h8300sim
/Makefile
] ; then \
1151 rootme
=`pwd` ; export rootme
; \
1153 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1160 all-fileutils
: force
1161 @if
[ -f .
/fileutils
/Makefile
] ; then \
1162 rootme
=`pwd` ; export rootme
; \
1163 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1168 install-fileutils
: force
1169 @if
[ -f .
/fileutils
/Makefile
] ; then \
1170 rootme
=`pwd` ; export rootme
; \
1171 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1178 @if
[ -f .
/find
/Makefile
] ; then \
1179 rootme
=`pwd` ; export rootme
; \
1180 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1186 @if
[ -f .
/find
/Makefile
] ; then \
1187 rootme
=`pwd` ; export rootme
; \
1188 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1195 @if
[ -f .
/gawk
/Makefile
] ; then \
1196 rootme
=`pwd` ; export rootme
; \
1197 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1203 @if
[ -f .
/gawk
/Makefile
] ; then \
1204 rootme
=`pwd` ; export rootme
; \
1205 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1211 all-m4
: all-libiberty
1212 @if
[ -f .
/m4
/Makefile
] ; then \
1213 rootme
=`pwd` ; export rootme
; \
1214 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1220 @if
[ -f .
/m4
/Makefile
] ; then \
1221 rootme
=`pwd` ; export rootme
; \
1222 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1229 @if
[ -f .
/sed
/Makefile
] ; then \
1230 rootme
=`pwd` ; export rootme
; \
1231 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1237 @if
[ -f .
/sed
/Makefile
] ; then \
1238 rootme
=`pwd` ; export rootme
; \
1239 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1246 @if
[ -f .
/time
/Makefile
] ; then \
1247 rootme
=`pwd` ; export rootme
; \
1248 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1254 @if
[ -f .
/time
/Makefile
] ; then \
1255 rootme
=`pwd` ; export rootme
; \
1256 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1263 @if
[ -f .
/wdiff
/Makefile
] ; then \
1264 rootme
=`pwd` ; export rootme
; \
1265 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1270 install-wdiff
: force
1271 @if
[ -f .
/wdiff
/Makefile
] ; then \
1272 rootme
=`pwd` ; export rootme
; \
1273 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1279 all-shellutils
: force
1280 @if
[ -f .
/shellutils
/Makefile
] ; then \
1281 rootme
=`pwd` ; export rootme
; \
1282 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1287 install-shellutils
: force
1288 @if
[ -f .
/shellutils
/Makefile
] ; then \
1289 rootme
=`pwd` ; export rootme
; \
1290 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1296 all-textutils
: force
1297 @if
[ -f .
/textutils
/Makefile
] ; then \
1298 rootme
=`pwd` ; export rootme
; \
1299 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1304 install-textutils
: force
1305 @if
[ -f .
/textutils
/Makefile
] ; then \
1306 rootme
=`pwd` ; export rootme
; \
1307 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1314 ### other supporting targets
1317 ### start-sanitize-chill
1319 ### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
1321 ### if you change the code for libg++ et al, also change the
1322 ### code for chillrt
1324 ### end-sanitize-chill
1325 @for i in
$(DODIRS
); do \
1326 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
] ; then \
1328 libg
++ | xiberty | newlib
) \
1329 if
(rootme
=`pwd` ; export rootme
; \
1330 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1332 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1335 $(start-sanitize-chill
) \
1337 if
(rootme
=`pwd` ; export rootme
; \
1338 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1340 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1343 $(end-sanitize-chill
) \
1345 if
(rootme
=`pwd` ; export rootme
; \
1346 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1348 $(MAKE
) $(GCC_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1352 if
(rootme
=`pwd` ; export rootme
; \
1354 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1361 # The "else true" stuff is for Ultrix; the shell returns the exit code
1362 # of the "if" command, if no commands are run in the "then" or "else" part,
1363 # causing Make to quit.
1387 for i in
$(MAKEDIRS
) ; do \
1388 echo Making
$$i...
; \
1389 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1390 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1391 if
[ ! -d
$$i ] ; then \
1392 if mkdir
$$i ; then \
1403 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1406 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1407 mv
-f
dir.
info.new
dir.
info
1410 @echo
"Building a full distribution of this tree isn't done"
1411 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1420 @for i in
$(SUBDIRS
); \
1424 wd
=`basename $$pwd`; \
1425 for j in
`$(MAKE) ls`; \
1433 # with the gnu make, this is done automatically.
1435 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1436 $(SHELL
) .
/config.status
1439 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1441 DEVO_SUPPORT
= README cfg-paper.texi Makefile.in configure configure.in \
1442 config.sub config configure.man configure.texi move-if-change \
1444 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1445 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
) texinfo
/fsf
/texinfo.
tex
1450 .
/configure
-rm sun4
1451 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1453 gdb.
tar.Z
: setup-dirs
1454 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1455 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1457 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/fsf
/texinfo.
tex
1458 rm -rf proto-toplev
; mkdir proto-toplev
1459 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1460 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1463 # Put only one copy (four hard links) of COPYING in the tar file.
1464 rm proto-toplev
/bfd
/COPYING
1465 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1466 rm proto-toplev
/include/COPYING
1467 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1468 rm proto-toplev
/readline
/COPYING
1469 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1470 # Take out texinfo from configurable dirs
1471 rm proto-toplev
/configure.in
1472 sed
'/^configdirs=/s/texinfo //' <configure.in
>proto-toplev
/configure.in
1473 # Take out glob from buildable dirs
1474 rm proto-toplev
/Makefile.in
1476 sed
-e
'/^SUBDIRS =/s/glob //' \
1477 -e
'/^all\.normal: /s/\all-texinfo //' \
1478 -e
'/^clean: /s/clean-texinfo //' \
1479 -e
'/^install\.all: /s/install-texinfo //' \
1480 <Makefile.in
>proto-toplev
/Makefile.in
1482 mkdir proto-toplev
/texinfo
1483 mkdir proto-toplev
/texinfo
/fsf
1484 ln
-s ..
/..
/..
/texinfo
/fsf
/texinfo.
tex proto-toplev
/texinfo
/fsf
/
1485 chmod og
=u
`find proto-toplev -print`
1486 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1487 echo
"==> Making gdb-$$VER.tar.Z"; \
1488 ln
-s proto-toplev gdb-
$$VER; \
1489 tar cfh
- gdb-
$$VER \
1490 | compress
-v
>gdb-
$$VER.
tar.Z
)
1493 # end of Makefile.in