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 ; \
201 #### host and target specific makefile fragments come in here.
204 # Flags to pass down to all sub-makes.
205 # Please keep these in alphabetical order.
206 BASE_FLAGS_TO_PASS
= \
207 "AR_FLAGS=$(AR_FLAGS)" \
208 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
209 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
211 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
212 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
214 $(start-sanitize-chill
)\
215 "CHILLFLAGS=$(CHILLFLAGS)" \
216 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
217 "CHILL_LIB=$(CHILL_LIB)" \
218 $(end-sanitize-chill
)\
219 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
220 "CXXFLAGS=$(CXXFLAGS)" \
221 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
222 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
223 "INSTALL=$(INSTALL)" \
224 "INSTALL_DATA=$(INSTALL_DATA)" \
225 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
226 "LDFLAGS=$(LDFLAGS)" \
228 "LOADLIBES=$(LOADLIBES)" \
229 "MAKEINFO=$(MAKEINFO)" \
230 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
231 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
232 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
233 "exec_prefix=$(exec_prefix)" \
237 # Flags to pass down to most sub-makes, in which we're building with
238 # the host environment.
239 # If any variables are added here, they must be added to do-*, below.
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 # If any variables are added here, they must be added to do-*, below.
268 EXTRA_TARGET_FLAGS
= \
269 'AR=$$(AR_FOR_TARGET)' \
270 'AS=$$(AS_FOR_TARGET)' \
271 'CC=$$(CC_FOR_TARGET)' \
272 'CXX=$$(CXX_FOR_TARGET)' \
273 'NM=$$(NM_FOR_TARGET)' \
274 'RANLIB=$$(RANLIB_FOR_TARGET)' \
275 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
277 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
279 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
280 # unfortunately needs the native compiler and the target ar and
282 # If any variables are added here, they must be added to do-*, below.
284 'AR=$$(AR_FOR_TARGET)' \
289 'RANLIB=$$(RANLIB_FOR_TARGET)' \
292 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
294 # The first rule in the file had better be this one. Don't put any above it.
297 .PHONY
: all check dvi info install-info install-info-dirs
298 .PHONY
: do-info do-check do-dvi do-install-info
299 .PHONY
: do-clean do-mostlyclean do-distclean do-realclean
302 # Do a target for all the subdirectories. A ``make do-X'' will do a
303 # ``make X'' in all subdirectories (because, in general, X depends on
304 # fdo-X, a ``make X'' will also do this, but it may do additional work
306 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
307 # because it is so large that it can easily overflow the command line
308 # length limit on some systems.
309 do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean
:
310 @target
=`echo $@ | sed -e 's/^do-//'`; \
311 rootme
=`pwd`; export rootme
; \
312 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
313 for i in
$(SUBDIRS
); do \
314 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
]; then \
317 for flag in
$(EXTRA_TARGET_FLAGS
); do \
318 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
322 for flag in
$(EXTRA_GCC_FLAGS
); do \
323 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
327 for flag in
$(EXTRA_HOST_FLAGS
); do \
328 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
332 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
334 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
335 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
336 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
338 then true
; else exit
1; fi
; \
346 install-info
: install-info-dirs do-install-info
dir.
info
347 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
349 do-install-info
: install-info-dirs
351 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
352 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
353 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
354 all-make all-rcs all-cvs all-diff all-grep \
355 all-patch all-emacs all-ispell all-etc \
356 all-tcl all-tk all-expect \
358 $(start-sanitize-chill
) \
360 $(end-sanitize-chill
) \
361 all-gprof all-prms all-send-pr all-libm all-deja-gnu \
362 all-fileutils all-find all-gawk all-sed all-shellutils \
363 all-textutils all-time all-wdiff all-uudecode \
364 all-hello all-tar all-gzip all-indent all-recode
367 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
368 all-opcodes all-bfd all-readline all-sim \
369 all-gdb all-binutils all-gcc all-newlib \
370 $(start-sanitize-chill
) \
372 $(end-sanitize-chill
) \
375 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
378 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
381 -rm -f Makefile config.status
383 clean: do-clean local-clean
384 mostlyclean: do-mostlyclean local-clean
385 distclean: do-distclean local-clean local-distclean
386 realclean: do-realclean local-clean local-distclean
389 @echo
"the uninstall target is not supported in this tree"
391 install: $(INSTALL_TARGET
)
392 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
393 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
394 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
396 install.
all: install-no-fixedincludes
397 @if
[ -f .
/gcc
/Makefile
] ; then \
398 rootme
=`pwd` ; export rootme
; \
400 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
405 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
410 $(start-sanitize-chill
) \
412 $(end-sanitize-chill
) \
460 # Install the gcc headers files, but not the fixed include files,
461 # which we are not allowed to distribute. This rule is very dependent
462 # on the workings of the gcc Makefile.in.
464 gcc-no-fixedincludes
:
465 @if
[ -f .
/gcc
/Makefile
]; then \
466 rm -rf gcc
/tmp-include
; \
467 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
469 touch gcc
/stmp-fixincludes
; \
470 rm -f gcc
/stmp-headers
; \
471 rootme
=`pwd`; export rootme
; \
472 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
474 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
475 rm -rf gcc
/include; \
476 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
479 install.cross
: install-dirs install-libiberty install-mmalloc \
480 install-binutils install-opcodes install-byacc install-flex \
481 install-ld install-gas install-readline \
482 install-glob install-gdb install-mmalloc \
484 $(start-sanitize-chill
) \
486 $(end-sanitize-chill
) \
487 install-gcc install-etc install-deja-gnu
490 all-gzip
: all-libiberty
491 @if
[ -f .
/gzip
/Makefile
] ; then \
492 rootme
=`pwd` ; export rootme
; \
493 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
499 @if
[ -f .
/gzip
/Makefile
] ; then \
500 rootme
=`pwd` ; export rootme
; \
501 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
507 all-hello
: all-libiberty
508 @if
[ -f .
/hello
/Makefile
] ; then \
509 rootme
=`pwd` ; export rootme
; \
510 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
516 @if
[ -f .
/hello
/Makefile
] ; then \
517 rootme
=`pwd` ; export rootme
; \
518 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
524 all-recode
: all-libiberty
525 @if
[ -f .
/recode
/Makefile
] ; then \
526 rootme
=`pwd` ; export rootme
; \
527 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
532 install-recode
: force
533 @if
[ -f .
/recode
/Makefile
] ; then \
534 rootme
=`pwd` ; export rootme
; \
535 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
542 @if
[ -f .
/indent
/Makefile
] ; then \
543 rootme
=`pwd` ; export rootme
; \
544 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
549 install-indent
: force
550 @if
[ -f .
/indent
/Makefile
] ; then \
551 rootme
=`pwd` ; export rootme
; \
552 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
558 all-tar
: all-libiberty
559 @if
[ -f .
/tar/Makefile
] ; then \
560 rootme
=`pwd` ; export rootme
; \
561 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
567 @if
[ -f .
/tar/Makefile
] ; then \
568 rootme
=`pwd` ; export rootme
; \
569 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
577 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
578 rootme
=`pwd` ; export rootme
; \
579 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
584 install-deja-gnu
: force
585 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
586 rootme
=`pwd` ; export rootme
; \
587 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
594 @if
[ -f .
/autoconf
/Makefile
] ; then \
595 rootme
=`pwd` ; export rootme
; \
596 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
601 install-autoconf
: force
602 @if
[ -f .
/autoconf
/Makefile
] ; then \
603 rootme
=`pwd` ; export rootme
; \
604 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
611 @if
[ -f .
/etc
/Makefile
] ; then \
612 rootme
=`pwd` ; export rootme
; \
613 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
619 @if
[ -f .
/etc
/Makefile
] ; then \
620 rootme
=`pwd` ; export rootme
; \
621 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
628 @if
[ -f .
/libiberty
/Makefile
] ; then \
629 rootme
=`pwd` ; export rootme
; \
631 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
636 install-libiberty
: force
637 @if
[ -f .
/libiberty
/Makefile
] ; then \
638 rootme
=`pwd` ; export rootme
; \
640 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
646 all-xiberty
: all-gcc all-newlib
647 @if
[ -f .
/xiberty
/Makefile
] ; then \
648 rootme
=`pwd` ; export rootme
; \
649 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
651 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
656 install-xiberty
: force
657 @if
[ -f .
/xiberty
/Makefile
] ; then \
658 rootme
=`pwd` ; export rootme
; \
659 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
661 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
668 @if
[ -f .
/mmalloc
/Makefile
] ; then \
669 rootme
=`pwd` ; export rootme
; \
671 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
676 install-mmalloc
: force
677 @if
[ -f .
/mmalloc
/Makefile
] ; then \
678 rootme
=`pwd` ; export rootme
; \
680 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
686 all-texinfo
: all-libiberty
687 @if
[ -f .
/texinfo
/Makefile
] ; then \
688 rootme
=`pwd` ; export rootme
; \
690 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
695 install-texinfo
: force
696 @if
[ -f .
/texinfo
/Makefile
] ; then \
697 rootme
=`pwd` ; export rootme
; \
699 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
706 @if
[ -f .
/bfd
/Makefile
] ; then \
707 rootme
=`pwd` ; export rootme
; \
709 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
715 @if
[ -f .
/bfd
/Makefile
] ; then \
716 rootme
=`pwd` ; export rootme
; \
718 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
726 @if
[ -f .
/opcodes
/Makefile
] ; then \
727 rootme
=`pwd` ; export rootme
; \
729 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
734 install-opcodes
: force
735 @if
[ -f .
/opcodes
/Makefile
] ; then \
736 rootme
=`pwd` ; export rootme
; \
738 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
744 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
745 @if
[ -f .
/binutils
/Makefile
] ; then \
746 rootme
=`pwd` ; export rootme
; \
748 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
753 install-binutils
: force
754 @if
[ -f .
/binutils
/Makefile
] ; then \
755 rootme
=`pwd` ; export rootme
; \
757 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
763 all-newlib
: all-binutils all-ld all-gas all-gcc
764 @if
[ -f .
/newlib
/Makefile
] ; then \
765 rootme
=`pwd` ; export rootme
; \
766 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
768 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
773 install-newlib
: force
774 @if
[ -f .
/newlib
/Makefile
] ; then \
775 rootme
=`pwd` ; export rootme
; \
776 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
778 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
783 ### start-sanitize-chill
785 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
786 @if
[ -f .
/chillrt
/Makefile
] ; then \
787 rootme
=`pwd` ; export rootme
; \
788 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
790 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
795 install-chillrt
: force
796 @if
[ -f .
/chillrt
/Makefile
] ; then \
797 rootme
=`pwd` ; export rootme
; \
798 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
800 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
804 ### end-sanitize-chill
807 all-gprof
: all-libiberty all-bfd
808 @if
[ -f .
/gprof
/Makefile
] ; then \
809 rootme
=`pwd` ; export rootme
; \
811 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
817 @if
[ -f .
/gprof
/Makefile
] ; then \
818 rootme
=`pwd` ; export rootme
; \
820 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
827 @if
[ -f .
/byacc
/Makefile
] ; then \
828 rootme
=`pwd` ; export rootme
; \
830 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
836 @if
[ -f .
/byacc
/Makefile
] ; then \
837 rootme
=`pwd` ; export rootme
; \
839 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
845 all-flex
: all-libiberty
846 @if
[ -f .
/flex
/Makefile
] ; then \
847 rootme
=`pwd` ; export rootme
; \
849 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
855 @if
[ -f .
/flex
/Makefile
] ; then \
856 rootme
=`pwd` ; export rootme
; \
858 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
863 all-gcc
: all-libiberty all-byacc all-binutils all-gas
864 @if
[ -f .
/gcc
/Makefile
] ; then \
865 rootme
=`pwd` ; export rootme
; \
866 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
868 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
874 @if
[ -f .
/gcc
/Makefile
] ; then \
875 rootme
=`pwd` ; export rootme
; \
876 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
878 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
885 @if
[ -f .
/readline
/Makefile
] ; then \
886 rootme
=`pwd` ; export rootme
; \
888 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
893 install-readline
: force
894 @if
[ -f .
/readline
/Makefile
] ; then \
895 rootme
=`pwd` ; export rootme
; \
897 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
904 @if
[ -f .
/glob
/Makefile
] ; then \
905 rootme
=`pwd` ; export rootme
; \
907 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
913 @if
[ -f .
/glob
/Makefile
] ; then \
914 rootme
=`pwd` ; export rootme
; \
916 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
922 all-gas
: all-libiberty all-opcodes all-bfd
923 @if
[ -f .
/gas
/Makefile
] ; then \
924 rootme
=`pwd` ; export rootme
; \
926 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
932 @if
[ -f .
/gas
/Makefile
] ; then \
933 rootme
=`pwd` ; export rootme
; \
935 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
941 all-tgas
: all-libiberty all-bfd
942 @if
[ -f .
/tgas
/Makefile
] ; then \
943 rootme
=`pwd` ; export rootme
; \
945 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
952 all-ld
: all-libiberty all-bfd all-byacc all-flex
953 @if
[ -f .
/ld/Makefile
] ; then \
954 rootme
=`pwd` ; export rootme
; \
956 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
962 @if
[ -f .
/ld/Makefile
] ; then \
963 rootme
=`pwd` ; export rootme
; \
965 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
971 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
972 @if
[ -f .
/gdb
/Makefile
] ; then \
973 rootme
=`pwd` ; export rootme
; \
975 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
981 @if
[ -f .
/gdb
/Makefile
] ; then \
982 rootme
=`pwd` ; export rootme
; \
984 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
990 all-make
: all-libiberty
991 @if
[ -f .
/make
/Makefile
] ; then \
992 rootme
=`pwd` ; export rootme
; \
994 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1000 @if
[ -f .
/make
/Makefile
] ; then \
1001 rootme
=`pwd` ; export rootme
; \
1003 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1009 all-diff
: all-libiberty
1010 @if
[ -f .
/diff
/Makefile
] ; then \
1011 rootme
=`pwd` ; export rootme
; \
1013 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1019 @if
[ -f .
/diff
/Makefile
] ; then \
1020 rootme
=`pwd` ; export rootme
; \
1022 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1029 @if
[ -f .
/grep
/Makefile
] ; then \
1030 rootme
=`pwd` ; export rootme
; \
1032 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1038 @if
[ -f .
/grep
/Makefile
] ; then \
1039 rootme
=`pwd` ; export rootme
; \
1041 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1048 @if
[ -f .
/rcs
/Makefile
] ; then \
1049 rootme
=`pwd` ; export rootme
; \
1051 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1057 @if
[ -f .
/rcs
/Makefile
] ; then \
1058 rootme
=`pwd` ; export rootme
; \
1060 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1067 @if
[ -f .
/cvs
/Makefile
] ; then \
1068 rootme
=`pwd` ; export rootme
; \
1070 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1076 @if
[ -f .
/cvs
/Makefile
] ; then \
1077 rootme
=`pwd` ; export rootme
; \
1079 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1086 @if
[ -f .
/patch
/Makefile
] ; then \
1087 rootme
=`pwd` ; export rootme
; \
1089 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1094 install-patch
: force
1095 @if
[ -f .
/patch
/Makefile
] ; then \
1096 rootme
=`pwd` ; export rootme
; \
1098 $(MAKE
) $(FLAGS_TO_PASS
) \
1100 man1dir=$(man1dir) install) ; \
1107 @if
[ -f .
/emacs
/Makefile
] ; then \
1108 rootme
=`pwd` ; export rootme
; \
1110 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1115 install-emacs
: force
1116 @if
[ -f .
/emacs
/Makefile
] ; then \
1117 rootme
=`pwd` ; export rootme
; \
1119 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1125 all-ispell
: all-emacs
1126 @if
[ -f .
/ispell
/Makefile
] ; then \
1127 rootme
=`pwd` ; export rootme
; \
1129 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1134 install-ispell
: force
1135 @if
[ -f .
/ispell
/Makefile
] ; then \
1136 rootme
=`pwd` ; export rootme
; \
1138 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1145 @if
[ -f .
/prms
/Makefile
] ; then \
1146 rootme
=`pwd` ; export rootme
; \
1148 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1154 @if
[ -f .
/prms
/Makefile
] ; then \
1155 rootme
=`pwd` ; export rootme
; \
1157 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1164 @if
[ -f .
/send-pr
/Makefile
] ; then \
1165 rootme
=`pwd` ; export rootme
; \
1167 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1172 install-send-pr
: force
1173 @if
[ -f .
/send-pr
/Makefile
] ; then \
1174 rootme
=`pwd` ; export rootme
; \
1176 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1183 @if
[ -f .
/libm
/Makefile
] ; then \
1184 rootme
=`pwd` ; export rootme
; \
1186 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1192 @if
[ -f .
/libm
/Makefile
] ; then \
1193 rootme
=`pwd` ; export rootme
; \
1195 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1202 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1203 @if
[ -f .
/libg
++/Makefile
] ; then \
1204 rootme
=`pwd` ; export rootme
; \
1205 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1207 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1212 install-libg
++: force
1213 @if
[ -f .
/libg
++/Makefile
] ; then \
1214 rootme
=`pwd` ; export rootme
; \
1215 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1217 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1223 @if
[ -f .
/tcl
/Makefile
] ; then \
1224 rootme
=`pwd` ; export rootme
; \
1225 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1227 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1233 @if
[ -f .
/tcl
/Makefile
] ; then \
1234 rootme
=`pwd` ; export rootme
; \
1235 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1237 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1245 @if
[ -f .
/tk
/Makefile
] ; then \
1246 rootme
=`pwd` ; export rootme
; \
1247 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1249 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1255 @if
[ -f .
/tk
/Makefile
] ; then \
1256 rootme
=`pwd` ; export rootme
; \
1257 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1259 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1266 @if
[ -f .
/expect
/Makefile
] ; then \
1267 rootme
=`pwd` ; export rootme
; \
1268 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1270 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1275 install-expect
: force
1276 @if
[ -f .
/expect
/Makefile
] ; then \
1277 rootme
=`pwd` ; export rootme
; \
1278 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1280 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1287 @if
[ -f .
/sim
/Makefile
] ; then \
1288 rootme
=`pwd` ; export rootme
; \
1290 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1296 @if
[ -f .
/sim
/Makefile
] ; then \
1297 rootme
=`pwd` ; export rootme
; \
1299 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1305 all-fileutils
: force
1306 @if
[ -f .
/fileutils
/Makefile
] ; then \
1307 rootme
=`pwd` ; export rootme
; \
1308 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1313 install-fileutils
: force
1314 @if
[ -f .
/fileutils
/Makefile
] ; then \
1315 rootme
=`pwd` ; export rootme
; \
1316 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1323 @if
[ -f .
/find
/Makefile
] ; then \
1324 rootme
=`pwd` ; export rootme
; \
1325 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1331 @if
[ -f .
/find
/Makefile
] ; then \
1332 rootme
=`pwd` ; export rootme
; \
1333 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1340 @if
[ -f .
/gawk
/Makefile
] ; then \
1341 rootme
=`pwd` ; export rootme
; \
1342 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1348 @if
[ -f .
/gawk
/Makefile
] ; then \
1349 rootme
=`pwd` ; export rootme
; \
1350 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1356 all-m4
: all-libiberty
1357 @if
[ -f .
/m4
/Makefile
] ; then \
1358 rootme
=`pwd` ; export rootme
; \
1359 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1365 @if
[ -f .
/m4
/Makefile
] ; then \
1366 rootme
=`pwd` ; export rootme
; \
1367 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1374 @if
[ -f .
/sed
/Makefile
] ; then \
1375 rootme
=`pwd` ; export rootme
; \
1376 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1382 @if
[ -f .
/sed
/Makefile
] ; then \
1383 rootme
=`pwd` ; export rootme
; \
1384 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1391 @if
[ -f .
/time
/Makefile
] ; then \
1392 rootme
=`pwd` ; export rootme
; \
1393 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1399 @if
[ -f .
/time
/Makefile
] ; then \
1400 rootme
=`pwd` ; export rootme
; \
1401 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1408 @if
[ -f .
/wdiff
/Makefile
] ; then \
1409 rootme
=`pwd` ; export rootme
; \
1410 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1415 install-wdiff
: force
1416 @if
[ -f .
/wdiff
/Makefile
] ; then \
1417 rootme
=`pwd` ; export rootme
; \
1418 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1424 all-uudecode
: all-libiberty
1425 @if
[ -f .
/uudecode
/Makefile
] ; then \
1426 rootme
=`pwd` ; export rootme
; \
1427 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1432 install-uudecode
: force
1433 @if
[ -f .
/uudecode
/Makefile
] ; then \
1434 rootme
=`pwd` ; export rootme
; \
1435 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1441 all-shellutils
: force
1442 @if
[ -f .
/shellutils
/Makefile
] ; then \
1443 rootme
=`pwd` ; export rootme
; \
1444 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1449 install-shellutils
: force
1450 @if
[ -f .
/shellutils
/Makefile
] ; then \
1451 rootme
=`pwd` ; export rootme
; \
1452 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1458 all-textutils
: force
1459 @if
[ -f .
/textutils
/Makefile
] ; then \
1460 rootme
=`pwd` ; export rootme
; \
1461 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1466 install-textutils
: force
1467 @if
[ -f .
/textutils
/Makefile
] ; then \
1468 rootme
=`pwd` ; export rootme
; \
1469 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1476 ### other supporting targets
1500 for i in
$(MAKEDIRS
) ; do \
1501 echo Making
$$i...
; \
1502 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1503 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1504 if
[ ! -d
$$i ] ; then \
1505 if mkdir
$$i ; then \
1516 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1517 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1518 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1519 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1521 dir.
info: do-install-info
1522 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1523 mv
-f
dir.
info.new
dir.
info
1526 @echo
"Building a full distribution of this tree isn't done"
1527 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1536 @for i in
$(SUBDIRS
); \
1540 wd
=`basename $$pwd`; \
1541 for j in
`$(MAKE) ls`; \
1549 # with the gnu make, this is done automatically.
1551 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1552 $(SHELL
) .
/config.status
1555 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1557 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1558 config.guess config.sub config move-if-change
1559 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1561 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1562 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1567 .
/configure
-rm sun4
1568 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1570 gdb.
tar.Z
: setup-dirs
1571 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
1572 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1574 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1575 rm -rf proto-toplev
; mkdir proto-toplev
1576 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1577 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1580 mkdir proto-toplev
/etc
1581 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1582 ln
-s ..
/..
/etc
/$$i .
; \
1584 # Put only one copy (four hard links) of COPYING in the tar file.
1585 rm proto-toplev
/bfd
/COPYING
1586 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1587 rm proto-toplev
/include/COPYING
1588 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1589 rm proto-toplev
/readline
/COPYING
1590 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1592 # Take out texinfo and glob from configurable dirs
1593 rm proto-toplev
/configure.in
1594 sed
-e
'/^host_tools=/s/texinfo //' \
1595 -e
'/^host_libs=/s/glob //' \
1596 <configure.in
>proto-toplev
/configure.in
1598 # Take out texinfo from a few places; make simple BISON=bison line.
1599 rm proto-toplev
/Makefile.in
1600 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1601 -e
'/^ install-texinfo /d' \
1602 -e
'\/^BISON =/,\/^$$/c\
1604 <Makefile.in
>proto-toplev
/Makefile.in
1606 mkdir proto-toplev
/texinfo
1607 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1608 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1609 chmod og
=u
`find proto-toplev -print`
1610 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1611 echo
"==> Making gdb-$$VER.tar.Z"; \
1612 ln
-s proto-toplev gdb-
$$VER; \
1613 tar cfh
- gdb-
$$VER \
1614 | compress
-v
>gdb-
$$VER.
tar.Z
)
1615 $(GZIP
) -d
<gdb-
$$VER.
tar.Z |
$(GZIP
) -9 -v
>gdb-
$$VER.
tar.z
1617 # end of Makefile.in