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
)
67 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
68 then echo $${rootme}/byacc/byacc ; \
72 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
73 then echo $${rootme}/flex/flex ; \
76 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
77 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
78 else echo makeinfo ; fi`
81 # libraries that may need to be augmented on a system-by-system basis
84 # compilers to use to create programs which must be run in the build
87 CXX_FOR_BUILD
= $(CXX
)
89 SUBDIRS
= "this is set via configure, don't edit this"
93 INSTALL_TARGET
= install.
all
99 if [ -f $${rootme}/gcc/Makefile ] ; then \
100 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
102 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
105 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
110 if [ -f $${rootme}/gcc/Makefile ] ; then \
111 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
113 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
116 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
120 $(start-sanitize-chill
)
121 CHILL_FOR_TARGET
= ` \
122 if [ -f $${rootme}/gcc/Makefile ] ; then \
123 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
125 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
128 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
131 $(end-sanitize-chill
)
134 if [ -f $${rootme}/gcc/Makefile ] ; then \
135 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
137 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
140 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
145 if [ -f $${rootme}/gas/Makefile ] ; then \
146 echo $${rootme}/gas/as.new ; \
148 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
151 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
156 if [ -f $${rootme}/binutils/Makefile ] ; then \
157 echo $${rootme}/binutils/ar ; \
159 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
162 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
166 RANLIB_FOR_TARGET
= ` \
167 if [ -f $${rootme}/binutils/Makefile ] ; then \
168 echo $${rootme}/binutils/ranlib ; \
170 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
173 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
178 if [ -f $${rootme}/binutils/Makefile ] ; then \
179 echo $${rootme}/binutils/nm ; \
181 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
184 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
188 # FIXME: This is badly named.
190 if [ -f $${rootme}/gcc/Makefile ] ; then \
191 if [ -f $${rootme}/newlib/Makefile ] ; then \
192 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
194 echo -I$${rootme}/gcc/include ; \
202 #### host and target specific makefile fragments come in here.
205 # Flags to pass down to all sub-makes.
206 # Please keep these in alphabetical order.
207 BASE_FLAGS_TO_PASS
= \
208 "AR_FLAGS=$(AR_FLAGS)" \
209 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
210 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
212 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
213 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
215 $(start-sanitize-chill
)\
216 "CHILLFLAGS=$(CHILLFLAGS)" \
217 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
218 "CHILL_LIB=$(CHILL_LIB)" \
219 $(end-sanitize-chill
)\
220 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
221 "CXXFLAGS=$(CXXFLAGS)" \
222 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
223 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
224 "INSTALL=$(INSTALL)" \
225 "INSTALL_DATA=$(INSTALL_DATA)" \
226 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
227 "LDFLAGS=$(LDFLAGS)" \
229 "LOADLIBES=$(LOADLIBES)" \
230 "MAKEINFO=$(MAKEINFO)" \
231 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
233 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
234 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
235 "exec_prefix=$(exec_prefix)" \
239 # Flags to pass down to most sub-makes, in which we're building with
240 # the host environment.
241 # If any variables are added here, they must be added to do-*, below.
251 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
253 # Flags that are concerned with the location of the X11 include files
255 X11_FLAGS_TO_PASS
= \
256 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
257 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
260 # Shell case of subdirectories which are built with the target environment.
261 TARGET_LIBS
=libg
++ | xiberty | newlib
262 $(start-sanitize-chill
)
263 TARGET_LIBS
=libg
++ | xiberty | newlib | chillrt
264 $(end-sanitize-chill
)
266 # Flags to pass down to makes which are built with the target environment.
267 # The double $ decreases the length of the command line; the variables
268 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
269 # If any variables are added here, they must be added to do-*, below.
270 EXTRA_TARGET_FLAGS
= \
271 'AR=$$(AR_FOR_TARGET)' \
272 'AS=$$(AS_FOR_TARGET)' \
273 'CC=$$(CC_FOR_TARGET)' \
274 'CXX=$$(CXX_FOR_TARGET)' \
275 'NM=$$(NM_FOR_TARGET)' \
276 'RANLIB=$$(RANLIB_FOR_TARGET)' \
277 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
279 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
281 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
282 # unfortunately needs the native compiler and the target ar and
284 # If any variables are added here, they must be added to do-*, below.
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 for flag in
$(EXTRA_TARGET_FLAGS
); do \
320 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
324 for flag in
$(EXTRA_GCC_FLAGS
); do \
325 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
329 for flag in
$(EXTRA_HOST_FLAGS
); do \
330 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
334 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
336 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
337 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
338 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
340 then true
; else exit
1; fi
; \
348 install-info
: install-info-dirs do-install-info
dir.
info
349 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
351 do-install-info
: install-info-dirs
353 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
354 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
355 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
356 all-make all-rcs all-cvs all-diff all-grep \
357 all-patch all-emacs all-ispell all-etc \
358 all-tcl all-tk all-expect \
360 $(start-sanitize-chill
) \
362 $(end-sanitize-chill
) \
363 all-gprof all-gnats all-send-pr all-libm all-deja-gnu \
364 all-fileutils all-find all-gawk all-sed all-shellutils \
365 all-textutils all-time all-wdiff all-uudecode \
366 all-hello all-tar all-gzip all-indent all-recode
369 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
370 all-opcodes all-bfd all-readline all-sim \
371 all-gdb all-binutils all-gcc all-newlib \
372 $(start-sanitize-chill
) \
374 $(end-sanitize-chill
) \
377 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
380 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
383 -rm -f Makefile config.status
385 clean: do-clean local-clean
386 mostlyclean: do-mostlyclean local-clean
387 distclean: do-distclean local-clean local-distclean
388 realclean: do-realclean local-clean local-distclean
391 @echo
"the uninstall target is not supported in this tree"
393 install: $(INSTALL_TARGET
)
394 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
395 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
396 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
398 install.
all: install-no-fixedincludes
399 @if
[ -f .
/gcc
/Makefile
] ; then \
400 rootme
=`pwd` ; export rootme
; \
402 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
407 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
412 $(start-sanitize-chill
) \
414 $(end-sanitize-chill
) \
462 # Install the gcc headers files, but not the fixed include files,
463 # which we are not allowed to distribute. This rule is very dependent
464 # on the workings of the gcc Makefile.in.
466 gcc-no-fixedincludes
:
467 @if
[ -f .
/gcc
/Makefile
]; then \
468 rm -rf gcc
/tmp-include
; \
469 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
471 touch gcc
/stmp-fixincludes
; \
472 rm -f gcc
/stmp-headers
; \
473 rootme
=`pwd`; export rootme
; \
474 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
476 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
477 rm -rf gcc
/include; \
478 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
481 install.cross
: install-dirs install-libiberty install-mmalloc \
482 install-binutils install-opcodes install-byacc install-flex \
483 install-ld install-gas install-readline \
484 install-glob install-gdb install-mmalloc \
486 $(start-sanitize-chill
) \
488 $(end-sanitize-chill
) \
489 install-gcc install-etc install-deja-gnu
492 all-gzip
: all-libiberty
493 @if
[ -f .
/gzip
/Makefile
] ; then \
494 rootme
=`pwd` ; export rootme
; \
495 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
501 @if
[ -f .
/gzip
/Makefile
] ; then \
502 rootme
=`pwd` ; export rootme
; \
503 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
509 all-hello
: all-libiberty
510 @if
[ -f .
/hello
/Makefile
] ; then \
511 rootme
=`pwd` ; export rootme
; \
512 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
518 @if
[ -f .
/hello
/Makefile
] ; then \
519 rootme
=`pwd` ; export rootme
; \
520 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
526 all-recode
: all-libiberty
527 @if
[ -f .
/recode
/Makefile
] ; then \
528 rootme
=`pwd` ; export rootme
; \
529 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
534 install-recode
: force
535 @if
[ -f .
/recode
/Makefile
] ; then \
536 rootme
=`pwd` ; export rootme
; \
537 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
544 @if
[ -f .
/indent
/Makefile
] ; then \
545 rootme
=`pwd` ; export rootme
; \
546 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
551 install-indent
: force
552 @if
[ -f .
/indent
/Makefile
] ; then \
553 rootme
=`pwd` ; export rootme
; \
554 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
560 all-tar
: all-libiberty
561 @if
[ -f .
/tar/Makefile
] ; then \
562 rootme
=`pwd` ; export rootme
; \
563 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
569 @if
[ -f .
/tar/Makefile
] ; then \
570 rootme
=`pwd` ; export rootme
; \
571 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
579 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
580 rootme
=`pwd` ; export rootme
; \
581 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
586 install-deja-gnu
: force
587 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
588 rootme
=`pwd` ; export rootme
; \
589 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
596 @if
[ -f .
/autoconf
/Makefile
] ; then \
597 rootme
=`pwd` ; export rootme
; \
598 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
603 install-autoconf
: force
604 @if
[ -f .
/autoconf
/Makefile
] ; then \
605 rootme
=`pwd` ; export rootme
; \
606 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
613 @if
[ -f .
/etc
/Makefile
] ; then \
614 rootme
=`pwd` ; export rootme
; \
615 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
621 @if
[ -f .
/etc
/Makefile
] ; then \
622 rootme
=`pwd` ; export rootme
; \
623 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
630 @if
[ -f .
/libiberty
/Makefile
] ; then \
631 rootme
=`pwd` ; export rootme
; \
633 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
638 install-libiberty
: force
639 @if
[ -f .
/libiberty
/Makefile
] ; then \
640 rootme
=`pwd` ; export rootme
; \
642 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
648 all-xiberty
: all-gcc all-newlib
649 @if
[ -f .
/xiberty
/Makefile
] ; then \
650 rootme
=`pwd` ; export rootme
; \
651 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
653 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
658 install-xiberty
: force
659 @if
[ -f .
/xiberty
/Makefile
] ; then \
660 rootme
=`pwd` ; export rootme
; \
661 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
663 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
670 @if
[ -f .
/mmalloc
/Makefile
] ; then \
671 rootme
=`pwd` ; export rootme
; \
673 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
678 install-mmalloc
: force
679 @if
[ -f .
/mmalloc
/Makefile
] ; then \
680 rootme
=`pwd` ; export rootme
; \
682 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
688 all-texinfo
: all-libiberty
689 @if
[ -f .
/texinfo
/Makefile
] ; then \
690 rootme
=`pwd` ; export rootme
; \
692 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
697 install-texinfo
: force
698 @if
[ -f .
/texinfo
/Makefile
] ; then \
699 rootme
=`pwd` ; export rootme
; \
701 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
708 @if
[ -f .
/bfd
/Makefile
] ; then \
709 rootme
=`pwd` ; export rootme
; \
711 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
717 @if
[ -f .
/bfd
/Makefile
] ; then \
718 rootme
=`pwd` ; export rootme
; \
720 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
728 @if
[ -f .
/opcodes
/Makefile
] ; then \
729 rootme
=`pwd` ; export rootme
; \
731 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
736 install-opcodes
: force
737 @if
[ -f .
/opcodes
/Makefile
] ; then \
738 rootme
=`pwd` ; export rootme
; \
740 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
746 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
747 @if
[ -f .
/binutils
/Makefile
] ; then \
748 rootme
=`pwd` ; export rootme
; \
750 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
755 install-binutils
: force
756 @if
[ -f .
/binutils
/Makefile
] ; then \
757 rootme
=`pwd` ; export rootme
; \
759 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
765 all-newlib
: all-binutils all-ld all-gas all-gcc
766 @if
[ -f .
/newlib
/Makefile
] ; then \
767 rootme
=`pwd` ; export rootme
; \
768 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
770 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
775 install-newlib
: force
776 @if
[ -f .
/newlib
/Makefile
] ; then \
777 rootme
=`pwd` ; export rootme
; \
778 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
780 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
785 ### start-sanitize-chill
787 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
788 @if
[ -f .
/chillrt
/Makefile
] ; then \
789 rootme
=`pwd` ; export rootme
; \
790 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
792 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
797 install-chillrt
: force
798 @if
[ -f .
/chillrt
/Makefile
] ; then \
799 rootme
=`pwd` ; export rootme
; \
800 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
802 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
806 ### end-sanitize-chill
809 all-gprof
: all-libiberty all-bfd
810 @if
[ -f .
/gprof
/Makefile
] ; then \
811 rootme
=`pwd` ; export rootme
; \
813 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
819 @if
[ -f .
/gprof
/Makefile
] ; then \
820 rootme
=`pwd` ; export rootme
; \
822 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
829 @if
[ -f .
/byacc
/Makefile
] ; then \
830 rootme
=`pwd` ; export rootme
; \
832 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
838 @if
[ -f .
/byacc
/Makefile
] ; then \
839 rootme
=`pwd` ; export rootme
; \
841 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
847 all-flex
: all-libiberty
848 @if
[ -f .
/flex
/Makefile
] ; then \
849 rootme
=`pwd` ; export rootme
; \
851 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
857 @if
[ -f .
/flex
/Makefile
] ; then \
858 rootme
=`pwd` ; export rootme
; \
860 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
865 all-gcc
: all-libiberty all-byacc all-binutils all-gas
866 @if
[ -f .
/gcc
/Makefile
] ; then \
867 rootme
=`pwd` ; export rootme
; \
868 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
870 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
876 @if
[ -f .
/gcc
/Makefile
] ; then \
877 rootme
=`pwd` ; export rootme
; \
878 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
880 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
887 @if
[ -f .
/readline
/Makefile
] ; then \
888 rootme
=`pwd` ; export rootme
; \
890 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
895 install-readline
: force
896 @if
[ -f .
/readline
/Makefile
] ; then \
897 rootme
=`pwd` ; export rootme
; \
899 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
906 @if
[ -f .
/glob
/Makefile
] ; then \
907 rootme
=`pwd` ; export rootme
; \
909 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
915 @if
[ -f .
/glob
/Makefile
] ; then \
916 rootme
=`pwd` ; export rootme
; \
918 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
924 all-gas
: all-libiberty all-opcodes all-bfd
925 @if
[ -f .
/gas
/Makefile
] ; then \
926 rootme
=`pwd` ; export rootme
; \
928 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
934 @if
[ -f .
/gas
/Makefile
] ; then \
935 rootme
=`pwd` ; export rootme
; \
937 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
943 all-tgas
: all-libiberty all-bfd
944 @if
[ -f .
/tgas
/Makefile
] ; then \
945 rootme
=`pwd` ; export rootme
; \
947 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
954 all-ld
: all-libiberty all-bfd all-byacc all-flex
955 @if
[ -f .
/ld/Makefile
] ; then \
956 rootme
=`pwd` ; export rootme
; \
958 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
964 @if
[ -f .
/ld/Makefile
] ; then \
965 rootme
=`pwd` ; export rootme
; \
967 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
973 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
974 @if
[ -f .
/gdb
/Makefile
] ; then \
975 rootme
=`pwd` ; export rootme
; \
977 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
983 @if
[ -f .
/gdb
/Makefile
] ; then \
984 rootme
=`pwd` ; export rootme
; \
986 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
992 all-make
: all-libiberty
993 @if
[ -f .
/make
/Makefile
] ; then \
994 rootme
=`pwd` ; export rootme
; \
996 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1002 @if
[ -f .
/make
/Makefile
] ; then \
1003 rootme
=`pwd` ; export rootme
; \
1005 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1011 all-diff
: all-libiberty
1012 @if
[ -f .
/diff
/Makefile
] ; then \
1013 rootme
=`pwd` ; export rootme
; \
1015 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1021 @if
[ -f .
/diff
/Makefile
] ; then \
1022 rootme
=`pwd` ; export rootme
; \
1024 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1031 @if
[ -f .
/grep
/Makefile
] ; then \
1032 rootme
=`pwd` ; export rootme
; \
1034 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1040 @if
[ -f .
/grep
/Makefile
] ; then \
1041 rootme
=`pwd` ; export rootme
; \
1043 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1050 @if
[ -f .
/rcs
/Makefile
] ; then \
1051 rootme
=`pwd` ; export rootme
; \
1053 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1059 @if
[ -f .
/rcs
/Makefile
] ; then \
1060 rootme
=`pwd` ; export rootme
; \
1062 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1069 @if
[ -f .
/cvs
/Makefile
] ; then \
1070 rootme
=`pwd` ; export rootme
; \
1072 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1078 @if
[ -f .
/cvs
/Makefile
] ; then \
1079 rootme
=`pwd` ; export rootme
; \
1081 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1088 @if
[ -f .
/patch
/Makefile
] ; then \
1089 rootme
=`pwd` ; export rootme
; \
1091 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1096 install-patch
: force
1097 @if
[ -f .
/patch
/Makefile
] ; then \
1098 rootme
=`pwd` ; export rootme
; \
1100 $(MAKE
) $(FLAGS_TO_PASS
) \
1102 man1dir=$(man1dir) install) ; \
1109 @if
[ -f .
/emacs
/Makefile
] ; then \
1110 rootme
=`pwd` ; export rootme
; \
1112 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1117 install-emacs
: force
1118 @if
[ -f .
/emacs
/Makefile
] ; then \
1119 rootme
=`pwd` ; export rootme
; \
1121 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1127 all-ispell
: all-emacs
1128 @if
[ -f .
/ispell
/Makefile
] ; then \
1129 rootme
=`pwd` ; export rootme
; \
1131 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1136 install-ispell
: force
1137 @if
[ -f .
/ispell
/Makefile
] ; then \
1138 rootme
=`pwd` ; export rootme
; \
1140 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1147 @if
[ -f .
/gnats
/Makefile
] ; then \
1148 rootme
=`pwd` ; export rootme
; \
1150 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1155 install-gnats
: force
1156 @if
[ -f .
/gnats
/Makefile
] ; then \
1157 rootme
=`pwd` ; export rootme
; \
1159 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1166 @if
[ -f .
/send-pr
/Makefile
] ; then \
1167 rootme
=`pwd` ; export rootme
; \
1169 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1174 install-send-pr
: force
1175 @if
[ -f .
/send-pr
/Makefile
] ; then \
1176 rootme
=`pwd` ; export rootme
; \
1178 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1185 @if
[ -f .
/libm
/Makefile
] ; then \
1186 rootme
=`pwd` ; export rootme
; \
1188 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1194 @if
[ -f .
/libm
/Makefile
] ; then \
1195 rootme
=`pwd` ; export rootme
; \
1197 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1204 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1205 @if
[ -f .
/libg
++/Makefile
] ; then \
1206 rootme
=`pwd` ; export rootme
; \
1207 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1209 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1214 install-libg
++: force
1215 @if
[ -f .
/libg
++/Makefile
] ; then \
1216 rootme
=`pwd` ; export rootme
; \
1217 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1219 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1225 @if
[ -f .
/tcl
/Makefile
] ; then \
1226 rootme
=`pwd` ; export rootme
; \
1227 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1229 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1235 @if
[ -f .
/tcl
/Makefile
] ; then \
1236 rootme
=`pwd` ; export rootme
; \
1237 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1239 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1247 @if
[ -f .
/tk
/Makefile
] ; then \
1248 rootme
=`pwd` ; export rootme
; \
1249 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1251 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1257 @if
[ -f .
/tk
/Makefile
] ; then \
1258 rootme
=`pwd` ; export rootme
; \
1259 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1261 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1268 @if
[ -f .
/expect
/Makefile
] ; then \
1269 rootme
=`pwd` ; export rootme
; \
1270 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1272 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1277 install-expect
: force
1278 @if
[ -f .
/expect
/Makefile
] ; then \
1279 rootme
=`pwd` ; export rootme
; \
1280 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1282 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1289 @if
[ -f .
/sim
/Makefile
] ; then \
1290 rootme
=`pwd` ; export rootme
; \
1292 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1298 @if
[ -f .
/sim
/Makefile
] ; then \
1299 rootme
=`pwd` ; export rootme
; \
1301 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1307 all-fileutils
: force
1308 @if
[ -f .
/fileutils
/Makefile
] ; then \
1309 rootme
=`pwd` ; export rootme
; \
1310 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1315 install-fileutils
: force
1316 @if
[ -f .
/fileutils
/Makefile
] ; then \
1317 rootme
=`pwd` ; export rootme
; \
1318 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1325 @if
[ -f .
/find
/Makefile
] ; then \
1326 rootme
=`pwd` ; export rootme
; \
1327 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1333 @if
[ -f .
/find
/Makefile
] ; then \
1334 rootme
=`pwd` ; export rootme
; \
1335 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1342 @if
[ -f .
/gawk
/Makefile
] ; then \
1343 rootme
=`pwd` ; export rootme
; \
1344 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1350 @if
[ -f .
/gawk
/Makefile
] ; then \
1351 rootme
=`pwd` ; export rootme
; \
1352 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1358 all-m4
: all-libiberty
1359 @if
[ -f .
/m4
/Makefile
] ; then \
1360 rootme
=`pwd` ; export rootme
; \
1361 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1367 @if
[ -f .
/m4
/Makefile
] ; then \
1368 rootme
=`pwd` ; export rootme
; \
1369 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1376 @if
[ -f .
/sed
/Makefile
] ; then \
1377 rootme
=`pwd` ; export rootme
; \
1378 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1384 @if
[ -f .
/sed
/Makefile
] ; then \
1385 rootme
=`pwd` ; export rootme
; \
1386 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1393 @if
[ -f .
/time
/Makefile
] ; then \
1394 rootme
=`pwd` ; export rootme
; \
1395 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1401 @if
[ -f .
/time
/Makefile
] ; then \
1402 rootme
=`pwd` ; export rootme
; \
1403 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1410 @if
[ -f .
/wdiff
/Makefile
] ; then \
1411 rootme
=`pwd` ; export rootme
; \
1412 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1417 install-wdiff
: force
1418 @if
[ -f .
/wdiff
/Makefile
] ; then \
1419 rootme
=`pwd` ; export rootme
; \
1420 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1426 all-uudecode
: all-libiberty
1427 @if
[ -f .
/uudecode
/Makefile
] ; then \
1428 rootme
=`pwd` ; export rootme
; \
1429 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1434 install-uudecode
: force
1435 @if
[ -f .
/uudecode
/Makefile
] ; then \
1436 rootme
=`pwd` ; export rootme
; \
1437 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1443 all-shellutils
: force
1444 @if
[ -f .
/shellutils
/Makefile
] ; then \
1445 rootme
=`pwd` ; export rootme
; \
1446 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1451 install-shellutils
: force
1452 @if
[ -f .
/shellutils
/Makefile
] ; then \
1453 rootme
=`pwd` ; export rootme
; \
1454 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1460 all-textutils
: force
1461 @if
[ -f .
/textutils
/Makefile
] ; then \
1462 rootme
=`pwd` ; export rootme
; \
1463 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1468 install-textutils
: force
1469 @if
[ -f .
/textutils
/Makefile
] ; then \
1470 rootme
=`pwd` ; export rootme
; \
1471 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1478 ### other supporting targets
1502 for i in
$(MAKEDIRS
) ; do \
1503 echo Making
$$i...
; \
1504 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1505 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1506 if
[ ! -d
$$i ] ; then \
1507 if mkdir
$$i ; then \
1518 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1519 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1520 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1521 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1523 dir.
info: do-install-info
1524 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1525 mv
-f
dir.
info.new
dir.
info
1528 @echo
"Building a full distribution of this tree isn't done"
1529 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1538 @for i in
$(SUBDIRS
); \
1542 wd
=`basename $$pwd`; \
1543 for j in
`$(MAKE) ls`; \
1551 # with the gnu make, this is done automatically.
1553 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1554 $(SHELL
) .
/config.status
1557 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1559 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1560 config.guess config.sub config move-if-change
1561 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1563 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1564 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1569 .
/configure
-rm sun4
1570 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1572 gdb.
tar.Z
: setup-dirs
1573 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
1574 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1576 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1577 rm -rf proto-toplev
; mkdir proto-toplev
1578 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1579 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1582 mkdir proto-toplev
/etc
1583 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1584 ln
-s ..
/..
/etc
/$$i .
; \
1586 # Put only one copy (four hard links) of COPYING in the tar file.
1587 rm proto-toplev
/bfd
/COPYING
1588 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1589 rm proto-toplev
/include/COPYING
1590 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1591 rm proto-toplev
/readline
/COPYING
1592 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1594 # Take out texinfo and glob from configurable dirs
1595 rm proto-toplev
/configure.in
1596 sed
-e
'/^host_tools=/s/texinfo //' \
1597 -e
'/^host_libs=/s/glob //' \
1598 <configure.in
>proto-toplev
/configure.in
1600 # Take out texinfo from a few places; make simple BISON=bison line.
1601 rm proto-toplev
/Makefile.in
1602 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1603 -e
'/^ install-texinfo /d' \
1604 -e
'\/^BISON =/,\/^$$/c\
1606 <Makefile.in
>proto-toplev
/Makefile.in
1608 mkdir proto-toplev
/texinfo
1609 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1610 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1611 chmod og
=u
`find proto-toplev -print`
1612 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1613 echo
"==> Making gdb-$$VER.tar.Z"; \
1614 ln
-s proto-toplev gdb-
$$VER; \
1615 tar cfh
- gdb-
$$VER \
1616 | compress
-v
>gdb-
$$VER.
tar.Z
)
1617 $(GZIP
) -d
<gdb-
$$VER.
tar.Z |
$(GZIP
) -9 -v
>gdb-
$$VER.
tar.z
1619 # end of Makefile.in