2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992, 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
27 tooldir
= $(exec_prefix)/$(target
)
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
48 INSTALL
= $${srcroot}/install.sh
-c
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
)
51 INSTALL_XFORM
= $(INSTALL
) -t
$(program_transform_name
)
58 # start-sanitize-chill
59 CHILLFLAGS
= $(CFLAGS
)
70 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
71 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
72 then echo $${rootme}/byacc/byacc ; \
76 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
77 then echo $${rootme}/flex/flex ; \
80 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
81 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
82 else echo makeinfo ; fi`
84 EXPECT
= `if [ -f $${rootme}/expect/expect ] ; \
85 then echo $${rootme}/expect/expect ; \
86 else echo expect ; fi`
88 RUNTEST
= `if [ -f $${srcroot}/dejagnu/runtest ] ; \
89 then echo $${srcroot}/dejagnu/runtest ; \
90 else echo runtest ; fi`
93 # libraries that may need to be augmented on a system-by-system basis
96 # compilers to use to create programs which must be run in the build
99 CXX_FOR_BUILD
= $(CXX
)
101 SUBDIRS
= "this is set via configure, don't edit this"
105 INSTALL_TARGET
= install-dirs \
107 $(INSTALL_TARGET_MODULES
) \
108 $(INSTALL_X11_MODULES
) \
112 if [ -f $${rootme}/gcc/Makefile ] ; then \
113 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
115 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
118 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
122 # start-sanitize-chill
123 CHILL_FOR_TARGET
= ` \
124 if [ -f $${rootme}/gcc/Makefile ] ; then \
125 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
127 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
130 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
137 if [ -f $${rootme}/gcc/Makefile ] ; then \
138 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
140 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
143 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
148 if [ -f $${rootme}/gas/Makefile ] ; then \
149 echo $${rootme}/gas/as.new ; \
151 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
154 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
159 if [ -f $${rootme}/binutils/Makefile ] ; then \
160 echo $${rootme}/binutils/ar ; \
162 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
165 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
169 RANLIB_FOR_TARGET
= ` \
170 if [ -f $${rootme}/binutils/Makefile ] ; then \
171 echo $${rootme}/binutils/ranlib ; \
173 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
176 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
181 if [ -f $${rootme}/binutils/Makefile ] ; then \
182 echo $${rootme}/binutils/nm ; \
184 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
187 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
191 # FIXME: This is badly named.
193 if [ -f $${rootme}/gcc/Makefile ] ; then \
194 if [ -f $${rootme}/newlib/Makefile ] ; then \
195 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
197 echo -I$${rootme}/gcc/include ; \
205 #### host and target specific makefile fragments come in here.
208 # Flags to pass down to all sub-makes.
209 # Please keep these in alphabetical order.
210 BASE_FLAGS_TO_PASS
= \
211 "AR_FLAGS=$(AR_FLAGS)" \
212 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
213 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
215 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
216 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
218 $(start-sanitize-chill
)\
219 "CHILLFLAGS=$(CHILLFLAGS)" \
220 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
221 "CHILL_LIB=$(CHILL_LIB)" \
222 $(end-sanitize-chill
)\
223 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
224 "CXXFLAGS=$(CXXFLAGS)" \
225 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
226 'GCC_FOR_TARGET=$$(CC_FOR_TARGET)' \
227 "INSTALL=$(INSTALL)" \
228 "INSTALL_DATA=$(INSTALL_DATA)" \
229 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
230 "INSTALL_XFORM=$(INSTALL_XFORM)" \
231 "LDFLAGS=$(LDFLAGS)" \
233 "LOADLIBES=$(LOADLIBES)" \
234 "MAKEINFO=$(MAKEINFO)" \
235 "MUNCH_NM=$(MUNCH_NM)" \
236 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
238 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
240 "RUNTEST=$(RUNTEST)" \
241 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
242 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
243 "exec_prefix=$(exec_prefix)" \
247 # Flags to pass down to most sub-makes, in which we're building with
248 # the host environment.
249 # If any variables are added here, they must be added to do-*, below.
259 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
261 # Flags that are concerned with the location of the X11 include files
263 X11_FLAGS_TO_PASS
= \
264 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
265 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
268 # Flags to pass down to makes which are built with the target environment.
269 # The double $ decreases the length of the command line; the variables
270 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
271 # If any variables are added here, they must be added to do-*, below.
272 EXTRA_TARGET_FLAGS
= \
273 'AR=$$(AR_FOR_TARGET)' \
274 'AS=$$(AS_FOR_TARGET)' \
275 'CC=$$(CC_FOR_TARGET)' \
276 'CXX=$$(CXX_FOR_TARGET)' \
277 'NM=$$(NM_FOR_TARGET)' \
278 'RANLIB=$$(RANLIB_FOR_TARGET)' \
279 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
281 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
283 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
284 # unfortunately needs the native compiler and the target ar and
286 # If any variables are added here, they must be added to do-*, below.
287 # The HOST_* variables are a special case, which are used for the gcc
288 # cross-building scheme.
289 HOST_CC
= $(CC_FOR_BUILD
)
291 HOST_PREFIX_1
= loser-
293 'AR=$$(AR_FOR_TARGET)' \
297 'HOST_CC=$(CC_FOR_BUILD)' \
298 'HOST_PREFIX=$(HOST_PREFIX)' \
299 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
301 'RANLIB=$$(RANLIB_FOR_TARGET)' \
304 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
306 # This is a list of the targets for all of the modules which are compiled
307 # using $(FLAGS_TO_PASS).
354 # This is a list of the check targets for all of the modules which are
355 # compiled using $(FLAGS_TO_PASS).
401 # This is a list of the install targets for all of the modules which are
402 # compiled using $(FLAGS_TO_PASS).
449 # This is a list of the targets for all of the modules which are compiled
450 # using $(X11_FLAGS_TO_PASS).
457 # This is a list of the check targets for all of the modules which are
458 # compiled using $(X11_FLAGS_TO_PASS).
459 CHECK_X11_MODULES
= \
465 # This is a list of the install targets for all the modules which are
466 # compiled using $(X11_FLAGS_TO_PASS).
467 INSTALL_X11_MODULES
= \
473 # This is a list of the targets for all of the modules which are compiled
474 # using $(TARGET_FLAGS_TO_PASS).
475 ALL_TARGET_MODULES
= \
476 $(start-sanitize-chill
) \
478 $(end-sanitize-chill
) \
483 # This is a list of the check targets for all of the modules which are
484 # compiled using $(TARGET_FLAGS_TO_PASS).
485 CHECK_TARGET_MODULES
= \
486 $(start-sanitize-chill
) \
488 $(end-sanitize-chill
) \
493 # This is a list of the install targets for all of the modules which are
494 # compiled using $(TARGET_FLAGS_TO_PASS).
495 INSTALL_TARGET_MODULES
= \
496 $(start-sanitize-chill
) \
498 $(end-sanitize-chill
) \
503 # This is a shell case of all modules which are compiled using
504 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
505 TARGET_LIBS
= libg
++ | newlib | xiberty
506 # start-sanitize-chill
507 TARGET_LIBS
= chillrt | libg
++ | newlib | xiberty
510 # The first rule in the file had better be this one. Don't put any above it.
514 # The target built for a native build.
518 $(ALL_TARGET_MODULES
) \
522 # The target built for a cross build.
539 $(ALL_TARGET_MODULES
)
541 # Do a target for all the subdirectories. A ``make do-X'' will do a
542 # ``make X'' in all subdirectories (because, in general, there is a
543 # dependency (below) of X upon do-X, a ``make X'' will also do this,
544 # but it may do additional work as well).
545 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
546 # because it is so large that it can easily overflow the command line
547 # length limit on some systems.
559 @target
=`echo $@ | sed -e 's/^do-//'`; \
560 rootme
=`pwd`; export rootme
; \
561 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
562 for i in
$(SUBDIRS
); do \
563 if
[ -f .
/$$i/Makefile
]; then \
566 for flag in
$(EXTRA_TARGET_FLAGS
); do \
567 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
571 for flag in
$(EXTRA_GCC_FLAGS
); do \
572 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
576 for flag in
$(EXTRA_HOST_FLAGS
); do \
577 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
581 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
583 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
584 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
585 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
587 then true
; else exit
1; fi
; \
591 # Here are the targets which correspond to the do-X targets.
593 .PHONY
: info installcheck dvi install-info
594 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
596 installcheck: do-installcheck
599 install-info
: do-install-info
dir.
info
600 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
601 if
[ -f
dir.
info ] ; then \
602 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
606 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
609 -rm -f Makefile config.status
611 clean: do-clean local-clean
612 mostlyclean: do-mostlyclean local-clean
613 distclean: do-distclean local-clean local-distclean
614 realclean: do-realclean local-clean local-distclean
619 check: $(CHECK_MODULES
) \
620 $(CHECK_TARGET_MODULES
) \
621 $(CHECK_X11_MODULES
) \
624 # Installation targets.
626 .PHONY
: install uninstall vault-install
627 install: $(INSTALL_TARGET
)
630 @echo
"the uninstall target is not supported in this tree"
633 @if
[ -f .
/release
/vault-install
] ; then \
634 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
640 install.
all: install-no-fixedincludes
641 @if
[ -f .
/gcc
/Makefile
] ; then \
642 rootme
=`pwd` ; export rootme
; \
644 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
649 # install-no-fixedincludes is used because Cygnus can not distribute
650 # the fixed header files.
651 .PHONY
: install-no-fixedincludes
652 install-no-fixedincludes
: \
655 $(INSTALL_TARGET_MODULES
) \
656 $(INSTALL_X11_MODULES
) \
659 # Install the gcc headers files, but not the fixed include files,
660 # which Cygnus is not allowed to distribute. This rule is very
661 # dependent on the workings of the gcc Makefile.in.
662 .PHONY
: gcc-no-fixedincludes
663 gcc-no-fixedincludes
:
664 @if
[ -f .
/gcc
/Makefile
]; then \
665 rm -rf gcc
/tmp-include
; \
666 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
668 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
669 touch gcc
/stmp-fixinc
; \
670 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
671 rootme
=`pwd`; export rootme
; \
672 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
674 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
675 rm -rf gcc
/include; \
676 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
679 .PHONY
: install.cross
696 $(INSTALL_TARGET_MODULES
)
698 # This rule is used to build the modules which use FLAGS_TO_PASS. To
699 # build a target all-X means to cd to X and make all.
700 # all-glob is handled specially because it doesn't actually build.
701 .PHONY
: $(ALL_MODULES
) all-glob
702 $(ALL_MODULES
) all-glob
:
703 @
dir=`echo $@ | sed -e 's/all-//'`; \
704 if
[ -f .
/$${dir}/Makefile
] ; then \
705 rootme
=`pwd`; export rootme
; \
706 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
707 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
712 # This rule is used to check the modules which use FLAGS_TO_PASS. To
713 # build a target check-X means to cd to X and make all.
714 .PHONY
: $(CHECK_MODULES
)
716 @
dir=`echo $@ | sed -e 's/check-//'`; \
717 if
[ -f .
/$${dir}/Makefile
] ; then \
718 rootme
=`pwd`; export rootme
; \
719 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
720 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
725 # This rule is used to install the modules which use FLAGS_TO_PASS.
726 # To build a target install-X means to cd to X and make install.
727 .PHONY
: $(INSTALL_MODULES
)
728 $(INSTALL_MODULES
): install-dirs
729 @
dir=`echo $@ | sed -e 's/install-//'`; \
730 if
[ -f .
/$${dir}/Makefile
] ; then \
731 rootme
=`pwd`; export rootme
; \
732 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
733 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
738 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
739 # To build a target all-X means to cd to X and make all.
740 .PHONY
: $(ALL_TARGET_MODULES
)
741 $(ALL_TARGET_MODULES
):
742 @
dir=`echo $@ | sed -e 's/all-//'`; \
743 if
[ -f .
/$${dir}/Makefile
] ; then \
744 rootme
=`pwd`; export rootme
; \
745 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
746 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
751 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
752 # To build a target install-X means to cd to X and make install.
753 .PHONY
: $(CHECK_TARGET_MODULES
)
754 $(CHECK_TARGET_MODULES
):
755 @
dir=`echo $@ | sed -e 's/check-//'`; \
756 if
[ -f .
/$${dir}/Makefile
] ; then \
757 rootme
=`pwd`; export rootme
; \
758 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
759 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check); \
764 # This rule is used to install the modules which use
765 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
767 .PHONY
: $(INSTALL_TARGET_MODULES
)
768 $(INSTALL_TARGET_MODULES
): install-dirs
769 @
dir=`echo $@ | sed -e 's/install-//'`; \
770 if
[ -f .
/$${dir}/Makefile
] ; then \
771 rootme
=`pwd`; export rootme
; \
772 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
773 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
778 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
779 # To build a target all-X means to cd to X and make all.
780 .PHONY
: $(ALL_X11_MODULES
)
782 @
dir=`echo $@ | sed -e 's/all-//'`; \
783 if
[ -f .
/$${dir}/Makefile
] ; then \
784 rootme
=`pwd`; export rootme
; \
785 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
787 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
792 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
793 # To build a target check-X means to cd to X and make all.
794 .PHONY
: $(CHECK_X11_MODULES
)
795 $(CHECK_X11_MODULES
):
796 @
dir=`echo $@ | sed -e 's/check-//'`; \
797 if
[ -f .
/$${dir}/Makefile
] ; then \
798 rootme
=`pwd`; export rootme
; \
799 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
801 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
806 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
807 # To build a target install-X means to cd to X and make install.
808 .PHONY
: $(INSTALL_X11_MODULES
)
809 $(INSTALL_X11_MODULES
):
810 @
dir=`echo $@ | sed -e 's/install-//'`; \
811 if
[ -f .
/$${dir}/Makefile
] ; then \
812 rootme
=`pwd`; export rootme
; \
813 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
815 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
820 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
823 @if
[ -f .
/gcc
/Makefile
] ; then \
824 rootme
=`pwd`; export rootme
; \
825 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
826 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
833 @if
[ -f .
/gcc
/Makefile
] ; then \
834 rootme
=`pwd`; export rootme
; \
835 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
836 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
843 @if
[ -f .
/gcc
/Makefile
] ; then \
844 rootme
=`pwd`; export rootme
; \
845 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
846 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
851 # This is a list of inter-dependencies among modules.
854 all-binutils
: all-libiberty all-opcodes all-bfd all-flex
856 # start-sanitize-chill
857 all-chillrt
: all-binutils all-gas all-gcc all-newlib
861 all-diff
: all-libiberty
864 all-expect
: all-tcl all-tk
865 all-fileutils
: all-libiberty
867 all-flex
: all-libiberty all-byacc
868 all-gas
: all-libiberty all-opcodes all-bfd
870 all-gcc
: all-libiberty all-byacc all-binutils all-gas
871 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc all-sim
873 all-gprof
: all-libiberty all-bfd
875 all-gzip
: all-libiberty
876 all-hello
: all-libiberty
878 all-ispell
: all-emacs
879 all-ld
: all-libiberty all-bfd all-byacc all-flex
880 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
882 all-m4
: all-libiberty
883 all-make
: all-libiberty
885 all-newlib
: all-binutils all-gas all-gcc
891 all-recode
: all-libiberty
895 all-sim
: all-libiberty all-bfd
896 all-tar
: all-libiberty
898 all-tclX
: all-tcl all-tk
900 all-texinfo
: all-libiberty
902 all-tgas
: all-libiberty all-bfd
905 all-uudecode
: all-libiberty
906 all-xiberty
: all-gcc all-newlib
908 ### other supporting targets
917 @for i in
$(MAKEDIRS
) ; do \
918 echo Making
$$i...
; \
919 parent
=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
920 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
921 if
[ ! -d
$$i ] ; then \
922 if mkdir
$$i ; then \
933 dir.
info: do-install-info
934 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
935 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
936 mv
-f
dir.
info.new
dir.
info ; \
941 @echo
"Building a full distribution of this tree isn't done"
942 @echo
"via 'make dist'. Check out the etc/ subdirectory"
951 @for i in
$(SUBDIRS
); \
955 wd
=`basename $$pwd`; \
956 for j in
`$(MAKE) ls`; \
962 # with the gnu make, this is done automatically.
964 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
965 $(SHELL
) .
/config.status
968 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
970 DEVO_SUPPORT
= README Makefile.in configure configure.in \
971 config.guess config.sub config move-if-change
972 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
973 configure.texi standards.texi make-stds.texi
974 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
975 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
977 .PHONY
: setup-dirs-gdb gdb.
tar.Z make-gdb.
tar.Z
982 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
984 gdb.
tar.Z
: setup-dirs-gdb
985 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
986 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-testsuite.
dir)
987 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
989 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
990 rm -rf proto-toplev
; mkdir proto-toplev
991 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
992 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
995 mkdir proto-toplev
/etc
996 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
997 ln
-s ..
/..
/etc
/$$i .
; \
999 # Put only one copy (four hard links) of COPYING in the tar file.
1000 rm proto-toplev
/bfd
/COPYING
1001 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1002 rm proto-toplev
/include/COPYING
1003 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1004 rm proto-toplev
/readline
/COPYING
1005 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1007 # Take out texinfo and glob from configurable dirs
1008 rm proto-toplev
/configure.in
1009 sed
-e
'/^host_tools=/s/texinfo //' \
1010 -e
'/^host_libs=/s/glob //' \
1011 <configure.in
>proto-toplev
/configure.in
1013 # Take out texinfo from a few places; make simple BISON=bison line.
1014 rm proto-toplev
/Makefile.in
1015 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1016 -e
'/^ install-texinfo /d' \
1017 -e
'/^BISON = /,/^$$/d' \
1018 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1019 <Makefile.in
>proto-toplev
/Makefile.in
1021 mkdir proto-toplev
/texinfo
1022 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1023 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1024 chmod og
=u
`find proto-toplev -print`
1025 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1026 ln
-s proto-toplev gdb-
$$VER; \
1027 echo
"==> Making gdb-$$VER.tar.Z"; \
1028 tar cfh
- gdb-
$$VER |
$(COMPRESS
) -v
>gdb-
$$VER.
tar.Z
; \
1029 echo
"==> Making gdb-$$VER.tar.gz"; \
1030 tar cfh
- gdb-
$$VER |
$(GZIP
) -v
-9 >gdb-
$$VER.
tar.gz
)
1032 # Make the testsuite archive separately.
1033 ln
-s ..
/..
/gdb
/proto-testsuite.
dir/testsuite proto-toplev
/gdb
/testsuite
1034 # Blow away the Chill test that requires a Chill compiled executable,
1035 # since GNU Chill is not yet publically available.
1036 rm -rf proto-toplev
/gdb
/testsuite
/gdb.t31
1038 # Put a copy of COPYING in the tar file.
1039 ln proto-toplev
/gdb
/COPYING proto-toplev
/gdb
/testsuite
/COPYING
1040 chmod og
=u
`find proto-toplev/gdb/testsuite -print`
1041 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1042 echo
"==> Making gdb-$$VER-testsuite.tar.Z"; \
1043 tar cfh
- gdb-
$$VER/configure gdb-
$$VER/config.guess \
1044 gdb-
$$VER/config.sub gdb-
$$VER/move-if-change \
1045 gdb-
$$VER/gdb
/testsuite | \
1046 $(COMPRESS
) -v
>gdb-
$$VER-testsuite.
tar.Z
; \
1047 echo
"==> Making gdb-$$VER-testsuite.tar.gz"; \
1048 tar cfh
- gdb-
$$VER/configure gdb-
$$VER/config.guess \
1049 gdb-
$$VER/config.sub gdb-
$$VER/move-if-change \
1050 gdb-
$$VER/gdb
/testsuite | \
1051 $(GZIP
) -v
-9 >gdb-
$$VER-testsuite.
tar.gz
)
1053 # When you use `make setup-dirs' or `make taz' you should always redefine
1055 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1056 # Directories that might want `make diststuff' run.
1057 DISTSTUFFDIRS
= ld gprof gdb
1061 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex texinfo
/gpl.texinfo
1064 .
/configure
-rm sun4
1065 chmod og
=u
`find etc $(DEVO_SUPPORT) $(SUPPORT_FILES) $(TOOL) -print`
1066 # Make links, and run "make diststuff" when needed.
1067 # The `echo' for setting `p' is to convert all whitespace to spaces.
1068 # Then the `case' further below should tell whether $$d is in
1070 rm -rf proto-toplev
; mkdir proto-toplev
1071 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1072 p
=" `echo $(DISTSTUFFDIRS)` " ; \
1073 for d in
$$dirs ; do \
1074 if
[ -d
$$d ]; then \
1077 echo making diststuff in
$$d ; \
1078 (cd
$$d ; $(MAKE
) -f Makefile.in diststuff
) || exit
1 ;; \
1080 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1081 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1083 ln
-s ..
/$$d proto-toplev
/$$d ; \
1085 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1088 mkdir proto-toplev
/etc
1089 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1090 ln
-s ..
/..
/etc
/$$i .
; \
1093 # Take out texinfo and glob from configurable dirs
1094 rm proto-toplev
/configure.in
1095 sed
-e
'/^host_tools=/s/texinfo //' \
1096 -e
'/^host_libs=/s/glob //' \
1097 <configure.in
>proto-toplev
/configure.in
1099 # Take out texinfo from a few places; make simple BISON=bison line.
1100 rm proto-toplev
/Makefile.in
1101 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1102 -e
'/^ install-texinfo /d' \
1103 -e
'/^BISON = /,/^$$/d' \
1104 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1105 <Makefile.in
>proto-toplev
/Makefile.in
1107 mkdir proto-toplev
/texinfo
1108 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1109 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1110 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1111 chmod og
=u
`find proto-toplev -print`
1112 (VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1113 echo
"==> Making $(TOOL)-$$VER.tar.gz"; \
1114 ln
-s proto-toplev
$(TOOL
)-$$VER; \
1115 tar cfh
- $(TOOL
)-$$VER \
1116 |
$(GZIP
) -v
-9 >$(TOOL
)-$$VER.
tar.gz
)
1118 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo
1119 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1122 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes
1123 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1124 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)" TOOL
=gas
1126 # The FSF "binutils" release includes gprof and ld.
1127 .PHONY
: binutils.
tar.gz
1128 BINUTILS_SUPPORT_DIRS
= bfd
include libiberty opcodes
ld gprof
1129 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1130 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS)" TOOL
=binutils
1132 .PHONY
: gas
+binutils.
tar.gz
1133 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1134 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1135 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(GASB_SUPPORT_DIRS)" TOOL
=gas
1140 # start-sanitize-chill
1141 ## This is ugly, but I don't want GNU make to put these variables in
1142 ## the environment. Older makes will see this as a set of targets
1143 ## with no dependencies and no actions.
1144 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1145 # end-sanitize-chill
1147 # end of Makefile.in