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
)
57 $(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`
80 # libraries that may need to be augmented on a system-by-system basis
83 # compilers to use to create programs which must be run in the build
86 CXX_FOR_BUILD
= $(CXX
)
88 SUBDIRS
= "this is set via configure, don't edit this"
92 INSTALL_TARGET
= install.
all
98 if [ -f $${rootme}/gcc/Makefile ] ; then \
99 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
101 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
104 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
109 if [ -f $${rootme}/gcc/Makefile ] ; then \
110 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
112 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
115 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
119 $(start-sanitize-chill
)
120 CHILL_FOR_TARGET
= ` \
121 if [ -f $${rootme}/gcc/Makefile ] ; then \
122 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
124 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
127 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
130 $(end-sanitize-chill
)
133 if [ -f $${rootme}/gcc/Makefile ] ; then \
134 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
136 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
139 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
144 if [ -f $${rootme}/gas/Makefile ] ; then \
145 echo $${rootme}/gas/as.new ; \
147 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
150 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
155 if [ -f $${rootme}/binutils/Makefile ] ; then \
156 echo $${rootme}/binutils/ar ; \
158 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
161 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
165 RANLIB_FOR_TARGET
= ` \
166 if [ -f $${rootme}/binutils/Makefile ] ; then \
167 echo $${rootme}/binutils/ranlib ; \
169 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
172 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
177 if [ -f $${rootme}/binutils/Makefile ] ; then \
178 echo $${rootme}/binutils/nm ; \
180 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
183 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
188 if [ -f $${rootme}/gcc/Makefile ] ; then \
189 if [ -f $${rootme}/newlib/Makefile ] ; then \
190 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
192 echo -I$${rootme}/gcc/include ; \
199 #### host and target specific makefile fragments come in here.
202 # Flags to pass down to sub-makes -- please keep these in alphabetical order
205 "AR_FLAGS=$(AR_FLAGS)" \
206 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
208 "CXXFLAGS=$(CXXFLAGS)" \
209 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
211 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
213 $(start-sanitize-chill
)\
214 "CHILLFLAGS=$(CHILLFLAGS)" \
215 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
216 "CHILL_LIB=$(CHILL_LIB)" \
217 $(end-sanitize-chill
)\
218 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
219 "INSTALL=$(INSTALL)" \
220 "INSTALL_DATA=$(INSTALL_DATA)" \
221 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
222 "LDFLAGS=$(LDFLAGS)" \
224 "LOADLIBES=$(LOADLIBES)" \
225 "MAKEINFO=$(MAKEINFO)" \
227 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
228 "exec_prefix=$(exec_prefix)" \
232 # Flags that are concerned with the location of the X11 include files
235 X11_FLAGS_TO_PASS
= \
236 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
237 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
240 # Flags to pass down to makes which are built with the target
241 # environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
242 TARGET_FLAGS_TO_PASS
= \
243 "AR=$(AR_FOR_TARGET)" \
244 "AR_FLAGS=$(AR_FLAGS)" \
245 "AS=$(AS_FOR_TARGET)" \
247 "CXX=$(CXX_FOR_TARGET)" \
248 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
249 "CXXFLAGS=$(CXXFLAGS)" \
250 "CC=$(CC_FOR_TARGET)" \
251 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
253 "INSTALL=$(INSTALL)" \
254 "INSTALL_DATA=$(INSTALL_DATA)" \
255 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
256 "LDFLAGS=$(LDFLAGS)" \
258 "LOADLIBES=$(LOADLIBES)" \
259 "MAKEINFO=$(MAKEINFO)" \
260 "NM=$(NM_FOR_TARGET)" \
261 "RANLIB=$(RANLIB_FOR_TARGET)" \
262 "XTRAFLAGS=$(XTRAFLAGS)" \
263 "exec_prefix=$(exec_prefix)" \
267 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
268 # unfortunately needs the native compiler and the target ar and
269 # ranlib. Keep these in alphabetical order, please.
270 GCC_FLAGS_TO_PASS
= \
271 "AR=$(AR_FOR_TARGET)" \
272 "AR_FLAGS=$(AR_FLAGS)" \
273 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
277 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
278 "CXXFLAGS=$(CXXFLAGS)" \
280 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
282 "INSTALL=$(INSTALL)" \
283 "INSTALL_DATA=$(INSTALL_DATA)" \
284 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
285 "LDFLAGS=$(LDFLAGS)" \
287 "LOADLIBES=$(LOADLIBES)" \
288 "MAKEINFO=$(MAKEINFO)" \
290 "RANLIB=$(RANLIB_FOR_TARGET)" \
291 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
292 "XTRAFLAGS=$(XTRAFLAGS)" \
293 "exec_prefix=$(exec_prefix)" \
297 # The first rule in the file had better be this one. Don't put any above it.
300 .PHONY
: all check dvi info install-info
304 @rootme
=`pwd` ; export rootme
; \
305 $(MAKE
) $(FLAGS_TO_PASS
) DO
=info "DODIRS=$(SUBDIRS)" subdir_do
308 @rootme
=`pwd` ; export rootme
; \
309 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
311 install-info
: install-info-dirs
force
312 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
313 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
314 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
315 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) DO
=install-info
"DODIRS=$(SUBDIRS)" subdir_do
316 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) dir.
info install-dir.
info
319 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
320 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
321 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
322 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
324 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
325 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
326 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
327 all-make all-rcs all-cvs all-diff all-grep \
328 all-patch all-emacs all-ispell all-etc \
329 all-tcl all-tk all-expect \
331 $(start-sanitize-chill
) \
333 $(end-sanitize-chill
) \
334 all-gprof all-send_pr all-libm all-deja-gnu \
335 all-fileutils all-find all-gawk all-sed all-shellutils \
336 all-textutils all-time all-wdiff all-uudecode
339 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
340 all-opcodes all-bfd all-readline all-sim \
341 all-gdb all-binutils all-gcc all-newlib \
342 $(start-sanitize-chill
) \
344 $(end-sanitize-chill
) \
347 .PHONY
: clean distclean mostlyclean realclean do_clean
350 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
352 clean mostlyclean: do_clean
353 @rootme
=`pwd` ; export rootme
; \
354 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
356 distclean realclean: do_clean
357 @rootme
=`pwd` ; export rootme
; \
358 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
359 -rm -f Makefile config.status
362 @echo
"the uninstall target is not supported in this tree"
364 install: $(INSTALL_TARGET
)
365 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
366 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
367 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
369 install.
all: install-no-fixedincludes
370 @if
[ -f .
/gcc
/Makefile
] ; then \
371 rootme
=`pwd` ; export rootme
; \
373 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
378 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
404 $(start-sanitize-chill
) \
406 $(end-sanitize-chill
) \
415 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
416 install-textutils install-time install-wdiff install-uudecode
419 # Install the gcc headers files, but not the fixed include files,
420 # which we are not allowed to distribute. This rule is very dependent
421 # on the workings of the gcc Makefile.in.
423 gcc-no-fixedincludes
:
424 @if
[ -f .
/gcc
/Makefile
]; then \
425 rm -rf gcc
/tmp-include
; \
426 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
428 touch gcc
/stmp-fixincludes
; \
429 rm -f gcc
/stmp-headers
; \
430 rootme
=`pwd`; export rootme
; \
431 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
433 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
434 rm -rf gcc
/include; \
435 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
438 install.cross
: install-dirs install-libiberty install-mmalloc \
439 install-binutils install-opcodes install-byacc install-flex \
440 install-ld install-gas install-readline \
441 install-glob install-gdb install-mmalloc \
443 $(start-sanitize-chill
) \
445 $(end-sanitize-chill
) \
446 install-gcc install-etc install-deja-gnu
450 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
451 rootme
=`pwd` ; export rootme
; \
452 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
457 install-deja-gnu
: force
458 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
459 rootme
=`pwd` ; export rootme
; \
460 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
467 @if
[ -f .
/autoconf
/Makefile
] ; then \
468 rootme
=`pwd` ; export rootme
; \
469 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
474 install-autoconf
: force
475 @if
[ -f .
/autoconf
/Makefile
] ; then \
476 rootme
=`pwd` ; export rootme
; \
477 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
484 @if
[ -f .
/etc
/Makefile
] ; then \
485 rootme
=`pwd` ; export rootme
; \
486 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
492 @if
[ -f .
/etc
/Makefile
] ; then \
493 rootme
=`pwd` ; export rootme
; \
494 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
501 @if
[ -f .
/libiberty
/Makefile
] ; then \
502 rootme
=`pwd` ; export rootme
; \
504 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
509 install-libiberty
: force
510 @if
[ -f .
/libiberty
/Makefile
] ; then \
511 rootme
=`pwd` ; export rootme
; \
513 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
519 all-xiberty
: all-gcc all-newlib
520 @if
[ -f .
/xiberty
/Makefile
] ; then \
521 rootme
=`pwd` ; export rootme
; \
522 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
524 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
529 install-xiberty
: force
530 @if
[ -f .
/xiberty
/Makefile
] ; then \
531 rootme
=`pwd` ; export rootme
; \
532 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
534 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
541 @if
[ -f .
/mmalloc
/Makefile
] ; then \
542 rootme
=`pwd` ; export rootme
; \
544 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
549 install-mmalloc
: force
550 @if
[ -f .
/mmalloc
/Makefile
] ; then \
551 rootme
=`pwd` ; export rootme
; \
553 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
559 all-texinfo
: all-libiberty
560 @if
[ -f .
/texinfo
/Makefile
] ; then \
561 rootme
=`pwd` ; export rootme
; \
563 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
568 install-texinfo
: force
569 @if
[ -f .
/texinfo
/Makefile
] ; then \
570 rootme
=`pwd` ; export rootme
; \
572 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
579 @if
[ -f .
/bfd
/Makefile
] ; then \
580 rootme
=`pwd` ; export rootme
; \
582 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
588 @if
[ -f .
/bfd
/Makefile
] ; then \
589 rootme
=`pwd` ; export rootme
; \
591 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
599 @if
[ -f .
/opcodes
/Makefile
] ; then \
600 rootme
=`pwd` ; export rootme
; \
602 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
607 install-opcodes
: force
608 @if
[ -f .
/opcodes
/Makefile
] ; then \
609 rootme
=`pwd` ; export rootme
; \
611 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
617 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
618 @if
[ -f .
/binutils
/Makefile
] ; then \
619 rootme
=`pwd` ; export rootme
; \
621 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
626 install-binutils
: force
627 @if
[ -f .
/binutils
/Makefile
] ; then \
628 rootme
=`pwd` ; export rootme
; \
630 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
636 all-newlib
: all-binutils all-ld all-gas all-gcc
637 @if
[ -f .
/newlib
/Makefile
] ; then \
638 rootme
=`pwd` ; export rootme
; \
639 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
641 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
646 install-newlib
: force
647 @if
[ -f .
/newlib
/Makefile
] ; then \
648 rootme
=`pwd` ; export rootme
; \
649 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
651 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
656 ### start-sanitize-chill
658 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
659 @if
[ -f .
/chillrt
/Makefile
] ; then \
660 rootme
=`pwd` ; export rootme
; \
661 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
663 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
668 install-chillrt
: force
669 @if
[ -f .
/chillrt
/Makefile
] ; then \
670 rootme
=`pwd` ; export rootme
; \
671 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
673 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
677 ### end-sanitize-chill
680 all-gprof
: all-libiberty all-bfd
681 @if
[ -f .
/gprof
/Makefile
] ; then \
682 rootme
=`pwd` ; export rootme
; \
684 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
690 @if
[ -f .
/gprof
/Makefile
] ; then \
691 rootme
=`pwd` ; export rootme
; \
693 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
700 @if
[ -f .
/byacc
/Makefile
] ; then \
701 rootme
=`pwd` ; export rootme
; \
703 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
709 @if
[ -f .
/byacc
/Makefile
] ; then \
710 rootme
=`pwd` ; export rootme
; \
712 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
718 all-flex
: all-libiberty
719 @if
[ -f .
/flex
/Makefile
] ; then \
720 rootme
=`pwd` ; export rootme
; \
722 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
728 @if
[ -f .
/flex
/Makefile
] ; then \
729 rootme
=`pwd` ; export rootme
; \
731 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
736 all-gcc
: all-libiberty all-byacc all-binutils all-gas
737 @if
[ -f .
/gcc
/Makefile
] ; then \
738 rootme
=`pwd` ; export rootme
; \
739 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
741 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
747 @if
[ -f .
/gcc
/Makefile
] ; then \
748 rootme
=`pwd` ; export rootme
; \
749 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
751 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
758 @if
[ -f .
/readline
/Makefile
] ; then \
759 rootme
=`pwd` ; export rootme
; \
761 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
766 install-readline
: force
767 @if
[ -f .
/readline
/Makefile
] ; then \
768 rootme
=`pwd` ; export rootme
; \
770 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
777 @if
[ -f .
/glob
/Makefile
] ; then \
778 rootme
=`pwd` ; export rootme
; \
780 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
786 @if
[ -f .
/glob
/Makefile
] ; then \
787 rootme
=`pwd` ; export rootme
; \
789 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
795 all-gas
: all-libiberty all-opcodes all-bfd
796 @if
[ -f .
/gas
/Makefile
] ; then \
797 rootme
=`pwd` ; export rootme
; \
799 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
805 @if
[ -f .
/gas
/Makefile
] ; then \
806 rootme
=`pwd` ; export rootme
; \
808 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
814 all-tgas
: all-libiberty all-bfd
815 @if
[ -f .
/tgas
/Makefile
] ; then \
816 rootme
=`pwd` ; export rootme
; \
818 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
825 all-ld
: all-libiberty all-bfd all-byacc all-flex
826 @if
[ -f .
/ld/Makefile
] ; then \
827 rootme
=`pwd` ; export rootme
; \
829 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
835 @if
[ -f .
/ld/Makefile
] ; then \
836 rootme
=`pwd` ; export rootme
; \
838 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
844 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
845 @if
[ -f .
/gdb
/Makefile
] ; then \
846 rootme
=`pwd` ; export rootme
; \
848 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
854 @if
[ -f .
/gdb
/Makefile
] ; then \
855 rootme
=`pwd` ; export rootme
; \
857 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
863 all-make
: all-libiberty
864 @if
[ -f .
/make
/Makefile
] ; then \
865 rootme
=`pwd` ; export rootme
; \
867 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
873 @if
[ -f .
/make
/Makefile
] ; then \
874 rootme
=`pwd` ; export rootme
; \
876 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
883 @if
[ -f .
/diff
/Makefile
] ; then \
884 rootme
=`pwd` ; export rootme
; \
886 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
892 @if
[ -f .
/diff
/Makefile
] ; then \
893 rootme
=`pwd` ; export rootme
; \
895 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
902 @if
[ -f .
/grep
/Makefile
] ; then \
903 rootme
=`pwd` ; export rootme
; \
905 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
911 @if
[ -f .
/grep
/Makefile
] ; then \
912 rootme
=`pwd` ; export rootme
; \
914 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
921 @if
[ -f .
/rcs
/Makefile
] ; then \
922 rootme
=`pwd` ; export rootme
; \
924 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
930 @if
[ -f .
/rcs
/Makefile
] ; then \
931 rootme
=`pwd` ; export rootme
; \
933 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
940 @if
[ -f .
/cvs
/Makefile
] ; then \
941 rootme
=`pwd` ; export rootme
; \
943 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
949 @if
[ -f .
/cvs
/Makefile
] ; then \
950 rootme
=`pwd` ; export rootme
; \
952 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
959 @if
[ -f .
/patch
/Makefile
] ; then \
960 rootme
=`pwd` ; export rootme
; \
962 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
968 @if
[ -f .
/patch
/Makefile
] ; then \
969 rootme
=`pwd` ; export rootme
; \
971 $(MAKE
) $(FLAGS_TO_PASS
) \
973 man1dir=$(man1dir) install) ; \
980 @if
[ -f .
/emacs
/Makefile
] ; then \
981 rootme
=`pwd` ; export rootme
; \
983 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
989 @if
[ -f .
/emacs
/Makefile
] ; then \
990 rootme
=`pwd` ; export rootme
; \
992 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
998 all-ispell
: all-emacs
999 @if
[ -f .
/ispell
/Makefile
] ; then \
1000 rootme
=`pwd` ; export rootme
; \
1002 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1007 install-ispell
: force
1008 @if
[ -f .
/ispell
/Makefile
] ; then \
1009 rootme
=`pwd` ; export rootme
; \
1011 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1018 @if
[ -f .
/send_pr
/Makefile
] ; then \
1019 rootme
=`pwd` ; export rootme
; \
1021 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1026 install-send_pr
: force
1027 @if
[ -f .
/send_pr
/Makefile
] ; then \
1028 rootme
=`pwd` ; export rootme
; \
1030 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1037 @if
[ -f .
/libm
/Makefile
] ; then \
1038 rootme
=`pwd` ; export rootme
; \
1040 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1046 @if
[ -f .
/libm
/Makefile
] ; then \
1047 rootme
=`pwd` ; export rootme
; \
1049 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1056 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1057 @if
[ -f .
/libg
++/Makefile
] ; then \
1058 rootme
=`pwd` ; export rootme
; \
1059 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1061 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1066 install-libg
++: force
1067 @if
[ -f .
/libg
++/Makefile
] ; then \
1068 rootme
=`pwd` ; export rootme
; \
1069 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1071 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1077 @if
[ -f .
/tcl
/Makefile
] ; then \
1078 rootme
=`pwd` ; export rootme
; \
1079 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1081 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1087 @if
[ -f .
/tcl
/Makefile
] ; then \
1088 rootme
=`pwd` ; export rootme
; \
1089 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1091 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1099 @if
[ -f .
/tk
/Makefile
] ; then \
1100 rootme
=`pwd` ; export rootme
; \
1101 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1103 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1109 @if
[ -f .
/tk
/Makefile
] ; then \
1110 rootme
=`pwd` ; export rootme
; \
1111 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1113 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1120 @if
[ -f .
/expect
/Makefile
] ; then \
1121 rootme
=`pwd` ; export rootme
; \
1122 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1124 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1129 install-expect
: force
1130 @if
[ -f .
/expect
/Makefile
] ; then \
1131 rootme
=`pwd` ; export rootme
; \
1132 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1134 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1141 @if
[ -f .
/sim
/Makefile
] ; then \
1142 rootme
=`pwd` ; export rootme
; \
1144 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1150 @if
[ -f .
/sim
/Makefile
] ; then \
1151 rootme
=`pwd` ; export rootme
; \
1153 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1159 all-fileutils
: force
1160 @if
[ -f .
/fileutils
/Makefile
] ; then \
1161 rootme
=`pwd` ; export rootme
; \
1162 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1167 install-fileutils
: force
1168 @if
[ -f .
/fileutils
/Makefile
] ; then \
1169 rootme
=`pwd` ; export rootme
; \
1170 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1177 @if
[ -f .
/find
/Makefile
] ; then \
1178 rootme
=`pwd` ; export rootme
; \
1179 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1185 @if
[ -f .
/find
/Makefile
] ; then \
1186 rootme
=`pwd` ; export rootme
; \
1187 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1194 @if
[ -f .
/gawk
/Makefile
] ; then \
1195 rootme
=`pwd` ; export rootme
; \
1196 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1202 @if
[ -f .
/gawk
/Makefile
] ; then \
1203 rootme
=`pwd` ; export rootme
; \
1204 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1210 all-m4
: all-libiberty
1211 @if
[ -f .
/m4
/Makefile
] ; then \
1212 rootme
=`pwd` ; export rootme
; \
1213 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1219 @if
[ -f .
/m4
/Makefile
] ; then \
1220 rootme
=`pwd` ; export rootme
; \
1221 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1228 @if
[ -f .
/sed
/Makefile
] ; then \
1229 rootme
=`pwd` ; export rootme
; \
1230 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1236 @if
[ -f .
/sed
/Makefile
] ; then \
1237 rootme
=`pwd` ; export rootme
; \
1238 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1245 @if
[ -f .
/time
/Makefile
] ; then \
1246 rootme
=`pwd` ; export rootme
; \
1247 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1253 @if
[ -f .
/time
/Makefile
] ; then \
1254 rootme
=`pwd` ; export rootme
; \
1255 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1262 @if
[ -f .
/wdiff
/Makefile
] ; then \
1263 rootme
=`pwd` ; export rootme
; \
1264 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1269 install-wdiff
: force
1270 @if
[ -f .
/wdiff
/Makefile
] ; then \
1271 rootme
=`pwd` ; export rootme
; \
1272 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1278 all-uudecode
: all-libiberty
1279 @if
[ -f .
/uudecode
/Makefile
] ; then \
1280 rootme
=`pwd` ; export rootme
; \
1281 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1286 install-uudecode
: force
1287 @if
[ -f .
/uudecode
/Makefile
] ; then \
1288 rootme
=`pwd` ; export rootme
; \
1289 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1295 all-shellutils
: force
1296 @if
[ -f .
/shellutils
/Makefile
] ; then \
1297 rootme
=`pwd` ; export rootme
; \
1298 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1303 install-shellutils
: force
1304 @if
[ -f .
/shellutils
/Makefile
] ; then \
1305 rootme
=`pwd` ; export rootme
; \
1306 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1312 all-textutils
: force
1313 @if
[ -f .
/textutils
/Makefile
] ; then \
1314 rootme
=`pwd` ; export rootme
; \
1315 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1320 install-textutils
: force
1321 @if
[ -f .
/textutils
/Makefile
] ; then \
1322 rootme
=`pwd` ; export rootme
; \
1323 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1330 ### other supporting targets
1333 ### start-sanitize-chill
1335 ### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
1337 ### if you change the code for libg++ et al, also change the
1338 ### code for chillrt
1340 ### end-sanitize-chill
1341 @for i in
$(DODIRS
); do \
1342 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
] ; then \
1344 libg
++ | xiberty | newlib
) \
1345 if
(rootme
=`pwd` ; export rootme
; \
1346 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1348 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1351 $(start-sanitize-chill
) \
1353 if
(rootme
=`pwd` ; export rootme
; \
1354 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1356 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1359 $(end-sanitize-chill
) \
1361 if
(rootme
=`pwd` ; export rootme
; \
1362 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1364 $(MAKE
) $(GCC_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1368 if
(rootme
=`pwd` ; export rootme
; \
1370 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1377 # The "else true" stuff is for Ultrix; the shell returns the exit code
1378 # of the "if" command, if no commands are run in the "then" or "else" part,
1379 # causing Make to quit.
1403 for i in
$(MAKEDIRS
) ; do \
1404 echo Making
$$i...
; \
1405 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1406 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1407 if
[ ! -d
$$i ] ; then \
1408 if mkdir
$$i ; then \
1419 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1422 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1423 mv
-f
dir.
info.new
dir.
info
1426 @echo
"Building a full distribution of this tree isn't done"
1427 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1436 @for i in
$(SUBDIRS
); \
1440 wd
=`basename $$pwd`; \
1441 for j in
`$(MAKE) ls`; \
1449 # with the gnu make, this is done automatically.
1451 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1452 $(SHELL
) .
/config.status
1455 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1457 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1458 config.guess config.sub config etc move-if-change \
1460 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1461 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1466 .
/configure
-rm sun4
1467 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1469 gdb.
tar.Z
: setup-dirs
1470 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1471 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1473 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1474 rm -rf proto-toplev
; mkdir proto-toplev
1475 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1476 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1479 # Put only one copy (four hard links) of COPYING in the tar file.
1480 rm proto-toplev
/bfd
/COPYING
1481 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1482 rm proto-toplev
/include/COPYING
1483 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1484 rm proto-toplev
/readline
/COPYING
1485 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1487 # Take out texinfo and glob from configurable dirs
1488 rm proto-toplev
/configure.in
1489 sed
-e
'/^host_tools=/s/texinfo //' \
1490 -e
'/^host_libs=/s/glob //' \
1491 <configure.in
>proto-toplev
/configure.in
1493 # Take out texinfo from a few places; make simple BISON=bison line.
1494 rm proto-toplev
/Makefile.in
1495 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1496 -e
'/^ install-texinfo /d' \
1497 -e
'\/^BISON =/,\/^$$/c\
1499 <Makefile.in
>proto-toplev
/Makefile.in
1501 mkdir proto-toplev
/texinfo
1502 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1503 chmod og
=u
`find proto-toplev -print`
1504 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1505 echo
"==> Making gdb-$$VER.tar.Z"; \
1506 ln
-s proto-toplev gdb-
$$VER; \
1507 tar cfh
- gdb-
$$VER \
1508 | compress
-v
>gdb-
$$VER.
tar.Z
)
1511 # end of Makefile.in