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 ; \
187 # FIXME: This is badly named.
189 if [ -f $${rootme}/gcc/Makefile ] ; then \
190 if [ -f $${rootme}/newlib/Makefile ] ; then \
191 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
193 echo -I$${rootme}/gcc/include ; \
200 #### host and target specific makefile fragments come in here.
203 # Flags to pass down to all sub-makes.
204 # Please keep these in alphabetical order.
205 BASE_FLAGS_TO_PASS
= \
206 "AR_FLAGS=$(AR_FLAGS)" \
207 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
208 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
210 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
211 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
213 $(start-sanitize-chill
)\
214 "CHILLFLAGS=$(CHILLFLAGS)" \
215 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
216 "CHILL_LIB=$(CHILL_LIB)" \
217 $(end-sanitize-chill
)\
218 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
219 "CXXFLAGS=$(CXXFLAGS)" \
220 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
221 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
222 "INSTALL=$(INSTALL)" \
223 "INSTALL_DATA=$(INSTALL_DATA)" \
224 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
225 "LDFLAGS=$(LDFLAGS)" \
227 "LOADLIBES=$(LOADLIBES)" \
228 "MAKEINFO=$(MAKEINFO)" \
229 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
230 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
231 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
232 "exec_prefix=$(exec_prefix)" \
236 # Flags to pass down to most sub-makes, in which we're building with
237 # the host environment.
238 # Because of the way do-info, et. al., use this, this must not contain
249 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
251 # Flags that are concerned with the location of the X11 include files
253 X11_FLAGS_TO_PASS
= \
254 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
255 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
258 # Shell case of subdirectories which are built with the target environment.
259 TARGET_LIBS
=libg
++ | xiberty | newlib
260 $(start-sanitize-chill
)
261 TARGET_LIBS
=libg
++ | xiberty | newlib | chillrt
262 $(end-sanitize-chill
)
264 # Flags to pass down to makes which are built with the target environment.
265 # The double $ decreases the length of the command line; the variables
266 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
267 # Because of the way do-info, et. al., use this, this must not contain
269 EXTRA_TARGET_FLAGS
= \
270 'AR=$$(AR_FOR_TARGET)' \
271 'AS=$$(AS_FOR_TARGET)' \
272 'CC=$$(CC_FOR_TARGET)' \
273 'CXX=$$(CXX_FOR_TARGET)' \
274 'NM=$$(NM_FOR_TARGET)' \
275 'RANLIB=$$(RANLIB_FOR_TARGET)' \
276 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
278 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
280 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
281 # unfortunately needs the native compiler and the target ar and
283 # Because of the way do-info, et. al., use this, this must not contain
286 'AR=$$(AR_FOR_TARGET)' \
291 'RANLIB=$$(RANLIB_FOR_TARGET)' \
294 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
296 # The first rule in the file had better be this one. Don't put any above it.
299 .PHONY
: all check dvi info install-info install-info-dirs
300 .PHONY
: do-info do-check do-dvi do-install-info
301 .PHONY
: do-clean do-mostlyclean do-distclean do-realclean
304 # Do a target for all the subdirectories. A ``make do-X'' will do a
305 # ``make X'' in all subdirectories (because, in general, X depends on
306 # fdo-X, a ``make X'' will also do this, but it may do additional work
308 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
309 # because it is so large that it can easily overflow the command line
310 # length limit on some systems.
311 do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean
:
312 @target
=`echo $@ | sed -e 's/^do-//'`; \
313 rootme
=`pwd`; export rootme
; \
314 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
315 for i in
$(SUBDIRS
); do \
316 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
]; then \
319 extra_flags
=`echo $(EXTRA_TARGET_FLAGS)`; \
322 extra_flags
=`echo $(EXTRA_GCC_FLAGS)`; \
325 extra_flags
=`echo $(EXTRA_HOST_FLAGS)`; \
328 export extra_flags
; \
330 $(MAKE
) $(BASE_FLAGS_TO_PASS
) $${extra_flags} $${target}); \
331 then true
; else exit
1; fi
; \
339 install-info
: install-info-dirs do-install-info
dir.
info
340 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
342 do-install-info
: install-info-dirs
344 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
345 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
346 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
347 all-make all-rcs all-cvs all-diff all-grep \
348 all-patch all-emacs all-ispell all-etc \
349 all-tcl all-tk all-expect \
351 $(start-sanitize-chill
) \
353 $(end-sanitize-chill
) \
354 all-gprof all-send_pr all-libm all-deja-gnu \
355 all-fileutils all-find all-gawk all-sed all-shellutils \
356 all-textutils all-time all-wdiff all-uudecode
359 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
360 all-opcodes all-bfd all-readline all-sim \
361 all-gdb all-binutils all-gcc all-newlib \
362 $(start-sanitize-chill
) \
364 $(end-sanitize-chill
) \
367 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
370 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
373 -rm -f Makefile config.status
375 clean: do-clean local-clean
376 mostlyclean: do-mostlyclean local-clean
377 distclean: do-distclean local-clean local-distclean
378 realclean: do-realclean local-clean local-distclean
381 @echo
"the uninstall target is not supported in this tree"
383 install: $(INSTALL_TARGET
)
384 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
385 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
386 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
388 install.
all: install-no-fixedincludes
389 @if
[ -f .
/gcc
/Makefile
] ; then \
390 rootme
=`pwd` ; export rootme
; \
392 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
397 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
423 $(start-sanitize-chill
) \
425 $(end-sanitize-chill
) \
434 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
435 install-textutils install-time install-wdiff install-uudecode
438 # Install the gcc headers files, but not the fixed include files,
439 # which we are not allowed to distribute. This rule is very dependent
440 # on the workings of the gcc Makefile.in.
442 gcc-no-fixedincludes
:
443 @if
[ -f .
/gcc
/Makefile
]; then \
444 rm -rf gcc
/tmp-include
; \
445 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
447 touch gcc
/stmp-fixincludes
; \
448 rm -f gcc
/stmp-headers
; \
449 rootme
=`pwd`; export rootme
; \
450 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
452 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
453 rm -rf gcc
/include; \
454 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
457 install.cross
: install-dirs install-libiberty install-mmalloc \
458 install-binutils install-opcodes install-byacc install-flex \
459 install-ld install-gas install-readline \
460 install-glob install-gdb install-mmalloc \
462 $(start-sanitize-chill
) \
464 $(end-sanitize-chill
) \
465 install-gcc install-etc install-deja-gnu
469 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
470 rootme
=`pwd` ; export rootme
; \
471 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
476 install-deja-gnu
: force
477 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
478 rootme
=`pwd` ; export rootme
; \
479 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
486 @if
[ -f .
/autoconf
/Makefile
] ; then \
487 rootme
=`pwd` ; export rootme
; \
488 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
493 install-autoconf
: force
494 @if
[ -f .
/autoconf
/Makefile
] ; then \
495 rootme
=`pwd` ; export rootme
; \
496 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
503 @if
[ -f .
/etc
/Makefile
] ; then \
504 rootme
=`pwd` ; export rootme
; \
505 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
511 @if
[ -f .
/etc
/Makefile
] ; then \
512 rootme
=`pwd` ; export rootme
; \
513 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
520 @if
[ -f .
/libiberty
/Makefile
] ; then \
521 rootme
=`pwd` ; export rootme
; \
523 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
528 install-libiberty
: force
529 @if
[ -f .
/libiberty
/Makefile
] ; then \
530 rootme
=`pwd` ; export rootme
; \
532 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
538 all-xiberty
: all-gcc all-newlib
539 @if
[ -f .
/xiberty
/Makefile
] ; then \
540 rootme
=`pwd` ; export rootme
; \
541 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
543 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
548 install-xiberty
: force
549 @if
[ -f .
/xiberty
/Makefile
] ; then \
550 rootme
=`pwd` ; export rootme
; \
551 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
553 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
560 @if
[ -f .
/mmalloc
/Makefile
] ; then \
561 rootme
=`pwd` ; export rootme
; \
563 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
568 install-mmalloc
: force
569 @if
[ -f .
/mmalloc
/Makefile
] ; then \
570 rootme
=`pwd` ; export rootme
; \
572 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
578 all-texinfo
: all-libiberty
579 @if
[ -f .
/texinfo
/Makefile
] ; then \
580 rootme
=`pwd` ; export rootme
; \
582 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
587 install-texinfo
: force
588 @if
[ -f .
/texinfo
/Makefile
] ; then \
589 rootme
=`pwd` ; export rootme
; \
591 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
598 @if
[ -f .
/bfd
/Makefile
] ; then \
599 rootme
=`pwd` ; export rootme
; \
601 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
607 @if
[ -f .
/bfd
/Makefile
] ; then \
608 rootme
=`pwd` ; export rootme
; \
610 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
618 @if
[ -f .
/opcodes
/Makefile
] ; then \
619 rootme
=`pwd` ; export rootme
; \
621 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
626 install-opcodes
: force
627 @if
[ -f .
/opcodes
/Makefile
] ; then \
628 rootme
=`pwd` ; export rootme
; \
630 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
636 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
637 @if
[ -f .
/binutils
/Makefile
] ; then \
638 rootme
=`pwd` ; export rootme
; \
640 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
645 install-binutils
: force
646 @if
[ -f .
/binutils
/Makefile
] ; then \
647 rootme
=`pwd` ; export rootme
; \
649 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
655 all-newlib
: all-binutils all-ld all-gas all-gcc
656 @if
[ -f .
/newlib
/Makefile
] ; then \
657 rootme
=`pwd` ; export rootme
; \
658 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
660 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
665 install-newlib
: force
666 @if
[ -f .
/newlib
/Makefile
] ; then \
667 rootme
=`pwd` ; export rootme
; \
668 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
670 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
675 ### start-sanitize-chill
677 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
678 @if
[ -f .
/chillrt
/Makefile
] ; then \
679 rootme
=`pwd` ; export rootme
; \
680 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
682 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
687 install-chillrt
: force
688 @if
[ -f .
/chillrt
/Makefile
] ; then \
689 rootme
=`pwd` ; export rootme
; \
690 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
692 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
696 ### end-sanitize-chill
699 all-gprof
: all-libiberty all-bfd
700 @if
[ -f .
/gprof
/Makefile
] ; then \
701 rootme
=`pwd` ; export rootme
; \
703 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
709 @if
[ -f .
/gprof
/Makefile
] ; then \
710 rootme
=`pwd` ; export rootme
; \
712 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
719 @if
[ -f .
/byacc
/Makefile
] ; then \
720 rootme
=`pwd` ; export rootme
; \
722 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
728 @if
[ -f .
/byacc
/Makefile
] ; then \
729 rootme
=`pwd` ; export rootme
; \
731 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
737 all-flex
: all-libiberty
738 @if
[ -f .
/flex
/Makefile
] ; then \
739 rootme
=`pwd` ; export rootme
; \
741 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
747 @if
[ -f .
/flex
/Makefile
] ; then \
748 rootme
=`pwd` ; export rootme
; \
750 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
755 all-gcc
: all-libiberty all-byacc all-binutils all-gas
756 @if
[ -f .
/gcc
/Makefile
] ; then \
757 rootme
=`pwd` ; export rootme
; \
758 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
760 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
766 @if
[ -f .
/gcc
/Makefile
] ; then \
767 rootme
=`pwd` ; export rootme
; \
768 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
770 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
777 @if
[ -f .
/readline
/Makefile
] ; then \
778 rootme
=`pwd` ; export rootme
; \
780 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
785 install-readline
: force
786 @if
[ -f .
/readline
/Makefile
] ; then \
787 rootme
=`pwd` ; export rootme
; \
789 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
796 @if
[ -f .
/glob
/Makefile
] ; then \
797 rootme
=`pwd` ; export rootme
; \
799 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
805 @if
[ -f .
/glob
/Makefile
] ; then \
806 rootme
=`pwd` ; export rootme
; \
808 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
814 all-gas
: all-libiberty all-opcodes all-bfd
815 @if
[ -f .
/gas
/Makefile
] ; then \
816 rootme
=`pwd` ; export rootme
; \
818 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
824 @if
[ -f .
/gas
/Makefile
] ; then \
825 rootme
=`pwd` ; export rootme
; \
827 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
833 all-tgas
: all-libiberty all-bfd
834 @if
[ -f .
/tgas
/Makefile
] ; then \
835 rootme
=`pwd` ; export rootme
; \
837 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
844 all-ld
: all-libiberty all-bfd all-byacc all-flex
845 @if
[ -f .
/ld/Makefile
] ; then \
846 rootme
=`pwd` ; export rootme
; \
848 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
854 @if
[ -f .
/ld/Makefile
] ; then \
855 rootme
=`pwd` ; export rootme
; \
857 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
863 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
864 @if
[ -f .
/gdb
/Makefile
] ; then \
865 rootme
=`pwd` ; export rootme
; \
867 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
873 @if
[ -f .
/gdb
/Makefile
] ; then \
874 rootme
=`pwd` ; export rootme
; \
876 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
882 all-make
: all-libiberty
883 @if
[ -f .
/make
/Makefile
] ; then \
884 rootme
=`pwd` ; export rootme
; \
886 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
892 @if
[ -f .
/make
/Makefile
] ; then \
893 rootme
=`pwd` ; export rootme
; \
895 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
902 @if
[ -f .
/diff
/Makefile
] ; then \
903 rootme
=`pwd` ; export rootme
; \
905 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
911 @if
[ -f .
/diff
/Makefile
] ; then \
912 rootme
=`pwd` ; export rootme
; \
914 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
921 @if
[ -f .
/grep
/Makefile
] ; then \
922 rootme
=`pwd` ; export rootme
; \
924 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
930 @if
[ -f .
/grep
/Makefile
] ; then \
931 rootme
=`pwd` ; export rootme
; \
933 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
940 @if
[ -f .
/rcs
/Makefile
] ; then \
941 rootme
=`pwd` ; export rootme
; \
943 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
949 @if
[ -f .
/rcs
/Makefile
] ; then \
950 rootme
=`pwd` ; export rootme
; \
952 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
959 @if
[ -f .
/cvs
/Makefile
] ; then \
960 rootme
=`pwd` ; export rootme
; \
962 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
968 @if
[ -f .
/cvs
/Makefile
] ; then \
969 rootme
=`pwd` ; export rootme
; \
971 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
978 @if
[ -f .
/patch
/Makefile
] ; then \
979 rootme
=`pwd` ; export rootme
; \
981 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
987 @if
[ -f .
/patch
/Makefile
] ; then \
988 rootme
=`pwd` ; export rootme
; \
990 $(MAKE
) $(FLAGS_TO_PASS
) \
992 man1dir=$(man1dir) install) ; \
999 @if
[ -f .
/emacs
/Makefile
] ; then \
1000 rootme
=`pwd` ; export rootme
; \
1002 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1007 install-emacs
: force
1008 @if
[ -f .
/emacs
/Makefile
] ; then \
1009 rootme
=`pwd` ; export rootme
; \
1011 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1017 all-ispell
: all-emacs
1018 @if
[ -f .
/ispell
/Makefile
] ; then \
1019 rootme
=`pwd` ; export rootme
; \
1021 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1026 install-ispell
: force
1027 @if
[ -f .
/ispell
/Makefile
] ; then \
1028 rootme
=`pwd` ; export rootme
; \
1030 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1037 @if
[ -f .
/send_pr
/Makefile
] ; then \
1038 rootme
=`pwd` ; export rootme
; \
1040 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1045 install-send_pr
: force
1046 @if
[ -f .
/send_pr
/Makefile
] ; then \
1047 rootme
=`pwd` ; export rootme
; \
1049 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1056 @if
[ -f .
/libm
/Makefile
] ; then \
1057 rootme
=`pwd` ; export rootme
; \
1059 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1065 @if
[ -f .
/libm
/Makefile
] ; then \
1066 rootme
=`pwd` ; export rootme
; \
1068 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1075 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1076 @if
[ -f .
/libg
++/Makefile
] ; then \
1077 rootme
=`pwd` ; export rootme
; \
1078 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1080 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1085 install-libg
++: force
1086 @if
[ -f .
/libg
++/Makefile
] ; then \
1087 rootme
=`pwd` ; export rootme
; \
1088 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1090 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1096 @if
[ -f .
/tcl
/Makefile
] ; then \
1097 rootme
=`pwd` ; export rootme
; \
1098 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1100 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1106 @if
[ -f .
/tcl
/Makefile
] ; then \
1107 rootme
=`pwd` ; export rootme
; \
1108 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1110 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1118 @if
[ -f .
/tk
/Makefile
] ; then \
1119 rootme
=`pwd` ; export rootme
; \
1120 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1122 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1128 @if
[ -f .
/tk
/Makefile
] ; then \
1129 rootme
=`pwd` ; export rootme
; \
1130 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1132 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1139 @if
[ -f .
/expect
/Makefile
] ; then \
1140 rootme
=`pwd` ; export rootme
; \
1141 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1143 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1148 install-expect
: force
1149 @if
[ -f .
/expect
/Makefile
] ; then \
1150 rootme
=`pwd` ; export rootme
; \
1151 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1153 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1160 @if
[ -f .
/sim
/Makefile
] ; then \
1161 rootme
=`pwd` ; export rootme
; \
1163 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1169 @if
[ -f .
/sim
/Makefile
] ; then \
1170 rootme
=`pwd` ; export rootme
; \
1172 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1178 all-fileutils
: force
1179 @if
[ -f .
/fileutils
/Makefile
] ; then \
1180 rootme
=`pwd` ; export rootme
; \
1181 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1186 install-fileutils
: force
1187 @if
[ -f .
/fileutils
/Makefile
] ; then \
1188 rootme
=`pwd` ; export rootme
; \
1189 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1196 @if
[ -f .
/find
/Makefile
] ; then \
1197 rootme
=`pwd` ; export rootme
; \
1198 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1204 @if
[ -f .
/find
/Makefile
] ; then \
1205 rootme
=`pwd` ; export rootme
; \
1206 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1213 @if
[ -f .
/gawk
/Makefile
] ; then \
1214 rootme
=`pwd` ; export rootme
; \
1215 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1221 @if
[ -f .
/gawk
/Makefile
] ; then \
1222 rootme
=`pwd` ; export rootme
; \
1223 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1229 all-m4
: all-libiberty
1230 @if
[ -f .
/m4
/Makefile
] ; then \
1231 rootme
=`pwd` ; export rootme
; \
1232 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1238 @if
[ -f .
/m4
/Makefile
] ; then \
1239 rootme
=`pwd` ; export rootme
; \
1240 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1247 @if
[ -f .
/sed
/Makefile
] ; then \
1248 rootme
=`pwd` ; export rootme
; \
1249 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1255 @if
[ -f .
/sed
/Makefile
] ; then \
1256 rootme
=`pwd` ; export rootme
; \
1257 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1264 @if
[ -f .
/time
/Makefile
] ; then \
1265 rootme
=`pwd` ; export rootme
; \
1266 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1272 @if
[ -f .
/time
/Makefile
] ; then \
1273 rootme
=`pwd` ; export rootme
; \
1274 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1281 @if
[ -f .
/wdiff
/Makefile
] ; then \
1282 rootme
=`pwd` ; export rootme
; \
1283 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1288 install-wdiff
: force
1289 @if
[ -f .
/wdiff
/Makefile
] ; then \
1290 rootme
=`pwd` ; export rootme
; \
1291 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1297 all-uudecode
: all-libiberty
1298 @if
[ -f .
/uudecode
/Makefile
] ; then \
1299 rootme
=`pwd` ; export rootme
; \
1300 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1305 install-uudecode
: force
1306 @if
[ -f .
/uudecode
/Makefile
] ; then \
1307 rootme
=`pwd` ; export rootme
; \
1308 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1314 all-shellutils
: force
1315 @if
[ -f .
/shellutils
/Makefile
] ; then \
1316 rootme
=`pwd` ; export rootme
; \
1317 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1322 install-shellutils
: force
1323 @if
[ -f .
/shellutils
/Makefile
] ; then \
1324 rootme
=`pwd` ; export rootme
; \
1325 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1331 all-textutils
: force
1332 @if
[ -f .
/textutils
/Makefile
] ; then \
1333 rootme
=`pwd` ; export rootme
; \
1334 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1339 install-textutils
: force
1340 @if
[ -f .
/textutils
/Makefile
] ; then \
1341 rootme
=`pwd` ; export rootme
; \
1342 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1349 ### other supporting targets
1373 for i in
$(MAKEDIRS
) ; do \
1374 echo Making
$$i...
; \
1375 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1376 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1377 if
[ ! -d
$$i ] ; then \
1378 if mkdir
$$i ; then \
1389 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1390 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1391 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1392 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1394 dir.
info: do-install-info
1395 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1396 mv
-f
dir.
info.new
dir.
info
1399 @echo
"Building a full distribution of this tree isn't done"
1400 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1409 @for i in
$(SUBDIRS
); \
1413 wd
=`basename $$pwd`; \
1414 for j in
`$(MAKE) ls`; \
1422 # with the gnu make, this is done automatically.
1424 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1425 $(SHELL
) .
/config.status
1428 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1430 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1431 config.guess config.sub config etc move-if-change \
1433 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1434 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1439 .
/configure
-rm sun4
1440 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1442 gdb.
tar.Z
: setup-dirs
1443 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1444 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1446 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1447 rm -rf proto-toplev
; mkdir proto-toplev
1448 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1449 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1452 # Put only one copy (four hard links) of COPYING in the tar file.
1453 rm proto-toplev
/bfd
/COPYING
1454 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1455 rm proto-toplev
/include/COPYING
1456 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1457 rm proto-toplev
/readline
/COPYING
1458 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1460 # Take out texinfo and glob from configurable dirs
1461 rm proto-toplev
/configure.in
1462 sed
-e
'/^host_tools=/s/texinfo //' \
1463 -e
'/^host_libs=/s/glob //' \
1464 <configure.in
>proto-toplev
/configure.in
1466 # Take out texinfo from a few places; make simple BISON=bison line.
1467 rm proto-toplev
/Makefile.in
1468 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1469 -e
'/^ install-texinfo /d' \
1470 -e
'\/^BISON =/,\/^$$/c\
1472 <Makefile.in
>proto-toplev
/Makefile.in
1474 mkdir proto-toplev
/texinfo
1475 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1476 chmod og
=u
`find proto-toplev -print`
1477 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1478 echo
"==> Making gdb-$$VER.tar.Z"; \
1479 ln
-s proto-toplev gdb-
$$VER; \
1480 tar cfh
- gdb-
$$VER \
1481 | compress
-v
>gdb-
$$VER.
tar.Z
)
1484 # end of Makefile.in