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; \
121 ## This is ugly, but I don't want GNU make to put these variables in
122 ## the environment. Older makes will see this as a set of targets
123 ## with no dependencies and no actions.
124 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
126 $(end-sanitize-chill
)
129 if [ -f $${rootme}/gcc/Makefile ] ; then \
130 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
132 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
135 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
140 if [ -f $${rootme}/gas/Makefile ] ; then \
141 echo $${rootme}/gas/as.new ; \
143 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
146 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
151 if [ -f $${rootme}/binutils/Makefile ] ; then \
152 echo $${rootme}/binutils/ar ; \
154 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
157 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
161 RANLIB_FOR_TARGET
= ` \
162 if [ -f $${rootme}/binutils/Makefile ] ; then \
163 echo $${rootme}/binutils/ranlib ; \
165 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
168 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
173 if [ -f $${rootme}/binutils/Makefile ] ; then \
174 echo $${rootme}/binutils/nm ; \
176 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
179 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
183 # FIXME: This is badly named.
185 if [ -f $${rootme}/gcc/Makefile ] ; then \
186 if [ -f $${rootme}/newlib/Makefile ] ; then \
187 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
189 echo -I$${rootme}/gcc/include ; \
197 #### host and target specific makefile fragments come in here.
200 # Flags to pass down to all sub-makes.
201 # Please keep these in alphabetical order.
202 BASE_FLAGS_TO_PASS
= \
203 "AR_FLAGS=$(AR_FLAGS)" \
204 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
205 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
207 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
208 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
210 $(start-sanitize-chill
)\
211 "CHILLFLAGS=$(CHILLFLAGS)" \
212 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
213 "CHILL_LIB=$(CHILL_LIB)" \
214 $(end-sanitize-chill
)\
215 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
216 "CXXFLAGS=$(CXXFLAGS)" \
217 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
218 'GCC_FOR_TARGET=$$(CC_FOR_TARGET)' \
219 "INSTALL=$(INSTALL)" \
220 "INSTALL_DATA=$(INSTALL_DATA)" \
221 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
222 "LDFLAGS=$(LDFLAGS)" \
224 "LOADLIBES=$(LOADLIBES)" \
225 "MAKEINFO=$(MAKEINFO)" \
226 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
228 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
229 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
230 "exec_prefix=$(exec_prefix)" \
234 # Flags to pass down to most sub-makes, in which we're building with
235 # the host environment.
236 # If any variables are added here, they must be added to do-*, below.
246 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
248 # Flags that are concerned with the location of the X11 include files
250 X11_FLAGS_TO_PASS
= \
251 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
252 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
255 # Shell case of subdirectories which are built with the target environment.
256 TARGET_LIBS
=libg
++ | xiberty | newlib
257 $(start-sanitize-chill
)
258 TARGET_LIBS
=libg
++ | xiberty | newlib | chillrt
259 $(end-sanitize-chill
)
261 # Flags to pass down to makes which are built with the target environment.
262 # The double $ decreases the length of the command line; the variables
263 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
264 # If any variables are added here, they must be added to do-*, below.
265 EXTRA_TARGET_FLAGS
= \
266 'AR=$$(AR_FOR_TARGET)' \
267 'AS=$$(AS_FOR_TARGET)' \
268 'CC=$$(CC_FOR_TARGET)' \
269 'CXX=$$(CXX_FOR_TARGET)' \
270 'NM=$$(NM_FOR_TARGET)' \
271 'RANLIB=$$(RANLIB_FOR_TARGET)' \
272 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
274 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
276 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
277 # unfortunately needs the native compiler and the target ar and
279 # If any variables are added here, they must be added to do-*, below.
281 'AR=$$(AR_FOR_TARGET)' \
286 'RANLIB=$$(RANLIB_FOR_TARGET)' \
289 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
291 # The first rule in the file had better be this one. Don't put any above it.
294 .PHONY
: all check dvi info install-info install-info-dirs
295 .PHONY
: do-info do-check do-dvi do-install-info
296 .PHONY
: do-clean do-mostlyclean do-distclean do-realclean
300 # Do a target for all the subdirectories. A ``make do-X'' will do a
301 # ``make X'' in all subdirectories (because, in general, there is a
302 # dependency (below) of X upon do-X, a ``make X'' will also do this,
303 # but it may do additional work as well).
304 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
305 # because it is so large that it can easily overflow the command line
306 # length limit on some systems.
307 do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean
:
308 @target
=`echo $@ | sed -e 's/^do-//'`; \
309 rootme
=`pwd`; export rootme
; \
310 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
311 for i in
$(SUBDIRS
); do \
312 if
[ -f .
/$$i/Makefile
]; then \
315 for flag in
$(EXTRA_TARGET_FLAGS
); do \
316 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
320 for flag in
$(EXTRA_GCC_FLAGS
); do \
321 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
325 for flag in
$(EXTRA_HOST_FLAGS
); do \
326 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
330 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
332 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
333 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
334 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
336 then true
; else exit
1; fi
; \
344 install-info
: install-info-dirs do-install-info
dir.
info
345 if
[ -f
dir.
info ] ; then \
346 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
349 do-install-info
: install-info-dirs
351 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
352 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
353 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
354 all-make all-rcs all-cvs all-diff all-grep \
355 all-patch all-emacs all-ispell all-etc \
356 all-tcl all-tk all-expect \
358 $(start-sanitize-chill
) \
360 $(end-sanitize-chill
) \
361 all-gprof all-prms all-send-pr all-libm all-dejagnu \
362 all-fileutils all-find all-gawk all-sed all-shellutils \
363 all-textutils all-time all-wdiff all-uudecode \
364 all-hello all-tar all-gzip all-indent all-recode
367 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
368 all-opcodes all-bfd all-readline all-sim \
369 all-gdb all-binutils all-gcc all-newlib \
370 $(start-sanitize-chill
) \
372 $(end-sanitize-chill
) \
375 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
378 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
381 -rm -f Makefile config.status
383 clean: do-clean local-clean
384 mostlyclean: do-mostlyclean local-clean
385 distclean: do-distclean local-clean local-distclean
386 realclean: do-realclean local-clean local-distclean
389 @echo
"the uninstall target is not supported in this tree"
391 install: $(INSTALL_TARGET
)
392 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
393 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
394 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
396 install.
all: install-no-fixedincludes
397 @if
[ -f .
/gcc
/Makefile
] ; then \
398 rootme
=`pwd` ; export rootme
; \
400 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
405 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
410 $(start-sanitize-chill
) \
412 $(end-sanitize-chill
) \
460 # Install the gcc headers files, but not the fixed include files,
461 # which we are not allowed to distribute. This rule is very dependent
462 # on the workings of the gcc Makefile.in.
464 gcc-no-fixedincludes
:
465 @if
[ -f .
/gcc
/Makefile
]; then \
466 rm -rf gcc
/tmp-include
; \
467 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
469 touch gcc
/stmp-fixincludes
; \
470 rm -f gcc
/stmp-headers
; \
471 rootme
=`pwd`; export rootme
; \
472 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
474 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
475 rm -rf gcc
/include; \
476 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
479 install.cross
: install-dirs install-libiberty install-mmalloc \
480 install-binutils install-opcodes install-byacc install-flex \
481 install-ld install-gas install-readline \
482 install-glob install-gdb install-mmalloc \
484 $(start-sanitize-chill
) \
486 $(end-sanitize-chill
) \
487 install-gcc install-etc install-dejagnu
490 all-gzip
: all-libiberty
491 @if
[ -f .
/gzip
/Makefile
] ; then \
492 rootme
=`pwd` ; export rootme
; \
493 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
499 @if
[ -f .
/gzip
/Makefile
] ; then \
500 rootme
=`pwd` ; export rootme
; \
501 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
507 all-hello
: all-libiberty
508 @if
[ -f .
/hello
/Makefile
] ; then \
509 rootme
=`pwd` ; export rootme
; \
510 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
516 @if
[ -f .
/hello
/Makefile
] ; then \
517 rootme
=`pwd` ; export rootme
; \
518 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
524 all-recode
: all-libiberty
525 @if
[ -f .
/recode
/Makefile
] ; then \
526 rootme
=`pwd` ; export rootme
; \
527 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
532 install-recode
: force
533 @if
[ -f .
/recode
/Makefile
] ; then \
534 rootme
=`pwd` ; export rootme
; \
535 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
542 @if
[ -f .
/indent
/Makefile
] ; then \
543 rootme
=`pwd` ; export rootme
; \
544 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
549 install-indent
: force
550 @if
[ -f .
/indent
/Makefile
] ; then \
551 rootme
=`pwd` ; export rootme
; \
552 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
558 all-tar
: all-libiberty
559 @if
[ -f .
/tar/Makefile
] ; then \
560 rootme
=`pwd` ; export rootme
; \
561 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
567 @if
[ -f .
/tar/Makefile
] ; then \
568 rootme
=`pwd` ; export rootme
; \
569 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
577 @if
[ -f .
/dejagnu
/Makefile
] ; then \
578 rootme
=`pwd` ; export rootme
; \
579 (cd .
/dejagnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
584 install-dejagnu
: force
585 @if
[ -f .
/dejagnu
/Makefile
] ; then \
586 rootme
=`pwd` ; export rootme
; \
587 (cd .
/dejagnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
594 @if
[ -f .
/autoconf
/Makefile
] ; then \
595 rootme
=`pwd` ; export rootme
; \
596 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
601 install-autoconf
: force
602 @if
[ -f .
/autoconf
/Makefile
] ; then \
603 rootme
=`pwd` ; export rootme
; \
604 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
611 @if
[ -f .
/etc
/Makefile
] ; then \
612 rootme
=`pwd` ; export rootme
; \
613 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
619 @if
[ -f .
/etc
/Makefile
] ; then \
620 rootme
=`pwd` ; export rootme
; \
621 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
628 @if
[ -f .
/libiberty
/Makefile
] ; then \
629 rootme
=`pwd` ; export rootme
; \
631 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
636 install-libiberty
: force
637 @if
[ -f .
/libiberty
/Makefile
] ; then \
638 rootme
=`pwd` ; export rootme
; \
640 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
646 all-xiberty
: all-gcc all-newlib
647 @if
[ -f .
/xiberty
/Makefile
] ; then \
648 rootme
=`pwd` ; export rootme
; \
649 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
651 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
656 install-xiberty
: force
657 @if
[ -f .
/xiberty
/Makefile
] ; then \
658 rootme
=`pwd` ; export rootme
; \
659 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
661 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
668 @if
[ -f .
/mmalloc
/Makefile
] ; then \
669 rootme
=`pwd` ; export rootme
; \
671 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
676 install-mmalloc
: force
677 @if
[ -f .
/mmalloc
/Makefile
] ; then \
678 rootme
=`pwd` ; export rootme
; \
680 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
686 all-texinfo
: all-libiberty
687 @if
[ -f .
/texinfo
/Makefile
] ; then \
688 rootme
=`pwd` ; export rootme
; \
690 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
695 install-texinfo
: force
696 @if
[ -f .
/texinfo
/Makefile
] ; then \
697 rootme
=`pwd` ; export rootme
; \
699 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
706 @if
[ -f .
/bfd
/Makefile
] ; then \
707 rootme
=`pwd` ; export rootme
; \
709 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
715 @if
[ -f .
/bfd
/Makefile
] ; then \
716 rootme
=`pwd` ; export rootme
; \
718 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
726 @if
[ -f .
/opcodes
/Makefile
] ; then \
727 rootme
=`pwd` ; export rootme
; \
729 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
734 install-opcodes
: force
735 @if
[ -f .
/opcodes
/Makefile
] ; then \
736 rootme
=`pwd` ; export rootme
; \
738 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
744 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
745 @if
[ -f .
/binutils
/Makefile
] ; then \
746 rootme
=`pwd` ; export rootme
; \
748 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
753 install-binutils
: force
754 @if
[ -f .
/binutils
/Makefile
] ; then \
755 rootme
=`pwd` ; export rootme
; \
757 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
763 all-newlib
: all-binutils all-ld all-gas all-gcc
764 @if
[ -f .
/newlib
/Makefile
] ; then \
765 rootme
=`pwd` ; export rootme
; \
766 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
768 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
773 install-newlib
: force
774 @if
[ -f .
/newlib
/Makefile
] ; then \
775 rootme
=`pwd` ; export rootme
; \
776 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
778 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
783 ### start-sanitize-chill
785 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
786 @if
[ -f .
/chillrt
/Makefile
] ; then \
787 rootme
=`pwd` ; export rootme
; \
788 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
790 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
795 install-chillrt
: force
796 @if
[ -f .
/chillrt
/Makefile
] ; then \
797 rootme
=`pwd` ; export rootme
; \
798 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
800 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
805 ### end-sanitize-chill
808 all-gprof
: all-libiberty all-bfd
809 @if
[ -f .
/gprof
/Makefile
] ; then \
810 rootme
=`pwd` ; export rootme
; \
812 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
818 @if
[ -f .
/gprof
/Makefile
] ; then \
819 rootme
=`pwd` ; export rootme
; \
821 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
828 @if
[ -f .
/byacc
/Makefile
] ; then \
829 rootme
=`pwd` ; export rootme
; \
831 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
837 @if
[ -f .
/byacc
/Makefile
] ; then \
838 rootme
=`pwd` ; export rootme
; \
840 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
846 all-flex
: all-libiberty
847 @if
[ -f .
/flex
/Makefile
] ; then \
848 rootme
=`pwd` ; export rootme
; \
850 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
856 @if
[ -f .
/flex
/Makefile
] ; then \
857 rootme
=`pwd` ; export rootme
; \
859 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
864 all-gcc
: all-libiberty all-byacc all-binutils all-gas
865 @if
[ -f .
/gcc
/Makefile
] ; then \
866 rootme
=`pwd` ; export rootme
; \
867 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
869 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
875 @if
[ -f .
/gcc
/Makefile
] ; then \
876 rootme
=`pwd` ; export rootme
; \
877 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
879 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
886 @if
[ -f .
/readline
/Makefile
] ; then \
887 rootme
=`pwd` ; export rootme
; \
889 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
894 install-readline
: force
895 @if
[ -f .
/readline
/Makefile
] ; then \
896 rootme
=`pwd` ; export rootme
; \
898 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
905 @if
[ -f .
/glob
/Makefile
] ; then \
906 rootme
=`pwd` ; export rootme
; \
908 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
914 @if
[ -f .
/glob
/Makefile
] ; then \
915 rootme
=`pwd` ; export rootme
; \
917 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
923 all-gas
: all-libiberty all-opcodes all-bfd
924 @if
[ -f .
/gas
/Makefile
] ; then \
925 rootme
=`pwd` ; export rootme
; \
927 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
933 @if
[ -f .
/gas
/Makefile
] ; then \
934 rootme
=`pwd` ; export rootme
; \
936 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
942 all-tgas
: all-libiberty all-bfd
943 @if
[ -f .
/tgas
/Makefile
] ; then \
944 rootme
=`pwd` ; export rootme
; \
946 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
953 all-ld
: all-libiberty all-bfd all-byacc all-flex
954 @if
[ -f .
/ld/Makefile
] ; then \
955 rootme
=`pwd` ; export rootme
; \
957 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
963 @if
[ -f .
/ld/Makefile
] ; then \
964 rootme
=`pwd` ; export rootme
; \
966 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
972 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
973 @if
[ -f .
/gdb
/Makefile
] ; then \
974 rootme
=`pwd` ; export rootme
; \
976 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
982 @if
[ -f .
/gdb
/Makefile
] ; then \
983 rootme
=`pwd` ; export rootme
; \
985 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
991 all-make
: all-libiberty
992 @if
[ -f .
/make
/Makefile
] ; then \
993 rootme
=`pwd` ; export rootme
; \
995 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1001 @if
[ -f .
/make
/Makefile
] ; then \
1002 rootme
=`pwd` ; export rootme
; \
1004 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1010 all-diff
: all-libiberty
1011 @if
[ -f .
/diff
/Makefile
] ; then \
1012 rootme
=`pwd` ; export rootme
; \
1014 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1020 @if
[ -f .
/diff
/Makefile
] ; then \
1021 rootme
=`pwd` ; export rootme
; \
1023 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1030 @if
[ -f .
/grep
/Makefile
] ; then \
1031 rootme
=`pwd` ; export rootme
; \
1033 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1039 @if
[ -f .
/grep
/Makefile
] ; then \
1040 rootme
=`pwd` ; export rootme
; \
1042 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1049 @if
[ -f .
/rcs
/Makefile
] ; then \
1050 rootme
=`pwd` ; export rootme
; \
1052 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1058 @if
[ -f .
/rcs
/Makefile
] ; then \
1059 rootme
=`pwd` ; export rootme
; \
1061 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1068 @if
[ -f .
/cvs
/Makefile
] ; then \
1069 rootme
=`pwd` ; export rootme
; \
1071 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1077 @if
[ -f .
/cvs
/Makefile
] ; then \
1078 rootme
=`pwd` ; export rootme
; \
1080 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1087 @if
[ -f .
/patch
/Makefile
] ; then \
1088 rootme
=`pwd` ; export rootme
; \
1090 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1095 install-patch
: force
1096 @if
[ -f .
/patch
/Makefile
] ; then \
1097 rootme
=`pwd` ; export rootme
; \
1099 $(MAKE
) $(FLAGS_TO_PASS
) \
1101 man1dir=$(man1dir) install) ; \
1108 @if
[ -f .
/emacs
/Makefile
] ; then \
1109 rootme
=`pwd` ; export rootme
; \
1111 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1116 install-emacs
: force
1117 @if
[ -f .
/emacs
/Makefile
] ; then \
1118 rootme
=`pwd` ; export rootme
; \
1120 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1126 all-ispell
: all-emacs
1127 @if
[ -f .
/ispell
/Makefile
] ; then \
1128 rootme
=`pwd` ; export rootme
; \
1130 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1135 install-ispell
: force
1136 @if
[ -f .
/ispell
/Makefile
] ; then \
1137 rootme
=`pwd` ; export rootme
; \
1139 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1146 @if
[ -f .
/prms
/Makefile
] ; then \
1147 rootme
=`pwd` ; export rootme
; \
1149 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1155 @if
[ -f .
/prms
/Makefile
] ; then \
1156 rootme
=`pwd` ; export rootme
; \
1158 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1165 @if
[ -f .
/send-pr
/Makefile
] ; then \
1166 rootme
=`pwd` ; export rootme
; \
1168 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1173 install-send-pr
: force
1174 @if
[ -f .
/send-pr
/Makefile
] ; then \
1175 rootme
=`pwd` ; export rootme
; \
1177 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1184 @if
[ -f .
/libm
/Makefile
] ; then \
1185 rootme
=`pwd` ; export rootme
; \
1187 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1193 @if
[ -f .
/libm
/Makefile
] ; then \
1194 rootme
=`pwd` ; export rootme
; \
1196 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1203 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1204 @if
[ -f .
/libg
++/Makefile
] ; then \
1205 rootme
=`pwd` ; export rootme
; \
1206 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1208 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1213 install-libg
++: force
1214 @if
[ -f .
/libg
++/Makefile
] ; then \
1215 rootme
=`pwd` ; export rootme
; \
1216 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1218 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1224 @if
[ -f .
/tcl
/Makefile
] ; then \
1225 rootme
=`pwd` ; export rootme
; \
1226 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1228 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1234 @if
[ -f .
/tcl
/Makefile
] ; then \
1235 rootme
=`pwd` ; export rootme
; \
1236 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1238 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1246 @if
[ -f .
/tk
/Makefile
] ; then \
1247 rootme
=`pwd` ; export rootme
; \
1248 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1250 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1256 @if
[ -f .
/tk
/Makefile
] ; then \
1257 rootme
=`pwd` ; export rootme
; \
1258 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1260 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1266 all-tclX
: all-tcl all-tk
1267 @if
[ -f .
/tclX
/Makefile
] ; then \
1268 rootme
=`pwd` ; export rootme
; \
1269 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1271 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1277 @if
[ -f .
/tclX
/Makefile
] ; then \
1278 rootme
=`pwd` ; export rootme
; \
1279 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1281 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1289 @if
[ -f .
/expect
/Makefile
] ; then \
1290 rootme
=`pwd` ; export rootme
; \
1291 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1293 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1298 install-expect
: force
1299 @if
[ -f .
/expect
/Makefile
] ; then \
1300 rootme
=`pwd` ; export rootme
; \
1301 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1303 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1310 @if
[ -f .
/sim
/Makefile
] ; then \
1311 rootme
=`pwd` ; export rootme
; \
1313 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1319 @if
[ -f .
/sim
/Makefile
] ; then \
1320 rootme
=`pwd` ; export rootme
; \
1322 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1328 all-fileutils
: force
1329 @if
[ -f .
/fileutils
/Makefile
] ; then \
1330 rootme
=`pwd` ; export rootme
; \
1331 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1336 install-fileutils
: force
1337 @if
[ -f .
/fileutils
/Makefile
] ; then \
1338 rootme
=`pwd` ; export rootme
; \
1339 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1346 @if
[ -f .
/find
/Makefile
] ; then \
1347 rootme
=`pwd` ; export rootme
; \
1348 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1354 @if
[ -f .
/find
/Makefile
] ; then \
1355 rootme
=`pwd` ; export rootme
; \
1356 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1363 @if
[ -f .
/gawk
/Makefile
] ; then \
1364 rootme
=`pwd` ; export rootme
; \
1365 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1371 @if
[ -f .
/gawk
/Makefile
] ; then \
1372 rootme
=`pwd` ; export rootme
; \
1373 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1379 all-m4
: all-libiberty
1380 @if
[ -f .
/m4
/Makefile
] ; then \
1381 rootme
=`pwd` ; export rootme
; \
1382 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1388 @if
[ -f .
/m4
/Makefile
] ; then \
1389 rootme
=`pwd` ; export rootme
; \
1390 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1397 @if
[ -f .
/sed
/Makefile
] ; then \
1398 rootme
=`pwd` ; export rootme
; \
1399 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1405 @if
[ -f .
/sed
/Makefile
] ; then \
1406 rootme
=`pwd` ; export rootme
; \
1407 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1414 @if
[ -f .
/time
/Makefile
] ; then \
1415 rootme
=`pwd` ; export rootme
; \
1416 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1422 @if
[ -f .
/time
/Makefile
] ; then \
1423 rootme
=`pwd` ; export rootme
; \
1424 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1431 @if
[ -f .
/wdiff
/Makefile
] ; then \
1432 rootme
=`pwd` ; export rootme
; \
1433 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1438 install-wdiff
: force
1439 @if
[ -f .
/wdiff
/Makefile
] ; then \
1440 rootme
=`pwd` ; export rootme
; \
1441 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1447 all-uudecode
: all-libiberty
1448 @if
[ -f .
/uudecode
/Makefile
] ; then \
1449 rootme
=`pwd` ; export rootme
; \
1450 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1455 install-uudecode
: force
1456 @if
[ -f .
/uudecode
/Makefile
] ; then \
1457 rootme
=`pwd` ; export rootme
; \
1458 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1464 all-shellutils
: force
1465 @if
[ -f .
/shellutils
/Makefile
] ; then \
1466 rootme
=`pwd` ; export rootme
; \
1467 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1472 install-shellutils
: force
1473 @if
[ -f .
/shellutils
/Makefile
] ; then \
1474 rootme
=`pwd` ; export rootme
; \
1475 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1481 all-textutils
: force
1482 @if
[ -f .
/textutils
/Makefile
] ; then \
1483 rootme
=`pwd` ; export rootme
; \
1484 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1489 install-textutils
: force
1490 @if
[ -f .
/textutils
/Makefile
] ; then \
1491 rootme
=`pwd` ; export rootme
; \
1492 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1499 ### other supporting targets
1523 for i in
$(MAKEDIRS
) ; do \
1524 echo Making
$$i...
; \
1525 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1526 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1527 if
[ ! -d
$$i ] ; then \
1528 if mkdir
$$i ; then \
1539 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1540 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1541 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1542 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1544 dir.
info: do-install-info
1545 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1546 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1547 mv
-f
dir.
info.new
dir.
info ; \
1552 @echo
"Building a full distribution of this tree isn't done"
1553 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1562 @for i in
$(SUBDIRS
); \
1566 wd
=`basename $$pwd`; \
1567 for j in
`$(MAKE) ls`; \
1575 # with the gnu make, this is done automatically.
1577 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1578 $(SHELL
) .
/config.status
1581 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1583 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1584 config.guess config.sub config move-if-change
1585 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1587 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
1588 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1593 .
/configure
-rm sun4
1594 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1596 gdb.
tar.Z
: setup-dirs
1597 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
1598 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1600 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1601 rm -rf proto-toplev
; mkdir proto-toplev
1602 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1603 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1606 mkdir proto-toplev
/etc
1607 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1608 ln
-s ..
/..
/etc
/$$i .
; \
1610 # Put only one copy (four hard links) of COPYING in the tar file.
1611 rm proto-toplev
/bfd
/COPYING
1612 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1613 rm proto-toplev
/include/COPYING
1614 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1615 rm proto-toplev
/readline
/COPYING
1616 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1618 # Take out texinfo and glob from configurable dirs
1619 rm proto-toplev
/configure.in
1620 sed
-e
'/^host_tools=/s/texinfo //' \
1621 -e
'/^host_libs=/s/glob //' \
1622 <configure.in
>proto-toplev
/configure.in
1624 # Take out texinfo from a few places; make simple BISON=bison line.
1625 rm proto-toplev
/Makefile.in
1626 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1627 -e
'/^ install-texinfo /d' \
1628 -e
'\/^BISON =/,\/^$$/c\
1630 <Makefile.in
>proto-toplev
/Makefile.in
1632 mkdir proto-toplev
/texinfo
1633 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1634 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1635 chmod og
=u
`find proto-toplev -print`
1636 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1637 echo
"==> Making gdb-$$VER.tar.Z"; \
1638 ln
-s proto-toplev gdb-
$$VER; \
1639 tar cfh
- gdb-
$$VER \
1640 | compress
-v
>gdb-
$$VER.
tar.Z
)
1641 $(GZIP
) -d
<gdb-
$$VER.
tar.Z |
$(GZIP
) -9 -v
>gdb-
$$VER.
tar.z
1643 # end of Makefile.in