2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992 Free Software Foundation
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
29 program_transform_name
=
31 datadir = $(prefix)/lib
32 mandir = $(prefix)/man
33 man1dir = $(mandir)/man1
34 man2dir = $(mandir)/man2
35 man3dir = $(mandir)/man3
36 man4dir = $(mandir)/man4
37 man5dir = $(mandir)/man5
38 man6dir = $(mandir)/man6
39 man7dir = $(mandir)/man7
40 man8dir = $(mandir)/man8
41 man9dir = $(mandir)/man9
42 infodir = $(prefix)/info
43 includedir = $(prefix)/include
44 docdir
= $(datadir)/doc
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
)
57 $(start-sanitize-chill
)
58 CHILLFLAGS
= $(CFLAGS
)
66 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
67 then echo $${rootme}/byacc/byacc ; \
71 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
72 then echo $${rootme}/flex/flex ; \
75 MAKEINFO
= `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
76 then echo $${rootme}/texinfo/C/makeinfo ; \
77 else echo makeinfo ; fi`
80 # libraries that may need to be augmented on a system-by-system basis
83 # compilers to use to create programs which must be run in the build
86 CXX_FOR_BUILD
= $(CXX
)
88 SUBDIRS
= "this is set via configure, don't edit this"
92 INSTALL_TARGET
= install.
all
98 if [ -f $${rootme}/gcc/Makefile ] ; then \
99 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
101 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
104 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
109 if [ -f $${rootme}/gcc/Makefile ] ; then \
110 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
112 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
115 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
119 $(start-sanitize-chill
)
120 CHILL_FOR_TARGET
= ` \
121 if [ -f $${rootme}/gcc/Makefile ] ; then \
122 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
124 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
127 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
130 $(end-sanitize-chill
)
133 if [ -f $${rootme}/gcc/Makefile ] ; then \
134 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
136 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
139 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
144 if [ -f $${rootme}/gas/Makefile ] ; then \
145 echo $${rootme}/gas/as.new ; \
147 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
150 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
155 if [ -f $${rootme}/binutils/Makefile ] ; then \
156 echo $${rootme}/binutils/ar ; \
158 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
161 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
165 RANLIB_FOR_TARGET
= ` \
166 if [ -f $${rootme}/binutils/Makefile ] ; then \
167 echo $${rootme}/binutils/ranlib ; \
169 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
172 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
177 if [ -f $${rootme}/binutils/Makefile ] ; then \
178 echo $${rootme}/binutils/nm ; \
180 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
183 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
188 if [ -f $${rootme}/gcc/Makefile ] ; then \
189 if [ -f $${rootme}/newlib/Makefile ] ; then \
190 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
192 echo -I$${rootme}/gcc/include ; \
199 #### host and target specific makefile fragments come in here.
202 # Flags to pass down to sub-makes -- please keep these in alphabetical order
205 "AR_FLAGS=$(AR_FLAGS)" \
206 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
208 "CXXFLAGS=$(CXXFLAGS)" \
209 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
211 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
213 $(start-sanitize-chill
)\
214 "CHILLFLAGS=$(CHILLFLAGS)" \
215 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
216 "CHILL_LIB=$(CHILL_LIB)" \
217 $(end-sanitize-chill
)\
218 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
219 "INSTALL=$(INSTALL)" \
220 "INSTALL_DATA=$(INSTALL_DATA)" \
221 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
222 "LDFLAGS=$(LDFLAGS)" \
224 "LOADLIBES=$(LOADLIBES)" \
225 "MAKEINFO=$(MAKEINFO)" \
227 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
228 "exec_prefix=$(exec_prefix)" \
232 # Flags that are concerned with the location of the X11 include files
235 X11_FLAGS_TO_PASS
= \
236 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
237 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
240 # Flags to pass down to makes which are built with the target
241 # environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
242 TARGET_FLAGS_TO_PASS
= \
243 "AR=$(AR_FOR_TARGET)" \
244 "AR_FLAGS=$(AR_FLAGS)" \
245 "AS=$(AS_FOR_TARGET)" \
247 "CXX=$(CXX_FOR_TARGET)" \
248 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
249 "CXXFLAGS=$(CXXFLAGS)" \
250 "CC=$(CC_FOR_TARGET)" \
251 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
253 "INSTALL=$(INSTALL)" \
254 "INSTALL_DATA=$(INSTALL_DATA)" \
255 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
256 "LDFLAGS=$(LDFLAGS)" \
258 "LOADLIBES=$(LOADLIBES)" \
259 "MAKEINFO=$(MAKEINFO)" \
260 "NM=$(NM_FOR_TARGET)" \
261 "RANLIB=$(RANLIB_FOR_TARGET)" \
262 "XTRAFLAGS=$(XTRAFLAGS)" \
263 "exec_prefix=$(exec_prefix)" \
267 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
268 # unfortunately needs the native compiler and the target ar and
269 # ranlib. Keep these in alphabetical order, please.
270 GCC_FLAGS_TO_PASS
= \
271 "AR=$(AR_FOR_TARGET)" \
272 "AR_FLAGS=$(AR_FLAGS)" \
273 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
277 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
278 "CXXFLAGS=$(CXXFLAGS)" \
280 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
282 "INSTALL=$(INSTALL)" \
283 "INSTALL_DATA=$(INSTALL_DATA)" \
284 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
285 "LDFLAGS=$(LDFLAGS)" \
287 "LOADLIBES=$(LOADLIBES)" \
288 "MAKEINFO=$(MAKEINFO)" \
290 "RANLIB=$(RANLIB_FOR_TARGET)" \
291 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
292 "XTRAFLAGS=$(XTRAFLAGS)" \
293 "exec_prefix=$(exec_prefix)" \
297 # The first rule in the file had better be this one. Don't put any above it.
300 .PHONY
: all check dvi info install-info
304 @rootme
=`pwd` ; export rootme
; \
305 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
307 install-info
: install-info-dirs
force
308 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
309 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
310 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
311 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) DO
=install-info
"DODIRS=$(SUBDIRS)" subdir_do
312 @rootme
='pwd' ; export rootme
; $(MAKE
) $(FLAGS_TO_PASS
) dir.
info install-dir.
info
315 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
316 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
317 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
318 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
320 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
321 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
322 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
323 all-make all-rcs all-cvs all-diff all-grep \
324 all-patch all-emacs all-ispell all-etc \
325 all-tcl all-tk all-expect \
327 $(start-sanitize-chill
) \
329 $(end-sanitize-chill
) \
330 all-gprof all-send_pr all-libm all-deja-gnu \
331 all-fileutils all-find all-gawk all-sed all-shellutils \
332 all-textutils all-time all-wdiff all-uudecode
335 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
336 all-opcodes all-bfd all-readline all-sim \
337 all-gdb all-binutils all-gcc all-newlib \
338 $(start-sanitize-chill
) \
340 $(end-sanitize-chill
) \
343 .PHONY
: clean distclean mostlyclean realclean do_clean
346 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
348 clean mostlyclean: do_clean
349 @rootme
=`pwd` ; export rootme
; \
350 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
352 distclean realclean: do_clean
353 @rootme
=`pwd` ; export rootme
; \
354 $(MAKE
) $(FLAGS_TO_PASS
) DO
=$@
"DODIRS=$(SUBDIRS)" subdir_do
355 -rm -f Makefile config.status
358 @echo
"the uninstall target is not supported in this tree"
360 install: $(INSTALL_TARGET
)
361 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
362 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
363 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
365 install.
all: install-no-fixedincludes
366 @if
[ -f .
/gcc
/Makefile
] ; then \
367 rootme
=`pwd` ; export rootme
; \
369 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
374 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
400 $(start-sanitize-chill
) \
402 $(end-sanitize-chill
) \
411 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
412 install-textutils install-time install-wdiff install-uudecode
415 # Install the gcc headers files, but not the fixed include files,
416 # which we are not allowed to distribute. This rule is very dependent
417 # on the workings of the gcc Makefile.in.
419 gcc-no-fixedincludes
:
420 @if
[ -f .
/gcc
/Makefile
]; then \
421 rm -rf gcc
/tmp-include
; \
422 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
424 touch gcc
/stmp-fixincludes
; \
425 rm -f gcc
/stmp-headers
; \
426 rootme
=`pwd`; export rootme
; \
427 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
429 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
430 rm -rf gcc
/include; \
431 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
434 install.cross
: install-dirs install-libiberty install-mmalloc \
435 install-binutils install-opcodes install-byacc install-flex \
436 install-ld install-gas install-readline \
437 install-glob install-gdb install-mmalloc \
439 $(start-sanitize-chill
) \
441 $(end-sanitize-chill
) \
442 install-gcc install-etc install-deja-gnu
446 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
447 rootme
=`pwd` ; export rootme
; \
448 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
453 install-deja-gnu
: force
454 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
455 rootme
=`pwd` ; export rootme
; \
456 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
463 @if
[ -f .
/autoconf
/Makefile
] ; then \
464 rootme
=`pwd` ; export rootme
; \
465 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
470 install-autoconf
: force
471 @if
[ -f .
/autoconf
/Makefile
] ; then \
472 rootme
=`pwd` ; export rootme
; \
473 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
480 @if
[ -f .
/etc
/Makefile
] ; then \
481 rootme
=`pwd` ; export rootme
; \
482 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
488 @if
[ -f .
/etc
/Makefile
] ; then \
489 rootme
=`pwd` ; export rootme
; \
490 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
497 @if
[ -f .
/libiberty
/Makefile
] ; then \
498 rootme
=`pwd` ; export rootme
; \
500 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
505 install-libiberty
: force
506 @if
[ -f .
/libiberty
/Makefile
] ; then \
507 rootme
=`pwd` ; export rootme
; \
509 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
515 all-xiberty
: all-gcc all-newlib
516 @if
[ -f .
/xiberty
/Makefile
] ; then \
517 rootme
=`pwd` ; export rootme
; \
518 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
520 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
525 install-xiberty
: force
526 @if
[ -f .
/xiberty
/Makefile
] ; then \
527 rootme
=`pwd` ; export rootme
; \
528 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
530 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
537 @if
[ -f .
/mmalloc
/Makefile
] ; then \
538 rootme
=`pwd` ; export rootme
; \
540 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
545 install-mmalloc
: force
546 @if
[ -f .
/mmalloc
/Makefile
] ; then \
547 rootme
=`pwd` ; export rootme
; \
549 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
555 all-texinfo
: all-libiberty
556 @if
[ -f .
/texinfo
/Makefile
] ; then \
557 rootme
=`pwd` ; export rootme
; \
559 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
564 install-texinfo
: force
565 @if
[ -f .
/texinfo
/Makefile
] ; then \
566 rootme
=`pwd` ; export rootme
; \
568 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
575 @if
[ -f .
/bfd
/Makefile
] ; then \
576 rootme
=`pwd` ; export rootme
; \
578 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
584 @if
[ -f .
/bfd
/Makefile
] ; then \
585 rootme
=`pwd` ; export rootme
; \
587 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
595 @if
[ -f .
/opcodes
/Makefile
] ; then \
596 rootme
=`pwd` ; export rootme
; \
598 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
603 install-opcodes
: force
604 @if
[ -f .
/opcodes
/Makefile
] ; then \
605 rootme
=`pwd` ; export rootme
; \
607 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
613 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
614 @if
[ -f .
/binutils
/Makefile
] ; then \
615 rootme
=`pwd` ; export rootme
; \
617 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
622 install-binutils
: force
623 @if
[ -f .
/binutils
/Makefile
] ; then \
624 rootme
=`pwd` ; export rootme
; \
626 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
632 all-newlib
: all-binutils all-ld all-gas all-gcc
633 @if
[ -f .
/newlib
/Makefile
] ; then \
634 rootme
=`pwd` ; export rootme
; \
635 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
637 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
642 install-newlib
: force
643 @if
[ -f .
/newlib
/Makefile
] ; then \
644 rootme
=`pwd` ; export rootme
; \
645 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
647 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
652 ### start-sanitize-chill
654 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
655 @if
[ -f .
/chillrt
/Makefile
] ; then \
656 rootme
=`pwd` ; export rootme
; \
657 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
659 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
664 install-chillrt
: force
665 @if
[ -f .
/chillrt
/Makefile
] ; then \
666 rootme
=`pwd` ; export rootme
; \
667 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
669 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
673 ### end-sanitize-chill
676 all-gprof
: all-libiberty all-bfd
677 @if
[ -f .
/gprof
/Makefile
] ; then \
678 rootme
=`pwd` ; export rootme
; \
680 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
686 @if
[ -f .
/gprof
/Makefile
] ; then \
687 rootme
=`pwd` ; export rootme
; \
689 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
696 @if
[ -f .
/byacc
/Makefile
] ; then \
697 rootme
=`pwd` ; export rootme
; \
699 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
705 @if
[ -f .
/byacc
/Makefile
] ; then \
706 rootme
=`pwd` ; export rootme
; \
708 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
714 all-flex
: all-libiberty
715 @if
[ -f .
/flex
/Makefile
] ; then \
716 rootme
=`pwd` ; export rootme
; \
718 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
724 @if
[ -f .
/flex
/Makefile
] ; then \
725 rootme
=`pwd` ; export rootme
; \
727 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
732 all-gcc
: all-libiberty all-byacc all-binutils all-gas
733 @if
[ -f .
/gcc
/Makefile
] ; then \
734 rootme
=`pwd` ; export rootme
; \
735 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
737 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
743 @if
[ -f .
/gcc
/Makefile
] ; then \
744 rootme
=`pwd` ; export rootme
; \
745 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
747 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
754 @if
[ -f .
/readline
/Makefile
] ; then \
755 rootme
=`pwd` ; export rootme
; \
757 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
762 install-readline
: force
763 @if
[ -f .
/readline
/Makefile
] ; then \
764 rootme
=`pwd` ; export rootme
; \
766 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
773 @if
[ -f .
/glob
/Makefile
] ; then \
774 rootme
=`pwd` ; export rootme
; \
776 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
782 @if
[ -f .
/glob
/Makefile
] ; then \
783 rootme
=`pwd` ; export rootme
; \
785 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
791 all-gas
: all-libiberty all-opcodes all-bfd
792 @if
[ -f .
/gas
/Makefile
] ; then \
793 rootme
=`pwd` ; export rootme
; \
795 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
801 @if
[ -f .
/gas
/Makefile
] ; then \
802 rootme
=`pwd` ; export rootme
; \
804 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
810 all-tgas
: all-libiberty all-bfd
811 @if
[ -f .
/tgas
/Makefile
] ; then \
812 rootme
=`pwd` ; export rootme
; \
814 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
821 all-ld
: all-libiberty all-bfd all-byacc all-flex
822 @if
[ -f .
/ld/Makefile
] ; then \
823 rootme
=`pwd` ; export rootme
; \
825 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
831 @if
[ -f .
/ld/Makefile
] ; then \
832 rootme
=`pwd` ; export rootme
; \
834 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
840 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
841 @if
[ -f .
/gdb
/Makefile
] ; then \
842 rootme
=`pwd` ; export rootme
; \
844 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
850 @if
[ -f .
/gdb
/Makefile
] ; then \
851 rootme
=`pwd` ; export rootme
; \
853 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
859 all-make
: all-libiberty
860 @if
[ -f .
/make
/Makefile
] ; then \
861 rootme
=`pwd` ; export rootme
; \
863 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
869 @if
[ -f .
/make
/Makefile
] ; then \
870 rootme
=`pwd` ; export rootme
; \
872 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
879 @if
[ -f .
/diff
/Makefile
] ; then \
880 rootme
=`pwd` ; export rootme
; \
882 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
888 @if
[ -f .
/diff
/Makefile
] ; then \
889 rootme
=`pwd` ; export rootme
; \
891 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
898 @if
[ -f .
/grep
/Makefile
] ; then \
899 rootme
=`pwd` ; export rootme
; \
901 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
907 @if
[ -f .
/grep
/Makefile
] ; then \
908 rootme
=`pwd` ; export rootme
; \
910 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
917 @if
[ -f .
/rcs
/Makefile
] ; then \
918 rootme
=`pwd` ; export rootme
; \
920 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
926 @if
[ -f .
/rcs
/Makefile
] ; then \
927 rootme
=`pwd` ; export rootme
; \
929 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
936 @if
[ -f .
/cvs
/Makefile
] ; then \
937 rootme
=`pwd` ; export rootme
; \
939 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
945 @if
[ -f .
/cvs
/Makefile
] ; then \
946 rootme
=`pwd` ; export rootme
; \
948 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
955 @if
[ -f .
/patch
/Makefile
] ; then \
956 rootme
=`pwd` ; export rootme
; \
958 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
964 @if
[ -f .
/patch
/Makefile
] ; then \
965 rootme
=`pwd` ; export rootme
; \
967 $(MAKE
) $(FLAGS_TO_PASS
) \
969 man1dir=$(man1dir) install) ; \
976 @if
[ -f .
/emacs
/Makefile
] ; then \
977 rootme
=`pwd` ; export rootme
; \
979 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
985 @if
[ -f .
/emacs
/Makefile
] ; then \
986 rootme
=`pwd` ; export rootme
; \
988 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
994 all-ispell
: all-emacs
995 @if
[ -f .
/ispell
/Makefile
] ; then \
996 rootme
=`pwd` ; export rootme
; \
998 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1003 install-ispell
: force
1004 @if
[ -f .
/ispell
/Makefile
] ; then \
1005 rootme
=`pwd` ; export rootme
; \
1007 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1014 @if
[ -f .
/send_pr
/Makefile
] ; then \
1015 rootme
=`pwd` ; export rootme
; \
1017 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1022 install-send_pr
: force
1023 @if
[ -f .
/send_pr
/Makefile
] ; then \
1024 rootme
=`pwd` ; export rootme
; \
1026 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1033 @if
[ -f .
/libm
/Makefile
] ; then \
1034 rootme
=`pwd` ; export rootme
; \
1036 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1042 @if
[ -f .
/libm
/Makefile
] ; then \
1043 rootme
=`pwd` ; export rootme
; \
1045 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1052 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1053 @if
[ -f .
/libg
++/Makefile
] ; then \
1054 rootme
=`pwd` ; export rootme
; \
1055 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1057 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1062 install-libg
++: force
1063 @if
[ -f .
/libg
++/Makefile
] ; then \
1064 rootme
=`pwd` ; export rootme
; \
1065 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1067 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1073 @if
[ -f .
/tcl
/Makefile
] ; then \
1074 rootme
=`pwd` ; export rootme
; \
1075 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1077 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1083 @if
[ -f .
/tcl
/Makefile
] ; then \
1084 rootme
=`pwd` ; export rootme
; \
1085 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1087 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1095 @if
[ -f .
/tk
/Makefile
] ; then \
1096 rootme
=`pwd` ; export rootme
; \
1097 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1099 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1105 @if
[ -f .
/tk
/Makefile
] ; then \
1106 rootme
=`pwd` ; export rootme
; \
1107 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1109 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1116 @if
[ -f .
/expect
/Makefile
] ; then \
1117 rootme
=`pwd` ; export rootme
; \
1118 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1120 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1125 install-expect
: force
1126 @if
[ -f .
/expect
/Makefile
] ; then \
1127 rootme
=`pwd` ; export rootme
; \
1128 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1130 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1137 @if
[ -f .
/sim
/Makefile
] ; then \
1138 rootme
=`pwd` ; export rootme
; \
1140 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1146 @if
[ -f .
/sim
/Makefile
] ; then \
1147 rootme
=`pwd` ; export rootme
; \
1149 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1155 all-fileutils
: force
1156 @if
[ -f .
/fileutils
/Makefile
] ; then \
1157 rootme
=`pwd` ; export rootme
; \
1158 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1163 install-fileutils
: force
1164 @if
[ -f .
/fileutils
/Makefile
] ; then \
1165 rootme
=`pwd` ; export rootme
; \
1166 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1173 @if
[ -f .
/find
/Makefile
] ; then \
1174 rootme
=`pwd` ; export rootme
; \
1175 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1181 @if
[ -f .
/find
/Makefile
] ; then \
1182 rootme
=`pwd` ; export rootme
; \
1183 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1190 @if
[ -f .
/gawk
/Makefile
] ; then \
1191 rootme
=`pwd` ; export rootme
; \
1192 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1198 @if
[ -f .
/gawk
/Makefile
] ; then \
1199 rootme
=`pwd` ; export rootme
; \
1200 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1206 all-m4
: all-libiberty
1207 @if
[ -f .
/m4
/Makefile
] ; then \
1208 rootme
=`pwd` ; export rootme
; \
1209 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1215 @if
[ -f .
/m4
/Makefile
] ; then \
1216 rootme
=`pwd` ; export rootme
; \
1217 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1224 @if
[ -f .
/sed
/Makefile
] ; then \
1225 rootme
=`pwd` ; export rootme
; \
1226 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1232 @if
[ -f .
/sed
/Makefile
] ; then \
1233 rootme
=`pwd` ; export rootme
; \
1234 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1241 @if
[ -f .
/time
/Makefile
] ; then \
1242 rootme
=`pwd` ; export rootme
; \
1243 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1249 @if
[ -f .
/time
/Makefile
] ; then \
1250 rootme
=`pwd` ; export rootme
; \
1251 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1258 @if
[ -f .
/wdiff
/Makefile
] ; then \
1259 rootme
=`pwd` ; export rootme
; \
1260 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1265 install-wdiff
: force
1266 @if
[ -f .
/wdiff
/Makefile
] ; then \
1267 rootme
=`pwd` ; export rootme
; \
1268 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1274 all-uudecode
: all-libiberty
1275 @if
[ -f .
/uudecode
/Makefile
] ; then \
1276 rootme
=`pwd` ; export rootme
; \
1277 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1282 install-uudecode
: force
1283 @if
[ -f .
/uudecode
/Makefile
] ; then \
1284 rootme
=`pwd` ; export rootme
; \
1285 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1291 all-shellutils
: force
1292 @if
[ -f .
/shellutils
/Makefile
] ; then \
1293 rootme
=`pwd` ; export rootme
; \
1294 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1299 install-shellutils
: force
1300 @if
[ -f .
/shellutils
/Makefile
] ; then \
1301 rootme
=`pwd` ; export rootme
; \
1302 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1308 all-textutils
: force
1309 @if
[ -f .
/textutils
/Makefile
] ; then \
1310 rootme
=`pwd` ; export rootme
; \
1311 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1316 install-textutils
: force
1317 @if
[ -f .
/textutils
/Makefile
] ; then \
1318 rootme
=`pwd` ; export rootme
; \
1319 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1326 ### other supporting targets
1329 ### start-sanitize-chill
1331 ### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
1333 ### if you change the code for libg++ et al, also change the
1334 ### code for chillrt
1336 ### end-sanitize-chill
1337 @for i in
$(DODIRS
); do \
1338 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
] ; then \
1340 libg
++ | xiberty | newlib
) \
1341 if
(rootme
=`pwd` ; export rootme
; \
1342 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1344 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1347 $(start-sanitize-chill
) \
1349 if
(rootme
=`pwd` ; export rootme
; \
1350 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1352 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1355 $(end-sanitize-chill
) \
1357 if
(rootme
=`pwd` ; export rootme
; \
1358 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1360 $(MAKE
) $(GCC_FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1364 if
(rootme
=`pwd` ; export rootme
; \
1366 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
1373 # The "else true" stuff is for Ultrix; the shell returns the exit code
1374 # of the "if" command, if no commands are run in the "then" or "else" part,
1375 # causing Make to quit.
1399 for i in
$(MAKEDIRS
) ; do \
1400 echo Making
$$i...
; \
1401 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1402 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1403 if
[ ! -d
$$i ] ; then \
1404 if mkdir
$$i ; then \
1415 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1418 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1419 mv
-f
dir.
info.new
dir.
info
1422 @echo
"Building a full distribution of this tree isn't done"
1423 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1432 @for i in
$(SUBDIRS
); \
1436 wd
=`basename $$pwd`; \
1437 for j in
`$(MAKE) ls`; \
1445 # with the gnu make, this is done automatically.
1447 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1448 $(SHELL
) .
/config.status
1451 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1453 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1454 config.guess config.sub config etc move-if-change \
1456 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1457 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1462 .
/configure
-rm sun4
1463 chmod og
=u
`find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1465 gdb.
tar.Z
: setup-dirs
1466 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir)
1467 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1469 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1470 rm -rf proto-toplev
; mkdir proto-toplev
1471 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1472 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1475 # Put only one copy (four hard links) of COPYING in the tar file.
1476 rm proto-toplev
/bfd
/COPYING
1477 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1478 rm proto-toplev
/include/COPYING
1479 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1480 rm proto-toplev
/readline
/COPYING
1481 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1483 # Take out texinfo and glob from configurable dirs
1484 rm proto-toplev
/configure.in
1485 sed
-e
'/^host_tools=/s/texinfo //' \
1486 -e
'/^host_libs=/s/glob //' \
1487 <configure.in
>proto-toplev
/configure.in
1489 # Take out texinfo from a few places; make simple BISON=bison line.
1490 rm proto-toplev
/Makefile.in
1491 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1492 -e
'/^ install-texinfo /d' \
1493 -e
'\/^BISON =/,\/^$$/c\
1495 <Makefile.in
>proto-toplev
/Makefile.in
1497 mkdir proto-toplev
/texinfo
1498 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1499 chmod og
=u
`find proto-toplev -print`
1500 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1501 echo
"==> Making gdb-$$VER.tar.Z"; \
1502 ln
-s proto-toplev gdb-
$$VER; \
1503 tar cfh
- gdb-
$$VER \
1504 | compress
-v
>gdb-
$$VER.
tar.Z
)
1507 # end of Makefile.in