2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992 Free Software Foundation
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
29 program_transform_name
=
31 datadir = $(prefix)/lib
32 mandir = $(prefix)/man
33 man1dir = $(mandir)/man1
34 man2dir = $(mandir)/man2
35 man3dir = $(mandir)/man3
36 man4dir = $(mandir)/man4
37 man5dir = $(mandir)/man5
38 man6dir = $(mandir)/man6
39 man7dir = $(mandir)/man7
40 man8dir = $(mandir)/man8
41 man9dir = $(mandir)/man9
42 infodir = $(prefix)/info
43 includedir = $(prefix)/include
44 docdir
= $(datadir)/doc
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
)
57 $(start-sanitize-chill
)
58 CHILLFLAGS
= $(CFLAGS
)
66 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
67 then echo $${rootme}/byacc/byacc ; \
71 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
72 then echo $${rootme}/flex/flex ; \
75 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
76 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
77 else echo makeinfo ; fi`
80 # libraries that may need to be augmented on a system-by-system basis
83 # compilers to use to create programs which must be run in the build
86 CXX_FOR_BUILD
= $(CXX
)
88 SUBDIRS
= "this is set via configure, don't edit this"
92 INSTALL_TARGET
= install.
all
98 if [ -f $${rootme}/gcc/Makefile ] ; then \
99 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
101 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
104 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
109 if [ -f $${rootme}/gcc/Makefile ] ; then \
110 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
112 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
115 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
119 $(start-sanitize-chill
)
120 CHILL_FOR_TARGET
= ` \
121 if [ -f $${rootme}/gcc/Makefile ] ; then \
122 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
124 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
127 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
130 $(end-sanitize-chill
)
133 if [ -f $${rootme}/gcc/Makefile ] ; then \
134 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
136 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
139 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
144 if [ -f $${rootme}/gas/Makefile ] ; then \
145 echo $${rootme}/gas/as.new ; \
147 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
150 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
155 if [ -f $${rootme}/binutils/Makefile ] ; then \
156 echo $${rootme}/binutils/ar ; \
158 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
161 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
165 RANLIB_FOR_TARGET
= ` \
166 if [ -f $${rootme}/binutils/Makefile ] ; then \
167 echo $${rootme}/binutils/ranlib ; \
169 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
172 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
177 if [ -f $${rootme}/binutils/Makefile ] ; then \
178 echo $${rootme}/binutils/nm ; \
180 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
183 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
187 # FIXME: This is badly named.
189 if [ -f $${rootme}/gcc/Makefile ] ; then \
190 if [ -f $${rootme}/newlib/Makefile ] ; then \
191 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
193 echo -I$${rootme}/gcc/include ; \
200 #### host and target specific makefile fragments come in here.
203 # Flags to pass down to all sub-makes.
204 # Please keep these in alphabetical order.
205 BASE_FLAGS_TO_PASS
= \
206 "AR_FLAGS=$(AR_FLAGS)" \
207 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
208 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
210 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
211 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
213 $(start-sanitize-chill
)\
214 "CHILLFLAGS=$(CHILLFLAGS)" \
215 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
216 "CHILL_LIB=$(CHILL_LIB)" \
217 $(end-sanitize-chill
)\
218 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
219 "CXXFLAGS=$(CXXFLAGS)" \
220 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
221 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
222 "INSTALL=$(INSTALL)" \
223 "INSTALL_DATA=$(INSTALL_DATA)" \
224 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
225 "LDFLAGS=$(LDFLAGS)" \
227 "LOADLIBES=$(LOADLIBES)" \
228 "MAKEINFO=$(MAKEINFO)" \
229 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
230 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
231 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
232 "exec_prefix=$(exec_prefix)" \
236 # Flags to pass down to most sub-makes, in which we're building with
237 # the host environment.
238 # If any variables are added here, they must be added to do-*, below.
248 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
250 # Flags that are concerned with the location of the X11 include files
252 X11_FLAGS_TO_PASS
= \
253 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
254 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
257 # Shell case of subdirectories which are built with the target environment.
258 TARGET_LIBS
=libg
++ | xiberty | newlib
259 $(start-sanitize-chill
)
260 TARGET_LIBS
=libg
++ | xiberty | newlib | chillrt
261 $(end-sanitize-chill
)
263 # Flags to pass down to makes which are built with the target environment.
264 # The double $ decreases the length of the command line; the variables
265 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
266 # If any variables are added here, they must be added to do-*, below.
267 EXTRA_TARGET_FLAGS
= \
268 'AR=$$(AR_FOR_TARGET)' \
269 'AS=$$(AS_FOR_TARGET)' \
270 'CC=$$(CC_FOR_TARGET)' \
271 'CXX=$$(CXX_FOR_TARGET)' \
272 'NM=$$(NM_FOR_TARGET)' \
273 'RANLIB=$$(RANLIB_FOR_TARGET)' \
274 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
276 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
278 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
279 # unfortunately needs the native compiler and the target ar and
281 # If any variables are added here, they must be added to do-*, below.
283 'AR=$$(AR_FOR_TARGET)' \
288 'RANLIB=$$(RANLIB_FOR_TARGET)' \
291 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
293 # The first rule in the file had better be this one. Don't put any above it.
296 .PHONY
: all check dvi info install-info install-info-dirs
297 .PHONY
: do-info do-check do-dvi do-install-info
298 .PHONY
: do-clean do-mostlyclean do-distclean do-realclean
301 # Do a target for all the subdirectories. A ``make do-X'' will do a
302 # ``make X'' in all subdirectories (because, in general, X depends on
303 # fdo-X, a ``make X'' will also do this, but it may do additional work
305 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
306 # because it is so large that it can easily overflow the command line
307 # length limit on some systems.
308 do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean
:
309 @target
=`echo $@ | sed -e 's/^do-//'`; \
310 rootme
=`pwd`; export rootme
; \
311 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
312 for i in
$(SUBDIRS
); do \
313 if
[ -f .
/$$i/localenv
] ||
[ -f .
/$$i/Makefile
]; then \
316 for flag in
$(EXTRA_TARGET_FLAGS
); do \
317 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
321 for flag in
$(EXTRA_GCC_FLAGS
); do \
322 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
326 for flag in
$(EXTRA_HOST_FLAGS
); do \
327 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
331 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
333 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
334 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
335 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
337 then true
; else exit
1; fi
; \
345 install-info
: install-info-dirs do-install-info
dir.
info
346 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info
348 do-install-info
: install-info-dirs
350 all.normal
: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
351 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
352 all-gcc all-binutils all-libg
++ all-readline all-sim all-gdb \
353 all-make all-rcs all-cvs all-diff all-grep \
354 all-patch all-emacs all-ispell all-etc \
355 all-tcl all-tk all-expect \
357 $(start-sanitize-chill
) \
359 $(end-sanitize-chill
) \
360 all-gprof all-send_pr all-libm all-deja-gnu \
361 all-fileutils all-find all-gawk all-sed all-shellutils \
362 all-textutils all-time all-wdiff all-uudecode \
363 all-hello all-tar all-gzip all-indent all-recode
366 all.cross
: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
367 all-opcodes all-bfd all-readline all-sim \
368 all-gdb all-binutils all-gcc all-newlib \
369 $(start-sanitize-chill
) \
371 $(end-sanitize-chill
) \
374 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
377 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
380 -rm -f Makefile config.status
382 clean: do-clean local-clean
383 mostlyclean: do-mostlyclean local-clean
384 distclean: do-distclean local-clean local-distclean
385 realclean: do-realclean local-clean local-distclean
388 @echo
"the uninstall target is not supported in this tree"
390 install: $(INSTALL_TARGET
)
391 -parent
=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
392 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
393 -if
[ -d
$(man1dir) ] ; then true
; else mkdir
$(man1dir) ; fi
395 install.
all: install-no-fixedincludes
396 @if
[ -f .
/gcc
/Makefile
] ; then \
397 rootme
=`pwd` ; export rootme
; \
399 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
404 install-no-fixedincludes
: install-dirs gcc-no-fixedincludes \
409 $(start-sanitize-chill
) \
411 $(end-sanitize-chill
) \
458 # Install the gcc headers files, but not the fixed include files,
459 # which we are not allowed to distribute. This rule is very dependent
460 # on the workings of the gcc Makefile.in.
462 gcc-no-fixedincludes
:
463 @if
[ -f .
/gcc
/Makefile
]; then \
464 rm -rf gcc
/tmp-include
; \
465 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
467 touch gcc
/stmp-fixincludes
; \
468 rm -f gcc
/stmp-headers
; \
469 rootme
=`pwd`; export rootme
; \
470 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
472 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
473 rm -rf gcc
/include; \
474 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
477 install.cross
: install-dirs install-libiberty install-mmalloc \
478 install-binutils install-opcodes install-byacc install-flex \
479 install-ld install-gas install-readline \
480 install-glob install-gdb install-mmalloc \
482 $(start-sanitize-chill
) \
484 $(end-sanitize-chill
) \
485 install-gcc install-etc install-deja-gnu
488 all-gzip
: all-libiberty
489 @if
[ -f .
/gzip
/Makefile
] ; then \
490 rootme
=`pwd` ; export rootme
; \
491 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
497 @if
[ -f .
/gzip
/Makefile
] ; then \
498 rootme
=`pwd` ; export rootme
; \
499 (cd .
/gzip
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
505 all-hello
: all-libiberty
506 @if
[ -f .
/hello
/Makefile
] ; then \
507 rootme
=`pwd` ; export rootme
; \
508 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
514 @if
[ -f .
/hello
/Makefile
] ; then \
515 rootme
=`pwd` ; export rootme
; \
516 (cd .
/hello
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
522 all-recode
: all-libiberty
523 @if
[ -f .
/recode
/Makefile
] ; then \
524 rootme
=`pwd` ; export rootme
; \
525 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
530 install-recode
: force
531 @if
[ -f .
/recode
/Makefile
] ; then \
532 rootme
=`pwd` ; export rootme
; \
533 (cd .
/recode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
540 @if
[ -f .
/indent
/Makefile
] ; then \
541 rootme
=`pwd` ; export rootme
; \
542 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
547 install-indent
: force
548 @if
[ -f .
/indent
/Makefile
] ; then \
549 rootme
=`pwd` ; export rootme
; \
550 (cd .
/indent
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
556 all-tar
: all-libiberty
557 @if
[ -f .
/tar/Makefile
] ; then \
558 rootme
=`pwd` ; export rootme
; \
559 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
565 @if
[ -f .
/tar/Makefile
] ; then \
566 rootme
=`pwd` ; export rootme
; \
567 (cd .
/tar; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
575 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
576 rootme
=`pwd` ; export rootme
; \
577 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
582 install-deja-gnu
: force
583 @if
[ -f .
/deja-gnu
/Makefile
] ; then \
584 rootme
=`pwd` ; export rootme
; \
585 (cd .
/deja-gnu
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
592 @if
[ -f .
/autoconf
/Makefile
] ; then \
593 rootme
=`pwd` ; export rootme
; \
594 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
599 install-autoconf
: force
600 @if
[ -f .
/autoconf
/Makefile
] ; then \
601 rootme
=`pwd` ; export rootme
; \
602 (cd .
/autoconf
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
609 @if
[ -f .
/etc
/Makefile
] ; then \
610 rootme
=`pwd` ; export rootme
; \
611 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
617 @if
[ -f .
/etc
/Makefile
] ; then \
618 rootme
=`pwd` ; export rootme
; \
619 (cd .
/etc
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
626 @if
[ -f .
/libiberty
/Makefile
] ; then \
627 rootme
=`pwd` ; export rootme
; \
629 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
634 install-libiberty
: force
635 @if
[ -f .
/libiberty
/Makefile
] ; then \
636 rootme
=`pwd` ; export rootme
; \
638 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
644 all-xiberty
: all-gcc all-newlib
645 @if
[ -f .
/xiberty
/Makefile
] ; then \
646 rootme
=`pwd` ; export rootme
; \
647 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
649 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
654 install-xiberty
: force
655 @if
[ -f .
/xiberty
/Makefile
] ; then \
656 rootme
=`pwd` ; export rootme
; \
657 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
659 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
666 @if
[ -f .
/mmalloc
/Makefile
] ; then \
667 rootme
=`pwd` ; export rootme
; \
669 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
674 install-mmalloc
: force
675 @if
[ -f .
/mmalloc
/Makefile
] ; then \
676 rootme
=`pwd` ; export rootme
; \
678 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
684 all-texinfo
: all-libiberty
685 @if
[ -f .
/texinfo
/Makefile
] ; then \
686 rootme
=`pwd` ; export rootme
; \
688 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
693 install-texinfo
: force
694 @if
[ -f .
/texinfo
/Makefile
] ; then \
695 rootme
=`pwd` ; export rootme
; \
697 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
704 @if
[ -f .
/bfd
/Makefile
] ; then \
705 rootme
=`pwd` ; export rootme
; \
707 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
713 @if
[ -f .
/bfd
/Makefile
] ; then \
714 rootme
=`pwd` ; export rootme
; \
716 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
724 @if
[ -f .
/opcodes
/Makefile
] ; then \
725 rootme
=`pwd` ; export rootme
; \
727 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
732 install-opcodes
: force
733 @if
[ -f .
/opcodes
/Makefile
] ; then \
734 rootme
=`pwd` ; export rootme
; \
736 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
742 all-binutils
: all-opcodes all-libiberty all-bfd all-flex
743 @if
[ -f .
/binutils
/Makefile
] ; then \
744 rootme
=`pwd` ; export rootme
; \
746 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
751 install-binutils
: force
752 @if
[ -f .
/binutils
/Makefile
] ; then \
753 rootme
=`pwd` ; export rootme
; \
755 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
761 all-newlib
: all-binutils all-ld all-gas all-gcc
762 @if
[ -f .
/newlib
/Makefile
] ; then \
763 rootme
=`pwd` ; export rootme
; \
764 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
766 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
771 install-newlib
: force
772 @if
[ -f .
/newlib
/Makefile
] ; then \
773 rootme
=`pwd` ; export rootme
; \
774 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
776 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
781 ### start-sanitize-chill
783 all-chillrt
: all-binutils all-ld all-gas all-gcc all-newlib
784 @if
[ -f .
/chillrt
/Makefile
] ; then \
785 rootme
=`pwd` ; export rootme
; \
786 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
788 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
793 install-chillrt
: force
794 @if
[ -f .
/chillrt
/Makefile
] ; then \
795 rootme
=`pwd` ; export rootme
; \
796 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
798 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
802 ### end-sanitize-chill
805 all-gprof
: all-libiberty all-bfd
806 @if
[ -f .
/gprof
/Makefile
] ; then \
807 rootme
=`pwd` ; export rootme
; \
809 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
815 @if
[ -f .
/gprof
/Makefile
] ; then \
816 rootme
=`pwd` ; export rootme
; \
818 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
825 @if
[ -f .
/byacc
/Makefile
] ; then \
826 rootme
=`pwd` ; export rootme
; \
828 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
834 @if
[ -f .
/byacc
/Makefile
] ; then \
835 rootme
=`pwd` ; export rootme
; \
837 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
843 all-flex
: all-libiberty
844 @if
[ -f .
/flex
/Makefile
] ; then \
845 rootme
=`pwd` ; export rootme
; \
847 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
853 @if
[ -f .
/flex
/Makefile
] ; then \
854 rootme
=`pwd` ; export rootme
; \
856 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
861 all-gcc
: all-libiberty all-byacc all-binutils all-gas
862 @if
[ -f .
/gcc
/Makefile
] ; then \
863 rootme
=`pwd` ; export rootme
; \
864 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
866 $(MAKE
) $(GCC_FLAGS_TO_PASS
) all) ; \
872 @if
[ -f .
/gcc
/Makefile
] ; then \
873 rootme
=`pwd` ; export rootme
; \
874 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
876 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install) ; \
883 @if
[ -f .
/readline
/Makefile
] ; then \
884 rootme
=`pwd` ; export rootme
; \
886 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
891 install-readline
: force
892 @if
[ -f .
/readline
/Makefile
] ; then \
893 rootme
=`pwd` ; export rootme
; \
895 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
902 @if
[ -f .
/glob
/Makefile
] ; then \
903 rootme
=`pwd` ; export rootme
; \
905 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
911 @if
[ -f .
/glob
/Makefile
] ; then \
912 rootme
=`pwd` ; export rootme
; \
914 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
920 all-gas
: all-libiberty all-opcodes all-bfd
921 @if
[ -f .
/gas
/Makefile
] ; then \
922 rootme
=`pwd` ; export rootme
; \
924 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
930 @if
[ -f .
/gas
/Makefile
] ; then \
931 rootme
=`pwd` ; export rootme
; \
933 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
939 all-tgas
: all-libiberty all-bfd
940 @if
[ -f .
/tgas
/Makefile
] ; then \
941 rootme
=`pwd` ; export rootme
; \
943 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
950 all-ld
: all-libiberty all-bfd all-byacc all-flex
951 @if
[ -f .
/ld/Makefile
] ; then \
952 rootme
=`pwd` ; export rootme
; \
954 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
960 @if
[ -f .
/ld/Makefile
] ; then \
961 rootme
=`pwd` ; export rootme
; \
963 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
969 all-gdb
: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
970 @if
[ -f .
/gdb
/Makefile
] ; then \
971 rootme
=`pwd` ; export rootme
; \
973 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
979 @if
[ -f .
/gdb
/Makefile
] ; then \
980 rootme
=`pwd` ; export rootme
; \
982 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
988 all-make
: all-libiberty
989 @if
[ -f .
/make
/Makefile
] ; then \
990 rootme
=`pwd` ; export rootme
; \
992 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
998 @if
[ -f .
/make
/Makefile
] ; then \
999 rootme
=`pwd` ; export rootme
; \
1001 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1008 @if
[ -f .
/diff
/Makefile
] ; then \
1009 rootme
=`pwd` ; export rootme
; \
1011 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1017 @if
[ -f .
/diff
/Makefile
] ; then \
1018 rootme
=`pwd` ; export rootme
; \
1020 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1027 @if
[ -f .
/grep
/Makefile
] ; then \
1028 rootme
=`pwd` ; export rootme
; \
1030 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1036 @if
[ -f .
/grep
/Makefile
] ; then \
1037 rootme
=`pwd` ; export rootme
; \
1039 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1046 @if
[ -f .
/rcs
/Makefile
] ; then \
1047 rootme
=`pwd` ; export rootme
; \
1049 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1055 @if
[ -f .
/rcs
/Makefile
] ; then \
1056 rootme
=`pwd` ; export rootme
; \
1058 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1065 @if
[ -f .
/cvs
/Makefile
] ; then \
1066 rootme
=`pwd` ; export rootme
; \
1068 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1074 @if
[ -f .
/cvs
/Makefile
] ; then \
1075 rootme
=`pwd` ; export rootme
; \
1077 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1084 @if
[ -f .
/patch
/Makefile
] ; then \
1085 rootme
=`pwd` ; export rootme
; \
1087 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1092 install-patch
: force
1093 @if
[ -f .
/patch
/Makefile
] ; then \
1094 rootme
=`pwd` ; export rootme
; \
1096 $(MAKE
) $(FLAGS_TO_PASS
) \
1098 man1dir=$(man1dir) install) ; \
1105 @if
[ -f .
/emacs
/Makefile
] ; then \
1106 rootme
=`pwd` ; export rootme
; \
1108 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1113 install-emacs
: force
1114 @if
[ -f .
/emacs
/Makefile
] ; then \
1115 rootme
=`pwd` ; export rootme
; \
1117 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1123 all-ispell
: all-emacs
1124 @if
[ -f .
/ispell
/Makefile
] ; then \
1125 rootme
=`pwd` ; export rootme
; \
1127 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1132 install-ispell
: force
1133 @if
[ -f .
/ispell
/Makefile
] ; then \
1134 rootme
=`pwd` ; export rootme
; \
1136 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1143 @if
[ -f .
/send_pr
/Makefile
] ; then \
1144 rootme
=`pwd` ; export rootme
; \
1146 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1151 install-send_pr
: force
1152 @if
[ -f .
/send_pr
/Makefile
] ; then \
1153 rootme
=`pwd` ; export rootme
; \
1155 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1162 @if
[ -f .
/libm
/Makefile
] ; then \
1163 rootme
=`pwd` ; export rootme
; \
1165 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1171 @if
[ -f .
/libm
/Makefile
] ; then \
1172 rootme
=`pwd` ; export rootme
; \
1174 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1181 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
1182 @if
[ -f .
/libg
++/Makefile
] ; then \
1183 rootme
=`pwd` ; export rootme
; \
1184 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1186 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all) ; \
1191 install-libg
++: force
1192 @if
[ -f .
/libg
++/Makefile
] ; then \
1193 rootme
=`pwd` ; export rootme
; \
1194 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
1196 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install) ; \
1202 @if
[ -f .
/tcl
/Makefile
] ; then \
1203 rootme
=`pwd` ; export rootme
; \
1204 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1206 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1212 @if
[ -f .
/tcl
/Makefile
] ; then \
1213 rootme
=`pwd` ; export rootme
; \
1214 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1216 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1224 @if
[ -f .
/tk
/Makefile
] ; then \
1225 rootme
=`pwd` ; export rootme
; \
1226 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1228 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all) ; \
1234 @if
[ -f .
/tk
/Makefile
] ; then \
1235 rootme
=`pwd` ; export rootme
; \
1236 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1238 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install) ; \
1245 @if
[ -f .
/expect
/Makefile
] ; then \
1246 rootme
=`pwd` ; export rootme
; \
1247 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1249 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1254 install-expect
: force
1255 @if
[ -f .
/expect
/Makefile
] ; then \
1256 rootme
=`pwd` ; export rootme
; \
1257 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
1259 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1266 @if
[ -f .
/sim
/Makefile
] ; then \
1267 rootme
=`pwd` ; export rootme
; \
1269 $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1275 @if
[ -f .
/sim
/Makefile
] ; then \
1276 rootme
=`pwd` ; export rootme
; \
1278 $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1284 all-fileutils
: force
1285 @if
[ -f .
/fileutils
/Makefile
] ; then \
1286 rootme
=`pwd` ; export rootme
; \
1287 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1292 install-fileutils
: force
1293 @if
[ -f .
/fileutils
/Makefile
] ; then \
1294 rootme
=`pwd` ; export rootme
; \
1295 (cd .
/fileutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1302 @if
[ -f .
/find
/Makefile
] ; then \
1303 rootme
=`pwd` ; export rootme
; \
1304 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1310 @if
[ -f .
/find
/Makefile
] ; then \
1311 rootme
=`pwd` ; export rootme
; \
1312 (cd .
/find
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1319 @if
[ -f .
/gawk
/Makefile
] ; then \
1320 rootme
=`pwd` ; export rootme
; \
1321 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1327 @if
[ -f .
/gawk
/Makefile
] ; then \
1328 rootme
=`pwd` ; export rootme
; \
1329 (cd .
/gawk
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1335 all-m4
: all-libiberty
1336 @if
[ -f .
/m4
/Makefile
] ; then \
1337 rootme
=`pwd` ; export rootme
; \
1338 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1344 @if
[ -f .
/m4
/Makefile
] ; then \
1345 rootme
=`pwd` ; export rootme
; \
1346 (cd .
/m4
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1353 @if
[ -f .
/sed
/Makefile
] ; then \
1354 rootme
=`pwd` ; export rootme
; \
1355 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1361 @if
[ -f .
/sed
/Makefile
] ; then \
1362 rootme
=`pwd` ; export rootme
; \
1363 (cd .
/sed
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1370 @if
[ -f .
/time
/Makefile
] ; then \
1371 rootme
=`pwd` ; export rootme
; \
1372 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1378 @if
[ -f .
/time
/Makefile
] ; then \
1379 rootme
=`pwd` ; export rootme
; \
1380 (cd .
/time
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1387 @if
[ -f .
/wdiff
/Makefile
] ; then \
1388 rootme
=`pwd` ; export rootme
; \
1389 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1394 install-wdiff
: force
1395 @if
[ -f .
/wdiff
/Makefile
] ; then \
1396 rootme
=`pwd` ; export rootme
; \
1397 (cd .
/wdiff
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1403 all-uudecode
: all-libiberty
1404 @if
[ -f .
/uudecode
/Makefile
] ; then \
1405 rootme
=`pwd` ; export rootme
; \
1406 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1411 install-uudecode
: force
1412 @if
[ -f .
/uudecode
/Makefile
] ; then \
1413 rootme
=`pwd` ; export rootme
; \
1414 (cd .
/uudecode
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1420 all-shellutils
: force
1421 @if
[ -f .
/shellutils
/Makefile
] ; then \
1422 rootme
=`pwd` ; export rootme
; \
1423 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1428 install-shellutils
: force
1429 @if
[ -f .
/shellutils
/Makefile
] ; then \
1430 rootme
=`pwd` ; export rootme
; \
1431 (cd .
/shellutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1437 all-textutils
: force
1438 @if
[ -f .
/textutils
/Makefile
] ; then \
1439 rootme
=`pwd` ; export rootme
; \
1440 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) all) ; \
1445 install-textutils
: force
1446 @if
[ -f .
/textutils
/Makefile
] ; then \
1447 rootme
=`pwd` ; export rootme
; \
1448 (cd .
/textutils
; $(MAKE
) $(FLAGS_TO_PASS
) install) ; \
1455 ### other supporting targets
1479 for i in
$(MAKEDIRS
) ; do \
1480 echo Making
$$i...
; \
1481 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1482 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
1483 if
[ ! -d
$$i ] ; then \
1484 if mkdir
$$i ; then \
1495 if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; fi
1496 -parent
=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1497 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1498 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; fi
1500 dir.
info: do-install-info
1501 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
1502 mv
-f
dir.
info.new
dir.
info
1505 @echo
"Building a full distribution of this tree isn't done"
1506 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1515 @for i in
$(SUBDIRS
); \
1519 wd
=`basename $$pwd`; \
1520 for j in
`$(MAKE) ls`; \
1528 # with the gnu make, this is done automatically.
1530 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
1531 $(SHELL
) .
/config.status
1534 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1536 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1537 config.guess config.sub config move-if-change
1538 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
1540 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob
1541 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
1546 .
/configure
-rm sun4
1547 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1549 gdb.
tar.Z
: setup-dirs
1550 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
1551 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
1553 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
1554 rm -rf proto-toplev
; mkdir proto-toplev
1555 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
1556 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1559 mkdir proto-toplev
/etc
1560 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1561 ln
-s ..
/..
/etc
/$$i .
; \
1563 # Put only one copy (four hard links) of COPYING in the tar file.
1564 rm proto-toplev
/bfd
/COPYING
1565 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1566 rm proto-toplev
/include/COPYING
1567 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1568 rm proto-toplev
/readline
/COPYING
1569 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1571 # Take out texinfo and glob from configurable dirs
1572 rm proto-toplev
/configure.in
1573 sed
-e
'/^host_tools=/s/texinfo //' \
1574 -e
'/^host_libs=/s/glob //' \
1575 <configure.in
>proto-toplev
/configure.in
1577 # Take out texinfo from a few places; make simple BISON=bison line.
1578 rm proto-toplev
/Makefile.in
1579 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1580 -e
'/^ install-texinfo /d' \
1581 -e
'\/^BISON =/,\/^$$/c\
1583 <Makefile.in
>proto-toplev
/Makefile.in
1585 mkdir proto-toplev
/texinfo
1586 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1587 chmod og
=u
`find proto-toplev -print`
1588 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1589 echo
"==> Making gdb-$$VER.tar.Z"; \
1590 ln
-s proto-toplev gdb-
$$VER; \
1591 tar cfh
- gdb-
$$VER \
1592 | compress
-v
>gdb-
$$VER.
tar.Z
)
1595 # end of Makefile.in