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 # For an installed makeinfo, we require it to be from texinfo 4 or
145 # higher, else we use the "missing" dummy.
146 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
147 then echo $$r/texinfo/makeinfo/makeinfo ; \
148 else if (makeinfo --version \
149 | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \
150 then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
152 # This just becomes part of the MAKEINFO definition passed down to
153 # sub-makes. It lets flags be given on the command line while still
154 # using the makeinfo from the object tree.
157 EXPECT
= `if [ -f $$r/expect/expect ] ; \
158 then echo $$r/expect/expect ; \
159 else echo expect ; fi`
161 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
162 then echo $$s/dejagnu/runtest ; \
163 else echo runtest ; fi`
166 # compilers to use to create programs which must be run in the build
169 CXX_FOR_BUILD
= $(CXX
)
171 SUBDIRS
= "this is set via configure, don't edit this"
174 # This is set by the configure script to the list of directories which
175 # should be built using the target tools.
176 TARGET_CONFIGDIRS
= libiberty libgloss
$(SPECIAL_LIBS
) newlib libio librx libstdc
++ libg
++ winsup opcodes bsp libstub cygmon libf2c libchill libobjc
178 # Target libraries are put under this directory:
179 # Changed by configure to $(target_alias) if cross.
182 # This is set by the configure script to the arguments passed to configure.
185 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
189 # This is the name of the environment variable used for the path to
190 # the libraries. This may be changed by configure.in.
191 RPATH_ENVVAR
= LD_LIBRARY_PATH
193 # This is the list of directories that may be needed in RPATH_ENVVAR
194 # so that programs built for the host machine work.
195 HOST_LIB_PATH
= $$r/bfd
:$$r/opcodes
197 # This is the list of directories that may be needed in RPATH_ENVVAR
198 # so that prorgams built for the target machine work.
199 TARGET_LIB_PATH
= $$r/$(TARGET_SUBDIR
)/libstdc
++-v3
/src
/.libs
:$$r/$(TARGET_SUBDIR
)/libstdc
++
201 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
202 # Some platforms don't like blank entries, so we remove duplicate,
203 # leading and trailing colons.
204 REALLY_SET_LIB_PATH
= \
205 $(RPATH_ENVVAR
)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR
);
208 INSTALL_TARGET
= installdirs \
211 $(INSTALL_TARGET_MODULES
) \
212 $(INSTALL_X11_MODULES
) \
215 INSTALL_TARGET_CROSS
= installdirs \
218 $(INSTALL_TARGET_MODULES
) \
219 $(INSTALL_X11_MODULES
) \
222 # Should be substed by configure.in
227 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE
=
229 # If GCC_FOR_TARGET is not overriden on the command line, then this
230 # variable is passed down to the gcc Makefile, where it is used to
231 # build libgcc2.a. We define it here so that it can itself be
232 # overridden on the command line.
233 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/ $(FLAGS_FOR_TARGET
)
236 if [ -f $$r/gas/as-new ] ; then \
237 echo $$r/gas/as-new ; \
238 elif [ -f $$r/gcc/xgcc ]; then \
239 $(CC_FOR_TARGET) -print-prog-name=as ; \
241 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
244 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
249 if [ -f $$r/ld/ld-new ] ; then \
250 echo $$r/ld/ld-new ; \
251 elif [ -f $$r/gcc/xgcc ]; then \
252 $(CC_FOR_TARGET) -print-prog-name=ld ; \
254 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
257 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
261 DLLTOOL_FOR_TARGET
= ` \
262 if [ -f $$r/binutils/dlltool ] ; then \
263 echo $$r/binutils/dlltool ; \
265 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
268 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
272 WINDRES_FOR_TARGET
= ` \
273 if [ -f $$r/binutils/windres ] ; then \
274 echo $$r/binutils/windres ; \
276 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
279 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
284 if [ -f $$r/binutils/ar ] ; then \
285 echo $$r/binutils/ar ; \
287 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
290 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
294 RANLIB_FOR_TARGET
= ` \
295 if [ -f $$r/binutils/ranlib ] ; then \
296 echo $$r/binutils/ranlib ; \
298 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
299 if [ x'$(RANLIB)' != x ]; then \
305 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
310 if [ -f $$r/binutils/nm-new ] ; then \
311 echo $$r/binutils/nm-new ; \
312 elif [ -f $$r/gcc/xgcc ]; then \
313 $(CC_FOR_TARGET) -print-prog-name=nm ; \
315 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
318 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
322 # The first rule in the file had better be this one. Don't put any above it.
323 # This lives here to allow makefile fragments to contain dependencies.
327 # These can be overridden by config/mt-*.
328 # The _TARGET_ is because they're specified in mt-foo.
329 # The _HOST_ is because they're programs that run on the host.
330 EXTRA_TARGET_HOST_ALL_MODULES
=
331 EXTRA_TARGET_HOST_INSTALL_MODULES
=
332 EXTRA_TARGET_HOST_CHECK_MODULES
=
334 #### host and target specific makefile fragments come in here.
337 # Flags to pass down to all sub-makes.
338 # Please keep these in alphabetical order.
339 BASE_FLAGS_TO_PASS
= \
340 "AR_FLAGS=$(AR_FLAGS)" \
341 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
342 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
344 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
345 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
347 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
348 "CHILLFLAGS=$(CHILLFLAGS)" \
349 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
350 "CHILL_LIB=$(CHILL_LIB)" \
351 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
352 "CXXFLAGS=$(CXXFLAGS)" \
353 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
354 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
355 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
356 "INSTALL=$(INSTALL)" \
357 "INSTALL_DATA=$(INSTALL_DATA)" \
358 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
359 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
360 "LDFLAGS=$(LDFLAGS)" \
362 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
363 "LIBCFLAGS=$(LIBCFLAGS)" \
364 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
365 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
366 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
369 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
370 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
371 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
372 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
375 "RUNTEST=$(RUNTEST)" \
376 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
377 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
378 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
381 "datadir=$(datadir)" \
382 "exec_prefix=$(exec_prefix)" \
383 "includedir=$(includedir)" \
384 "infodir=$(infodir)" \
386 "libexecdir=$(libexecdir)" \
387 "lispdir=$(lispdir)" \
388 "localstatedir=$(localstatedir)" \
390 "oldincludedir=$(oldincludedir)" \
392 "sbindir=$(sbindir)" \
393 "sharedstatedir=$(sharedstatedir)" \
394 "sysconfdir=$(sysconfdir)" \
395 "tooldir=$(tooldir)" \
396 "build_tooldir=$(build_tooldir)" \
397 "gxx_include_dir=$(gxx_include_dir)" \
398 "gcc_version=$(gcc_version)" \
399 "gcc_version_trigger=$(gcc_version_trigger)" \
400 "target_alias=$(target_alias)" \
401 "libsubdir=$(libsubdir)"
403 # For any flags above that may contain shell code that varies from one
404 # target library to another. When doing recursive invocations of the
405 # top-level Makefile, we don't want the outer make to evaluate them,
406 # so we pass these variables down unchanged. They must not contain
407 # single nor double quotes.
409 CXX_FOR_TARGET
='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)'
411 # Flags to pass down to most sub-makes, in which we're building with
412 # the host environment.
413 # If any variables are added here, they must be added to do-*, below.
419 'DLLTOOL=$(DLLTOOL)' \
425 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
427 # Flags that are concerned with the location of the X11 include files
430 # NOTE: until the top-level is getting the values via autoconf, it only
431 # causes problems to have this top-level Makefile overriding the autoconf-set
432 # values in child directories. Only variables that don't conflict with
433 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
435 X11_FLAGS_TO_PASS
= \
436 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
437 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
439 # Flags to pass down to makes which are built with the target environment.
440 # The double $ decreases the length of the command line; the variables
441 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
442 # If any variables are added here, they must be added to do-*, below.
443 EXTRA_TARGET_FLAGS
= \
444 'AR=$$(AR_FOR_TARGET)' \
445 'AS=$$(AS_FOR_TARGET)' \
446 'CC=$$(CC_FOR_TARGET)' \
447 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
448 'CXX=$$(CXX_FOR_TARGET)' \
449 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
450 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
451 'LD=$$(LD_FOR_TARGET)' \
452 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
453 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
454 'NM=$$(NM_FOR_TARGET)' \
455 'RANLIB=$$(RANLIB_FOR_TARGET)' \
456 'WINDRES=$$(WINDRES_FOR_TARGET)'
458 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
460 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
461 # unfortunately needs the native compiler and the target ar and
463 # If any variables are added here, they must be added to do-*, below.
464 # The HOST_* variables are a special case, which are used for the gcc
465 # cross-building scheme.
471 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
472 'HOST_CC=$(CC_FOR_BUILD)' \
473 'HOST_PREFIX=$(HOST_PREFIX)' \
474 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
477 'WINDRES=$$(WINDRES_FOR_TARGET)' \
478 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
479 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
480 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
481 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
482 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
483 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
484 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
485 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
486 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
487 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
489 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
491 # This is a list of the targets for all of the modules which are compiled
492 # using $(FLAGS_TO_PASS).
561 $(EXTRA_TARGET_HOST_ALL_MODULES
)
563 # This is a list of the check targets for all of the modules which are
564 # compiled using $(FLAGS_TO_PASS).
566 # The list is in two parts. The first lists those tools which
567 # are tested as part of the host's native tool-chain, and not
568 # tested in a cross configuration.
569 NATIVE_CHECK_MODULES
= \
575 CROSS_CHECK_MODULES
= \
634 $(EXTRA_TARGET_HOST_CHECK_MODULES
)
636 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
638 # This is a list of the install targets for all of the modules which are
639 # compiled using $(FLAGS_TO_PASS).
640 # We put install-opcodes before install-binutils because the installed
641 # binutils might be on PATH, and they might need the shared opcodes
643 # We put install-tcl before install-itcl because itcl wants to run a
644 # program on installation which uses the Tcl libraries.
710 $(EXTRA_TARGET_HOST_INSTALL_MODULES
)
712 # This is a list of the targets for all of the modules which are compiled
713 # using $(X11_FLAGS_TO_PASS).
726 # This is a list of the check targets for all of the modules which are
727 # compiled using $(X11_FLAGS_TO_PASS).
728 CHECK_X11_MODULES
= \
738 # This is a list of the install targets for all the modules which are
739 # compiled using $(X11_FLAGS_TO_PASS).
740 INSTALL_X11_MODULES
= \
752 # This is a list of the targets for all of the modules which are compiled
753 # using $(TARGET_FLAGS_TO_PASS).
754 ALL_TARGET_MODULES
= \
756 all-target-libstdc
++ \
757 all-target-libstdc
++-v3 \
762 all-target-libchill \
764 all-target-libtermcap \
766 all-target-libgloss \
767 all-target-libiberty \
769 all-target-examples \
774 all-target-boehm-gc \
775 all-target-qthreads \
779 # This is a list of the configure targets for all of the modules which
780 # are compiled using the target tools.
781 CONFIGURE_TARGET_MODULES
= \
782 configure-target-libio \
783 configure-target-libstdc
++ \
784 configure-target-libstdc
++-v3 \
785 configure-target-librx \
786 configure-target-libg
++ \
787 configure-target-newlib \
788 configure-target-libf2c \
789 configure-target-libchill \
790 configure-target-libobjc \
791 configure-target-libtermcap \
792 configure-target-winsup \
793 configure-target-libgloss \
794 configure-target-libiberty \
795 configure-target-gperf \
796 configure-target-examples \
797 configure-target-libstub \
798 configure-target-libffi \
799 configure-target-libjava \
800 configure-target-zlib \
801 configure-target-boehm-gc \
802 configure-target-qthreads \
803 configure-target-bsp \
804 configure-target-cygmon
806 # This is a list of the check targets for all of the modules which are
807 # compiled using $(TARGET_FLAGS_TO_PASS).
808 CHECK_TARGET_MODULES
= \
810 check-target-libstdc
++ \
811 check-target-libstdc
++-v3 \
812 check-target-libg
++ \
813 check-target-newlib \
814 check-target-libf2c \
815 check-target-libchill \
816 check-target-libobjc \
817 check-target-winsup \
818 check-target-libiberty \
819 check-target-libffi \
820 check-target-libjava \
822 check-target-boehm-gc \
823 check-target-qthreads \
826 # This is a list of the install targets for all of the modules which are
827 # compiled using $(TARGET_FLAGS_TO_PASS).
828 INSTALL_TARGET_MODULES
= \
829 install-target-libio \
830 install-target-libstdc
++ \
831 install-target-libstdc
++-v3 \
832 install-target-libg
++ \
833 install-target-newlib \
834 install-target-libf2c \
835 install-target-libchill \
836 install-target-libobjc \
837 install-target-libtermcap \
838 install-target-winsup \
839 install-target-libgloss \
840 install-target-libiberty \
842 install-target-libjava \
843 install-target-zlib \
844 install-target-boehm-gc \
845 install-target-qthreads \
848 # This is a list of the targets for which we can do a clean-{target}.
917 # All of the target modules that can be cleaned
918 CLEAN_TARGET_MODULES
= \
920 clean-target-libstdc
++ \
921 clean-target-libstdc
++-v3 \
923 clean-target-libg
++ \
924 clean-target-newlib \
925 clean-target-libf2c \
926 clean-target-libchill \
927 clean-target-libobjc \
928 clean-target-winsup \
929 clean-target-libgloss \
930 clean-target-libiberty \
932 clean-target-examples \
933 clean-target-libstub \
934 clean-target-libffi \
935 clean-target-libjava \
937 clean-target-boehm-gc \
938 clean-target-qthreads \
942 # All of the x11 modules that can be cleaned
943 CLEAN_X11_MODULES
= \
954 # The target built for a native build.
959 $(ALL_TARGET_MODULES
) \
962 # Do a target for all the subdirectories. A ``make do-X'' will do a
963 # ``make X'' in all subdirectories (because, in general, there is a
964 # dependency (below) of X upon do-X, a ``make X'' will also do this,
965 # but it may do additional work as well).
966 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
967 # because it is so large that it can easily overflow the command line
968 # length limit on some systems.
977 do-maintainer-clean \
981 @target
=`echo $@ | sed -e 's/^do-//'`; \
983 s
=`cd $(srcdir); pwd`; export s
; \
985 for i in
$(SUBDIRS
) -dummy-
; do \
986 if
[ -f .
/$$i/Makefile
]; then \
989 for flag in
$(EXTRA_GCC_FLAGS
); do \
990 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
994 for flag in
$(EXTRA_HOST_FLAGS
); do \
995 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1000 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
1001 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1002 "RANLIB=$${RANLIB}" \
1003 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1005 then true
; else exit
1; fi
; \
1008 @target
=`echo $@ | sed -e 's/^do-//'`; \
1009 r
=`pwd`; export r
; \
1010 s
=`cd $(srcdir); pwd`; export s
; \
1012 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
1013 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
1014 for flag in
$(EXTRA_TARGET_FLAGS
); do \
1015 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1017 if
(cd
$(TARGET_SUBDIR
)/$$i; \
1018 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
1019 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1020 "RANLIB=$${RANLIB}" \
1021 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1023 then true
; else exit
1; fi
; \
1027 # Here are the targets which correspond to the do-X targets.
1029 .PHONY
: info installcheck dvi install-info
1030 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
1031 .PHONY
: local-clean local-distclean local-maintainer-clean
1033 installcheck: do-installcheck
1036 # Make sure makeinfo is built before we do a `make info'.
1037 do-info
: all-texinfo
1039 install-info
: do-install-info
dir.
info
1040 s
=`cd $(srcdir); pwd`; export s
; \
1041 if
[ -f
dir.
info ] ; then \
1042 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
1046 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E *.log
1049 -rm -f Makefile config.status config.cache mh-frag mt-frag
1050 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
1051 rm -rf
$(TARGET_SUBDIR
); \
1054 local-maintainer-clean
:
1055 @echo
"This command is intended for maintainers to use;"
1056 @echo
"it deletes files that may require special tools to rebuild."
1058 clean: do-clean local-clean
1059 mostlyclean: do-mostlyclean local-clean
1060 distclean: do-distclean local-clean local-distclean
1061 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
1062 maintainer-clean
: local-distclean
1063 realclean: maintainer-clean
1065 # This rule is used to clean specific modules.
1066 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
1067 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
1068 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1069 if
[ -f .
/$${dir}/Makefile
] ; then \
1070 r
=`pwd`; export r
; \
1071 s
=`cd $(srcdir); pwd`; export s
; \
1073 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1078 .PHONY
: $(CLEAN_TARGET_MODULES
)
1079 $(CLEAN_TARGET_MODULES
):
1080 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1081 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1082 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1083 r
=`pwd`; export r
; \
1084 s
=`cd $(srcdir); pwd`; export s
; \
1086 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1091 clean-target
: $(CLEAN_TARGET_MODULES
) clean-target-libgcc
1092 clean-target-libgcc
:
1093 test ! -d gcc
/libgcc || \
1094 (cd gcc
/libgcc
&& find .
-type d
-print) | \
1095 while read d
; do
rm -f gcc
/$$d/libgcc.a ||
: ; done
1101 check: $(CHECK_MODULES
) \
1102 $(CHECK_TARGET_MODULES
) \
1103 $(CHECK_X11_MODULES
) \
1106 # Automated reporting of test results.
1108 warning.log
: build.log
1109 $(srcdir)/contrib
/warn_summary build.log
> $@
1112 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1113 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1115 $(srcdir)/contrib
/test_summary
-t
>$@
1117 echo If you really want to send e-mail
, run .
/$@ now
1119 mail-report-with-warnings.log
: warning.log
1120 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1121 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1123 $(srcdir)/contrib
/test_summary
-t
-i warning.log
>$@
1125 echo If you really want to send e-mail
, run .
/$@ now
1127 # Installation targets.
1129 .PHONY
: install install-cross
uninstall source-vault binary-vault vault-install
1130 install: $(INSTALL_TARGET
)
1131 install-cross
: $(INSTALL_TARGET_CROSS
)
1134 @echo
"the uninstall target is not supported in this tree"
1137 $(MAKE
) -f .
/release
/Build-A-Release \
1138 host
=$(host_alias
) source-vault
1141 $(MAKE
) -f .
/release
/Build-A-Release \
1142 host
=$(host_alias
) target
=$(target_alias
)
1145 @if
[ -f .
/release
/vault-install
] ; then \
1146 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1152 install.
all: install-no-fixedincludes
1153 @if
[ -f .
/gcc
/Makefile
] ; then \
1154 r
=`pwd` ; export r
; \
1157 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1162 # inet-install is used because the I*Net wants DejaGNU installed but
1163 # not built. Similarly, gzip is built but not installed.
1165 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1167 # install-no-fixedincludes is used because Cygnus can not distribute
1168 # the fixed header files.
1169 .PHONY
: install-no-fixedincludes
1170 install-no-fixedincludes
: \
1172 $(INSTALL_MODULES
) \
1173 $(INSTALL_TARGET_MODULES
) \
1174 $(INSTALL_X11_MODULES
) \
1175 gcc-no-fixedincludes
1177 # Install the gcc headers files, but not the fixed include files,
1178 # which Cygnus is not allowed to distribute. This rule is very
1179 # dependent on the workings of the gcc Makefile.in.
1180 .PHONY
: gcc-no-fixedincludes
1181 gcc-no-fixedincludes
:
1182 @if
[ -f .
/gcc
/Makefile
]; then \
1183 rm -rf gcc
/tmp-include
; \
1184 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1185 mkdir gcc
/include; \
1186 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1187 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1188 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1189 r
=`pwd`; export r
; \
1190 s
=`cd $(srcdir); pwd` ; export s
; \
1193 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1194 rm -rf gcc
/include; \
1195 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1198 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1199 # build a target all-X means to cd to X and make all.
1201 # all-gui, and all-libproc are handled specially because
1202 # they are still experimental, and if they fail to build, that
1203 # shouldn't stop "make all".
1204 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1205 $(ALL_MODULES
) all-gui all-libproc
:
1206 @
dir=`echo $@ | sed -e 's/all-//'`; \
1207 if
[ -f .
/$${dir}/Makefile
] ; then \
1208 r
=`pwd`; export r
; \
1209 s
=`cd $(srcdir); pwd`; export s
; \
1211 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1216 # These rules are used to check the modules which use FLAGS_TO_PASS.
1217 # To build a target check-X means to cd to X and make check. Some
1218 # modules are only tested in a native toolchain.
1220 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1221 $(NATIVE_CHECK_MODULES
):
1222 @if
[ '$(host_canonical)' = '$(target_canonical)' ] ; then \
1223 dir=`echo $@ | sed -e 's/check-//'`; \
1224 if
[ -f .
/$${dir}/Makefile
] ; then \
1225 r
=`pwd`; export r
; \
1226 s
=`cd $(srcdir); pwd`; export s
; \
1228 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1234 $(CROSS_CHECK_MODULES
):
1235 @
dir=`echo $@ | sed -e 's/check-//'`; \
1236 if
[ -f .
/$${dir}/Makefile
] ; then \
1237 r
=`pwd`; export r
; \
1238 s
=`cd $(srcdir); pwd`; export s
; \
1240 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1245 # This rule is used to install the modules which use FLAGS_TO_PASS.
1246 # To build a target install-X means to cd to X and make install.
1247 .PHONY
: $(INSTALL_MODULES
)
1248 $(INSTALL_MODULES
): installdirs
1249 @
dir=`echo $@ | sed -e 's/install-//'`; \
1250 if
[ -f .
/$${dir}/Makefile
] ; then \
1251 r
=`pwd`; export r
; \
1252 s
=`cd $(srcdir); pwd`; export s
; \
1254 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1259 # This rule is used to configure the modules which are built with the
1261 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1262 $(CONFIGURE_TARGET_MODULES
):
1263 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1264 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1265 r
=`pwd`; export r
; \
1266 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1267 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1268 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1269 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1270 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1272 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1273 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1274 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1277 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1280 fi
; exit
0 # break command into two pieces
1281 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1282 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1284 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1286 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1287 if
[ -d
$(srcdir)/$${dir} ]; then \
1288 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1289 r
=`pwd`; export r
; \
1290 s
=`cd $(srcdir); pwd`; export s
; \
1292 AR
="$(AR_FOR_TARGET)"; export AR
; \
1293 AS
="$(AS_FOR_TARGET)"; export AS
; \
1294 CC
="$(CC_FOR_TARGET)"; export CC
; \
1295 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1296 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1297 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1298 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1299 LD
="$(LD_FOR_TARGET)"; export LD
; \
1300 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1301 NM
="$(NM_FOR_TARGET)"; export NM
; \
1302 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1303 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1304 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1305 cd
$(TARGET_SUBDIR
)/$${dir}; \
1308 topdir
=$(srcdir) ;; \
1310 case
"$(TARGET_SUBDIR)" in \
1311 .
) topdir
="../$(srcdir)" ;; \
1312 *) topdir
="../../$(srcdir)" ;; \
1315 if
[ "$(srcdir)" = "." ] ; then \
1316 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1317 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1318 if
[ -f Makefile
]; then \
1319 if
$(MAKE
) distclean; then \
1333 srcdiroption
="--srcdir=."; \
1336 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1337 libsrcdir
="$$s/$${dir}"; \
1339 if
[ -f
$${libsrcdir}/configure
] ; then \
1340 rm -f no-such-file skip-this-dir
; \
1341 CONFIG_SITE
=no-such-file
$(SHELL
) $${libsrcdir}/configure \
1342 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1343 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1345 rm -f no-such-file skip-this-dir
; \
1346 CONFIG_SITE
=no-such-file
$(SHELL
) $$s/configure \
1347 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1348 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1350 if
[ -f skip-this-dir
] ; then \
1352 rm -f skip-this-dir
; \
1353 cd ..
; rmdir
$${dir} || true
; \
1364 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1365 # To build a target all-X means to cd to X and make all.
1366 .PHONY
: $(ALL_TARGET_MODULES
)
1367 $(ALL_TARGET_MODULES
):
1368 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1369 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1370 r
=`pwd`; export r
; \
1371 s
=`cd $(srcdir); pwd`; export s
; \
1373 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1374 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1379 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1380 # To build a target install-X means to cd to X and make install.
1381 .PHONY
: $(CHECK_TARGET_MODULES
)
1382 $(CHECK_TARGET_MODULES
):
1383 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1384 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1385 r
=`pwd`; export r
; \
1386 s
=`cd $(srcdir); pwd`; export s
; \
1388 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1389 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1394 # This rule is used to install the modules which use
1395 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1397 .PHONY
: $(INSTALL_TARGET_MODULES
)
1398 $(INSTALL_TARGET_MODULES
): installdirs
1399 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1400 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1401 r
=`pwd`; export r
; \
1402 s
=`cd $(srcdir); pwd`; export s
; \
1404 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1405 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1410 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1411 # To build a target all-X means to cd to X and make all.
1412 .PHONY
: $(ALL_X11_MODULES
)
1414 @
dir=`echo $@ | sed -e 's/all-//'`; \
1415 if
[ -f .
/$${dir}/Makefile
] ; then \
1416 r
=`pwd`; export r
; \
1417 s
=`cd $(srcdir); pwd`; export s
; \
1420 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1425 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1426 # To build a target check-X means to cd to X and make all.
1427 .PHONY
: $(CHECK_X11_MODULES
)
1428 $(CHECK_X11_MODULES
):
1429 @
dir=`echo $@ | sed -e 's/check-//'`; \
1430 if
[ -f .
/$${dir}/Makefile
] ; then \
1431 r
=`pwd`; export r
; \
1432 s
=`cd $(srcdir); pwd`; export s
; \
1435 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1440 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1441 # To build a target install-X means to cd to X and make install.
1442 .PHONY
: $(INSTALL_X11_MODULES
)
1443 $(INSTALL_X11_MODULES
): installdirs
1444 @
dir=`echo $@ | sed -e 's/install-//'`; \
1445 if
[ -f .
/$${dir}/Makefile
] ; then \
1446 r
=`pwd`; export r
; \
1447 s
=`cd $(srcdir); pwd`; export s
; \
1450 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1455 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1458 @if
[ -f .
/gcc
/Makefile
] ; then \
1459 r
=`pwd`; export r
; \
1460 s
=`cd $(srcdir); pwd`; export s
; \
1462 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1467 # Building GCC uses some tools for rebuilding "source" files
1468 # like texinfo, bison/byacc, etc. So we must depend on those.
1470 # While building GCC, it may be necessary to run various target
1471 # programs like the assembler, linker, etc. So we depend on
1474 # In theory, on an SMP all those dependencies can be resolved
1477 .PHONY
: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1478 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
: all-bootstrap
1479 @r
=`pwd`; export r
; \
1480 s
=`cd $(srcdir); pwd`; export s
; \
1482 echo
"Bootstrapping the compiler"; \
1483 cd gcc
&& $(MAKE
) $(GCC_FLAGS_TO_PASS
) $@
1484 @r
=`pwd`; export r
; \
1485 s
=`cd $(srcdir); pwd`; export s
; \
1487 *bootstrap4-lean
) \
1488 msg
="Comparing stage3 and stage4 of the compiler"; \
1489 compare
=compare3-lean
;; \
1490 *bootstrap4
) msg
="Comparing stage3 and stage4 of the compiler"; \
1491 compare
=compare3
;; \
1492 *-lean
) msg
="Comparing stage2 and stage3 of the compiler"; \
1493 compare
=compare-lean
;; \
1494 * ) msg
="Comparing stage2 and stage3 of the compiler"; \
1495 compare
=compare
;; \
1499 cd gcc
&& $(MAKE
) $(GCC_FLAGS_TO_PASS
) $$compare
1500 @r
=`pwd`; export r
; \
1501 s
=`cd $(srcdir); pwd` ; export s
; \
1503 echo
"Building runtime libraries"; \
1504 $(MAKE
) $(BASE_FLAGS_TO_PASS
) $(RECURSE_FLAGS
) all
1507 cross
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1508 @r
=`pwd`; export r
; \
1509 s
=`cd $(srcdir); pwd`; export s
; \
1511 echo
"Building the C and C++ compiler"; \
1512 cd gcc
&& $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++"
1513 @r
=`pwd`; export r
; \
1514 s
=`cd $(srcdir); pwd` ; export s
; \
1516 echo
"Building runtime libraries"; \
1517 $(MAKE
) $(BASE_FLAGS_TO_PASS
) $(RECURSE_FLAGS
) \
1518 LANGUAGES
="c c++" all
1522 @if
[ -f .
/gcc
/Makefile
] ; then \
1523 r
=`pwd`; export r
; \
1524 s
=`cd $(srcdir); pwd`; export s
; \
1526 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1533 @if
[ -f .
/gcc
/Makefile
] ; then \
1534 r
=`pwd`; export r
; \
1535 s
=`cd $(srcdir); pwd`; export s
; \
1537 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1542 .PHONY
: install-gcc-cross
1544 @if
[ -f .
/gcc
/Makefile
] ; then \
1545 r
=`pwd`; export r
; \
1546 s
=`cd $(srcdir); pwd`; export s
; \
1548 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++" install); \
1552 # EXPERIMENTAL STUFF
1553 # This rule is used to install the modules which use FLAGS_TO_PASS.
1554 # To build a target install-X means to cd to X and make install.
1555 .PHONY
: install-dosrel
1556 install-dosrel
: installdirs info
1557 @
dir=`echo $@ | sed -e 's/install-//'`; \
1558 if
[ -f .
/$${dir}/Makefile
] ; then \
1559 r
=`pwd`; export r
; \
1560 s
=`cd $(srcdir); pwd`; export s
; \
1562 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1567 install-dosrel-fake
:
1570 ALL_GCC_C
= $(ALL_GCC
) all-target-newlib all-target-libgloss
1571 ALL_GCC_CXX
= $(ALL_GCC_C
) all-target-libstdc
++ all-target-libstdc
++-v3
1573 # This is a list of inter-dependencies among modules.
1576 all-autoconf
: all-m4 all-texinfo
1577 all-automake
: all-m4 all-texinfo
1579 all-bfd
: all-libiberty all-intl
1580 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1581 all-bison
: all-texinfo
1582 configure-target-boehm-gc
: $(ALL_GCC_CXX
) configure-target-qthreads
1583 all-target-boehm-gc
: configure-target-boehm-gc
1584 configure-target-bsp
: $(ALL_GCC_C
)
1585 all-target-bsp
: configure-target-bsp
1588 all-cgen
: all-libiberty
1590 configure-target-cygmon
: $(ALL_GCC_C
)
1591 all-target-cygmon
: configure-target-cygmon all-target-libiberty all-target-libio all-target-libstub all-target-bsp
1593 all-dejagnu
: all-tcl all-expect all-tk
1594 all-diff
: all-libiberty
1596 all-emacs19
: all-bison all-byacc
1598 configure-target-examples
: $(ALL_GCC_C
)
1599 all-target-examples
: configure-target-examples
1600 all-expect
: all-tcl all-tk
1601 all-fileutils
: all-libiberty
1604 all-flex
: all-libiberty all-bison all-byacc
1605 all-gas
: all-libiberty all-opcodes all-bfd all-intl
1608 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld all-zlib
1609 all-bootstrap
: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
1610 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui
1611 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1614 configure-target-gperf
: $(ALL_GCC_CXX
)
1615 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++-v3
1616 all-gprof
: all-libiberty all-bfd all-opcodes all-intl
1617 all-grep
: all-libiberty
1618 all-grez
: all-libiberty all-bfd all-opcodes
1619 all-gui
: all-gdb all-libproc all-target-librx
1621 all-gzip
: all-libiberty
1622 all-hello
: all-libiberty
1624 all-inet
: all-tcl all-send-pr all-perl
1626 all-ispell
: all-emacs19
1627 all-itcl
: all-tcl all-tk all-tcl8.1 all-tk8.1
1628 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1629 configure-target-libg
++: $(ALL_GCC_CXX
) configure-target-librx
1630 all-target-libg
++: configure-target-libg
++ all-target-libiberty all-target-librx
1631 configure-target-libgloss
: $(ALL_GCC
)
1632 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1633 configure-target-libio
: $(ALL_GCC_C
)
1634 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1635 check-target-libio
: all-target-libstdc
++
1636 all-libgui
: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1638 configure-target-libffi
: $(ALL_GCC_C
)
1639 all-target-libffi
: configure-target-libffi
1640 configure-target-libjava
: $(ALL_GCC_CXX
) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
1641 all-target-libjava
: configure-target-libjava all-zip all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
1642 configure-target-librx
: $(ALL_GCC_C
)
1643 all-target-librx
: configure-target-librx
1644 configure-target-libstdc
++: $(ALL_GCC_C
)
1645 all-target-libstdc
++: configure-target-libstdc
++ all-target-libiberty all-target-libio
1646 configure-target-libstdc
++-v3
: $(ALL_GCC_C
)
1647 all-target-libstdc
++-v3
: configure-target-libstdc
++-v3 all-target-libiberty
1648 configure-target-libstub
: $(ALL_GCC_C
)
1649 all-target-libstub
: configure-target-libstub
1651 configure-target-libf2c
: $(ALL_GCC_C
)
1652 all-target-libf2c
: configure-target-libf2c all-target-libiberty
1653 configure-target-libchill
: $(ALL_GCC_C
)
1654 all-target-libchill
: configure-target-libchill all-target-libiberty
1655 configure-target-libobjc
: $(ALL_GCC_C
)
1656 all-target-libobjc
: configure-target-libobjc all-target-libiberty
1657 all-m4
: all-libiberty all-texinfo
1658 all-make
: all-libiberty
1660 configure-target-newlib
: $(ALL_GCC
)
1661 all-target-newlib
: configure-target-newlib
1662 configure-target-libtermcap
: $(ALL_GCC_C
)
1663 all-target-libtermcap
: configure-target-libtermcap
1664 all-opcodes
: all-bfd all-libiberty all-cgen
1665 all-patch
: all-libiberty
1667 all-prms
: all-libiberty
1668 configure-target-qthreads
: $(ALL_GCC_C
)
1669 all-target-qthreads
: configure-target-qthreads
1672 all-recode
: all-libiberty
1673 all-sed
: all-libiberty
1674 all-send-pr
: all-prms
1676 all-sid
: all-tcl all-tk
1677 all-sim
: all-libiberty all-bfd all-opcodes all-readline all-cgen
1678 all-snavigator
: all-tcl all-tk all-itcl all-db all-grep all-libgui
1679 all-tar
: all-libiberty
1682 all-tclX
: all-tcl all-tk
1684 all-tk8.1
: all-tcl8.1
1685 all-texinfo
: all-libiberty
1687 all-tgas
: all-libiberty all-bfd all-opcodes
1689 all-tix
: all-tcl all-tk all-tcl8.1 all-tk8.1
1691 configure-target-winsup
: $(ALL_GCC_C
)
1692 all-target-winsup
: all-target-libiberty all-target-libtermcap configure-target-winsup
1693 all-uudecode
: all-libiberty
1696 configure-target-zlib
: $(ALL_GCC_C
)
1697 all-target-zlib
: configure-target-zlib
1698 configure-target-libiberty
: $(ALL_GCC_C
)
1699 all-target-libiberty
: configure-target-libiberty
1700 all-target
: $(ALL_TARGET_MODULES
)
1701 install-target
: $(INSTALL_TARGET_MODULES
)
1702 install-gdb
: install-tcl install-tk install-itcl install-tix install-libgui
1703 install-sid
: install-tcl install-tk
1704 ### other supporting targets
1710 installdirs: mkinstalldirs
1711 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1713 dir.
info: do-install-info
1714 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1715 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1716 mv
-f
dir.
info.new
dir.
info ; \
1721 @echo
"Building a full distribution of this tree isn't done"
1722 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1726 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1727 # ability to use several tags files at once, so there is probably no need
1728 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1729 # (if we felt like it) have this Makefile write a piece of elisp which
1730 # the user could load to tell emacs19 where all the TAGS files we just
1734 # with the gnu make, this is done automatically.
1736 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
) $(gcc_version_trigger
)
1737 $(SHELL
) .
/config.status
1740 # Support for building net releases
1742 # Files in devo used in any net release.
1743 # ChangeLog omitted because it may refer to files which are not in this
1744 # distribution (perhaps it would be better to include it anyway).
1745 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1746 config.guess config.if config.sub config move-if-change \
1747 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1748 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1749 mkinstalldirs ltconfig ltmain.sh missing ylwrap \
1750 libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh
1752 # Files in devo/etc used in any net release.
1753 # ChangeLog omitted because it may refer to files which are not in this
1754 # distribution (perhaps it would be better to include it anyway).
1755 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1756 make-stds.texi standards.
info* configure.texi configure.
info* \
1757 configbuild.
* configdev.
*
1760 # When you use `make setup-dirs' or `make taz' you should always redefine
1762 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1764 # NOTE: No double quotes in the below. It is used within shell script
1766 VER
= ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \
1767 sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
1768 elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1769 sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
1770 elif test -f $(TOOL)/version.in; then \
1771 head -1 $(TOOL)/version.in; \
1772 elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
1773 sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
1780 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
1781 $(MAKE
) -f Makefile.in do-proto-toplev \
1782 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1783 MD5PROG
="$(MD5PROG)" \
1784 SUPPORT_FILES
="$(SUPPORT_FILES)"
1785 $(MAKE
) -f Makefile.in do-md5sum \
1786 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1787 MD5PROG
="$(MD5PROG)" \
1788 SUPPORT_FILES
="$(SUPPORT_FILES)"
1789 $(MAKE
) -f Makefile.in do-tar-bz2 \
1790 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1791 MD5PROG
="$(MD5PROG)" \
1792 SUPPORT_FILES
="$(SUPPORT_FILES)"
1795 gdb-taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
1796 $(MAKE
) -f Makefile.in do-proto-toplev \
1797 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1798 MD5PROG
="$(MD5PROG)" \
1799 SUPPORT_FILES
="$(SUPPORT_FILES)"
1800 $(MAKE
) -f Makefile.in do-md5sum \
1801 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1802 MD5PROG
="$(MD5PROG)" \
1803 SUPPORT_FILES
="$(SUPPORT_FILES)"
1804 $(MAKE
) -f Makefile.in do-djunpack \
1805 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1806 MD5PROG
="$(MD5PROG)" \
1807 SUPPORT_FILES
="$(SUPPORT_FILES)"
1808 $(MAKE
) -f Makefile.in do-tar-bz2 \
1809 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1810 MD5PROG
="$(MD5PROG)" \
1811 SUPPORT_FILES
="$(SUPPORT_FILES)"
1813 .PHONY
: do-proto-toplev
1814 do-proto-toplev
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
1815 echo
"==> Making $(PACKAGE)-$(VER)/"
1816 # Take out texinfo from a few places.
1817 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1818 -e
'/^ install-texinfo /d' \
1820 mv
-f tmp Makefile.in
1823 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1824 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) \
1825 ALL_GCC
="" ALL_GCC_C
="" ALL_GCC_CXX
="" \
1826 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1827 # Make links, and run "make diststuff" or "make info" when needed.
1828 rm -rf proto-toplev
; mkdir proto-toplev
1829 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1830 for d in
$$dirs ; do \
1831 if
[ -d
$$d ]; then \
1832 if
[ ! -f
$$d/Makefile
] ; then true
; \
1833 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1834 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1835 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1836 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1838 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1839 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1841 ln
-s ..
/$$d proto-toplev
/$$d ; \
1843 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1845 cd etc
&& $(MAKE
) info
1848 mkdir proto-toplev
/etc
1849 (cd proto-toplev
/etc
; \
1850 for i in
$(ETC_SUPPORT
); do \
1851 ln
-s ..
/..
/etc
/$$i .
; \
1854 # Take out texinfo from configurable dirs
1855 rm proto-toplev
/configure.in
1856 sed
-e
'/^host_tools=/s/texinfo //' \
1857 <configure.in
>proto-toplev
/configure.in
1859 mkdir proto-toplev
/texinfo
1860 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1861 if
test -r texinfo
/util
/tex3patch
; then \
1862 mkdir proto-toplev
/texinfo
/util
&& \
1863 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1865 chmod
-R og
=u . || chmod og
=u
`find . -print`
1867 # Create .gmo files from .po files.
1868 for f in
`find . -name '*.po' -type f -print`; do \
1869 msgfmt
-o
`echo $$f | sed -e 's/\.po$$/.gmo/'` $$f ; \
1872 -rm -f
$(PACKAGE
)-$(VER
)
1873 ln
-s proto-toplev
$(PACKAGE
)-$(VER
)
1877 echo
"==> Making $(PACKAGE)-$(VER).tar.bz2"
1878 -rm -f
$(PACKAGE
)-$(VER
).
tar.bz2
1879 find
$(PACKAGE
)-$(VER
) -follow
-name CVS
-prune
-o
-type f
-print \
1880 |
tar cTfh
- $(PACKAGE
)-$(VER
).
tar
1881 $(BZIPPROG
) -v
-9 $(PACKAGE
)-$(VER
).
tar
1885 echo
"==> Adding md5 checksum to top-level directory"
1886 cd proto-toplev
&& find
* -follow
-name CVS
-prune
-o
-type f
-print \
1887 | xargs
$(MD5PROG
) > ..
/md5.sum
1888 mv md5.sum proto-toplev
1892 echo
"==> Adding updated djunpack.bat to top-level directory"
1893 echo
- 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/'
1894 sed
< djunpack.bat
> djunpack.new \
1895 -e
's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/'
1896 mv djunpack.new djunpack.bat
1897 -rm -f proto-toplev
/djunpack.bat
1898 ln
-s ..
/djunpack.bat proto-toplev
/djunpack.bat
1900 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex
1901 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1904 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes intl setup.com makefile.vms mkdep
1905 gas.
tar.bz2
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1906 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1907 MD5PROG
="$(MD5PROG)" \
1908 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1910 # The FSF "binutils" release includes gprof and ld.
1911 .PHONY
: binutils.
tar.bz2
1912 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof intl setup.com makefile.vms mkdep
1913 binutils.
tar.bz2
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1914 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1915 MD5PROG
="$(MD5PROG)" \
1916 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS)"
1918 .PHONY
: gas
+binutils.
tar.bz2
1919 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1920 gas
+binutils.
tar.bz2
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1921 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1922 MD5PROG
="$(MD5PROG)" \
1923 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS)"
1925 .PHONY
: libg
++.
tar.bz2
1926 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1927 libg
++.
tar.bz2
: $(DIST_SUPPORT
) libg
++
1928 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1929 MD5PROG
="$(MD5PROG)" \
1930 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1932 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1933 gnats.
tar.bz2
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1934 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1935 MD5PROG
="$(MD5PROG)" \
1936 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1939 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils intl
1940 gdb.
tar.bz2
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1941 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb \
1942 MD5PROG
="$(MD5PROG)" \
1943 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS)"
1945 .PHONY
: dejagnu.
tar.bz2
1946 DEJAGNU_SUPPORT_DIRS
= tcl expect libiberty
1947 dejagnu.
tar.bz2
: $(DIST_SUPPORT
) $(DEJAGNU_SUPPORT_DIRS
) dejagnu
1948 $(MAKE
) -f Makefile.in taz TOOL
=dejagnu \
1949 MD5PROG
="$(MD5PROG)" \
1950 SUPPORT_FILES
="$(DEJAGNU_SUPPORT_DIRS)"
1952 .PHONY
: gdb
+dejagnu.
tar.bz2
1953 GDBD_SUPPORT_DIRS
= $(GDB_SUPPORT_DIRS
) tcl expect dejagnu
1954 gdb
+dejagnu.
tar.bz2
: $(DIST_SUPPORT
) $(GDBD_SUPPORT_DIRS
) gdb
1955 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb PACKAGE
=gdb
+dejagnu \
1956 MD5PROG
="$(MD5PROG)" \
1957 SUPPORT_FILES
="$(GDBD_SUPPORT_DIRS)"
1959 .PHONY
: insight.
tar.bz2
1960 INSIGHT_SUPPORT_DIRS
= $(GDB_SUPPORT_DIRS
) tcl tk itcl tix libgui
1961 insight.
tar.bz2
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1962 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb PACKAGE
=insight \
1963 MD5PROG
="$(MD5PROG)" \
1964 SUPPORT_FILES
="$(INSIGHT_SUPPORT_DIRS)"
1966 .PHONY
: insight
+dejagnu.
tar.bz2
1967 INSIGHTD_SUPPORT_DIRS
= $(INSIGHT_SUPPORT_DIRS
) expect dejagnu
1968 insight
+dejagnu.
tar.bz2
: $(DIST_SUPPORT
) $(INSIGHTD_SUPPORT_DIRS
) gdb
1969 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb PACKAGE
="insight+dejagnu" \
1970 MD5PROG
="$(MD5PROG)" \
1971 SUPPORT_FILES
="$(INSIGHTD_SUPPORT_DIRS)"
1973 .PHONY
: newlib.
tar.bz2
1974 NEWLIB_SUPPORT_DIRS
=libgloss
1975 # taz configures for the sun4 target which won't configure newlib.
1976 # We need newlib configured so that the .info files are made.
1977 # Unfortunately, it is not enough to just configure newlib separately:
1978 # taz will build the .info files but since SUBDIRS won't contain newlib,
1979 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1980 # used in building the .info files, eg: *.def, *.ref).
1981 # The problem isn't solvable however without a lot of extra work because
1982 # target libraries are built in subdir $(target_alias) which gets nuked during
1983 # the make distclean. For now punt on the issue of shipping newlib info files
1984 # with newlib net releases and wait for a day when some native target (sun4?)
1985 # supports newlib (if only minimally).
1986 newlib.
tar.bz2
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1987 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1988 MD5PROG
="$(MD5PROG)" \
1989 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1990 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1995 # end of Makefile.in