2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992 Free Software Foundation
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
29 program_transform_name
=
31 datadir = $(prefix)/lib
32 mandir = $(prefix)/man
33 man1dir = $(mandir)/man1
34 man2dir = $(mandir)/man2
35 man3dir = $(mandir)/man3
36 man4dir = $(mandir)/man4
37 man5dir = $(mandir)/man5
38 man6dir = $(mandir)/man6
39 man7dir = $(mandir)/man7
40 man8dir = $(mandir)/man8
41 man9dir = $(mandir)/man9
42 infodir = $(prefix)/info
43 includedir = $(prefix)/include
44 docdir
= $(datadir)/doc
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
)
57 $(start-sanitize-chill
)
58 CHILLFLAGS
= $(CFLAGS
)
67 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
68 then echo $${rootme}/byacc/byacc ; \
72 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
73 then echo $${rootme}/flex/flex ; \
76 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
77 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
78 else echo makeinfo ; fi`
81 # libraries that may need to be augmented on a system-by-system basis
84 # compilers to use to create programs which must be run in the build
87 CXX_FOR_BUILD
= $(CXX
)
89 SUBDIRS
= "this is set via configure, don't edit this"
93 INSTALL_TARGET
= install.
all
99 if [ -f $${rootme}/gcc/Makefile ] ; then \
100 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
102 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
105 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
110 if [ -f $${rootme}/gcc/Makefile ] ; then \
111 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
113 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
116 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
120 $(start-sanitize-chill
)
121 CHILL_FOR_TARGET
= ` \
122 if [ -f $${rootme}/gcc/Makefile ] ; then \
123 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
125 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
128 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
131 $(end-sanitize-chill
)
134 if [ -f $${rootme}/gcc/Makefile ] ; then \
135 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
137 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
140 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
145 if [ -f $${rootme}/gas/Makefile ] ; then \
146 echo $${rootme}/gas/as.new ; \
148 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
151 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
156 if [ -f $${rootme}/binutils/Makefile ] ; then \
157 echo $${rootme}/binutils/ar ; \
159 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
162 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
166 RANLIB_FOR_TARGET
= ` \
167 if [ -f $${rootme}/binutils/Makefile ] ; then \
168 echo $${rootme}/binutils/ranlib ; \
170 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
173 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
178 if [ -f $${rootme}/binutils/Makefile ] ; then \
179 echo $${rootme}/binutils/nm ; \
181 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
184 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
188 # FIXME: This is badly named.
190 if [ -f $${rootme}/gcc/Makefile ] ; then \
191 if [ -f $${rootme}/newlib/Makefile ] ; then \
192 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
194 echo -I$${rootme}/gcc/include ; \
202 #### host and target specific makefile fragments come in here.
205 # Flags to pass down to all sub-makes.
206 # Please keep these in alphabetical order.
207 BASE_FLAGS_TO_PASS
= \
208 "AR_FLAGS=$(AR_FLAGS)" \
209 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
210 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
212 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
213 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
215 $(start-sanitize-chill
)\
216 "CHILLFLAGS=$(CHILLFLAGS)" \
217 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
218 "CHILL_LIB=$(CHILL_LIB)" \
219 $(end-sanitize-chill
)\
220 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
221 "CXXFLAGS=$(CXXFLAGS)" \
222 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
223 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
224 "INSTALL=$(INSTALL)" \
225 "INSTALL_DATA=$(INSTALL_DATA)" \
226 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
227 "LDFLAGS=$(LDFLAGS)" \
229 "LOADLIBES=$(LOADLIBES)" \
230 "MAKEINFO=$(MAKEINFO)" \
231 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
233 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
234 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
235 "exec_prefix=$(exec_prefix)" \
239 # Flags to pass down to most sub-makes, in which we're building with
240 # the host environment.
241 # If any variables are added here, they must be added to do-*, below.
251 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
253 # Flags that are concerned with the location of the X11 include files
255 X11_FLAGS_TO_PASS
= \
256 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
257 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
260 # Shell case of subdirectories which are built with the target environment.
261 TARGET_LIBS
=libg
++ | xiberty | newlib
262 $(start-sanitize-chill
)
263 TARGET_LIBS
=libg
++ | xiberty | newlib | chillrt
264 $(end-sanitize-chill
)
266 # Flags to pass down to makes which are built with the target environment.
267 # The double $ decreases the length of the command line; the variables
268 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
269 # If any variables are added here, they must be added to do-*, below.
270 EXTRA_TARGET_FLAGS
= \
271 'AR=$$(AR_FOR_TARGET)' \
272 'AS=$$(AS_FOR_TARGET)' \
273 'CC=$$(CC_FOR_TARGET)' \
274 'CXX=$$(CXX_FOR_TARGET)' \
275 'NM=$$(NM_FOR_TARGET)' \
276 'RANLIB=$$(RANLIB_FOR_TARGET)' \
277 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
279 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
281 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
282 # unfortunately needs the native compiler and the target ar and
284 # If any variables are added here, they must be added to do-*, below.
286 'AR=$$(AR_FOR_TARGET)' \
291 'RANLIB=$$(RANLIB_FOR_TARGET)' \
294 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
296 # The first rule in the file had better be this one. Don't put any above it.
299 .PHONY
: all check dvi info install-info install-info-dirs
300 .PHONY
: do-info do-check do-dvi do-install-info
301 .PHONY
: do-clean do-mostlyclean do-distclean do-realclean
304 # Do a target for all the subdirectories. A ``make do-X'' will do a
305 # ``make X'' in all subdirectories (because, in general, X depends on
306 # fdo-X, a ``make X'' will also do this, but it may do additional work
308 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
309 # because it is so large that it can easily overflow the command line
310 # length limit on some systems.
311 do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean
:
312 @target
=`echo $@ | sed -e 's/^do-//'`; \
313 rootme
=`pwd`; export rootme
; \
314 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
315 for i in
$(SUBDIRS
); do \
316 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
]; then \
319 for flag in
$(EXTRA_TARGET_FLAGS
); do \
320 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
324 for flag in
$(EXTRA_GCC_FLAGS
); do \
325 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
329 for flag in
$(EXTRA_HOST_FLAGS
); do \
330 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
334 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
336 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
337 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
338 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
340 then true
; else exit
1; fi
; \
348 install-info
: install-info-dirs do-install-info
dir.
info
349 if
[ -f
dir.
info ] ; then \
350 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
353 do-install-info
: install-info-dirs
355 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
356 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
357 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
358 all-make all-rcs all-cvs all-diff all-grep \
359 all-patch all-emacs all-ispell all-etc \
360 all-tcl all-tk all-expect \
362 $(start-sanitize-chill
) \
364 $(end-sanitize-chill
) \
365 all-gprof all-prms all-send-pr all-libm all-deja-gnu \
366 all-fileutils all-find all-gawk all-sed all-shellutils \
367 all-textutils all-time all-wdiff all-uudecode \
368 all-hello all-tar all-gzip all-indent all-recode
371 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
372 all-opcodes all-bfd all-readline all-sim \
373 all-gdb all-binutils all-gcc all-newlib \
374 $(start-sanitize-chill
) \
376 $(end-sanitize-chill
) \
379 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
382 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
385 -rm -f Makefile config.status
387 clean: do-clean local-clean
388 mostlyclean: do-mostlyclean local-clean
389 distclean: do-distclean local-clean local-distclean
390 realclean: do-realclean local-clean local-distclean
393 @echo
"the uninstall target is not supported in this tree"
395 install: $(INSTALL_TARGET
)
396 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
397 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
398 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
400 install.
all: install-no-fixedincludes
401 @if
[ -f .
/gcc
/Makefile
] ; then \
402 rootme
=`pwd` ; export rootme
; \
404 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
409 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
414 $(start-sanitize-chill
) \
416 $(end-sanitize-chill
) \
464 # Install the gcc headers files, but not the fixed include files,
465 # which we are not allowed to distribute. This rule is very dependent
466 # on the workings of the gcc Makefile.in.
468 gcc-no-fixedincludes
:
469 @if
[ -f .
/gcc
/Makefile
]; then \
470 rm -rf gcc
/tmp-include
; \
471 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
473 touch gcc
/stmp-fixincludes
; \
474 rm -f gcc
/stmp-headers
; \
475 rootme
=`pwd`; export rootme
; \
476 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
478 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
479 rm -rf gcc
/include; \
480 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
483 install.cross
: install-dirs install-libiberty install-mmalloc \
484 install-binutils install-opcodes install-byacc install-flex \
485 install-ld install-gas install-readline \
486 install-glob install-gdb install-mmalloc \
488 $(start-sanitize-chill
) \
490 $(end-sanitize-chill
) \
491 install-gcc install-etc install-deja-gnu
494 all-gzip
: all-libiberty
495 @if
[ -f .
/gzip
/Makefile
] ; then \
496 rootme
=`pwd` ; export rootme
; \
497 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
503 @if
[ -f .
/gzip
/Makefile
] ; then \
504 rootme
=`pwd` ; export rootme
; \
505 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
511 all-hello
: all-libiberty
512 @if
[ -f .
/hello
/Makefile
] ; then \
513 rootme
=`pwd` ; export rootme
; \
514 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
520 @if
[ -f .
/hello
/Makefile
] ; then \
521 rootme
=`pwd` ; export rootme
; \
522 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
528 all-recode
: all-libiberty
529 @if
[ -f .
/recode
/Makefile
] ; then \
530 rootme
=`pwd` ; export rootme
; \
531 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
536 install-recode
: force
537 @if
[ -f .
/recode
/Makefile
] ; then \
538 rootme
=`pwd` ; export rootme
; \
539 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
546 @if
[ -f .
/indent
/Makefile
] ; then \
547 rootme
=`pwd` ; export rootme
; \
548 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
553 install-indent
: force
554 @if
[ -f .
/indent
/Makefile
] ; then \
555 rootme
=`pwd` ; export rootme
; \
556 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
562 all-tar
: all-libiberty
563 @if
[ -f .
/tar/Makefile
] ; then \
564 rootme
=`pwd` ; export rootme
; \
565 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
571 @if
[ -f .
/tar/Makefile
] ; then \
572 rootme
=`pwd` ; export rootme
; \
573 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
581 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
582 rootme
=`pwd` ; export rootme
; \
583 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
588 install-deja-gnu
: force
589 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
590 rootme
=`pwd` ; export rootme
; \
591 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
598 @if
[ -f .
/autoconf
/Makefile
] ; then \
599 rootme
=`pwd` ; export rootme
; \
600 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
605 install-autoconf
: force
606 @if
[ -f .
/autoconf
/Makefile
] ; then \
607 rootme
=`pwd` ; export rootme
; \
608 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
615 @if
[ -f .
/etc
/Makefile
] ; then \
616 rootme
=`pwd` ; export rootme
; \
617 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
623 @if
[ -f .
/etc
/Makefile
] ; then \
624 rootme
=`pwd` ; export rootme
; \
625 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
632 @if
[ -f .
/libiberty
/Makefile
] ; then \
633 rootme
=`pwd` ; export rootme
; \
635 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
640 install-libiberty
: force
641 @if
[ -f .
/libiberty
/Makefile
] ; then \
642 rootme
=`pwd` ; export rootme
; \
644 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
650 all-xiberty
: all-gcc all-newlib
651 @if
[ -f .
/xiberty
/Makefile
] ; then \
652 rootme
=`pwd` ; export rootme
; \
653 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
655 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
660 install-xiberty
: force
661 @if
[ -f .
/xiberty
/Makefile
] ; then \
662 rootme
=`pwd` ; export rootme
; \
663 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
665 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
672 @if
[ -f .
/mmalloc
/Makefile
] ; then \
673 rootme
=`pwd` ; export rootme
; \
675 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
680 install-mmalloc
: force
681 @if
[ -f .
/mmalloc
/Makefile
] ; then \
682 rootme
=`pwd` ; export rootme
; \
684 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
690 all-texinfo
: all-libiberty
691 @if
[ -f .
/texinfo
/Makefile
] ; then \
692 rootme
=`pwd` ; export rootme
; \
694 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
699 install-texinfo
: force
700 @if
[ -f .
/texinfo
/Makefile
] ; then \
701 rootme
=`pwd` ; export rootme
; \
703 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
710 @if
[ -f .
/bfd
/Makefile
] ; then \
711 rootme
=`pwd` ; export rootme
; \
713 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
719 @if
[ -f .
/bfd
/Makefile
] ; then \
720 rootme
=`pwd` ; export rootme
; \
722 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
730 @if
[ -f .
/opcodes
/Makefile
] ; then \
731 rootme
=`pwd` ; export rootme
; \
733 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
738 install-opcodes
: force
739 @if
[ -f .
/opcodes
/Makefile
] ; then \
740 rootme
=`pwd` ; export rootme
; \
742 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
748 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
749 @if
[ -f .
/binutils
/Makefile
] ; then \
750 rootme
=`pwd` ; export rootme
; \
752 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
757 install-binutils
: force
758 @if
[ -f .
/binutils
/Makefile
] ; then \
759 rootme
=`pwd` ; export rootme
; \
761 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
767 all-newlib
: all-binutils all-ld all-gas all-gcc
768 @if
[ -f .
/newlib
/Makefile
] ; then \
769 rootme
=`pwd` ; export rootme
; \
770 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
772 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
777 install-newlib
: force
778 @if
[ -f .
/newlib
/Makefile
] ; then \
779 rootme
=`pwd` ; export rootme
; \
780 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
782 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
787 ### start-sanitize-chill
789 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
790 @if
[ -f .
/chillrt
/Makefile
] ; then \
791 rootme
=`pwd` ; export rootme
; \
792 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
794 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
799 install-chillrt
: force
800 @if
[ -f .
/chillrt
/Makefile
] ; then \
801 rootme
=`pwd` ; export rootme
; \
802 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
804 $(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) ; \
1270 @if
[ -f .
/expect
/Makefile
] ; then \
1271 rootme
=`pwd` ; export rootme
; \
1272 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1274 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1279 install-expect
: force
1280 @if
[ -f .
/expect
/Makefile
] ; then \
1281 rootme
=`pwd` ; export rootme
; \
1282 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1284 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1291 @if
[ -f .
/sim
/Makefile
] ; then \
1292 rootme
=`pwd` ; export rootme
; \
1294 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1300 @if
[ -f .
/sim
/Makefile
] ; then \
1301 rootme
=`pwd` ; export rootme
; \
1303 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1309 all-fileutils
: force
1310 @if
[ -f .
/fileutils
/Makefile
] ; then \
1311 rootme
=`pwd` ; export rootme
; \
1312 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1317 install-fileutils
: force
1318 @if
[ -f .
/fileutils
/Makefile
] ; then \
1319 rootme
=`pwd` ; export rootme
; \
1320 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1327 @if
[ -f .
/find
/Makefile
] ; then \
1328 rootme
=`pwd` ; export rootme
; \
1329 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1335 @if
[ -f .
/find
/Makefile
] ; then \
1336 rootme
=`pwd` ; export rootme
; \
1337 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1344 @if
[ -f .
/gawk
/Makefile
] ; then \
1345 rootme
=`pwd` ; export rootme
; \
1346 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1352 @if
[ -f .
/gawk
/Makefile
] ; then \
1353 rootme
=`pwd` ; export rootme
; \
1354 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1360 all-m4
: all-libiberty
1361 @if
[ -f .
/m4
/Makefile
] ; then \
1362 rootme
=`pwd` ; export rootme
; \
1363 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1369 @if
[ -f .
/m4
/Makefile
] ; then \
1370 rootme
=`pwd` ; export rootme
; \
1371 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1378 @if
[ -f .
/sed
/Makefile
] ; then \
1379 rootme
=`pwd` ; export rootme
; \
1380 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1386 @if
[ -f .
/sed
/Makefile
] ; then \
1387 rootme
=`pwd` ; export rootme
; \
1388 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1395 @if
[ -f .
/time
/Makefile
] ; then \
1396 rootme
=`pwd` ; export rootme
; \
1397 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1403 @if
[ -f .
/time
/Makefile
] ; then \
1404 rootme
=`pwd` ; export rootme
; \
1405 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1412 @if
[ -f .
/wdiff
/Makefile
] ; then \
1413 rootme
=`pwd` ; export rootme
; \
1414 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1419 install-wdiff
: force
1420 @if
[ -f .
/wdiff
/Makefile
] ; then \
1421 rootme
=`pwd` ; export rootme
; \
1422 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1428 all-uudecode
: all-libiberty
1429 @if
[ -f .
/uudecode
/Makefile
] ; then \
1430 rootme
=`pwd` ; export rootme
; \
1431 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1436 install-uudecode
: force
1437 @if
[ -f .
/uudecode
/Makefile
] ; then \
1438 rootme
=`pwd` ; export rootme
; \
1439 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1445 all-shellutils
: force
1446 @if
[ -f .
/shellutils
/Makefile
] ; then \
1447 rootme
=`pwd` ; export rootme
; \
1448 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1453 install-shellutils
: force
1454 @if
[ -f .
/shellutils
/Makefile
] ; then \
1455 rootme
=`pwd` ; export rootme
; \
1456 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1462 all-textutils
: force
1463 @if
[ -f .
/textutils
/Makefile
] ; then \
1464 rootme
=`pwd` ; export rootme
; \
1465 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1470 install-textutils
: force
1471 @if
[ -f .
/textutils
/Makefile
] ; then \
1472 rootme
=`pwd` ; export rootme
; \
1473 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1480 ### other supporting targets
1504 for i in
$(MAKEDIRS
) ; do \
1505 echo Making
$$i...
; \
1506 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1507 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1508 if
[ ! -d
$$i ] ; then \
1509 if mkdir
$$i ; then \
1520 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1521 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1522 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1523 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1525 dir.
info: do-install-info
1526 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1527 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1528 mv
-f
dir.
info.new
dir.
info ; \
1532 @echo
"Building a full distribution of this tree isn't done"
1533 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1542 @for i in
$(SUBDIRS
); \
1546 wd
=`basename $$pwd`; \
1547 for j in
`$(MAKE) ls`; \
1555 # with the gnu make, this is done automatically.
1557 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1558 $(SHELL
) .
/config.status
1561 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1563 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1564 config.guess config.sub config move-if-change
1565 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1567 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
1568 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1573 .
/configure
-rm sun4
1574 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1576 gdb.
tar.Z
: setup-dirs
1577 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
1578 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1580 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1581 rm -rf proto-toplev
; mkdir proto-toplev
1582 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1583 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1586 mkdir proto-toplev
/etc
1587 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1588 ln
-s ..
/..
/etc
/$$i .
; \
1590 # Put only one copy (four hard links) of COPYING in the tar file.
1591 rm proto-toplev
/bfd
/COPYING
1592 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1593 rm proto-toplev
/include/COPYING
1594 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1595 rm proto-toplev
/readline
/COPYING
1596 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1598 # Take out texinfo and glob from configurable dirs
1599 rm proto-toplev
/configure.in
1600 sed
-e
'/^host_tools=/s/texinfo //' \
1601 -e
'/^host_libs=/s/glob //' \
1602 <configure.in
>proto-toplev
/configure.in
1604 # Take out texinfo from a few places; make simple BISON=bison line.
1605 rm proto-toplev
/Makefile.in
1606 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1607 -e
'/^ install-texinfo /d' \
1608 -e
'\/^BISON =/,\/^$$/c\
1610 <Makefile.in
>proto-toplev
/Makefile.in
1612 mkdir proto-toplev
/texinfo
1613 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1614 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1615 chmod og
=u
`find proto-toplev -print`
1616 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1617 echo
"==> Making gdb-$$VER.tar.Z"; \
1618 ln
-s proto-toplev gdb-
$$VER; \
1619 tar cfh
- gdb-
$$VER \
1620 | compress
-v
>gdb-
$$VER.
tar.Z
)
1621 $(GZIP
) -d
<gdb-
$$VER.
tar.Z |
$(GZIP
) -9 -v
>gdb-
$$VER.
tar.z
1623 # end of Makefile.in