2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990-1993 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; \
109 $(start-sanitize-chill
)
110 CHILL_FOR_TARGET
= ` \
111 if [ -f $${rootme}/gcc/Makefile ] ; then \
112 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
114 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
117 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
120 $(end-sanitize-chill
)
123 if [ -f $${rootme}/gcc/Makefile ] ; then \
124 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
126 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
129 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
134 if [ -f $${rootme}/gas/Makefile ] ; then \
135 echo $${rootme}/gas/as.new ; \
137 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
140 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
145 if [ -f $${rootme}/binutils/Makefile ] ; then \
146 echo $${rootme}/binutils/ar ; \
148 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
151 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
155 RANLIB_FOR_TARGET
= ` \
156 if [ -f $${rootme}/binutils/Makefile ] ; then \
157 echo $${rootme}/binutils/ranlib ; \
159 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
162 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
167 if [ -f $${rootme}/binutils/Makefile ] ; then \
168 echo $${rootme}/binutils/nm ; \
170 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
173 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
177 # FIXME: This is badly named.
179 if [ -f $${rootme}/gcc/Makefile ] ; then \
180 if [ -f $${rootme}/newlib/Makefile ] ; then \
181 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
183 echo -I$${rootme}/gcc/include ; \
191 #### host and target specific makefile fragments come in here.
194 # Flags to pass down to all sub-makes.
195 # Please keep these in alphabetical order.
196 BASE_FLAGS_TO_PASS
= \
197 "AR_FLAGS=$(AR_FLAGS)" \
198 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
199 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
201 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
202 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
204 $(start-sanitize-chill
)\
205 "CHILLFLAGS=$(CHILLFLAGS)" \
206 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
207 "CHILL_LIB=$(CHILL_LIB)" \
208 $(end-sanitize-chill
)\
209 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
210 "CXXFLAGS=$(CXXFLAGS)" \
211 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
212 'GCC_FOR_TARGET=$$(CC_FOR_TARGET)' \
213 "INSTALL=$(INSTALL)" \
214 "INSTALL_DATA=$(INSTALL_DATA)" \
215 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
216 "LDFLAGS=$(LDFLAGS)" \
218 "LOADLIBES=$(LOADLIBES)" \
219 "MAKEINFO=$(MAKEINFO)" \
220 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
222 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
223 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
224 "exec_prefix=$(exec_prefix)" \
228 # Flags to pass down to most sub-makes, in which we're building with
229 # the host environment.
230 # If any variables are added here, they must be added to do-*, below.
240 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
242 # Flags that are concerned with the location of the X11 include files
244 X11_FLAGS_TO_PASS
= \
245 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
246 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
249 # Shell case of subdirectories which are built with the target environment.
250 TARGET_LIBS
=libg
++ | xiberty | newlib
251 $(start-sanitize-chill
)
252 TARGET_LIBS
=libg
++ | xiberty | newlib | chillrt
253 $(end-sanitize-chill
)
255 # Flags to pass down to makes which are built with the target environment.
256 # The double $ decreases the length of the command line; the variables
257 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
258 # If any variables are added here, they must be added to do-*, below.
259 EXTRA_TARGET_FLAGS
= \
260 'AR=$$(AR_FOR_TARGET)' \
261 'AS=$$(AS_FOR_TARGET)' \
262 'CC=$$(CC_FOR_TARGET)' \
263 'CXX=$$(CXX_FOR_TARGET)' \
264 'NM=$$(NM_FOR_TARGET)' \
265 'RANLIB=$$(RANLIB_FOR_TARGET)' \
266 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
268 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
270 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
271 # unfortunately needs the native compiler and the target ar and
273 # If any variables are added here, they must be added to do-*, below.
275 'AR=$$(AR_FOR_TARGET)' \
280 'RANLIB=$$(RANLIB_FOR_TARGET)' \
283 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
285 # The first rule in the file had better be this one. Don't put any above it.
288 .PHONY
: all check dvi info install-info install-info-dirs
289 .PHONY
: do-info do-check do-dvi do-install-info
290 .PHONY
: do-clean do-mostlyclean do-distclean do-realclean
294 # Do a target for all the subdirectories. A ``make do-X'' will do a
295 # ``make X'' in all subdirectories (because, in general, there is a
296 # dependency (below) of X upon do-X, a ``make X'' will also do this,
297 # but it may do additional work as well).
298 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
299 # because it is so large that it can easily overflow the command line
300 # length limit on some systems.
301 do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean
:
302 @target
=`echo $@ | sed -e 's/^do-//'`; \
303 rootme
=`pwd`; export rootme
; \
304 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
305 for i in
$(SUBDIRS
); do \
306 if
[ -f .
/$$i/Makefile
]; then \
309 for flag in
$(EXTRA_TARGET_FLAGS
); do \
310 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
314 for flag in
$(EXTRA_GCC_FLAGS
); do \
315 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
319 for flag in
$(EXTRA_HOST_FLAGS
); do \
320 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
324 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
326 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
327 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
328 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
330 then true
; else exit
1; fi
; \
338 install-info
: install-info-dirs do-install-info
dir.
info
339 if
[ -f
dir.
info ] ; then \
340 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
343 do-install-info
: install-info-dirs
345 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
346 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
347 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
348 all-make all-rcs all-cvs all-diff all-grep \
349 all-patch all-emacs all-ispell all-etc \
350 all-tcl all-tk all-expect \
352 $(start-sanitize-chill
) \
354 $(end-sanitize-chill
) \
355 all-gprof all-prms all-send-pr all-libm all-deja-gnu \
356 all-fileutils all-find all-gawk all-sed all-shellutils \
357 all-textutils all-time all-wdiff all-uudecode \
358 all-hello all-tar all-gzip all-indent all-recode
361 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
362 all-opcodes all-bfd all-readline all-sim \
363 all-gdb all-binutils all-gcc all-newlib \
364 $(start-sanitize-chill
) \
366 $(end-sanitize-chill
) \
369 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
372 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
375 -rm -f Makefile config.status
377 clean: do-clean local-clean
378 mostlyclean: do-mostlyclean local-clean
379 distclean: do-distclean local-clean local-distclean
380 realclean: do-realclean local-clean local-distclean
383 @echo
"the uninstall target is not supported in this tree"
385 install: $(INSTALL_TARGET
)
386 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
387 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
388 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
390 install.
all: install-no-fixedincludes
391 @if
[ -f .
/gcc
/Makefile
] ; then \
392 rootme
=`pwd` ; export rootme
; \
394 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
399 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
404 $(start-sanitize-chill
) \
406 $(end-sanitize-chill
) \
454 # Install the gcc headers files, but not the fixed include files,
455 # which we are not allowed to distribute. This rule is very dependent
456 # on the workings of the gcc Makefile.in.
458 gcc-no-fixedincludes
:
459 @if
[ -f .
/gcc
/Makefile
]; then \
460 rm -rf gcc
/tmp-include
; \
461 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
463 touch gcc
/stmp-fixincludes
; \
464 rm -f gcc
/stmp-headers
; \
465 rootme
=`pwd`; export rootme
; \
466 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
468 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
469 rm -rf gcc
/include; \
470 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
473 install.cross
: install-dirs install-libiberty install-mmalloc \
474 install-binutils install-opcodes install-byacc install-flex \
475 install-ld install-gas install-readline \
476 install-glob install-gdb install-mmalloc \
478 $(start-sanitize-chill
) \
480 $(end-sanitize-chill
) \
481 install-gcc install-etc install-deja-gnu
484 all-gzip
: all-libiberty
485 @if
[ -f .
/gzip
/Makefile
] ; then \
486 rootme
=`pwd` ; export rootme
; \
487 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
493 @if
[ -f .
/gzip
/Makefile
] ; then \
494 rootme
=`pwd` ; export rootme
; \
495 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
501 all-hello
: all-libiberty
502 @if
[ -f .
/hello
/Makefile
] ; then \
503 rootme
=`pwd` ; export rootme
; \
504 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
510 @if
[ -f .
/hello
/Makefile
] ; then \
511 rootme
=`pwd` ; export rootme
; \
512 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
518 all-recode
: all-libiberty
519 @if
[ -f .
/recode
/Makefile
] ; then \
520 rootme
=`pwd` ; export rootme
; \
521 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
526 install-recode
: force
527 @if
[ -f .
/recode
/Makefile
] ; then \
528 rootme
=`pwd` ; export rootme
; \
529 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
536 @if
[ -f .
/indent
/Makefile
] ; then \
537 rootme
=`pwd` ; export rootme
; \
538 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
543 install-indent
: force
544 @if
[ -f .
/indent
/Makefile
] ; then \
545 rootme
=`pwd` ; export rootme
; \
546 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
552 all-tar
: all-libiberty
553 @if
[ -f .
/tar/Makefile
] ; then \
554 rootme
=`pwd` ; export rootme
; \
555 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
561 @if
[ -f .
/tar/Makefile
] ; then \
562 rootme
=`pwd` ; export rootme
; \
563 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
571 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
572 rootme
=`pwd` ; export rootme
; \
573 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
578 install-deja-gnu
: force
579 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
580 rootme
=`pwd` ; export rootme
; \
581 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
588 @if
[ -f .
/autoconf
/Makefile
] ; then \
589 rootme
=`pwd` ; export rootme
; \
590 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
595 install-autoconf
: force
596 @if
[ -f .
/autoconf
/Makefile
] ; then \
597 rootme
=`pwd` ; export rootme
; \
598 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
605 @if
[ -f .
/etc
/Makefile
] ; then \
606 rootme
=`pwd` ; export rootme
; \
607 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
613 @if
[ -f .
/etc
/Makefile
] ; then \
614 rootme
=`pwd` ; export rootme
; \
615 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
622 @if
[ -f .
/libiberty
/Makefile
] ; then \
623 rootme
=`pwd` ; export rootme
; \
625 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
630 install-libiberty
: force
631 @if
[ -f .
/libiberty
/Makefile
] ; then \
632 rootme
=`pwd` ; export rootme
; \
634 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
640 all-xiberty
: all-gcc all-newlib
641 @if
[ -f .
/xiberty
/Makefile
] ; then \
642 rootme
=`pwd` ; export rootme
; \
643 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
645 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
650 install-xiberty
: force
651 @if
[ -f .
/xiberty
/Makefile
] ; then \
652 rootme
=`pwd` ; export rootme
; \
653 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
655 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
662 @if
[ -f .
/mmalloc
/Makefile
] ; then \
663 rootme
=`pwd` ; export rootme
; \
665 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
670 install-mmalloc
: force
671 @if
[ -f .
/mmalloc
/Makefile
] ; then \
672 rootme
=`pwd` ; export rootme
; \
674 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
680 all-texinfo
: all-libiberty
681 @if
[ -f .
/texinfo
/Makefile
] ; then \
682 rootme
=`pwd` ; export rootme
; \
684 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
689 install-texinfo
: force
690 @if
[ -f .
/texinfo
/Makefile
] ; then \
691 rootme
=`pwd` ; export rootme
; \
693 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
700 @if
[ -f .
/bfd
/Makefile
] ; then \
701 rootme
=`pwd` ; export rootme
; \
703 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
709 @if
[ -f .
/bfd
/Makefile
] ; then \
710 rootme
=`pwd` ; export rootme
; \
712 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
720 @if
[ -f .
/opcodes
/Makefile
] ; then \
721 rootme
=`pwd` ; export rootme
; \
723 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
728 install-opcodes
: force
729 @if
[ -f .
/opcodes
/Makefile
] ; then \
730 rootme
=`pwd` ; export rootme
; \
732 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
738 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
739 @if
[ -f .
/binutils
/Makefile
] ; then \
740 rootme
=`pwd` ; export rootme
; \
742 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
747 install-binutils
: force
748 @if
[ -f .
/binutils
/Makefile
] ; then \
749 rootme
=`pwd` ; export rootme
; \
751 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
757 all-newlib
: all-binutils all-ld all-gas all-gcc
758 @if
[ -f .
/newlib
/Makefile
] ; then \
759 rootme
=`pwd` ; export rootme
; \
760 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
762 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
767 install-newlib
: force
768 @if
[ -f .
/newlib
/Makefile
] ; then \
769 rootme
=`pwd` ; export rootme
; \
770 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
772 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
777 ### start-sanitize-chill
779 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
780 @if
[ -f .
/chillrt
/Makefile
] ; then \
781 rootme
=`pwd` ; export rootme
; \
782 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
784 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
789 install-chillrt
: force
790 @if
[ -f .
/chillrt
/Makefile
] ; then \
791 rootme
=`pwd` ; export rootme
; \
792 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
794 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
800 ### end-sanitize-chill
803 all-gprof
: all-libiberty all-bfd
804 @if
[ -f .
/gprof
/Makefile
] ; then \
805 rootme
=`pwd` ; export rootme
; \
807 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
813 @if
[ -f .
/gprof
/Makefile
] ; then \
814 rootme
=`pwd` ; export rootme
; \
816 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
823 @if
[ -f .
/byacc
/Makefile
] ; then \
824 rootme
=`pwd` ; export rootme
; \
826 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
832 @if
[ -f .
/byacc
/Makefile
] ; then \
833 rootme
=`pwd` ; export rootme
; \
835 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
841 all-flex
: all-libiberty
842 @if
[ -f .
/flex
/Makefile
] ; then \
843 rootme
=`pwd` ; export rootme
; \
845 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
851 @if
[ -f .
/flex
/Makefile
] ; then \
852 rootme
=`pwd` ; export rootme
; \
854 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
859 all-gcc
: all-libiberty all-byacc all-binutils all-gas
860 @if
[ -f .
/gcc
/Makefile
] ; then \
861 rootme
=`pwd` ; export rootme
; \
862 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
864 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
870 @if
[ -f .
/gcc
/Makefile
] ; then \
871 rootme
=`pwd` ; export rootme
; \
872 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
874 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
881 @if
[ -f .
/readline
/Makefile
] ; then \
882 rootme
=`pwd` ; export rootme
; \
884 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
889 install-readline
: force
890 @if
[ -f .
/readline
/Makefile
] ; then \
891 rootme
=`pwd` ; export rootme
; \
893 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
900 @if
[ -f .
/glob
/Makefile
] ; then \
901 rootme
=`pwd` ; export rootme
; \
903 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
909 @if
[ -f .
/glob
/Makefile
] ; then \
910 rootme
=`pwd` ; export rootme
; \
912 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
918 all-gas
: all-libiberty all-opcodes all-bfd
919 @if
[ -f .
/gas
/Makefile
] ; then \
920 rootme
=`pwd` ; export rootme
; \
922 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
928 @if
[ -f .
/gas
/Makefile
] ; then \
929 rootme
=`pwd` ; export rootme
; \
931 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
937 all-tgas
: all-libiberty all-bfd
938 @if
[ -f .
/tgas
/Makefile
] ; then \
939 rootme
=`pwd` ; export rootme
; \
941 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
948 all-ld
: all-libiberty all-bfd all-byacc all-flex
949 @if
[ -f .
/ld/Makefile
] ; then \
950 rootme
=`pwd` ; export rootme
; \
952 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
958 @if
[ -f .
/ld/Makefile
] ; then \
959 rootme
=`pwd` ; export rootme
; \
961 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
967 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
968 @if
[ -f .
/gdb
/Makefile
] ; then \
969 rootme
=`pwd` ; export rootme
; \
971 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
977 @if
[ -f .
/gdb
/Makefile
] ; then \
978 rootme
=`pwd` ; export rootme
; \
980 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
986 all-make
: all-libiberty
987 @if
[ -f .
/make
/Makefile
] ; then \
988 rootme
=`pwd` ; export rootme
; \
990 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
996 @if
[ -f .
/make
/Makefile
] ; then \
997 rootme
=`pwd` ; export rootme
; \
999 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1005 all-diff
: all-libiberty
1006 @if
[ -f .
/diff
/Makefile
] ; then \
1007 rootme
=`pwd` ; export rootme
; \
1009 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1015 @if
[ -f .
/diff
/Makefile
] ; then \
1016 rootme
=`pwd` ; export rootme
; \
1018 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1025 @if
[ -f .
/grep
/Makefile
] ; then \
1026 rootme
=`pwd` ; export rootme
; \
1028 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1034 @if
[ -f .
/grep
/Makefile
] ; then \
1035 rootme
=`pwd` ; export rootme
; \
1037 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1044 @if
[ -f .
/rcs
/Makefile
] ; then \
1045 rootme
=`pwd` ; export rootme
; \
1047 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1053 @if
[ -f .
/rcs
/Makefile
] ; then \
1054 rootme
=`pwd` ; export rootme
; \
1056 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1063 @if
[ -f .
/cvs
/Makefile
] ; then \
1064 rootme
=`pwd` ; export rootme
; \
1066 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1072 @if
[ -f .
/cvs
/Makefile
] ; then \
1073 rootme
=`pwd` ; export rootme
; \
1075 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1082 @if
[ -f .
/patch
/Makefile
] ; then \
1083 rootme
=`pwd` ; export rootme
; \
1085 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1090 install-patch
: force
1091 @if
[ -f .
/patch
/Makefile
] ; then \
1092 rootme
=`pwd` ; export rootme
; \
1094 $(MAKE
) $(FLAGS_TO_PASS
) \
1096 man1dir=$(man1dir) install) ; \
1103 @if
[ -f .
/emacs
/Makefile
] ; then \
1104 rootme
=`pwd` ; export rootme
; \
1106 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1111 install-emacs
: force
1112 @if
[ -f .
/emacs
/Makefile
] ; then \
1113 rootme
=`pwd` ; export rootme
; \
1115 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1121 all-ispell
: all-emacs
1122 @if
[ -f .
/ispell
/Makefile
] ; then \
1123 rootme
=`pwd` ; export rootme
; \
1125 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1130 install-ispell
: force
1131 @if
[ -f .
/ispell
/Makefile
] ; then \
1132 rootme
=`pwd` ; export rootme
; \
1134 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1141 @if
[ -f .
/prms
/Makefile
] ; then \
1142 rootme
=`pwd` ; export rootme
; \
1144 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1150 @if
[ -f .
/prms
/Makefile
] ; then \
1151 rootme
=`pwd` ; export rootme
; \
1153 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1160 @if
[ -f .
/send-pr
/Makefile
] ; then \
1161 rootme
=`pwd` ; export rootme
; \
1163 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1168 install-send-pr
: force
1169 @if
[ -f .
/send-pr
/Makefile
] ; then \
1170 rootme
=`pwd` ; export rootme
; \
1172 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1179 @if
[ -f .
/libm
/Makefile
] ; then \
1180 rootme
=`pwd` ; export rootme
; \
1182 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1188 @if
[ -f .
/libm
/Makefile
] ; then \
1189 rootme
=`pwd` ; export rootme
; \
1191 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1198 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1199 @if
[ -f .
/libg
++/Makefile
] ; then \
1200 rootme
=`pwd` ; export rootme
; \
1201 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1203 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1208 install-libg
++: force
1209 @if
[ -f .
/libg
++/Makefile
] ; then \
1210 rootme
=`pwd` ; export rootme
; \
1211 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1213 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1219 @if
[ -f .
/tcl
/Makefile
] ; then \
1220 rootme
=`pwd` ; export rootme
; \
1221 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1223 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1229 @if
[ -f .
/tcl
/Makefile
] ; then \
1230 rootme
=`pwd` ; export rootme
; \
1231 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1233 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1241 @if
[ -f .
/tk
/Makefile
] ; then \
1242 rootme
=`pwd` ; export rootme
; \
1243 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1245 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1251 @if
[ -f .
/tk
/Makefile
] ; then \
1252 rootme
=`pwd` ; export rootme
; \
1253 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1255 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1261 all-tclX
: all-tcl all-tk
1262 @if
[ -f .
/tclX
/Makefile
] ; then \
1263 rootme
=`pwd` ; export rootme
; \
1264 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1266 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1272 @if
[ -f .
/tclX
/Makefile
] ; then \
1273 rootme
=`pwd` ; export rootme
; \
1274 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1276 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1284 @if
[ -f .
/expect
/Makefile
] ; then \
1285 rootme
=`pwd` ; export rootme
; \
1286 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1288 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1293 install-expect
: force
1294 @if
[ -f .
/expect
/Makefile
] ; then \
1295 rootme
=`pwd` ; export rootme
; \
1296 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1298 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1305 @if
[ -f .
/sim
/Makefile
] ; then \
1306 rootme
=`pwd` ; export rootme
; \
1308 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1314 @if
[ -f .
/sim
/Makefile
] ; then \
1315 rootme
=`pwd` ; export rootme
; \
1317 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1323 all-fileutils
: force
1324 @if
[ -f .
/fileutils
/Makefile
] ; then \
1325 rootme
=`pwd` ; export rootme
; \
1326 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1331 install-fileutils
: force
1332 @if
[ -f .
/fileutils
/Makefile
] ; then \
1333 rootme
=`pwd` ; export rootme
; \
1334 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1341 @if
[ -f .
/find
/Makefile
] ; then \
1342 rootme
=`pwd` ; export rootme
; \
1343 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1349 @if
[ -f .
/find
/Makefile
] ; then \
1350 rootme
=`pwd` ; export rootme
; \
1351 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1358 @if
[ -f .
/gawk
/Makefile
] ; then \
1359 rootme
=`pwd` ; export rootme
; \
1360 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1366 @if
[ -f .
/gawk
/Makefile
] ; then \
1367 rootme
=`pwd` ; export rootme
; \
1368 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1374 all-m4
: all-libiberty
1375 @if
[ -f .
/m4
/Makefile
] ; then \
1376 rootme
=`pwd` ; export rootme
; \
1377 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1383 @if
[ -f .
/m4
/Makefile
] ; then \
1384 rootme
=`pwd` ; export rootme
; \
1385 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1392 @if
[ -f .
/sed
/Makefile
] ; then \
1393 rootme
=`pwd` ; export rootme
; \
1394 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1400 @if
[ -f .
/sed
/Makefile
] ; then \
1401 rootme
=`pwd` ; export rootme
; \
1402 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1409 @if
[ -f .
/time
/Makefile
] ; then \
1410 rootme
=`pwd` ; export rootme
; \
1411 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1417 @if
[ -f .
/time
/Makefile
] ; then \
1418 rootme
=`pwd` ; export rootme
; \
1419 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1426 @if
[ -f .
/wdiff
/Makefile
] ; then \
1427 rootme
=`pwd` ; export rootme
; \
1428 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1433 install-wdiff
: force
1434 @if
[ -f .
/wdiff
/Makefile
] ; then \
1435 rootme
=`pwd` ; export rootme
; \
1436 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1442 all-uudecode
: all-libiberty
1443 @if
[ -f .
/uudecode
/Makefile
] ; then \
1444 rootme
=`pwd` ; export rootme
; \
1445 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1450 install-uudecode
: force
1451 @if
[ -f .
/uudecode
/Makefile
] ; then \
1452 rootme
=`pwd` ; export rootme
; \
1453 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1459 all-shellutils
: force
1460 @if
[ -f .
/shellutils
/Makefile
] ; then \
1461 rootme
=`pwd` ; export rootme
; \
1462 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1467 install-shellutils
: force
1468 @if
[ -f .
/shellutils
/Makefile
] ; then \
1469 rootme
=`pwd` ; export rootme
; \
1470 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1476 all-textutils
: force
1477 @if
[ -f .
/textutils
/Makefile
] ; then \
1478 rootme
=`pwd` ; export rootme
; \
1479 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1484 install-textutils
: force
1485 @if
[ -f .
/textutils
/Makefile
] ; then \
1486 rootme
=`pwd` ; export rootme
; \
1487 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1494 ### other supporting targets
1518 for i in
$(MAKEDIRS
) ; do \
1519 echo Making
$$i...
; \
1520 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1521 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1522 if
[ ! -d
$$i ] ; then \
1523 if mkdir
$$i ; then \
1534 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1535 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1536 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1537 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1539 dir.
info: do-install-info
1540 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1541 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1542 mv
-f
dir.
info.new
dir.
info ; \
1547 @echo
"Building a full distribution of this tree isn't done"
1548 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1557 @for i in
$(SUBDIRS
); \
1561 wd
=`basename $$pwd`; \
1562 for j in
`$(MAKE) ls`; \
1570 # with the gnu make, this is done automatically.
1572 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1573 $(SHELL
) .
/config.status
1576 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1578 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1579 config.guess config.sub config move-if-change
1580 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1582 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
1583 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1588 .
/configure
-rm sun4
1589 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1591 gdb.
tar.Z
: setup-dirs
1592 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
1593 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1595 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1596 rm -rf proto-toplev
; mkdir proto-toplev
1597 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1598 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1601 mkdir proto-toplev
/etc
1602 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1603 ln
-s ..
/..
/etc
/$$i .
; \
1605 # Put only one copy (four hard links) of COPYING in the tar file.
1606 rm proto-toplev
/bfd
/COPYING
1607 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1608 rm proto-toplev
/include/COPYING
1609 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1610 rm proto-toplev
/readline
/COPYING
1611 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1613 # Take out texinfo and glob from configurable dirs
1614 rm proto-toplev
/configure.in
1615 sed
-e
'/^host_tools=/s/texinfo //' \
1616 -e
'/^host_libs=/s/glob //' \
1617 <configure.in
>proto-toplev
/configure.in
1619 # Take out texinfo from a few places; make simple BISON=bison line.
1620 rm proto-toplev
/Makefile.in
1621 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1622 -e
'/^ install-texinfo /d' \
1623 -e
'\/^BISON =/,\/^$$/c\
1625 <Makefile.in
>proto-toplev
/Makefile.in
1627 mkdir proto-toplev
/texinfo
1628 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1629 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1630 chmod og
=u
`find proto-toplev -print`
1631 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1632 echo
"==> Making gdb-$$VER.tar.Z"; \
1633 ln
-s proto-toplev gdb-
$$VER; \
1634 tar cfh
- gdb-
$$VER \
1635 | compress
-v
>gdb-
$$VER.
tar.Z
)
1636 $(GZIP
) -d
<gdb-
$$VER.
tar.Z |
$(GZIP
) -9 -v
>gdb-
$$VER.
tar.z
1638 # end of Makefile.in