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-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
) \
459 # Install the gcc headers files, but not the fixed include files,
460 # which we are not allowed to distribute. This rule is very dependent
461 # on the workings of the gcc Makefile.in.
463 gcc-no-fixedincludes
:
464 @if
[ -f .
/gcc
/Makefile
]; then \
465 rm -rf gcc
/tmp-include
; \
466 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
468 touch gcc
/stmp-fixincludes
; \
469 rm -f gcc
/stmp-headers
; \
470 rootme
=`pwd`; export rootme
; \
471 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
473 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
474 rm -rf gcc
/include; \
475 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
478 install.cross
: install-dirs install-libiberty install-mmalloc \
479 install-binutils install-opcodes install-byacc install-flex \
480 install-ld install-gas install-readline \
481 install-glob install-gdb install-mmalloc \
483 $(start-sanitize-chill
) \
485 $(end-sanitize-chill
) \
486 install-gcc install-etc install-deja-gnu
489 all-gzip
: all-libiberty
490 @if
[ -f .
/gzip
/Makefile
] ; then \
491 rootme
=`pwd` ; export rootme
; \
492 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
498 @if
[ -f .
/gzip
/Makefile
] ; then \
499 rootme
=`pwd` ; export rootme
; \
500 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
506 all-hello
: all-libiberty
507 @if
[ -f .
/hello
/Makefile
] ; then \
508 rootme
=`pwd` ; export rootme
; \
509 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
515 @if
[ -f .
/hello
/Makefile
] ; then \
516 rootme
=`pwd` ; export rootme
; \
517 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
523 all-recode
: all-libiberty
524 @if
[ -f .
/recode
/Makefile
] ; then \
525 rootme
=`pwd` ; export rootme
; \
526 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
531 install-recode
: force
532 @if
[ -f .
/recode
/Makefile
] ; then \
533 rootme
=`pwd` ; export rootme
; \
534 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
541 @if
[ -f .
/indent
/Makefile
] ; then \
542 rootme
=`pwd` ; export rootme
; \
543 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
548 install-indent
: force
549 @if
[ -f .
/indent
/Makefile
] ; then \
550 rootme
=`pwd` ; export rootme
; \
551 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
557 all-tar
: all-libiberty
558 @if
[ -f .
/tar/Makefile
] ; then \
559 rootme
=`pwd` ; export rootme
; \
560 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
566 @if
[ -f .
/tar/Makefile
] ; then \
567 rootme
=`pwd` ; export rootme
; \
568 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
576 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
577 rootme
=`pwd` ; export rootme
; \
578 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
583 install-deja-gnu
: force
584 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
585 rootme
=`pwd` ; export rootme
; \
586 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
593 @if
[ -f .
/autoconf
/Makefile
] ; then \
594 rootme
=`pwd` ; export rootme
; \
595 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
600 install-autoconf
: force
601 @if
[ -f .
/autoconf
/Makefile
] ; then \
602 rootme
=`pwd` ; export rootme
; \
603 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
610 @if
[ -f .
/etc
/Makefile
] ; then \
611 rootme
=`pwd` ; export rootme
; \
612 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
618 @if
[ -f .
/etc
/Makefile
] ; then \
619 rootme
=`pwd` ; export rootme
; \
620 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
627 @if
[ -f .
/libiberty
/Makefile
] ; then \
628 rootme
=`pwd` ; export rootme
; \
630 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
635 install-libiberty
: force
636 @if
[ -f .
/libiberty
/Makefile
] ; then \
637 rootme
=`pwd` ; export rootme
; \
639 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
645 all-xiberty
: all-gcc all-newlib
646 @if
[ -f .
/xiberty
/Makefile
] ; then \
647 rootme
=`pwd` ; export rootme
; \
648 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
650 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
655 install-xiberty
: force
656 @if
[ -f .
/xiberty
/Makefile
] ; then \
657 rootme
=`pwd` ; export rootme
; \
658 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
660 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
667 @if
[ -f .
/mmalloc
/Makefile
] ; then \
668 rootme
=`pwd` ; export rootme
; \
670 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
675 install-mmalloc
: force
676 @if
[ -f .
/mmalloc
/Makefile
] ; then \
677 rootme
=`pwd` ; export rootme
; \
679 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
685 all-texinfo
: all-libiberty
686 @if
[ -f .
/texinfo
/Makefile
] ; then \
687 rootme
=`pwd` ; export rootme
; \
689 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
694 install-texinfo
: force
695 @if
[ -f .
/texinfo
/Makefile
] ; then \
696 rootme
=`pwd` ; export rootme
; \
698 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
705 @if
[ -f .
/bfd
/Makefile
] ; then \
706 rootme
=`pwd` ; export rootme
; \
708 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
714 @if
[ -f .
/bfd
/Makefile
] ; then \
715 rootme
=`pwd` ; export rootme
; \
717 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
725 @if
[ -f .
/opcodes
/Makefile
] ; then \
726 rootme
=`pwd` ; export rootme
; \
728 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
733 install-opcodes
: force
734 @if
[ -f .
/opcodes
/Makefile
] ; then \
735 rootme
=`pwd` ; export rootme
; \
737 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
743 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
744 @if
[ -f .
/binutils
/Makefile
] ; then \
745 rootme
=`pwd` ; export rootme
; \
747 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
752 install-binutils
: force
753 @if
[ -f .
/binutils
/Makefile
] ; then \
754 rootme
=`pwd` ; export rootme
; \
756 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
762 all-newlib
: all-binutils all-ld all-gas all-gcc
763 @if
[ -f .
/newlib
/Makefile
] ; then \
764 rootme
=`pwd` ; export rootme
; \
765 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
767 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
772 install-newlib
: force
773 @if
[ -f .
/newlib
/Makefile
] ; then \
774 rootme
=`pwd` ; export rootme
; \
775 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
777 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
782 ### start-sanitize-chill
784 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
785 @if
[ -f .
/chillrt
/Makefile
] ; then \
786 rootme
=`pwd` ; export rootme
; \
787 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
789 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
794 install-chillrt
: force
795 @if
[ -f .
/chillrt
/Makefile
] ; then \
796 rootme
=`pwd` ; export rootme
; \
797 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
799 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
803 ### end-sanitize-chill
806 all-gprof
: all-libiberty all-bfd
807 @if
[ -f .
/gprof
/Makefile
] ; then \
808 rootme
=`pwd` ; export rootme
; \
810 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
816 @if
[ -f .
/gprof
/Makefile
] ; then \
817 rootme
=`pwd` ; export rootme
; \
819 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
826 @if
[ -f .
/byacc
/Makefile
] ; then \
827 rootme
=`pwd` ; export rootme
; \
829 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
835 @if
[ -f .
/byacc
/Makefile
] ; then \
836 rootme
=`pwd` ; export rootme
; \
838 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
844 all-flex
: all-libiberty
845 @if
[ -f .
/flex
/Makefile
] ; then \
846 rootme
=`pwd` ; export rootme
; \
848 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
854 @if
[ -f .
/flex
/Makefile
] ; then \
855 rootme
=`pwd` ; export rootme
; \
857 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
862 all-gcc
: all-libiberty all-byacc all-binutils all-gas
863 @if
[ -f .
/gcc
/Makefile
] ; then \
864 rootme
=`pwd` ; export rootme
; \
865 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
867 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
873 @if
[ -f .
/gcc
/Makefile
] ; then \
874 rootme
=`pwd` ; export rootme
; \
875 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
877 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
884 @if
[ -f .
/readline
/Makefile
] ; then \
885 rootme
=`pwd` ; export rootme
; \
887 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
892 install-readline
: force
893 @if
[ -f .
/readline
/Makefile
] ; then \
894 rootme
=`pwd` ; export rootme
; \
896 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
903 @if
[ -f .
/glob
/Makefile
] ; then \
904 rootme
=`pwd` ; export rootme
; \
906 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
912 @if
[ -f .
/glob
/Makefile
] ; then \
913 rootme
=`pwd` ; export rootme
; \
915 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
921 all-gas
: all-libiberty all-opcodes all-bfd
922 @if
[ -f .
/gas
/Makefile
] ; then \
923 rootme
=`pwd` ; export rootme
; \
925 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
931 @if
[ -f .
/gas
/Makefile
] ; then \
932 rootme
=`pwd` ; export rootme
; \
934 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
940 all-tgas
: all-libiberty all-bfd
941 @if
[ -f .
/tgas
/Makefile
] ; then \
942 rootme
=`pwd` ; export rootme
; \
944 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
951 all-ld
: all-libiberty all-bfd all-byacc all-flex
952 @if
[ -f .
/ld/Makefile
] ; then \
953 rootme
=`pwd` ; export rootme
; \
955 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
961 @if
[ -f .
/ld/Makefile
] ; then \
962 rootme
=`pwd` ; export rootme
; \
964 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
970 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
971 @if
[ -f .
/gdb
/Makefile
] ; then \
972 rootme
=`pwd` ; export rootme
; \
974 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
980 @if
[ -f .
/gdb
/Makefile
] ; then \
981 rootme
=`pwd` ; export rootme
; \
983 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
989 all-make
: all-libiberty
990 @if
[ -f .
/make
/Makefile
] ; then \
991 rootme
=`pwd` ; export rootme
; \
993 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
999 @if
[ -f .
/make
/Makefile
] ; then \
1000 rootme
=`pwd` ; export rootme
; \
1002 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1008 all-diff
: all-libiberty
1009 @if
[ -f .
/diff
/Makefile
] ; then \
1010 rootme
=`pwd` ; export rootme
; \
1012 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1018 @if
[ -f .
/diff
/Makefile
] ; then \
1019 rootme
=`pwd` ; export rootme
; \
1021 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1028 @if
[ -f .
/grep
/Makefile
] ; then \
1029 rootme
=`pwd` ; export rootme
; \
1031 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1037 @if
[ -f .
/grep
/Makefile
] ; then \
1038 rootme
=`pwd` ; export rootme
; \
1040 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1047 @if
[ -f .
/rcs
/Makefile
] ; then \
1048 rootme
=`pwd` ; export rootme
; \
1050 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1056 @if
[ -f .
/rcs
/Makefile
] ; then \
1057 rootme
=`pwd` ; export rootme
; \
1059 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1066 @if
[ -f .
/cvs
/Makefile
] ; then \
1067 rootme
=`pwd` ; export rootme
; \
1069 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1075 @if
[ -f .
/cvs
/Makefile
] ; then \
1076 rootme
=`pwd` ; export rootme
; \
1078 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1085 @if
[ -f .
/patch
/Makefile
] ; then \
1086 rootme
=`pwd` ; export rootme
; \
1088 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1093 install-patch
: force
1094 @if
[ -f .
/patch
/Makefile
] ; then \
1095 rootme
=`pwd` ; export rootme
; \
1097 $(MAKE
) $(FLAGS_TO_PASS
) \
1099 man1dir=$(man1dir) install) ; \
1106 @if
[ -f .
/emacs
/Makefile
] ; then \
1107 rootme
=`pwd` ; export rootme
; \
1109 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1114 install-emacs
: force
1115 @if
[ -f .
/emacs
/Makefile
] ; then \
1116 rootme
=`pwd` ; export rootme
; \
1118 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1124 all-ispell
: all-emacs
1125 @if
[ -f .
/ispell
/Makefile
] ; then \
1126 rootme
=`pwd` ; export rootme
; \
1128 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1133 install-ispell
: force
1134 @if
[ -f .
/ispell
/Makefile
] ; then \
1135 rootme
=`pwd` ; export rootme
; \
1137 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1144 @if
[ -f .
/send-pr
/Makefile
] ; then \
1145 rootme
=`pwd` ; export rootme
; \
1147 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1152 install-send-pr
: force
1153 @if
[ -f .
/send-pr
/Makefile
] ; then \
1154 rootme
=`pwd` ; export rootme
; \
1156 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1163 @if
[ -f .
/libm
/Makefile
] ; then \
1164 rootme
=`pwd` ; export rootme
; \
1166 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1172 @if
[ -f .
/libm
/Makefile
] ; then \
1173 rootme
=`pwd` ; export rootme
; \
1175 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1182 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1183 @if
[ -f .
/libg
++/Makefile
] ; then \
1184 rootme
=`pwd` ; export rootme
; \
1185 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1187 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1192 install-libg
++: force
1193 @if
[ -f .
/libg
++/Makefile
] ; then \
1194 rootme
=`pwd` ; export rootme
; \
1195 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1197 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1203 @if
[ -f .
/tcl
/Makefile
] ; then \
1204 rootme
=`pwd` ; export rootme
; \
1205 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1207 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1213 @if
[ -f .
/tcl
/Makefile
] ; then \
1214 rootme
=`pwd` ; export rootme
; \
1215 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1217 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1225 @if
[ -f .
/tk
/Makefile
] ; then \
1226 rootme
=`pwd` ; export rootme
; \
1227 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1229 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1235 @if
[ -f .
/tk
/Makefile
] ; then \
1236 rootme
=`pwd` ; export rootme
; \
1237 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1239 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1246 @if
[ -f .
/expect
/Makefile
] ; then \
1247 rootme
=`pwd` ; export rootme
; \
1248 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1250 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1255 install-expect
: force
1256 @if
[ -f .
/expect
/Makefile
] ; then \
1257 rootme
=`pwd` ; export rootme
; \
1258 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1260 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1267 @if
[ -f .
/sim
/Makefile
] ; then \
1268 rootme
=`pwd` ; export rootme
; \
1270 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1276 @if
[ -f .
/sim
/Makefile
] ; then \
1277 rootme
=`pwd` ; export rootme
; \
1279 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1285 all-fileutils
: force
1286 @if
[ -f .
/fileutils
/Makefile
] ; then \
1287 rootme
=`pwd` ; export rootme
; \
1288 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1293 install-fileutils
: force
1294 @if
[ -f .
/fileutils
/Makefile
] ; then \
1295 rootme
=`pwd` ; export rootme
; \
1296 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1303 @if
[ -f .
/find
/Makefile
] ; then \
1304 rootme
=`pwd` ; export rootme
; \
1305 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1311 @if
[ -f .
/find
/Makefile
] ; then \
1312 rootme
=`pwd` ; export rootme
; \
1313 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1320 @if
[ -f .
/gawk
/Makefile
] ; then \
1321 rootme
=`pwd` ; export rootme
; \
1322 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1328 @if
[ -f .
/gawk
/Makefile
] ; then \
1329 rootme
=`pwd` ; export rootme
; \
1330 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1336 all-m4
: all-libiberty
1337 @if
[ -f .
/m4
/Makefile
] ; then \
1338 rootme
=`pwd` ; export rootme
; \
1339 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1345 @if
[ -f .
/m4
/Makefile
] ; then \
1346 rootme
=`pwd` ; export rootme
; \
1347 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1354 @if
[ -f .
/sed
/Makefile
] ; then \
1355 rootme
=`pwd` ; export rootme
; \
1356 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1362 @if
[ -f .
/sed
/Makefile
] ; then \
1363 rootme
=`pwd` ; export rootme
; \
1364 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1371 @if
[ -f .
/time
/Makefile
] ; then \
1372 rootme
=`pwd` ; export rootme
; \
1373 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1379 @if
[ -f .
/time
/Makefile
] ; then \
1380 rootme
=`pwd` ; export rootme
; \
1381 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1388 @if
[ -f .
/wdiff
/Makefile
] ; then \
1389 rootme
=`pwd` ; export rootme
; \
1390 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1395 install-wdiff
: force
1396 @if
[ -f .
/wdiff
/Makefile
] ; then \
1397 rootme
=`pwd` ; export rootme
; \
1398 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1404 all-uudecode
: all-libiberty
1405 @if
[ -f .
/uudecode
/Makefile
] ; then \
1406 rootme
=`pwd` ; export rootme
; \
1407 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1412 install-uudecode
: force
1413 @if
[ -f .
/uudecode
/Makefile
] ; then \
1414 rootme
=`pwd` ; export rootme
; \
1415 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1421 all-shellutils
: force
1422 @if
[ -f .
/shellutils
/Makefile
] ; then \
1423 rootme
=`pwd` ; export rootme
; \
1424 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1429 install-shellutils
: force
1430 @if
[ -f .
/shellutils
/Makefile
] ; then \
1431 rootme
=`pwd` ; export rootme
; \
1432 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1438 all-textutils
: force
1439 @if
[ -f .
/textutils
/Makefile
] ; then \
1440 rootme
=`pwd` ; export rootme
; \
1441 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1446 install-textutils
: force
1447 @if
[ -f .
/textutils
/Makefile
] ; then \
1448 rootme
=`pwd` ; export rootme
; \
1449 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1456 ### other supporting targets
1480 for i in
$(MAKEDIRS
) ; do \
1481 echo Making
$$i...
; \
1482 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1483 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1484 if
[ ! -d
$$i ] ; then \
1485 if mkdir
$$i ; then \
1496 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1497 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1498 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1499 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1501 dir.
info: do-install-info
1502 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1503 mv
-f
dir.
info.new
dir.
info
1506 @echo
"Building a full distribution of this tree isn't done"
1507 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1516 @for i in
$(SUBDIRS
); \
1520 wd
=`basename $$pwd`; \
1521 for j in
`$(MAKE) ls`; \
1529 # with the gnu make, this is done automatically.
1531 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1532 $(SHELL
) .
/config.status
1535 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1537 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1538 config.guess config.sub config move-if-change
1539 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1541 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1542 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1547 .
/configure
-rm sun4
1548 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1550 gdb.
tar.Z
: setup-dirs
1551 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
1552 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1554 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1555 rm -rf proto-toplev
; mkdir proto-toplev
1556 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1557 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1560 mkdir proto-toplev
/etc
1561 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1562 ln
-s ..
/..
/etc
/$$i .
; \
1564 # Put only one copy (four hard links) of COPYING in the tar file.
1565 rm proto-toplev
/bfd
/COPYING
1566 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1567 rm proto-toplev
/include/COPYING
1568 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1569 rm proto-toplev
/readline
/COPYING
1570 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1572 # Take out texinfo and glob from configurable dirs
1573 rm proto-toplev
/configure.in
1574 sed
-e
'/^host_tools=/s/texinfo //' \
1575 -e
'/^host_libs=/s/glob //' \
1576 <configure.in
>proto-toplev
/configure.in
1578 # Take out texinfo from a few places; make simple BISON=bison line.
1579 rm proto-toplev
/Makefile.in
1580 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1581 -e
'/^ install-texinfo /d' \
1582 -e
'\/^BISON =/,\/^$$/c\
1584 <Makefile.in
>proto-toplev
/Makefile.in
1586 mkdir proto-toplev
/texinfo
1587 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1588 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1589 chmod og
=u
`find proto-toplev -print`
1590 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1591 echo
"==> Making gdb-$$VER.tar.Z"; \
1592 ln
-s proto-toplev gdb-
$$VER; \
1593 tar cfh
- gdb-
$$VER \
1594 | compress
-v
>gdb-
$$VER.
tar.Z
)
1595 $(GZIP
) -d
<gdb-
$$VER.
tar.Z |
$(GZIP
) -9 -v
>gdb-
$$VER.
tar.z
1597 # end of Makefile.in