2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
4 # 1999, 2000, 2001 Free Software Foundation
6 # This file is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 exec_prefix = $(prefix)
26 bindir=${exec_prefix}/bin
27 sbindir
=${exec_prefix}/sbin
28 libexecdir
=${exec_prefix}/libexec
29 datadir=${prefix}/share
30 sysconfdir
=${prefix}/etc
31 sharedstatedir
=${prefix}/com
32 localstatedir
=${prefix}/var
33 libdir=${exec_prefix}/lib
34 includedir=${prefix}/include
35 oldincludedir=/usr
/include
36 infodir=${prefix}/info
38 gxx_include_dir
=${includedir}/g
++
40 tooldir
= $(exec_prefix)/$(target_alias
)
41 build_tooldir
= $(exec_prefix)/$(target_alias
)
43 program_transform_name
=
45 man1dir = $(mandir)/man1
46 man2dir = $(mandir)/man2
47 man3dir = $(mandir)/man3
48 man4dir = $(mandir)/man4
49 man5dir = $(mandir)/man5
50 man6dir = $(mandir)/man6
51 man7dir = $(mandir)/man7
52 man8dir = $(mandir)/man8
53 man9dir = $(mandir)/man9
54 infodir = $(prefix)/info
55 includedir = $(prefix)/include
56 # Directory in which the compiler finds executables, libraries, etc.
57 libsubdir
= $(libdir)/gcc-lib
/$(target_alias
)/$(gcc_version
)
62 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
64 INSTALL_PROGRAM_ARGS
=
66 INSTALL
= $(SHELL
) $$s/install-sh
-c
67 INSTALL_PROGRAM
= $(INSTALL
) $(INSTALL_PROGRAM_ARGS
)
68 INSTALL_SCRIPT
= $(INSTALL
)
69 INSTALL_DATA
= $(INSTALL
) -m
644
71 INSTALL_DOSREL
= install-dosrel-fake
78 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
79 # here so that they can be overridden by Makefile fragments.
80 HOST_CC
= $(CC_FOR_BUILD
)
82 HOST_PREFIX_1
= loser-
84 # These flag values are normally overridden by the configure script.
90 CFLAGS_FOR_TARGET
= $(CFLAGS
)
92 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
96 CHILLFLAGS
= $(CFLAGS
)
100 # Use -O2 to stress test the compiler.
101 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
102 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
103 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
117 # These values are substituted by configure.
122 BISON
= `if [ -f $$r/bison/bison ] ; then \
123 echo $$r/bison/bison -L $$s/bison/ ; \
128 YACC
= `if [ -f $$r/bison/bison ] ; then \
129 echo $$r/bison/bison -y -L $$s/bison/ ; \
130 elif [ -f $$r/byacc/byacc ] ; then \
131 echo $$r/byacc/byacc ; \
133 echo ${DEFAULT_YACC} ; \
136 LEX
= `if [ -f $$r/flex/flex ] ; \
137 then echo $$r/flex/flex ; \
138 else echo ${DEFAULT_LEX} ; fi`
140 M4
= `if [ -f $$r/m4/m4 ] ; \
141 then echo $$r/m4/m4 ; \
142 else echo ${DEFAULT_M4} ; fi`
144 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
145 then echo $$r/texinfo/makeinfo/makeinfo ; \
146 else echo makeinfo ; fi`
148 # This just becomes part of the MAKEINFO definition passed down to
149 # sub-makes. It lets flags be given on the command line while still
150 # using the makeinfo from the object tree.
153 EXPECT
= `if [ -f $$r/expect/expect ] ; \
154 then echo $$r/expect/expect ; \
155 else echo expect ; fi`
157 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
158 then echo $$s/dejagnu/runtest ; \
159 else echo runtest ; fi`
162 # compilers to use to create programs which must be run in the build
165 CXX_FOR_BUILD
= $(CXX
)
167 SUBDIRS
= "this is set via configure, don't edit this"
170 # This is set by the configure script to the list of directories which
171 # should be built using the target tools.
172 TARGET_CONFIGDIRS
= libiberty libgloss
$(SPECIAL_LIBS
) newlib libio librx libstdc
++ libg
++ winsup opcodes bsp libstub cygmon libf2c libchill libobjc
174 # Target libraries are put under this directory:
175 # Changed by configure to $(target_alias) if cross.
178 # This is set by the configure script to the arguments passed to configure.
181 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
185 # This is the name of the environment variable used for the path to
186 # the libraries. This may be changed by configure.in.
187 RPATH_ENVVAR
= LD_LIBRARY_PATH
189 # This is the list of directories that may be needed in RPATH_ENVVAR
190 # so that programs built for the host machine work.
191 HOST_LIB_PATH
= $$r/bfd
:$$r/opcodes
193 # This is the list of directories that may be needed in RPATH_ENVVAR
194 # so that prorgams built for the target machine work.
195 TARGET_LIB_PATH
= $$r/$(TARGET_SUBDIR
)/libstdc
++-v3
/src
/.libs
:$$r/$(TARGET_SUBDIR
)/libstdc
++
197 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
198 # Some platforms don't like blank entries, so we remove duplicate,
199 # leading and trailing colons.
200 REALLY_SET_LIB_PATH
= \
201 $(RPATH_ENVVAR
)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR
);
204 INSTALL_TARGET
= installdirs \
207 $(INSTALL_TARGET_MODULES
) \
208 $(INSTALL_X11_MODULES
) \
211 INSTALL_TARGET_CROSS
= installdirs \
214 $(INSTALL_TARGET_MODULES
) \
215 $(INSTALL_X11_MODULES
) \
218 # Should be substed by configure.in
223 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE
=
225 # If GCC_FOR_TARGET is not overriden on the command line, then this
226 # variable is passed down to the gcc Makefile, where it is used to
227 # build libgcc2.a. We define it here so that it can itself be
228 # overridden on the command line.
229 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/ $(FLAGS_FOR_TARGET
)
232 if [ -f $$r/gas/as-new ] ; then \
233 echo $$r/gas/as-new ; \
234 elif [ -f $$r/gcc/xgcc ]; then \
235 $(CC_FOR_TARGET) -print-prog-name=as ; \
237 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
240 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
245 if [ -f $$r/ld/ld-new ] ; then \
246 echo $$r/ld/ld-new ; \
247 elif [ -f $$r/gcc/xgcc ]; then \
248 $(CC_FOR_TARGET) -print-prog-name=ld ; \
250 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
253 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
257 DLLTOOL_FOR_TARGET
= ` \
258 if [ -f $$r/binutils/dlltool ] ; then \
259 echo $$r/binutils/dlltool ; \
261 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
264 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
268 WINDRES_FOR_TARGET
= ` \
269 if [ -f $$r/binutils/windres ] ; then \
270 echo $$r/binutils/windres ; \
272 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
275 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
280 if [ -f $$r/binutils/ar ] ; then \
281 echo $$r/binutils/ar ; \
283 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
286 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
290 RANLIB_FOR_TARGET
= ` \
291 if [ -f $$r/binutils/ranlib ] ; then \
292 echo $$r/binutils/ranlib ; \
294 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
297 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
302 if [ -f $$r/binutils/nm-new ] ; then \
303 echo $$r/binutils/nm-new ; \
304 elif [ -f $$r/gcc/xgcc ]; then \
305 $(CC_FOR_TARGET) -print-prog-name=nm ; \
307 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
310 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
314 # The first rule in the file had better be this one. Don't put any above it.
315 # This lives here to allow makefile fragments to contain dependencies.
319 # These can be overridden by config/mt-*.
320 # The _TARGET_ is because they're specified in mt-foo.
321 # The _HOST_ is because they're programs that run on the host.
322 EXTRA_TARGET_HOST_ALL_MODULES
=
323 EXTRA_TARGET_HOST_INSTALL_MODULES
=
324 EXTRA_TARGET_HOST_CHECK_MODULES
=
326 #### host and target specific makefile fragments come in here.
329 # Flags to pass down to all sub-makes.
330 # Please keep these in alphabetical order.
331 BASE_FLAGS_TO_PASS
= \
332 "AR_FLAGS=$(AR_FLAGS)" \
333 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
334 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
336 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
337 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
339 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
340 "CHILLFLAGS=$(CHILLFLAGS)" \
341 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
342 "CHILL_LIB=$(CHILL_LIB)" \
343 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
344 "CXXFLAGS=$(CXXFLAGS)" \
345 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
346 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
347 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
348 "INSTALL=$(INSTALL)" \
349 "INSTALL_DATA=$(INSTALL_DATA)" \
350 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
351 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
352 "LDFLAGS=$(LDFLAGS)" \
354 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
355 "LIBCFLAGS=$(LIBCFLAGS)" \
356 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
357 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
358 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
361 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
362 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
363 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
364 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
367 "RUNTEST=$(RUNTEST)" \
368 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
369 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
370 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
373 "datadir=$(datadir)" \
374 "exec_prefix=$(exec_prefix)" \
375 "includedir=$(includedir)" \
376 "infodir=$(infodir)" \
378 "libexecdir=$(libexecdir)" \
379 "lispdir=$(lispdir)" \
380 "localstatedir=$(localstatedir)" \
382 "oldincludedir=$(oldincludedir)" \
384 "sbindir=$(sbindir)" \
385 "sharedstatedir=$(sharedstatedir)" \
386 "sysconfdir=$(sysconfdir)" \
387 "tooldir=$(tooldir)" \
388 "build_tooldir=$(build_tooldir)" \
389 "gxx_include_dir=$(gxx_include_dir)" \
390 "gcc_version=$(gcc_version)" \
391 "gcc_version_trigger=$(gcc_version_trigger)" \
392 "target_alias=$(target_alias)" \
393 "libsubdir=$(libsubdir)"
395 # For any flags above that may contain shell code that varies from one
396 # target library to another. When doing recursive invocations of the
397 # top-level Makefile, we don't want the outer make to evaluate them,
398 # so we pass these variables down unchanged. They must not contain
399 # single nor double quotes.
401 CXX_FOR_TARGET
='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)'
403 # Flags to pass down to most sub-makes, in which we're building with
404 # the host environment.
405 # If any variables are added here, they must be added to do-*, below.
411 'DLLTOOL=$(DLLTOOL)' \
417 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
419 # Flags that are concerned with the location of the X11 include files
422 # NOTE: until the top-level is getting the values via autoconf, it only
423 # causes problems to have this top-level Makefile overriding the autoconf-set
424 # values in child directories. Only variables that don't conflict with
425 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
427 X11_FLAGS_TO_PASS
= \
428 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
429 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
431 # Flags to pass down to makes which are built with the target environment.
432 # The double $ decreases the length of the command line; the variables
433 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
434 # If any variables are added here, they must be added to do-*, below.
435 EXTRA_TARGET_FLAGS
= \
436 'AR=$$(AR_FOR_TARGET)' \
437 'AS=$$(AS_FOR_TARGET)' \
438 'CC=$$(CC_FOR_TARGET)' \
439 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
440 'CXX=$$(CXX_FOR_TARGET)' \
441 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
442 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
443 'LD=$$(LD_FOR_TARGET)' \
444 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
445 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
446 'NM=$$(NM_FOR_TARGET)' \
447 'RANLIB=$$(RANLIB_FOR_TARGET)' \
448 'WINDRES=$$(WINDRES_FOR_TARGET)'
450 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
452 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
453 # unfortunately needs the native compiler and the target ar and
455 # If any variables are added here, they must be added to do-*, below.
456 # The HOST_* variables are a special case, which are used for the gcc
457 # cross-building scheme.
463 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
464 'HOST_CC=$(CC_FOR_BUILD)' \
465 'HOST_PREFIX=$(HOST_PREFIX)' \
466 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
469 'WINDRES=$$(WINDRES_FOR_TARGET)' \
470 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
471 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
472 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
473 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
474 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
475 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
476 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
477 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
478 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
479 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
481 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
483 # This is a list of the targets for all of the modules which are compiled
484 # using $(FLAGS_TO_PASS).
553 $(EXTRA_TARGET_HOST_ALL_MODULES
)
555 # This is a list of the check targets for all of the modules which are
556 # compiled using $(FLAGS_TO_PASS).
558 # The list is in two parts. The first lists those tools which
559 # are tested as part of the host's native tool-chain, and not
560 # tested in a cross configuration.
561 NATIVE_CHECK_MODULES
= \
567 CROSS_CHECK_MODULES
= \
626 $(EXTRA_TARGET_HOST_CHECK_MODULES
)
628 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
630 # This is a list of the install targets for all of the modules which are
631 # compiled using $(FLAGS_TO_PASS).
632 # We put install-opcodes before install-binutils because the installed
633 # binutils might be on PATH, and they might need the shared opcodes
635 # We put install-tcl before install-itcl because itcl wants to run a
636 # program on installation which uses the Tcl libraries.
702 $(EXTRA_TARGET_HOST_INSTALL_MODULES
)
704 # This is a list of the targets for all of the modules which are compiled
705 # using $(X11_FLAGS_TO_PASS).
718 # This is a list of the check targets for all of the modules which are
719 # compiled using $(X11_FLAGS_TO_PASS).
720 CHECK_X11_MODULES
= \
730 # This is a list of the install targets for all the modules which are
731 # compiled using $(X11_FLAGS_TO_PASS).
732 INSTALL_X11_MODULES
= \
744 # This is a list of the targets for all of the modules which are compiled
745 # using $(TARGET_FLAGS_TO_PASS).
746 ALL_TARGET_MODULES
= \
748 all-target-libstdc
++ \
749 all-target-libstdc
++-v3 \
754 all-target-libchill \
756 all-target-libtermcap \
758 all-target-libgloss \
759 all-target-libiberty \
761 all-target-examples \
766 all-target-boehm-gc \
767 all-target-qthreads \
771 # This is a list of the configure targets for all of the modules which
772 # are compiled using the target tools.
773 CONFIGURE_TARGET_MODULES
= \
774 configure-target-libio \
775 configure-target-libstdc
++ \
776 configure-target-libstdc
++-v3 \
777 configure-target-librx \
778 configure-target-libg
++ \
779 configure-target-newlib \
780 configure-target-libf2c \
781 configure-target-libchill \
782 configure-target-libobjc \
783 configure-target-libtermcap \
784 configure-target-winsup \
785 configure-target-libgloss \
786 configure-target-libiberty \
787 configure-target-gperf \
788 configure-target-examples \
789 configure-target-libstub \
790 configure-target-libffi \
791 configure-target-libjava \
792 configure-target-zlib \
793 configure-target-boehm-gc \
794 configure-target-qthreads \
795 configure-target-bsp \
796 configure-target-cygmon
798 # This is a list of the check targets for all of the modules which are
799 # compiled using $(TARGET_FLAGS_TO_PASS).
800 CHECK_TARGET_MODULES
= \
802 check-target-libstdc
++ \
803 check-target-libstdc
++-v3 \
804 check-target-libg
++ \
805 check-target-newlib \
806 check-target-libf2c \
807 check-target-libchill \
808 check-target-libobjc \
809 check-target-winsup \
810 check-target-libiberty \
811 check-target-libffi \
812 check-target-libjava \
814 check-target-boehm-gc \
815 check-target-qthreads \
818 # This is a list of the install targets for all of the modules which are
819 # compiled using $(TARGET_FLAGS_TO_PASS).
820 INSTALL_TARGET_MODULES
= \
821 install-target-libio \
822 install-target-libstdc
++ \
823 install-target-libstdc
++-v3 \
824 install-target-libg
++ \
825 install-target-newlib \
826 install-target-libf2c \
827 install-target-libchill \
828 install-target-libobjc \
829 install-target-libtermcap \
830 install-target-winsup \
831 install-target-libgloss \
832 install-target-libiberty \
834 install-target-libjava \
835 install-target-zlib \
836 install-target-boehm-gc \
837 install-target-qthreads \
840 # This is a list of the targets for which we can do a clean-{target}.
909 # All of the target modules that can be cleaned
910 CLEAN_TARGET_MODULES
= \
912 clean-target-libstdc
++ \
913 clean-target-libstdc
++-v3 \
915 clean-target-libg
++ \
916 clean-target-newlib \
917 clean-target-libf2c \
918 clean-target-libchill \
919 clean-target-libobjc \
920 clean-target-winsup \
921 clean-target-libgloss \
922 clean-target-libiberty \
924 clean-target-examples \
925 clean-target-libstub \
926 clean-target-libffi \
927 clean-target-libjava \
929 clean-target-boehm-gc \
930 clean-target-qthreads \
934 # All of the x11 modules that can be cleaned
935 CLEAN_X11_MODULES
= \
946 # The target built for a native build.
951 $(ALL_TARGET_MODULES
) \
954 # Do a target for all the subdirectories. A ``make do-X'' will do a
955 # ``make X'' in all subdirectories (because, in general, there is a
956 # dependency (below) of X upon do-X, a ``make X'' will also do this,
957 # but it may do additional work as well).
958 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
959 # because it is so large that it can easily overflow the command line
960 # length limit on some systems.
969 do-maintainer-clean \
973 @target
=`echo $@ | sed -e 's/^do-//'`; \
975 s
=`cd $(srcdir); pwd`; export s
; \
977 for i in
$(SUBDIRS
) -dummy-
; do \
978 if
[ -f .
/$$i/Makefile
]; then \
981 for flag in
$(EXTRA_GCC_FLAGS
); do \
982 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
986 for flag in
$(EXTRA_HOST_FLAGS
); do \
987 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
991 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
993 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
994 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
995 "RANLIB=$${RANLIB}" \
996 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
998 then true
; else exit
1; fi
; \
1001 @target
=`echo $@ | sed -e 's/^do-//'`; \
1002 r
=`pwd`; export r
; \
1003 s
=`cd $(srcdir); pwd`; export s
; \
1005 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
1006 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
1007 for flag in
$(EXTRA_TARGET_FLAGS
); do \
1008 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1010 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
1011 if
(cd
$(TARGET_SUBDIR
)/$$i; \
1012 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
1013 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1014 "RANLIB=$${RANLIB}" \
1015 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1017 then true
; else exit
1; fi
; \
1021 # Here are the targets which correspond to the do-X targets.
1023 .PHONY
: info installcheck dvi install-info
1024 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
1025 .PHONY
: local-clean local-distclean local-maintainer-clean
1027 installcheck: do-installcheck
1030 # Make sure makeinfo is built before we do a `make info'.
1031 do-info
: all-texinfo
1033 install-info
: do-install-info
dir.
info
1034 s
=`cd $(srcdir); pwd`; export s
; \
1035 if
[ -f
dir.
info ] ; then \
1036 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
1040 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E *.log
1043 -rm -f Makefile config.status config.cache mh-frag mt-frag
1044 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
1045 rm -rf
$(TARGET_SUBDIR
); \
1048 local-maintainer-clean
:
1049 @echo
"This command is intended for maintainers to use;"
1050 @echo
"it deletes files that may require special tools to rebuild."
1052 clean: do-clean local-clean
1053 mostlyclean: do-mostlyclean local-clean
1054 distclean: do-distclean local-clean local-distclean
1055 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
1056 maintainer-clean
: local-distclean
1057 realclean: maintainer-clean
1059 # This rule is used to clean specific modules.
1060 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
1061 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
1062 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1063 if
[ -f .
/$${dir}/Makefile
] ; then \
1064 r
=`pwd`; export r
; \
1065 s
=`cd $(srcdir); pwd`; export s
; \
1067 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1072 .PHONY
: $(CLEAN_TARGET_MODULES
)
1073 $(CLEAN_TARGET_MODULES
):
1074 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1075 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1076 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1077 r
=`pwd`; export r
; \
1078 s
=`cd $(srcdir); pwd`; export s
; \
1080 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1085 clean-target
: $(CLEAN_TARGET_MODULES
) clean-target-libgcc
1086 clean-target-libgcc
:
1087 test ! -d gcc
/libgcc || \
1088 (cd gcc
/libgcc
&& find .
-type d
-print) | \
1089 while read d
; do
rm -f gcc
/$$d/libgcc.a ||
: ; done
1095 check: $(CHECK_MODULES
) \
1096 $(CHECK_TARGET_MODULES
) \
1097 $(CHECK_X11_MODULES
) \
1100 # Automated reporting of test results.
1102 warning.log
: build.log
1103 $(srcdir)/contrib
/warn_summary build.log
> $@
1106 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1107 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1109 $(srcdir)/contrib
/test_summary
-t
>$@
1111 echo If you really want to send e-mail
, run .
/$@ now
1113 mail-report-with-warnings.log
: warning.log
1114 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1115 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1117 $(srcdir)/contrib
/test_summary
-t
-i warning.log
>$@
1119 echo If you really want to send e-mail
, run .
/$@ now
1121 # Installation targets.
1123 .PHONY
: install install-cross
uninstall source-vault binary-vault vault-install
1124 install: $(INSTALL_TARGET
)
1125 install-cross
: $(INSTALL_TARGET_CROSS
)
1128 @echo
"the uninstall target is not supported in this tree"
1131 $(MAKE
) -f .
/release
/Build-A-Release \
1132 host
=$(host_alias
) source-vault
1135 $(MAKE
) -f .
/release
/Build-A-Release \
1136 host
=$(host_alias
) target
=$(target_alias
)
1139 @if
[ -f .
/release
/vault-install
] ; then \
1140 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1146 install.
all: install-no-fixedincludes
1147 @if
[ -f .
/gcc
/Makefile
] ; then \
1148 r
=`pwd` ; export r
; \
1151 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1156 # inet-install is used because the I*Net wants DejaGNU installed but
1157 # not built. Similarly, gzip is built but not installed.
1159 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1161 # install-no-fixedincludes is used because Cygnus can not distribute
1162 # the fixed header files.
1163 .PHONY
: install-no-fixedincludes
1164 install-no-fixedincludes
: \
1166 $(INSTALL_MODULES
) \
1167 $(INSTALL_TARGET_MODULES
) \
1168 $(INSTALL_X11_MODULES
) \
1169 gcc-no-fixedincludes
1171 # Install the gcc headers files, but not the fixed include files,
1172 # which Cygnus is not allowed to distribute. This rule is very
1173 # dependent on the workings of the gcc Makefile.in.
1174 .PHONY
: gcc-no-fixedincludes
1175 gcc-no-fixedincludes
:
1176 @if
[ -f .
/gcc
/Makefile
]; then \
1177 rm -rf gcc
/tmp-include
; \
1178 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1179 mkdir gcc
/include; \
1180 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1181 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1182 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1183 r
=`pwd`; export r
; \
1184 s
=`cd $(srcdir); pwd` ; export s
; \
1187 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1188 rm -rf gcc
/include; \
1189 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1192 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1193 # build a target all-X means to cd to X and make all.
1195 # all-gui, and all-libproc are handled specially because
1196 # they are still experimental, and if they fail to build, that
1197 # shouldn't stop "make all".
1198 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1199 $(ALL_MODULES
) all-gui all-libproc
:
1200 @
dir=`echo $@ | sed -e 's/all-//'`; \
1201 if
[ -f .
/$${dir}/Makefile
] ; then \
1202 r
=`pwd`; export r
; \
1203 s
=`cd $(srcdir); pwd`; export s
; \
1205 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1210 # These rules are used to check the modules which use FLAGS_TO_PASS.
1211 # To build a target check-X means to cd to X and make check. Some
1212 # modules are only tested in a native toolchain.
1214 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1215 $(NATIVE_CHECK_MODULES
):
1216 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1217 dir=`echo $@ | sed -e 's/check-//'`; \
1218 if
[ -f .
/$${dir}/Makefile
] ; then \
1219 r
=`pwd`; export r
; \
1220 s
=`cd $(srcdir); pwd`; export s
; \
1222 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1228 $(CROSS_CHECK_MODULES
):
1229 @
dir=`echo $@ | sed -e 's/check-//'`; \
1230 if
[ -f .
/$${dir}/Makefile
] ; then \
1231 r
=`pwd`; export r
; \
1232 s
=`cd $(srcdir); pwd`; export s
; \
1234 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1239 # This rule is used to install the modules which use FLAGS_TO_PASS.
1240 # To build a target install-X means to cd to X and make install.
1241 .PHONY
: $(INSTALL_MODULES
)
1242 $(INSTALL_MODULES
): installdirs
1243 @
dir=`echo $@ | sed -e 's/install-//'`; \
1244 if
[ -f .
/$${dir}/Makefile
] ; then \
1245 r
=`pwd`; export r
; \
1246 s
=`cd $(srcdir); pwd`; export s
; \
1248 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1253 # This rule is used to configure the modules which are built with the
1255 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1256 $(CONFIGURE_TARGET_MODULES
):
1257 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1258 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1259 r
=`pwd`; export r
; \
1260 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1261 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1262 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1263 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1264 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1266 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1267 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1268 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1271 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1274 fi
; exit
0 # break command into two pieces
1275 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1276 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1278 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1280 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1281 if
[ -d
$(srcdir)/$${dir} ]; then \
1282 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1283 r
=`pwd`; export r
; \
1284 s
=`cd $(srcdir); pwd`; export s
; \
1286 AR
="$(AR_FOR_TARGET)"; export AR
; \
1287 AS
="$(AS_FOR_TARGET)"; export AS
; \
1288 CC
="$(CC_FOR_TARGET)"; export CC
; \
1289 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1290 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1291 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1292 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1293 LD
="$(LD_FOR_TARGET)"; export LD
; \
1294 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1295 NM
="$(NM_FOR_TARGET)"; export NM
; \
1296 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1297 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1298 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1299 cd
$(TARGET_SUBDIR
)/$${dir}; \
1302 topdir
=$(srcdir) ;; \
1304 case
"$(TARGET_SUBDIR)" in \
1305 .
) topdir
="../$(srcdir)" ;; \
1306 *) topdir
="../../$(srcdir)" ;; \
1309 if
[ "$(srcdir)" = "." ] ; then \
1310 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1311 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1312 if
[ -f Makefile
]; then \
1313 if
$(MAKE
) distclean; then \
1327 srcdiroption
="--srcdir=."; \
1330 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1331 libsrcdir
="$$s/$${dir}"; \
1333 if
[ -f
$${libsrcdir}/configure
] ; then \
1334 rm -f no-such-file skip-this-dir
; \
1335 CONFIG_SITE
=no-such-file
$(SHELL
) $${libsrcdir}/configure \
1336 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1337 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1339 rm -f no-such-file skip-this-dir
; \
1340 CONFIG_SITE
=no-such-file
$(SHELL
) $$s/configure \
1341 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1342 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1344 if
[ -f skip-this-dir
] ; then \
1346 rm -f skip-this-dir
; \
1347 cd ..
; rmdir
$${dir} || true
; \
1358 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1359 # To build a target all-X means to cd to X and make all.
1360 .PHONY
: $(ALL_TARGET_MODULES
)
1361 $(ALL_TARGET_MODULES
):
1362 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1363 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1364 r
=`pwd`; export r
; \
1365 s
=`cd $(srcdir); pwd`; export s
; \
1367 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1368 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1373 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1374 # To build a target install-X means to cd to X and make install.
1375 .PHONY
: $(CHECK_TARGET_MODULES
)
1376 $(CHECK_TARGET_MODULES
):
1377 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1378 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1379 r
=`pwd`; export r
; \
1380 s
=`cd $(srcdir); pwd`; export s
; \
1382 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1383 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1388 # This rule is used to install the modules which use
1389 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1391 .PHONY
: $(INSTALL_TARGET_MODULES
)
1392 $(INSTALL_TARGET_MODULES
): installdirs
1393 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1394 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1395 r
=`pwd`; export r
; \
1396 s
=`cd $(srcdir); pwd`; export s
; \
1398 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1399 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1404 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1405 # To build a target all-X means to cd to X and make all.
1406 .PHONY
: $(ALL_X11_MODULES
)
1408 @
dir=`echo $@ | sed -e 's/all-//'`; \
1409 if
[ -f .
/$${dir}/Makefile
] ; then \
1410 r
=`pwd`; export r
; \
1411 s
=`cd $(srcdir); pwd`; export s
; \
1414 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1419 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1420 # To build a target check-X means to cd to X and make all.
1421 .PHONY
: $(CHECK_X11_MODULES
)
1422 $(CHECK_X11_MODULES
):
1423 @
dir=`echo $@ | sed -e 's/check-//'`; \
1424 if
[ -f .
/$${dir}/Makefile
] ; then \
1425 r
=`pwd`; export r
; \
1426 s
=`cd $(srcdir); pwd`; export s
; \
1429 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1434 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1435 # To build a target install-X means to cd to X and make install.
1436 .PHONY
: $(INSTALL_X11_MODULES
)
1437 $(INSTALL_X11_MODULES
): installdirs
1438 @
dir=`echo $@ | sed -e 's/install-//'`; \
1439 if
[ -f .
/$${dir}/Makefile
] ; then \
1440 r
=`pwd`; export r
; \
1441 s
=`cd $(srcdir); pwd`; export s
; \
1444 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1449 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1452 @if
[ -f .
/gcc
/Makefile
] ; then \
1453 r
=`pwd`; export r
; \
1454 s
=`cd $(srcdir); pwd`; export s
; \
1456 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1461 # Building GCC uses some tools for rebuilding "source" files
1462 # like texinfo, bison/byacc, etc. So we must depend on those.
1464 # While building GCC, it may be necessary to run various target
1465 # programs like the assembler, linker, etc. So we depend on
1468 # In theory, on an SMP all those dependencies can be resolved
1471 .PHONY
: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1472 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
: all-bootstrap
1473 @r
=`pwd`; export r
; \
1474 s
=`cd $(srcdir); pwd`; export s
; \
1476 echo
"Bootstrapping the compiler"; \
1477 cd gcc
&& $(MAKE
) $(GCC_FLAGS_TO_PASS
) $@
1478 @r
=`pwd`; export r
; \
1479 s
=`cd $(srcdir); pwd`; export s
; \
1481 *bootstrap4-lean
) \
1482 msg
="Comparing stage3 and stage4 of the compiler"; \
1483 compare
=compare3-lean
;; \
1484 *bootstrap4
) msg
="Comparing stage3 and stage4 of the compiler"; \
1485 compare
=compare3
;; \
1486 *-lean
) msg
="Comparing stage2 and stage3 of the compiler"; \
1487 compare
=compare-lean
;; \
1488 * ) msg
="Comparing stage2 and stage3 of the compiler"; \
1489 compare
=compare
;; \
1493 cd gcc
&& $(MAKE
) $(GCC_FLAGS_TO_PASS
) $$compare
1494 @r
=`pwd`; export r
; \
1495 s
=`cd $(srcdir); pwd` ; export s
; \
1497 echo
"Building runtime libraries"; \
1498 $(MAKE
) $(BASE_FLAGS_TO_PASS
) $(RECURSE_FLAGS
) all
1501 cross
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1502 @r
=`pwd`; export r
; \
1503 s
=`cd $(srcdir); pwd`; export s
; \
1505 echo
"Building the C and C++ compiler"; \
1506 cd gcc
&& $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++"
1507 @r
=`pwd`; export r
; \
1508 s
=`cd $(srcdir); pwd` ; export s
; \
1510 echo
"Building runtime libraries"; \
1511 $(MAKE
) $(BASE_FLAGS_TO_PASS
) $(RECURSE_FLAGS
) \
1512 LANGUAGES
="c c++" all
1516 @if
[ -f .
/gcc
/Makefile
] ; then \
1517 r
=`pwd`; export r
; \
1518 s
=`cd $(srcdir); pwd`; export s
; \
1520 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1527 @if
[ -f .
/gcc
/Makefile
] ; then \
1528 r
=`pwd`; export r
; \
1529 s
=`cd $(srcdir); pwd`; export s
; \
1531 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1536 .PHONY
: install-gcc-cross
1538 @if
[ -f .
/gcc
/Makefile
] ; then \
1539 r
=`pwd`; export r
; \
1540 s
=`cd $(srcdir); pwd`; export s
; \
1542 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++" install); \
1546 # EXPERIMENTAL STUFF
1547 # This rule is used to install the modules which use FLAGS_TO_PASS.
1548 # To build a target install-X means to cd to X and make install.
1549 .PHONY
: install-dosrel
1550 install-dosrel
: installdirs info
1551 @
dir=`echo $@ | sed -e 's/install-//'`; \
1552 if
[ -f .
/$${dir}/Makefile
] ; then \
1553 r
=`pwd`; export r
; \
1554 s
=`cd $(srcdir); pwd`; export s
; \
1556 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1561 install-dosrel-fake
:
1564 ALL_GCC_C
= $(ALL_GCC
) all-target-newlib all-target-libgloss
1565 ALL_GCC_CXX
= $(ALL_GCC_C
) all-target-libstdc
++ all-target-libstdc
++-v3
1567 # This is a list of inter-dependencies among modules.
1570 all-autoconf
: all-m4 all-texinfo
1571 all-automake
: all-m4 all-texinfo
1573 all-bfd
: all-libiberty all-intl
1574 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1575 all-bison
: all-texinfo
1576 configure-target-boehm-gc
: $(ALL_GCC_CXX
) configure-target-qthreads
1577 all-target-boehm-gc
: configure-target-boehm-gc
1578 configure-target-bsp
: $(ALL_GCC_C
)
1579 all-target-bsp
: configure-target-bsp
1582 all-cgen
: all-libiberty
1584 configure-target-cygmon
: $(ALL_GCC_C
)
1585 all-target-cygmon
: configure-target-cygmon all-target-libiberty all-target-libio all-target-libstub all-target-bsp
1587 all-dejagnu
: all-tcl all-expect all-tk
1588 all-diff
: all-libiberty
1590 all-emacs19
: all-bison all-byacc
1592 configure-target-examples
: $(ALL_GCC_C
)
1593 all-target-examples
: configure-target-examples
1594 all-expect
: all-tcl all-tk
1595 all-fileutils
: all-libiberty
1598 all-flex
: all-libiberty all-bison all-byacc
1599 all-gas
: all-libiberty all-opcodes all-bfd all-intl
1602 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld all-zlib
1603 all-bootstrap
: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
1604 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui
1605 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1608 configure-target-gperf
: $(ALL_GCC_C
)
1609 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++
1610 all-gprof
: all-libiberty all-bfd all-opcodes all-intl
1611 all-grep
: all-libiberty
1612 all-grez
: all-libiberty all-bfd all-opcodes
1613 all-gui
: all-gdb all-libproc all-target-librx
1615 all-gzip
: all-libiberty
1616 all-hello
: all-libiberty
1618 all-inet
: all-tcl all-send-pr all-perl
1620 all-ispell
: all-emacs19
1621 all-itcl
: all-tcl all-tk all-tcl8.1 all-tk8.1
1622 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1623 configure-target-libg
++: $(ALL_GCC_CXX
) configure-target-librx
1624 all-target-libg
++: configure-target-libg
++ all-target-libiberty all-target-librx
1625 configure-target-libgloss
: $(ALL_GCC
)
1626 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1627 configure-target-libio
: $(ALL_GCC_C
)
1628 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1629 check-target-libio
: all-target-libstdc
++
1630 all-libgui
: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1632 configure-target-libffi
: $(ALL_GCC_C
)
1633 all-target-libffi
: configure-target-libffi
1634 configure-target-libjava
: $(ALL_GCC_CXX
) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
1635 all-target-libjava
: configure-target-libjava all-zip all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
1636 configure-target-librx
: $(ALL_GCC_C
)
1637 all-target-librx
: configure-target-librx
1638 configure-target-libstdc
++: $(ALL_GCC_C
)
1639 all-target-libstdc
++: configure-target-libstdc
++ all-target-libiberty all-target-libio
1640 configure-target-libstdc
++-v3
: $(ALL_GCC_C
)
1641 all-target-libstdc
++-v3
: configure-target-libstdc
++-v3 all-target-libiberty
1642 configure-target-libstub
: $(ALL_GCC_C
)
1643 all-target-libstub
: configure-target-libstub
1645 configure-target-libf2c
: $(ALL_GCC_C
)
1646 all-target-libf2c
: configure-target-libf2c all-target-libiberty
1647 configure-target-libchill
: $(ALL_GCC_C
)
1648 all-target-libchill
: configure-target-libchill all-target-libiberty
1649 configure-target-libobjc
: $(ALL_GCC_C
)
1650 all-target-libobjc
: configure-target-libobjc all-target-libiberty
1651 all-m4
: all-libiberty all-texinfo
1652 all-make
: all-libiberty
1654 configure-target-newlib
: $(ALL_GCC
)
1655 all-target-newlib
: configure-target-newlib
1656 configure-target-libtermcap
: $(ALL_GCC_C
)
1657 all-target-libtermcap
: configure-target-libtermcap
1658 all-opcodes
: all-bfd all-libiberty all-cgen
1659 all-patch
: all-libiberty
1661 all-prms
: all-libiberty
1662 configure-target-qthreads
: $(ALL_GCC_C
)
1663 all-target-qthreads
: configure-target-qthreads
1666 all-recode
: all-libiberty
1667 all-sed
: all-libiberty
1668 all-send-pr
: all-prms
1670 all-sid
: all-tcl all-tk
1671 all-sim
: all-libiberty all-bfd all-opcodes all-readline all-cgen
1672 all-snavigator
: all-tcl all-tk all-itcl all-db all-grep all-libgui
1673 all-tar
: all-libiberty
1676 all-tclX
: all-tcl all-tk
1678 all-tk8.1
: all-tcl8.1
1679 all-texinfo
: all-libiberty
1681 all-tgas
: all-libiberty all-bfd all-opcodes
1683 all-tix
: all-tcl all-tk all-tcl8.1 all-tk8.1
1685 configure-target-winsup
: $(ALL_GCC_C
)
1686 all-target-winsup
: all-target-libiberty all-target-libtermcap configure-target-winsup
1687 all-uudecode
: all-libiberty
1690 configure-target-zlib
: $(ALL_GCC_C
)
1691 all-target-zlib
: configure-target-zlib
1692 configure-target-libiberty
: $(ALL_GCC_C
)
1693 all-target-libiberty
: configure-target-libiberty
1694 all-target
: $(ALL_TARGET_MODULES
)
1695 install-target
: $(INSTALL_TARGET_MODULES
)
1696 install-gdb
: install-tcl install-tk install-itcl install-tix install-libgui
1697 install-sid
: install-tcl install-tk
1698 ### other supporting targets
1704 installdirs: mkinstalldirs
1705 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1707 dir.
info: do-install-info
1708 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1709 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1710 mv
-f
dir.
info.new
dir.
info ; \
1715 @echo
"Building a full distribution of this tree isn't done"
1716 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1720 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1721 # ability to use several tags files at once, so there is probably no need
1722 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1723 # (if we felt like it) have this Makefile write a piece of elisp which
1724 # the user could load to tell emacs19 where all the TAGS files we just
1728 # with the gnu make, this is done automatically.
1730 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
) $(gcc_version_trigger
)
1731 $(SHELL
) .
/config.status
1734 # Support for building net releases
1736 # Files in devo used in any net release.
1737 # ChangeLog omitted because it may refer to files which are not in this
1738 # distribution (perhaps it would be better to include it anyway).
1739 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1740 config.guess config.if config.sub config move-if-change \
1741 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1742 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1743 mkinstalldirs ltconfig ltmain.sh missing ylwrap \
1744 libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh
1746 # Files in devo/etc used in any net release.
1747 # ChangeLog omitted because it may refer to files which are not in this
1748 # distribution (perhaps it would be better to include it anyway).
1749 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1750 make-stds.texi standards.
info* configure.texi configure.
info* \
1751 configbuild.
* configdev.
*
1754 # When you use `make setup-dirs' or `make taz' you should always redefine
1756 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1758 # NOTE: No double quotes in the below. It is used within shell script
1760 VER
= ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \
1761 sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
1762 elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1763 sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
1764 elif test -f $(TOOL)/version.in; then \
1765 head -1 $(TOOL)/version.in; \
1766 elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
1767 sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
1774 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
1775 $(MAKE
) -f Makefile.in do-proto-toplev \
1776 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1777 MD5PROG
="$(MD5PROG)" \
1778 SUPPORT_FILES
="$(SUPPORT_FILES)"
1779 $(MAKE
) -f Makefile.in do-md5sum \
1780 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1781 MD5PROG
="$(MD5PROG)" \
1782 SUPPORT_FILES
="$(SUPPORT_FILES)"
1783 $(MAKE
) -f Makefile.in do-tar-bz2 \
1784 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1785 MD5PROG
="$(MD5PROG)" \
1786 SUPPORT_FILES
="$(SUPPORT_FILES)"
1789 gdb-taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
1790 $(MAKE
) -f Makefile.in do-proto-toplev \
1791 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1792 MD5PROG
="$(MD5PROG)" \
1793 SUPPORT_FILES
="$(SUPPORT_FILES)"
1794 $(MAKE
) -f Makefile.in do-md5sum \
1795 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1796 MD5PROG
="$(MD5PROG)" \
1797 SUPPORT_FILES
="$(SUPPORT_FILES)"
1798 $(MAKE
) -f Makefile.in do-djunpack \
1799 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1800 MD5PROG
="$(MD5PROG)" \
1801 SUPPORT_FILES
="$(SUPPORT_FILES)"
1802 $(MAKE
) -f Makefile.in do-tar-bz2 \
1803 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1804 MD5PROG
="$(MD5PROG)" \
1805 SUPPORT_FILES
="$(SUPPORT_FILES)"
1807 .PHONY
: do-proto-toplev
1808 do-proto-toplev
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
1809 echo
"==> Making $(PACKAGE)-$(VER)/"
1810 # Take out texinfo from a few places.
1811 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1812 -e
'/^ install-texinfo /d' \
1814 mv
-f tmp Makefile.in
1817 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1818 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) \
1819 ALL_GCC
="" ALL_GCC_C
="" ALL_GCC_CXX
="" \
1820 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1821 # Make links, and run "make diststuff" or "make info" when needed.
1822 rm -rf proto-toplev
; mkdir proto-toplev
1823 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1824 for d in
$$dirs ; do \
1825 if
[ -d
$$d ]; then \
1826 if
[ ! -f
$$d/Makefile
] ; then true
; \
1827 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1828 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1829 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1830 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1832 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1833 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1835 ln
-s ..
/$$d proto-toplev
/$$d ; \
1837 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1839 cd etc
&& $(MAKE
) info
1842 mkdir proto-toplev
/etc
1843 (cd proto-toplev
/etc
; \
1844 for i in
$(ETC_SUPPORT
); do \
1845 ln
-s ..
/..
/etc
/$$i .
; \
1848 # Take out texinfo from configurable dirs
1849 rm proto-toplev
/configure.in
1850 sed
-e
'/^host_tools=/s/texinfo //' \
1851 <configure.in
>proto-toplev
/configure.in
1853 mkdir proto-toplev
/texinfo
1854 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1855 if
test -r texinfo
/util
/tex3patch
; then \
1856 mkdir proto-toplev
/texinfo
/util
&& \
1857 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1859 chmod
-R og
=u . || chmod og
=u
`find . -print`
1861 -rm -f
$(PACKAGE
)-$(VER
)
1862 ln
-s proto-toplev
$(PACKAGE
)-$(VER
)
1866 echo
"==> Making $(PACKAGE)-$(VER).tar.bz2"
1867 -rm -f
$(PACKAGE
)-$(VER
).
tar.bz2
1868 find
$(PACKAGE
)-$(VER
) -follow
-name CVS
-prune
-o
-type f
-print \
1869 |
tar cTfh
- $(PACKAGE
)-$(VER
).
tar
1870 $(BZIPPROG
) -v
-9 $(PACKAGE
)-$(VER
).
tar
1874 echo
"==> Adding md5 checksum to top-level directory"
1875 cd proto-toplev
&& find
* -follow
-name CVS
-prune
-o
-type f
-print \
1876 | xargs
$(MD5PROG
) > ..
/md5.sum
1877 mv md5.sum proto-toplev
1881 echo
"==> Adding updated djunpack.bat to top-level directory"
1882 echo
- 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/'
1883 sed
< djunpack.bat
> djunpack.new \
1884 -e
's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/'
1885 mv djunpack.new djunpack.bat
1886 -rm -f proto-toplev
/djunpack.bat
1887 ln
-s ..
/djunpack.bat proto-toplev
/djunpack.bat
1889 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex
1890 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1893 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes intl setup.com makefile.vms mkdep
1894 gas.
tar.bz2
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1895 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1896 MD5PROG
="$(MD5PROG)" \
1897 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1899 # The FSF "binutils" release includes gprof and ld.
1900 .PHONY
: binutils.
tar.bz2
1901 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof intl setup.com makefile.vms mkdep
1902 binutils.
tar.bz2
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1903 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1904 MD5PROG
="$(MD5PROG)" \
1905 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS)"
1907 .PHONY
: gas
+binutils.
tar.bz2
1908 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1909 gas
+binutils.
tar.bz2
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1910 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1911 MD5PROG
="$(MD5PROG)" \
1912 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS)"
1914 .PHONY
: libg
++.
tar.bz2
1915 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1916 libg
++.
tar.bz2
: $(DIST_SUPPORT
) libg
++
1917 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1918 MD5PROG
="$(MD5PROG)" \
1919 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1921 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1922 gnats.
tar.bz2
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1923 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1924 MD5PROG
="$(MD5PROG)" \
1925 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1928 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils intl
1929 gdb.
tar.bz2
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1930 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb \
1931 MD5PROG
="$(MD5PROG)" \
1932 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS)"
1934 .PHONY
: dejagnu.
tar.bz2
1935 DEJAGNU_SUPPORT_DIRS
= tcl expect libiberty
1936 dejagnu.
tar.bz2
: $(DIST_SUPPORT
) $(DEJAGNU_SUPPORT_DIRS
) dejagnu
1937 $(MAKE
) -f Makefile.in taz TOOL
=dejagnu \
1938 MD5PROG
="$(MD5PROG)" \
1939 SUPPORT_FILES
="$(DEJAGNU_SUPPORT_DIRS)"
1941 .PHONY
: gdb
+dejagnu.
tar.bz2
1942 GDBD_SUPPORT_DIRS
= $(GDB_SUPPORT_DIRS
) tcl expect dejagnu
1943 gdb
+dejagnu.
tar.bz2
: $(DIST_SUPPORT
) $(GDBD_SUPPORT_DIRS
) gdb
1944 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb PACKAGE
=gdb
+dejagnu \
1945 MD5PROG
="$(MD5PROG)" \
1946 SUPPORT_FILES
="$(GDBD_SUPPORT_DIRS)"
1948 .PHONY
: insight.
tar.bz2
1949 INSIGHT_SUPPORT_DIRS
= $(GDB_SUPPORT_DIRS
) tcl tk itcl tix libgui
1950 insight.
tar.bz2
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1951 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb PACKAGE
=insight \
1952 MD5PROG
="$(MD5PROG)" \
1953 SUPPORT_FILES
="$(INSIGHT_SUPPORT_DIRS)"
1955 .PHONY
: insight
+dejagnu.
tar.bz2
1956 INSIGHTD_SUPPORT_DIRS
= $(INSIGHT_SUPPORT_DIRS
) expect dejagnu
1957 insight
+dejagnu.
tar.bz2
: $(DIST_SUPPORT
) $(INSIGHTD_SUPPORT_DIRS
) gdb
1958 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb PACKAGE
="insight+dejagnu" \
1959 MD5PROG
="$(MD5PROG)" \
1960 SUPPORT_FILES
="$(INSIGHTD_SUPPORT_DIRS)"
1962 .PHONY
: newlib.
tar.bz2
1963 NEWLIB_SUPPORT_DIRS
=libgloss
1964 # taz configures for the sun4 target which won't configure newlib.
1965 # We need newlib configured so that the .info files are made.
1966 # Unfortunately, it is not enough to just configure newlib separately:
1967 # taz will build the .info files but since SUBDIRS won't contain newlib,
1968 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1969 # used in building the .info files, eg: *.def, *.ref).
1970 # The problem isn't solvable however without a lot of extra work because
1971 # target libraries are built in subdir $(target_alias) which gets nuked during
1972 # the make distclean. For now punt on the issue of shipping newlib info files
1973 # with newlib net releases and wait for a day when some native target (sun4?)
1974 # supports newlib (if only minimally).
1975 newlib.
tar.bz2
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1976 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1977 MD5PROG
="$(MD5PROG)" \
1978 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1979 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1984 # end of Makefile.in