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; \
124 if [ -f $${rootme}/gcc/Makefile ] ; then \
125 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
127 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
130 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
135 if [ -f $${rootme}/gas/Makefile ] ; then \
136 echo $${rootme}/gas/as.new ; \
138 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
141 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
146 if [ -f $${rootme}/binutils/Makefile ] ; then \
147 echo $${rootme}/binutils/ar ; \
149 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
152 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
156 RANLIB_FOR_TARGET
= ` \
157 if [ -f $${rootme}/binutils/Makefile ] ; then \
158 echo $${rootme}/binutils/ranlib ; \
160 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
163 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
168 if [ -f $${rootme}/binutils/Makefile ] ; then \
169 echo $${rootme}/binutils/nm ; \
171 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
174 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
178 # FIXME: This is badly named.
180 if [ -f $${rootme}/gcc/Makefile ] ; then \
181 if [ -f $${rootme}/newlib/Makefile ] ; then \
182 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
184 echo -I$${rootme}/gcc/include ; \
192 #### host and target specific makefile fragments come in here.
195 # Flags to pass down to all sub-makes.
196 # Please keep these in alphabetical order.
197 BASE_FLAGS_TO_PASS
= \
198 "AR_FLAGS=$(AR_FLAGS)" \
199 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
200 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
202 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
203 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
205 $(start-sanitize-chill
)\
206 "CHILLFLAGS=$(CHILLFLAGS)" \
207 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
208 "CHILL_LIB=$(CHILL_LIB)" \
209 $(end-sanitize-chill
)\
210 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
211 "CXXFLAGS=$(CXXFLAGS)" \
212 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
213 'GCC_FOR_TARGET=$$(CC_FOR_TARGET)' \
214 "INSTALL=$(INSTALL)" \
215 "INSTALL_DATA=$(INSTALL_DATA)" \
216 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
217 "LDFLAGS=$(LDFLAGS)" \
219 "LOADLIBES=$(LOADLIBES)" \
220 "MAKEINFO=$(MAKEINFO)" \
221 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
223 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
224 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
225 "exec_prefix=$(exec_prefix)" \
229 # Flags to pass down to most sub-makes, in which we're building with
230 # the host environment.
231 # If any variables are added here, they must be added to do-*, below.
241 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
243 # Flags that are concerned with the location of the X11 include files
245 X11_FLAGS_TO_PASS
= \
246 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
247 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
250 # Shell case of subdirectories which are built with the target environment.
251 TARGET_LIBS
=libg
++ | xiberty | newlib
252 # start-sanitize-chill
253 TARGET_LIBS
=libg
++ | xiberty | newlib | chillrt
256 # Flags to pass down to makes which are built with the target environment.
257 # The double $ decreases the length of the command line; the variables
258 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
259 # If any variables are added here, they must be added to do-*, below.
260 EXTRA_TARGET_FLAGS
= \
261 'AR=$$(AR_FOR_TARGET)' \
262 'AS=$$(AS_FOR_TARGET)' \
263 'CC=$$(CC_FOR_TARGET)' \
264 'CXX=$$(CXX_FOR_TARGET)' \
265 'NM=$$(NM_FOR_TARGET)' \
266 'RANLIB=$$(RANLIB_FOR_TARGET)' \
267 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
269 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
271 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
272 # unfortunately needs the native compiler and the target ar and
274 # If any variables are added here, they must be added to do-*, below.
276 'AR=$$(AR_FOR_TARGET)' \
281 'RANLIB=$$(RANLIB_FOR_TARGET)' \
284 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
286 # The first rule in the file had better be this one. Don't put any above it.
289 .PHONY
: all check installcheck dvi info install-info install-info-dirs
290 .PHONY
: do-info do-check do-installcheck do-dvi do-install-info
291 .PHONY
: do-clean do-mostlyclean do-distclean do-realclean
295 # start-sanitize-chill
296 ## This is ugly, but I don't want GNU make to put these variables in
297 ## the environment. Older makes will see this as a set of targets
298 ## with no dependencies and no actions.
299 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
302 # Do a target for all the subdirectories. A ``make do-X'' will do a
303 # ``make X'' in all subdirectories (because, in general, there is a
304 # dependency (below) of X upon do-X, a ``make X'' will also do this,
305 # but it may do additional work as well).
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-installcheck 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/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
; \
344 installcheck: do-installcheck
347 install-info
: install-info-dirs do-install-info
dir.
info
348 if
[ -f
dir.
info ] ; then \
349 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
352 do-install-info
: install-info-dirs
354 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
355 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
356 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
357 all-make all-rcs all-cvs all-diff all-grep \
358 all-patch all-emacs all-ispell all-etc \
359 all-tcl all-tk all-expect \
361 $(start-sanitize-chill
) \
363 $(end-sanitize-chill
) \
364 all-gprof all-prms all-send-pr all-libm all-dejagnu \
365 all-fileutils all-find all-gawk all-sed all-shellutils \
366 all-textutils all-time all-wdiff all-uudecode \
367 all-hello all-tar all-gzip all-indent all-recode
370 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
371 all-opcodes all-bfd all-readline all-sim \
372 all-gdb all-binutils all-gcc all-newlib \
373 $(start-sanitize-chill
) \
375 $(end-sanitize-chill
) \
378 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
381 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
384 -rm -f Makefile config.status
386 clean: do-clean local-clean
387 mostlyclean: do-mostlyclean local-clean
388 distclean: do-distclean local-clean local-distclean
389 realclean: do-realclean local-clean local-distclean
392 @echo
"the uninstall target is not supported in this tree"
394 install: $(INSTALL_TARGET
)
395 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
396 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
397 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
399 install.
all: install-no-fixedincludes
400 @if
[ -f .
/gcc
/Makefile
] ; then \
401 rootme
=`pwd` ; export rootme
; \
403 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
408 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
413 $(start-sanitize-chill
) \
415 $(end-sanitize-chill
) \
463 # Install the gcc headers files, but not the fixed include files,
464 # which we are not allowed to distribute. This rule is very dependent
465 # on the workings of the gcc Makefile.in.
467 gcc-no-fixedincludes
:
468 @if
[ -f .
/gcc
/Makefile
]; then \
469 rm -rf gcc
/tmp-include
; \
470 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
472 touch gcc
/stmp-fixincludes
; \
473 rm -f gcc
/stmp-headers
; \
474 rootme
=`pwd`; export rootme
; \
475 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
477 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
478 rm -rf gcc
/include; \
479 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
482 install.cross
: install-dirs install-libiberty install-mmalloc \
483 install-binutils install-opcodes install-byacc install-flex \
484 install-ld install-gas install-readline \
485 install-glob install-gdb install-mmalloc \
487 $(start-sanitize-chill
) \
489 $(end-sanitize-chill
) \
490 install-gcc install-etc install-dejagnu
493 all-gzip
: all-libiberty
494 @if
[ -f .
/gzip
/Makefile
] ; then \
495 rootme
=`pwd` ; export rootme
; \
496 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
502 @if
[ -f .
/gzip
/Makefile
] ; then \
503 rootme
=`pwd` ; export rootme
; \
504 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
510 all-hello
: all-libiberty
511 @if
[ -f .
/hello
/Makefile
] ; then \
512 rootme
=`pwd` ; export rootme
; \
513 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
519 @if
[ -f .
/hello
/Makefile
] ; then \
520 rootme
=`pwd` ; export rootme
; \
521 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
527 all-recode
: all-libiberty
528 @if
[ -f .
/recode
/Makefile
] ; then \
529 rootme
=`pwd` ; export rootme
; \
530 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
535 install-recode
: force
536 @if
[ -f .
/recode
/Makefile
] ; then \
537 rootme
=`pwd` ; export rootme
; \
538 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
545 @if
[ -f .
/indent
/Makefile
] ; then \
546 rootme
=`pwd` ; export rootme
; \
547 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
552 install-indent
: force
553 @if
[ -f .
/indent
/Makefile
] ; then \
554 rootme
=`pwd` ; export rootme
; \
555 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
561 all-tar
: all-libiberty
562 @if
[ -f .
/tar/Makefile
] ; then \
563 rootme
=`pwd` ; export rootme
; \
564 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
570 @if
[ -f .
/tar/Makefile
] ; then \
571 rootme
=`pwd` ; export rootme
; \
572 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
580 @if
[ -f .
/dejagnu
/Makefile
] ; then \
581 rootme
=`pwd` ; export rootme
; \
582 (cd .
/dejagnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
587 install-dejagnu
: force
588 @if
[ -f .
/dejagnu
/Makefile
] ; then \
589 rootme
=`pwd` ; export rootme
; \
590 (cd .
/dejagnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
597 @if
[ -f .
/autoconf
/Makefile
] ; then \
598 rootme
=`pwd` ; export rootme
; \
599 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
604 install-autoconf
: force
605 @if
[ -f .
/autoconf
/Makefile
] ; then \
606 rootme
=`pwd` ; export rootme
; \
607 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
614 @if
[ -f .
/etc
/Makefile
] ; then \
615 rootme
=`pwd` ; export rootme
; \
616 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
622 @if
[ -f .
/etc
/Makefile
] ; then \
623 rootme
=`pwd` ; export rootme
; \
624 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
631 @if
[ -f .
/libiberty
/Makefile
] ; then \
632 rootme
=`pwd` ; export rootme
; \
634 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
639 install-libiberty
: force
640 @if
[ -f .
/libiberty
/Makefile
] ; then \
641 rootme
=`pwd` ; export rootme
; \
643 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
649 all-xiberty
: all-gcc all-newlib
650 @if
[ -f .
/xiberty
/Makefile
] ; then \
651 rootme
=`pwd` ; export rootme
; \
652 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
654 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
659 install-xiberty
: force
660 @if
[ -f .
/xiberty
/Makefile
] ; then \
661 rootme
=`pwd` ; export rootme
; \
662 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
664 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
671 @if
[ -f .
/mmalloc
/Makefile
] ; then \
672 rootme
=`pwd` ; export rootme
; \
674 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
679 install-mmalloc
: force
680 @if
[ -f .
/mmalloc
/Makefile
] ; then \
681 rootme
=`pwd` ; export rootme
; \
683 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
689 all-texinfo
: all-libiberty
690 @if
[ -f .
/texinfo
/Makefile
] ; then \
691 rootme
=`pwd` ; export rootme
; \
693 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
698 install-texinfo
: force
699 @if
[ -f .
/texinfo
/Makefile
] ; then \
700 rootme
=`pwd` ; export rootme
; \
702 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
709 @if
[ -f .
/bfd
/Makefile
] ; then \
710 rootme
=`pwd` ; export rootme
; \
712 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
718 @if
[ -f .
/bfd
/Makefile
] ; then \
719 rootme
=`pwd` ; export rootme
; \
721 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
729 @if
[ -f .
/opcodes
/Makefile
] ; then \
730 rootme
=`pwd` ; export rootme
; \
732 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
737 install-opcodes
: force
738 @if
[ -f .
/opcodes
/Makefile
] ; then \
739 rootme
=`pwd` ; export rootme
; \
741 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
747 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
748 @if
[ -f .
/binutils
/Makefile
] ; then \
749 rootme
=`pwd` ; export rootme
; \
751 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
756 install-binutils
: force
757 @if
[ -f .
/binutils
/Makefile
] ; then \
758 rootme
=`pwd` ; export rootme
; \
760 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
766 all-newlib
: all-binutils all-ld all-gas all-gcc
767 @if
[ -f .
/newlib
/Makefile
] ; then \
768 rootme
=`pwd` ; export rootme
; \
769 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
771 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
776 install-newlib
: force
777 @if
[ -f .
/newlib
/Makefile
] ; then \
778 rootme
=`pwd` ; export rootme
; \
779 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
781 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
786 ### start-sanitize-chill
788 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
789 @if
[ -f .
/chillrt
/Makefile
] ; then \
790 rootme
=`pwd` ; export rootme
; \
791 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
793 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
798 install-chillrt
: force
799 @if
[ -f .
/chillrt
/Makefile
] ; then \
800 rootme
=`pwd` ; export rootme
; \
801 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
803 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
808 ### end-sanitize-chill
811 all-gprof
: all-libiberty all-bfd
812 @if
[ -f .
/gprof
/Makefile
] ; then \
813 rootme
=`pwd` ; export rootme
; \
815 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
821 @if
[ -f .
/gprof
/Makefile
] ; then \
822 rootme
=`pwd` ; export rootme
; \
824 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
831 @if
[ -f .
/byacc
/Makefile
] ; then \
832 rootme
=`pwd` ; export rootme
; \
834 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
840 @if
[ -f .
/byacc
/Makefile
] ; then \
841 rootme
=`pwd` ; export rootme
; \
843 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
849 all-flex
: all-libiberty
850 @if
[ -f .
/flex
/Makefile
] ; then \
851 rootme
=`pwd` ; export rootme
; \
853 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
859 @if
[ -f .
/flex
/Makefile
] ; then \
860 rootme
=`pwd` ; export rootme
; \
862 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
867 all-gcc
: all-libiberty all-byacc all-binutils all-gas
868 @if
[ -f .
/gcc
/Makefile
] ; then \
869 rootme
=`pwd` ; export rootme
; \
870 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
872 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
878 @if
[ -f .
/gcc
/Makefile
] ; then \
879 rootme
=`pwd` ; export rootme
; \
880 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
882 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
889 @if
[ -f .
/readline
/Makefile
] ; then \
890 rootme
=`pwd` ; export rootme
; \
892 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
897 install-readline
: force
898 @if
[ -f .
/readline
/Makefile
] ; then \
899 rootme
=`pwd` ; export rootme
; \
901 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
908 @if
[ -f .
/glob
/Makefile
] ; then \
909 rootme
=`pwd` ; export rootme
; \
911 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
917 @if
[ -f .
/glob
/Makefile
] ; then \
918 rootme
=`pwd` ; export rootme
; \
920 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
926 all-gas
: all-libiberty all-opcodes all-bfd
927 @if
[ -f .
/gas
/Makefile
] ; then \
928 rootme
=`pwd` ; export rootme
; \
930 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
936 @if
[ -f .
/gas
/Makefile
] ; then \
937 rootme
=`pwd` ; export rootme
; \
939 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
945 all-tgas
: all-libiberty all-bfd
946 @if
[ -f .
/tgas
/Makefile
] ; then \
947 rootme
=`pwd` ; export rootme
; \
949 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
956 all-ld
: all-libiberty all-bfd all-byacc all-flex
957 @if
[ -f .
/ld/Makefile
] ; then \
958 rootme
=`pwd` ; export rootme
; \
960 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
966 @if
[ -f .
/ld/Makefile
] ; then \
967 rootme
=`pwd` ; export rootme
; \
969 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
975 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
976 @if
[ -f .
/gdb
/Makefile
] ; then \
977 rootme
=`pwd` ; export rootme
; \
979 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
985 @if
[ -f .
/gdb
/Makefile
] ; then \
986 rootme
=`pwd` ; export rootme
; \
988 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
994 all-make
: all-libiberty
995 @if
[ -f .
/make
/Makefile
] ; then \
996 rootme
=`pwd` ; export rootme
; \
998 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1004 @if
[ -f .
/make
/Makefile
] ; then \
1005 rootme
=`pwd` ; export rootme
; \
1007 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1013 all-diff
: all-libiberty
1014 @if
[ -f .
/diff
/Makefile
] ; then \
1015 rootme
=`pwd` ; export rootme
; \
1017 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1023 @if
[ -f .
/diff
/Makefile
] ; then \
1024 rootme
=`pwd` ; export rootme
; \
1026 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1033 @if
[ -f .
/grep
/Makefile
] ; then \
1034 rootme
=`pwd` ; export rootme
; \
1036 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1042 @if
[ -f .
/grep
/Makefile
] ; then \
1043 rootme
=`pwd` ; export rootme
; \
1045 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1052 @if
[ -f .
/rcs
/Makefile
] ; then \
1053 rootme
=`pwd` ; export rootme
; \
1055 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1061 @if
[ -f .
/rcs
/Makefile
] ; then \
1062 rootme
=`pwd` ; export rootme
; \
1064 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1071 @if
[ -f .
/cvs
/Makefile
] ; then \
1072 rootme
=`pwd` ; export rootme
; \
1074 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1080 @if
[ -f .
/cvs
/Makefile
] ; then \
1081 rootme
=`pwd` ; export rootme
; \
1083 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1090 @if
[ -f .
/patch
/Makefile
] ; then \
1091 rootme
=`pwd` ; export rootme
; \
1093 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1098 install-patch
: force
1099 @if
[ -f .
/patch
/Makefile
] ; then \
1100 rootme
=`pwd` ; export rootme
; \
1102 $(MAKE
) $(FLAGS_TO_PASS
) \
1104 man1dir=$(man1dir) install) ; \
1111 @if
[ -f .
/emacs
/Makefile
] ; then \
1112 rootme
=`pwd` ; export rootme
; \
1114 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1119 install-emacs
: force
1120 @if
[ -f .
/emacs
/Makefile
] ; then \
1121 rootme
=`pwd` ; export rootme
; \
1123 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1129 all-ispell
: all-emacs
1130 @if
[ -f .
/ispell
/Makefile
] ; then \
1131 rootme
=`pwd` ; export rootme
; \
1133 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1138 install-ispell
: force
1139 @if
[ -f .
/ispell
/Makefile
] ; then \
1140 rootme
=`pwd` ; export rootme
; \
1142 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1149 @if
[ -f .
/prms
/Makefile
] ; then \
1150 rootme
=`pwd` ; export rootme
; \
1152 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1158 @if
[ -f .
/prms
/Makefile
] ; then \
1159 rootme
=`pwd` ; export rootme
; \
1161 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1168 @if
[ -f .
/send-pr
/Makefile
] ; then \
1169 rootme
=`pwd` ; export rootme
; \
1171 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1176 install-send-pr
: force
1177 @if
[ -f .
/send-pr
/Makefile
] ; then \
1178 rootme
=`pwd` ; export rootme
; \
1180 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1187 @if
[ -f .
/libm
/Makefile
] ; then \
1188 rootme
=`pwd` ; export rootme
; \
1190 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1196 @if
[ -f .
/libm
/Makefile
] ; then \
1197 rootme
=`pwd` ; export rootme
; \
1199 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1206 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1207 @if
[ -f .
/libg
++/Makefile
] ; then \
1208 rootme
=`pwd` ; export rootme
; \
1209 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1211 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1216 install-libg
++: force
1217 @if
[ -f .
/libg
++/Makefile
] ; then \
1218 rootme
=`pwd` ; export rootme
; \
1219 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1221 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1227 @if
[ -f .
/tcl
/Makefile
] ; then \
1228 rootme
=`pwd` ; export rootme
; \
1229 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1231 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1237 @if
[ -f .
/tcl
/Makefile
] ; then \
1238 rootme
=`pwd` ; export rootme
; \
1239 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1241 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1249 @if
[ -f .
/tk
/Makefile
] ; then \
1250 rootme
=`pwd` ; export rootme
; \
1251 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1253 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1259 @if
[ -f .
/tk
/Makefile
] ; then \
1260 rootme
=`pwd` ; export rootme
; \
1261 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1263 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1269 all-tclX
: all-tcl all-tk
1270 @if
[ -f .
/tclX
/Makefile
] ; then \
1271 rootme
=`pwd` ; export rootme
; \
1272 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1274 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1280 @if
[ -f .
/tclX
/Makefile
] ; then \
1281 rootme
=`pwd` ; export rootme
; \
1282 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1284 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1292 @if
[ -f .
/expect
/Makefile
] ; then \
1293 rootme
=`pwd` ; export rootme
; \
1294 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1296 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1301 install-expect
: force
1302 @if
[ -f .
/expect
/Makefile
] ; then \
1303 rootme
=`pwd` ; export rootme
; \
1304 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1306 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1313 @if
[ -f .
/sim
/Makefile
] ; then \
1314 rootme
=`pwd` ; export rootme
; \
1316 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1322 @if
[ -f .
/sim
/Makefile
] ; then \
1323 rootme
=`pwd` ; export rootme
; \
1325 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1331 all-fileutils
: force
1332 @if
[ -f .
/fileutils
/Makefile
] ; then \
1333 rootme
=`pwd` ; export rootme
; \
1334 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1339 install-fileutils
: force
1340 @if
[ -f .
/fileutils
/Makefile
] ; then \
1341 rootme
=`pwd` ; export rootme
; \
1342 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1349 @if
[ -f .
/find
/Makefile
] ; then \
1350 rootme
=`pwd` ; export rootme
; \
1351 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1357 @if
[ -f .
/find
/Makefile
] ; then \
1358 rootme
=`pwd` ; export rootme
; \
1359 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1366 @if
[ -f .
/gawk
/Makefile
] ; then \
1367 rootme
=`pwd` ; export rootme
; \
1368 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1374 @if
[ -f .
/gawk
/Makefile
] ; then \
1375 rootme
=`pwd` ; export rootme
; \
1376 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1382 all-m4
: all-libiberty
1383 @if
[ -f .
/m4
/Makefile
] ; then \
1384 rootme
=`pwd` ; export rootme
; \
1385 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1391 @if
[ -f .
/m4
/Makefile
] ; then \
1392 rootme
=`pwd` ; export rootme
; \
1393 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1400 @if
[ -f .
/sed
/Makefile
] ; then \
1401 rootme
=`pwd` ; export rootme
; \
1402 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1408 @if
[ -f .
/sed
/Makefile
] ; then \
1409 rootme
=`pwd` ; export rootme
; \
1410 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1417 @if
[ -f .
/time
/Makefile
] ; then \
1418 rootme
=`pwd` ; export rootme
; \
1419 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1425 @if
[ -f .
/time
/Makefile
] ; then \
1426 rootme
=`pwd` ; export rootme
; \
1427 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1434 @if
[ -f .
/wdiff
/Makefile
] ; then \
1435 rootme
=`pwd` ; export rootme
; \
1436 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1441 install-wdiff
: force
1442 @if
[ -f .
/wdiff
/Makefile
] ; then \
1443 rootme
=`pwd` ; export rootme
; \
1444 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1450 all-uudecode
: all-libiberty
1451 @if
[ -f .
/uudecode
/Makefile
] ; then \
1452 rootme
=`pwd` ; export rootme
; \
1453 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1458 install-uudecode
: force
1459 @if
[ -f .
/uudecode
/Makefile
] ; then \
1460 rootme
=`pwd` ; export rootme
; \
1461 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1467 all-shellutils
: force
1468 @if
[ -f .
/shellutils
/Makefile
] ; then \
1469 rootme
=`pwd` ; export rootme
; \
1470 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1475 install-shellutils
: force
1476 @if
[ -f .
/shellutils
/Makefile
] ; then \
1477 rootme
=`pwd` ; export rootme
; \
1478 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1484 all-textutils
: force
1485 @if
[ -f .
/textutils
/Makefile
] ; then \
1486 rootme
=`pwd` ; export rootme
; \
1487 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1492 install-textutils
: force
1493 @if
[ -f .
/textutils
/Makefile
] ; then \
1494 rootme
=`pwd` ; export rootme
; \
1495 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1502 ### other supporting targets
1526 for i in
$(MAKEDIRS
) ; do \
1527 echo Making
$$i...
; \
1528 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1529 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1530 if
[ ! -d
$$i ] ; then \
1531 if mkdir
$$i ; then \
1542 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1543 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1544 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1545 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1547 dir.
info: do-install-info
1548 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1549 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1550 mv
-f
dir.
info.new
dir.
info ; \
1555 @echo
"Building a full distribution of this tree isn't done"
1556 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1565 @for i in
$(SUBDIRS
); \
1569 wd
=`basename $$pwd`; \
1570 for j in
`$(MAKE) ls`; \
1578 # with the gnu make, this is done automatically.
1580 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1581 $(SHELL
) .
/config.status
1584 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1586 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1587 config.guess config.sub config move-if-change
1588 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1590 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
1591 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1596 .
/configure
-rm sun4
1597 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1599 gdb.
tar.Z
: setup-dirs
1600 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
1601 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1603 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1604 rm -rf proto-toplev
; mkdir proto-toplev
1605 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1606 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1609 mkdir proto-toplev
/etc
1610 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1611 ln
-s ..
/..
/etc
/$$i .
; \
1613 # Put only one copy (four hard links) of COPYING in the tar file.
1614 rm proto-toplev
/bfd
/COPYING
1615 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1616 rm proto-toplev
/include/COPYING
1617 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1618 rm proto-toplev
/readline
/COPYING
1619 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1621 # Take out texinfo and glob from configurable dirs
1622 rm proto-toplev
/configure.in
1623 sed
-e
'/^host_tools=/s/texinfo //' \
1624 -e
'/^host_libs=/s/glob //' \
1625 <configure.in
>proto-toplev
/configure.in
1627 # Take out texinfo from a few places; make simple BISON=bison line.
1628 rm proto-toplev
/Makefile.in
1629 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1630 -e
'/^ install-texinfo /d' \
1631 -e
'\/^BISON =/,\/^$$/c\
1633 <Makefile.in
>proto-toplev
/Makefile.in
1635 mkdir proto-toplev
/texinfo
1636 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1637 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1638 chmod og
=u
`find proto-toplev -print`
1639 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1640 echo
"==> Making gdb-$$VER.tar.Z"; \
1641 ln
-s proto-toplev gdb-
$$VER; \
1642 tar cfh
- gdb-
$$VER \
1643 | compress
-v
>gdb-
$$VER.
tar.Z
)
1644 $(GZIP
) -d
<gdb-
$$VER.
tar.Z |
$(GZIP
) -9 -v
>gdb-
$$VER.
tar.z
1646 # end of Makefile.in