2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
4 # 1999, 2000 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
115 # These values are substituted by configure.
120 BISON
= `if [ -f $$r/bison/bison ] ; then \
121 echo $$r/bison/bison -L $$s/bison/ ; \
126 YACC
= `if [ -f $$r/bison/bison ] ; then \
127 echo $$r/bison/bison -y -L $$s/bison/ ; \
128 elif [ -f $$r/byacc/byacc ] ; then \
129 echo $$r/byacc/byacc ; \
131 echo ${DEFAULT_YACC} ; \
134 LEX
= `if [ -f $$r/flex/flex ] ; \
135 then echo $$r/flex/flex ; \
136 else echo ${DEFAULT_LEX} ; fi`
138 M4
= `if [ -f $$r/m4/m4 ] ; \
139 then echo $$r/m4/m4 ; \
140 else echo ${DEFAULT_M4} ; fi`
142 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
143 then echo $$r/texinfo/makeinfo/makeinfo ; \
144 else echo makeinfo ; fi`
146 # This just becomes part of the MAKEINFO definition passed down to
147 # sub-makes. It lets flags be given on the command line while still
148 # using the makeinfo from the object tree.
151 EXPECT
= `if [ -f $$r/expect/expect ] ; \
152 then echo $$r/expect/expect ; \
153 else echo expect ; fi`
155 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
156 then echo $$s/dejagnu/runtest ; \
157 else echo runtest ; fi`
160 # compilers to use to create programs which must be run in the build
163 CXX_FOR_BUILD
= $(CXX
)
165 SUBDIRS
= "this is set via configure, don't edit this"
168 # This is set by the configure script to the list of directories which
169 # should be built using the target tools.
170 TARGET_CONFIGDIRS
= libiberty libgloss
$(SPECIAL_LIBS
) newlib librx winsup opcodes bsp libstub cygmon libf2c libchill libobjc
172 # Target libraries are put under this directory:
173 # Changed by configure to $(target_alias) if cross.
176 # This is set by the configure script to the arguments passed to configure.
179 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
183 # This is the name of the environment variable used for the path to
184 # the libraries. This may be changed by configure.in.
185 RPATH_ENVVAR
= LD_LIBRARY_PATH
187 # This is the list of directories that may be needed in RPATH_ENVVAR
188 # so that programs built for the host machine work.
189 HOST_LIB_PATH
= $$r/bfd
:$$r/opcodes
191 # This is the list of directories that may be needed in RPATH_ENVVAR
192 # so that prorgams built for the target machine work.
193 TARGET_LIB_PATH
= $$r/$(TARGET_SUBDIR
)/libstdc
++-v3
/src
/.libs
:
195 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
196 # Some platforms don't like blank entries, so we remove duplicate,
197 # leading and trailing colons.
198 REALLY_SET_LIB_PATH
= \
199 $(RPATH_ENVVAR
)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR
);
202 INSTALL_TARGET
= installdirs \
205 $(INSTALL_TARGET_MODULES
) \
206 $(INSTALL_X11_MODULES
) \
209 INSTALL_TARGET_CROSS
= installdirs \
212 $(INSTALL_TARGET_MODULES
) \
213 $(INSTALL_X11_MODULES
) \
216 # Should be substed by configure.in
223 # If GCC_FOR_TARGET is not overriden on the command line, then this
224 # variable is passed down to the gcc Makefile, where it is used to
225 # build libgcc2.a. We define it here so that it can itself be
226 # overridden on the command line.
227 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/ $(FLAGS_FOR_TARGET
)
230 if [ -f $$r/gas/as-new ] ; then \
231 echo $$r/gas/as-new ; \
233 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
236 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
241 if [ -f $$r/ld/ld-new ] ; then \
242 echo $$r/ld/ld-new ; \
244 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
247 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
251 DLLTOOL_FOR_TARGET
= ` \
252 if [ -f $$r/binutils/dlltool ] ; then \
253 echo $$r/binutils/dlltool ; \
255 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
258 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
262 WINDRES_FOR_TARGET
= ` \
263 if [ -f $$r/binutils/windres ] ; then \
264 echo $$r/binutils/windres ; \
266 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
269 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
274 if [ -f $$r/binutils/ar ] ; then \
275 echo $$r/binutils/ar ; \
277 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
280 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
284 RANLIB_FOR_TARGET
= ` \
285 if [ -f $$r/binutils/ranlib ] ; then \
286 echo $$r/binutils/ranlib ; \
288 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
289 if [ x"$(RANLIB)" != x ]; then \
295 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
300 if [ -f $$r/binutils/nm-new ] ; then \
301 echo $$r/binutils/nm-new ; \
303 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
306 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
310 # The first rule in the file had better be this one. Don't put any above it.
311 # This lives here to allow makefile fragments to contain dependencies.
315 # These can be overridden by config/mt-*.
316 # The _TARGET_ is because they're specified in mt-foo.
317 # The _HOST_ is because they're programs that run on the host.
318 EXTRA_TARGET_HOST_ALL_MODULES
=
319 EXTRA_TARGET_HOST_INSTALL_MODULES
=
320 EXTRA_TARGET_HOST_CHECK_MODULES
=
322 #### host and target specific makefile fragments come in here.
325 # Flags to pass down to all sub-makes.
326 # Please keep these in alphabetical order.
327 BASE_FLAGS_TO_PASS
= \
328 "AR_FLAGS=$(AR_FLAGS)" \
329 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
330 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
332 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
333 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
335 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
336 "CHILLFLAGS=$(CHILLFLAGS)" \
337 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
338 "CHILL_LIB=$(CHILL_LIB)" \
339 "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
340 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
341 "CXXFLAGS=$(CXXFLAGS)" \
342 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
343 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
344 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
345 "INSTALL=$(INSTALL)" \
346 "INSTALL_DATA=$(INSTALL_DATA)" \
347 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
348 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
349 "LDFLAGS=$(LDFLAGS)" \
351 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
352 "LIBCFLAGS=$(LIBCFLAGS)" \
353 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
354 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
355 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
358 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
359 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
360 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
361 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
364 "RUNTEST=$(RUNTEST)" \
365 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
366 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
367 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
370 "datadir=$(datadir)" \
371 "exec_prefix=$(exec_prefix)" \
372 "includedir=$(includedir)" \
373 "infodir=$(infodir)" \
375 "libexecdir=$(libexecdir)" \
376 "lispdir=$(lispdir)" \
377 "libstdcxx_incdir=$(libstdcxx_incdir)" \
378 "libsubdir=$(libsubdir)" \
379 "localstatedir=$(localstatedir)" \
381 "oldincludedir=$(oldincludedir)" \
383 "sbindir=$(sbindir)" \
384 "sharedstatedir=$(sharedstatedir)" \
385 "sysconfdir=$(sysconfdir)" \
386 "tooldir=$(tooldir)" \
387 "build_tooldir=$(build_tooldir)" \
388 "gxx_include_dir=$(gxx_include_dir)" \
389 "gcc_version=$(gcc_version)" \
390 "gcc_version_trigger=$(gcc_version_trigger)" \
391 "target_alias=$(target_alias)"
393 # Flags to pass down to most sub-makes, in which we're building with
394 # the host environment.
395 # If any variables are added here, they must be added to do-*, below.
401 'DLLTOOL=$(DLLTOOL)' \
404 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
407 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
409 # Flags that are concerned with the location of the X11 include files
412 # NOTE: until the top-level is getting the values via autoconf, it only
413 # causes problems to have this top-level Makefile overriding the autoconf-set
414 # values in child directories. Only variables that don't conflict with
415 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
417 X11_FLAGS_TO_PASS
= \
418 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
419 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
421 # Flags to pass down to makes which are built with the target environment.
422 # The double $ decreases the length of the command line; the variables
423 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
424 # If any variables are added here, they must be added to do-*, below.
425 EXTRA_TARGET_FLAGS
= \
426 'AR=$$(AR_FOR_TARGET)' \
427 'AS=$$(AS_FOR_TARGET)' \
428 'CC=$$(CC_FOR_TARGET)' \
429 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
430 'CXX=$$(CXX_FOR_TARGET)' \
431 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
432 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
433 'LD=$$(LD_FOR_TARGET)' \
434 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
435 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
436 'NM=$$(NM_FOR_TARGET)' \
437 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
438 'WINDRES=$$(WINDRES_FOR_TARGET)'
440 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
442 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
443 # unfortunately needs the native compiler and the target ar and
445 # If any variables are added here, they must be added to do-*, below.
446 # The HOST_* variables are a special case, which are used for the gcc
447 # cross-building scheme.
453 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
454 'HOST_CC=$(CC_FOR_BUILD)' \
455 'HOST_PREFIX=$(HOST_PREFIX)' \
456 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
458 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
459 'WINDRES=$$(WINDRES_FOR_TARGET)' \
460 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
461 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
462 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
463 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
464 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
465 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
466 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
467 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
468 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
469 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
471 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
473 # This is a list of the targets for all of the modules which are compiled
474 # using $(FLAGS_TO_PASS).
543 $(EXTRA_TARGET_HOST_ALL_MODULES
)
545 # This is a list of the check targets for all of the modules which are
546 # compiled using $(FLAGS_TO_PASS).
548 # The list is in two parts. The first lists those tools which
549 # are tested as part of the host's native tool-chain, and not
550 # tested in a cross configuration.
551 NATIVE_CHECK_MODULES
= \
558 CROSS_CHECK_MODULES
= \
616 $(EXTRA_TARGET_HOST_CHECK_MODULES
)
618 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
620 # This is a list of the install targets for all of the modules which are
621 # compiled using $(FLAGS_TO_PASS).
622 # We put install-opcodes before install-binutils because the installed
623 # binutils might be on PATH, and they might need the shared opcodes
625 # We put install-tcl before install-itcl because itcl wants to run a
626 # program on installation which uses the Tcl libraries.
692 $(EXTRA_TARGET_HOST_INSTALL_MODULES
)
694 # This is a list of the targets for all of the modules which are compiled
695 # using $(X11_FLAGS_TO_PASS).
708 # This is a list of the check targets for all of the modules which are
709 # compiled using $(X11_FLAGS_TO_PASS).
710 CHECK_X11_MODULES
= \
720 # This is a list of the install targets for all the modules which are
721 # compiled using $(X11_FLAGS_TO_PASS).
722 INSTALL_X11_MODULES
= \
734 # This is a list of the targets for all of the modules which are compiled
735 # using $(TARGET_FLAGS_TO_PASS).
736 ALL_TARGET_MODULES
= \
737 all-target-libstdc
++-v3 \
741 all-target-libchill \
743 all-target-libtermcap \
745 all-target-libgloss \
746 all-target-libiberty \
748 all-target-examples \
753 all-target-boehm-gc \
754 all-target-qthreads \
758 # This is a list of the configure targets for all of the modules which
759 # are compiled using the target tools.
760 CONFIGURE_TARGET_MODULES
= \
761 configure-target-libstdc
++-v3 \
762 configure-target-librx \
763 configure-target-newlib \
764 configure-target-libf2c \
765 configure-target-libchill \
766 configure-target-libobjc \
767 configure-target-libtermcap \
768 configure-target-winsup \
769 configure-target-libgloss \
770 configure-target-libiberty \
771 configure-target-gperf \
772 configure-target-examples \
773 configure-target-libstub \
774 configure-target-libffi \
775 configure-target-libjava \
776 configure-target-zlib \
777 configure-target-boehm-gc \
778 configure-target-qthreads \
779 configure-target-bsp \
780 configure-target-cygmon
782 # This is a list of the check targets for all of the modules which are
783 # compiled using $(TARGET_FLAGS_TO_PASS).
784 CHECK_TARGET_MODULES
= \
785 check-target-libstdc
++-v3 \
786 check-target-newlib \
787 check-target-libf2c \
788 check-target-libchill \
789 check-target-libobjc \
790 check-target-winsup \
791 check-target-libiberty \
792 check-target-libffi \
793 check-target-libjava \
795 check-target-boehm-gc \
796 check-target-qthreads \
799 # This is a list of the install targets for all of the modules which are
800 # compiled using $(TARGET_FLAGS_TO_PASS).
801 INSTALL_TARGET_MODULES
= \
802 install-target-libstdc
++-v3 \
803 install-target-newlib \
804 install-target-libf2c \
805 install-target-libchill \
806 install-target-libobjc \
807 install-target-libtermcap \
808 install-target-winsup \
809 install-target-libgloss \
810 install-target-libiberty \
812 install-target-libjava \
813 install-target-zlib \
814 install-target-boehm-gc \
815 install-target-qthreads \
818 # This is a list of the targets for which we can do a clean-{target}.
887 # All of the target modules that can be cleaned
888 CLEAN_TARGET_MODULES
= \
889 clean-target-libstdc
++-v3 \
891 clean-target-newlib \
892 clean-target-libf2c \
893 clean-target-libchill \
894 clean-target-libobjc \
895 clean-target-winsup \
896 clean-target-libgloss \
897 clean-target-libiberty \
899 clean-target-examples \
900 clean-target-libstub \
901 clean-target-libffi \
902 clean-target-libjava \
904 clean-target-boehm-gc \
905 clean-target-qthreads \
909 # All of the x11 modules that can be cleaned
910 CLEAN_X11_MODULES
= \
921 # The target built for a native build.
926 $(ALL_TARGET_MODULES
) \
929 # Do a target for all the subdirectories. A ``make do-X'' will do a
930 # ``make X'' in all subdirectories (because, in general, there is a
931 # dependency (below) of X upon do-X, a ``make X'' will also do this,
932 # but it may do additional work as well).
933 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
934 # because it is so large that it can easily overflow the command line
935 # length limit on some systems.
944 do-maintainer-clean \
948 @target
=`echo $@ | sed -e 's/^do-//'`; \
950 s
=`cd $(srcdir); pwd`; export s
; \
952 for i in
$(SUBDIRS
) -dummy-
; do \
953 if
[ -f .
/$$i/Makefile
]; then \
956 for flag in
$(EXTRA_GCC_FLAGS
); do \
957 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
961 for flag in
$(EXTRA_HOST_FLAGS
); do \
962 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
966 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
968 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
969 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
970 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
971 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
973 then true
; else exit
1; fi
; \
976 @target
=`echo $@ | sed -e 's/^do-//'`; \
978 s
=`cd $(srcdir); pwd`; export s
; \
980 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
981 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
982 for flag in
$(EXTRA_TARGET_FLAGS
); do \
983 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
985 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
986 if
(cd
$(TARGET_SUBDIR
)/$$i; \
987 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
988 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
989 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
990 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
992 then true
; else exit
1; fi
; \
996 # Here are the targets which correspond to the do-X targets.
998 .PHONY
: info installcheck dvi install-info
999 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
1000 .PHONY
: local-clean local-distclean local-maintainer-clean
1002 installcheck: do-installcheck
1005 # Make sure makeinfo is built before we do a `make info'.
1006 do-info
: all-texinfo
1008 install-info
: do-install-info
dir.
info
1009 s
=`cd $(srcdir); pwd`; export s
; \
1010 if
[ -f
dir.
info ] ; then \
1011 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
1015 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E *.log
1018 -rm -f Makefile config.status config.cache mh-frag mt-frag
1019 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
1020 rm -rf
$(TARGET_SUBDIR
); \
1022 -rm -f texinfo
/po
/Makefile texinfo
/po
/Makefile.in texinfo
/info/Makefile
1023 -rm -f texinfo
/doc
/Makefile texinfo
/po
/POTFILES
1024 -rmdir texinfo
/doc texinfo
/info texinfo
/intl texinfo
/lib
2>/dev
/null
1025 -rmdir texinfo
/makeinfo texinfo
/po texinfo
/util
2>/dev
/null
1026 -rmdir fastjar gcc libiberty texinfo zlib
2>/dev
/null
1028 local-maintainer-clean
:
1029 @echo
"This command is intended for maintainers to use;"
1030 @echo
"it deletes files that may require special tools to rebuild."
1032 clean: do-clean local-clean
1033 mostlyclean: do-mostlyclean local-clean
1034 distclean: do-distclean local-clean local-distclean
1035 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
1036 maintainer-clean
: local-distclean
1037 realclean: maintainer-clean
1039 # This rule is used to clean specific modules.
1040 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
1041 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
1042 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1043 if
[ -f .
/$${dir}/Makefile
] ; then \
1044 r
=`pwd`; export r
; \
1045 s
=`cd $(srcdir); pwd`; export s
; \
1047 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1052 .PHONY
: $(CLEAN_TARGET_MODULES
)
1053 $(CLEAN_TARGET_MODULES
):
1054 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1055 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1056 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1057 r
=`pwd`; export r
; \
1058 s
=`cd $(srcdir); pwd`; export s
; \
1060 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1065 clean-target
: $(CLEAN_TARGET_MODULES
) clean-target-libgcc
1066 clean-target-libgcc
:
1067 test ! -d gcc
/libgcc || \
1068 (cd gcc
/libgcc
&& find .
-type d
-print) | \
1069 while read d
; do
rm -f gcc
/$$d/libgcc.a ||
: ; done
1075 check: $(CHECK_MODULES
) \
1076 $(CHECK_TARGET_MODULES
) \
1077 $(CHECK_X11_MODULES
) \
1080 # Automated reporting of test results.
1082 warning.log
: build.log
1083 $(srcdir)/contrib
/warn_summary build.log
> $@
1086 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1087 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1089 $(srcdir)/contrib
/test_summary
-t
>$@
1091 echo If you really want to send e-mail
, run .
/$@ now
1093 mail-report-with-warnings.log
: warning.log
1094 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1095 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1097 $(srcdir)/contrib
/test_summary
-t
-i warning.log
>$@
1099 echo If you really want to send e-mail
, run .
/$@ now
1101 # Installation targets.
1103 .PHONY
: install install-cross
uninstall source-vault binary-vault vault-install
1104 install: $(INSTALL_TARGET
)
1105 install-cross
: $(INSTALL_TARGET_CROSS
)
1108 @echo
"the uninstall target is not supported in this tree"
1111 $(MAKE
) -f .
/release
/Build-A-Release \
1112 host
=$(host_alias
) source-vault
1115 $(MAKE
) -f .
/release
/Build-A-Release \
1116 host
=$(host_alias
) target
=$(target_alias
)
1119 @if
[ -f .
/release
/vault-install
] ; then \
1120 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1126 install.
all: install-no-fixedincludes
1127 @if
[ -f .
/gcc
/Makefile
] ; then \
1128 r
=`pwd` ; export r
; \
1131 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1136 # inet-install is used because the I*Net wants DejaGNU installed but
1137 # not built. Similarly, gzip is built but not installed.
1139 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1141 # install-no-fixedincludes is used because Cygnus can not distribute
1142 # the fixed header files.
1143 .PHONY
: install-no-fixedincludes
1144 install-no-fixedincludes
: \
1146 $(INSTALL_MODULES
) \
1147 $(INSTALL_TARGET_MODULES
) \
1148 $(INSTALL_X11_MODULES
) \
1149 gcc-no-fixedincludes
1151 # Install the gcc headers files, but not the fixed include files,
1152 # which Cygnus is not allowed to distribute. This rule is very
1153 # dependent on the workings of the gcc Makefile.in.
1154 .PHONY
: gcc-no-fixedincludes
1155 gcc-no-fixedincludes
:
1156 @if
[ -f .
/gcc
/Makefile
]; then \
1157 rm -rf gcc
/tmp-include
; \
1158 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1159 mkdir gcc
/include; \
1160 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1161 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1162 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1163 r
=`pwd`; export r
; \
1164 s
=`cd $(srcdir); pwd` ; export s
; \
1167 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1168 rm -rf gcc
/include; \
1169 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1172 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1173 # build a target all-X means to cd to X and make all.
1175 # all-gui, and all-libproc are handled specially because
1176 # they are still experimental, and if they fail to build, that
1177 # shouldn't stop "make all".
1178 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1179 $(ALL_MODULES
) all-gui all-libproc
:
1180 @
dir=`echo $@ | sed -e 's/all-//'`; \
1181 if
[ -f .
/$${dir}/Makefile
] ; then \
1182 r
=`pwd`; export r
; \
1183 s
=`cd $(srcdir); pwd`; export s
; \
1185 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1190 # These rules are used to check the modules which use FLAGS_TO_PASS.
1191 # To build a target check-X means to cd to X and make check. Some
1192 # modules are only tested in a native toolchain.
1194 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1195 $(NATIVE_CHECK_MODULES
):
1196 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1197 dir=`echo $@ | sed -e 's/check-//'`; \
1198 if
[ -f .
/$${dir}/Makefile
] ; then \
1199 r
=`pwd`; export r
; \
1200 s
=`cd $(srcdir); pwd`; export s
; \
1202 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1208 $(CROSS_CHECK_MODULES
):
1209 @
dir=`echo $@ | sed -e 's/check-//'`; \
1210 if
[ -f .
/$${dir}/Makefile
] ; then \
1211 r
=`pwd`; export r
; \
1212 s
=`cd $(srcdir); pwd`; export s
; \
1214 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1219 # This rule is used to install the modules which use FLAGS_TO_PASS.
1220 # To build a target install-X means to cd to X and make install.
1221 .PHONY
: $(INSTALL_MODULES
)
1222 $(INSTALL_MODULES
): installdirs
1223 @
dir=`echo $@ | sed -e 's/install-//'`; \
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
) install); \
1233 # This rule is used to configure the modules which are built with the
1235 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1236 $(CONFIGURE_TARGET_MODULES
):
1237 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1238 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1239 r
=`pwd`; export r
; \
1240 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1241 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1242 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1243 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1244 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1246 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1247 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1248 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1251 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1254 fi
; exit
0 # break command into two pieces
1255 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1256 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1258 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1260 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1261 if
[ -d
$(srcdir)/$${dir} ]; then \
1262 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1263 r
=`pwd`; export r
; \
1264 s
=`cd $(srcdir); pwd`; export s
; \
1266 AR
="$(AR_FOR_TARGET)"; export AR
; \
1267 AS
="$(AS_FOR_TARGET)"; export AS
; \
1268 CC
="$(CC_FOR_TARGET)"; export CC
; \
1269 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1270 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1271 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1272 GCJ
="$(GCJ_FOR_TARGET)"; export GCJ
; \
1273 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1274 LD
="$(LD_FOR_TARGET)"; export LD
; \
1275 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1276 NM
="$(NM_FOR_TARGET)"; export NM
; \
1277 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1278 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1279 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1280 cd
"$(TARGET_SUBDIR)/$${dir}" || exit
1; \
1282 /* |
[A-Za-z
]:[\\/]*) \
1283 topdir
=$(srcdir) ;; \
1285 case
"$(TARGET_SUBDIR)" in \
1286 .
) topdir
="../$(srcdir)" ;; \
1287 *) topdir
="../../$(srcdir)" ;; \
1290 if
[ "$(srcdir)" = "." ] ; then \
1291 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1292 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1293 if
[ -f Makefile
]; then \
1294 if
$(MAKE
) distclean; then \
1308 srcdiroption
="--srcdir=."; \
1311 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1312 libsrcdir
="$$s/$${dir}"; \
1314 if
[ -f
$${libsrcdir}/configure
] ; then \
1315 rm -f no-such-file skip-this-dir
; \
1316 CONFIG_SITE
=no-such-file
$(SHELL
) $${libsrcdir}/configure \
1317 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1318 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1320 rm -f no-such-file skip-this-dir
; \
1321 CONFIG_SITE
=no-such-file
$(SHELL
) $$s/configure \
1322 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1323 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1325 if
[ -f skip-this-dir
] ; then \
1327 rm -f skip-this-dir
; \
1328 cd ..
; rmdir
$${dir} || true
; \
1339 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1340 # To build a target all-X means to cd to X and make all.
1341 .PHONY
: $(ALL_TARGET_MODULES
)
1342 $(ALL_TARGET_MODULES
):
1343 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1344 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1345 r
=`pwd`; export r
; \
1346 s
=`cd $(srcdir); pwd`; export s
; \
1348 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1353 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1354 # To build a target install-X means to cd to X and make install.
1355 .PHONY
: $(CHECK_TARGET_MODULES
)
1356 $(CHECK_TARGET_MODULES
):
1357 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1358 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1359 r
=`pwd`; export r
; \
1360 s
=`cd $(srcdir); pwd`; export s
; \
1362 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1367 # This rule is used to install the modules which use
1368 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1370 .PHONY
: $(INSTALL_TARGET_MODULES
)
1371 $(INSTALL_TARGET_MODULES
): installdirs
1372 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1373 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1374 r
=`pwd`; export r
; \
1375 s
=`cd $(srcdir); pwd`; export s
; \
1377 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1378 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1383 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1384 # To build a target all-X means to cd to X and make all.
1385 .PHONY
: $(ALL_X11_MODULES
)
1387 @
dir=`echo $@ | sed -e 's/all-//'`; \
1388 if
[ -f .
/$${dir}/Makefile
] ; then \
1389 r
=`pwd`; export r
; \
1390 s
=`cd $(srcdir); pwd`; export s
; \
1393 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1398 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1399 # To build a target check-X means to cd to X and make all.
1400 .PHONY
: $(CHECK_X11_MODULES
)
1401 $(CHECK_X11_MODULES
):
1402 @
dir=`echo $@ | sed -e 's/check-//'`; \
1403 if
[ -f .
/$${dir}/Makefile
] ; then \
1404 r
=`pwd`; export r
; \
1405 s
=`cd $(srcdir); pwd`; export s
; \
1408 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1413 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1414 # To build a target install-X means to cd to X and make install.
1415 .PHONY
: $(INSTALL_X11_MODULES
)
1416 $(INSTALL_X11_MODULES
): installdirs
1417 @
dir=`echo $@ | sed -e 's/install-//'`; \
1418 if
[ -f .
/$${dir}/Makefile
] ; then \
1419 r
=`pwd`; export r
; \
1420 s
=`cd $(srcdir); pwd`; export s
; \
1423 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1428 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1431 @if
[ -f .
/gcc
/Makefile
] ; then \
1432 r
=`pwd`; export r
; \
1433 s
=`cd $(srcdir); pwd`; export s
; \
1435 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1440 # Building GCC uses some tools for rebuilding "source" files
1441 # like texinfo, bison/byacc, etc. So we must depend on those.
1443 # While building GCC, it may be necessary to run various target
1444 # programs like the assembler, linker, etc. So we depend on
1447 # In theory, on an SMP all those dependencies can be resolved
1450 .PHONY
: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1451 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
: all-bootstrap
1452 @r
=`pwd`; export r
; \
1453 s
=`cd $(srcdir); pwd`; export s
; \
1455 echo
"Bootstrapping the compiler"; \
1456 cd gcc
&& $(MAKE
) $(GCC_FLAGS_TO_PASS
) $@
1457 @r
=`pwd`; export r
; \
1458 s
=`cd $(srcdir); pwd`; export s
; \
1460 *bootstrap4-lean
) \
1461 msg
="Comparing stage3 and stage4 of the compiler"; \
1462 compare
=compare3-lean
;; \
1463 *bootstrap4
) msg
="Comparing stage3 and stage4 of the compiler"; \
1464 compare
=compare3
;; \
1465 *-lean
) msg
="Comparing stage2 and stage3 of the compiler"; \
1466 compare
=compare-lean
;; \
1467 * ) msg
="Comparing stage2 and stage3 of the compiler"; \
1468 compare
=compare
;; \
1472 cd gcc
&& $(MAKE
) $(GCC_FLAGS_TO_PASS
) $$compare
1473 @r
=`pwd`; export r
; \
1474 s
=`cd $(srcdir); pwd` ; export s
; \
1476 echo
"Building runtime libraries"; \
1477 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all
1480 cross
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1481 @r
=`pwd`; export r
; \
1482 s
=`cd $(srcdir); pwd`; export s
; \
1484 echo
"Building the C and C++ compiler"; \
1485 cd gcc
&& $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++"
1486 @r
=`pwd`; export r
; \
1487 s
=`cd $(srcdir); pwd` ; export s
; \
1489 echo
"Building runtime libraries"; \
1490 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all LANGUAGES
="c c++"
1494 @if
[ -f .
/gcc
/Makefile
] ; then \
1495 r
=`pwd`; export r
; \
1496 s
=`cd $(srcdir); pwd`; export s
; \
1498 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1505 @if
[ -f .
/gcc
/Makefile
] ; then \
1506 r
=`pwd`; export r
; \
1507 s
=`cd $(srcdir); pwd`; export s
; \
1509 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check-c
++); \
1510 $(MAKE
) check-target-libstdc
++-v3 \
1517 @if
[ -f .
/gcc
/Makefile
] ; then \
1518 r
=`pwd`; export r
; \
1519 s
=`cd $(srcdir); pwd`; export s
; \
1521 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1526 .PHONY
: install-gcc-cross
1528 @if
[ -f .
/gcc
/Makefile
] ; then \
1529 r
=`pwd`; export r
; \
1530 s
=`cd $(srcdir); pwd`; export s
; \
1532 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++" install); \
1536 # EXPERIMENTAL STUFF
1537 # This rule is used to install the modules which use FLAGS_TO_PASS.
1538 # To build a target install-X means to cd to X and make install.
1539 .PHONY
: install-dosrel
1540 install-dosrel
: installdirs info
1541 @
dir=`echo $@ | sed -e 's/install-//'`; \
1542 if
[ -f .
/$${dir}/Makefile
] ; then \
1543 r
=`pwd`; export r
; \
1544 s
=`cd $(srcdir); pwd`; export s
; \
1546 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1551 install-dosrel-fake
:
1554 ALL_GCC_C
= $(ALL_GCC
) all-target-newlib all-target-libgloss
1555 ALL_GCC_CXX
= $(ALL_GCC_C
) all-target-libstdc
++-v3
1557 # This is a list of inter-dependencies among modules.
1560 all-autoconf
: all-m4 all-texinfo
1561 all-automake
: all-m4 all-texinfo
1563 all-bfd
: all-libiberty all-intl
1564 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1565 all-bison
: all-texinfo
1566 configure-target-boehm-gc
: $(ALL_GCC_CXX
) configure-target-qthreads
1567 all-target-boehm-gc
: configure-target-boehm-gc
1568 configure-target-bsp
: $(ALL_GCC_C
)
1569 all-target-bsp
: configure-target-bsp
1572 all-cgen
: all-libiberty
1574 configure-target-cygmon
: $(ALL_GCC_C
)
1575 all-target-cygmon
: configure-target-cygmon all-target-libiberty all-target-libstub all-target-bsp
1577 all-dejagnu
: all-tcl all-expect all-tk
1578 all-diff
: all-libiberty
1580 all-emacs19
: all-bison all-byacc
1582 configure-target-examples
: $(ALL_GCC_C
)
1583 all-target-examples
: configure-target-examples
1584 all-expect
: all-tcl all-tk
1585 all-fileutils
: all-libiberty
1588 all-flex
: all-libiberty all-bison all-byacc
1589 all-gas
: all-libiberty all-opcodes all-bfd all-intl
1592 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld all-zlib
1593 all-bootstrap
: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
1594 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui
1595 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1598 configure-target-gperf
: $(ALL_GCC_C
)
1599 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++-v3
1600 all-gprof
: all-libiberty all-bfd all-opcodes all-intl
1601 all-grep
: all-libiberty
1602 all-grez
: all-libiberty all-bfd all-opcodes
1603 all-gui
: all-gdb all-libproc all-target-librx
1605 all-gzip
: all-libiberty
1606 all-hello
: all-libiberty
1608 all-inet
: all-tcl all-send-pr all-perl
1610 all-ispell
: all-emacs19
1611 all-itcl
: all-tcl all-tk all-tcl8.1 all-tk8.1
1612 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1613 configure-target-libgloss
: $(ALL_GCC
)
1614 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1615 all-libgui
: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1617 configure-target-libffi
: $(ALL_GCC_C
)
1618 all-target-libffi
: configure-target-libffi
1619 configure-target-libjava
: $(ALL_GCC_CXX
) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
1620 all-target-libjava
: configure-target-libjava all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
1621 configure-target-librx
: $(ALL_GCC_C
)
1622 all-target-librx
: configure-target-librx
1623 configure-target-libstdc
++-v3
: $(ALL_GCC_C
)
1624 all-target-libstdc
++-v3
: configure-target-libstdc
++-v3 all-target-libiberty
1625 configure-target-libstub
: $(ALL_GCC_C
)
1626 all-target-libstub
: configure-target-libstub
1628 configure-target-libf2c
: $(ALL_GCC_C
)
1629 all-target-libf2c
: configure-target-libf2c all-target-libiberty
1630 configure-target-libchill
: $(ALL_GCC_C
)
1631 all-target-libchill
: configure-target-libchill all-target-libiberty
1632 configure-target-libobjc
: $(ALL_GCC_C
)
1633 all-target-libobjc
: configure-target-libobjc all-target-libiberty
1634 all-m4
: all-libiberty all-texinfo
1635 all-make
: all-libiberty
1637 configure-target-newlib
: $(ALL_GCC
)
1638 all-target-newlib
: configure-target-newlib
1639 configure-target-libtermcap
: $(ALL_GCC_C
)
1640 all-target-libtermcap
: configure-target-libtermcap
1641 all-opcodes
: all-bfd all-libiberty all-cgen
1642 all-patch
: all-libiberty
1644 all-prms
: all-libiberty
1645 configure-target-qthreads
: $(ALL_GCC_C
)
1646 all-target-qthreads
: configure-target-qthreads
1649 all-recode
: all-libiberty
1650 all-sed
: all-libiberty
1651 all-send-pr
: all-prms
1653 all-sim
: all-libiberty all-bfd all-opcodes all-readline all-cgen
1654 all-snavigator
: all-tcl all-tk all-itcl all-db all-grep all-libgui
1655 all-tar
: all-libiberty
1658 all-tclX
: all-tcl all-tk
1660 all-tk8.1
: all-tcl8.1
1661 all-texinfo
: all-libiberty
1663 all-tgas
: all-libiberty all-bfd all-opcodes
1665 all-tix
: all-tcl all-tk all-tcl8.1 all-tk8.1
1667 configure-target-winsup
: $(ALL_GCC_C
)
1668 all-target-winsup
: all-target-libiberty all-target-libtermcap configure-target-winsup
1669 all-uudecode
: all-libiberty
1672 configure-target-zlib
: $(ALL_GCC_C
)
1673 all-target-zlib
: configure-target-zlib
1674 all-fastjar
: all-zlib
1675 configure-target-fastjar
: configure-target-zlib
1676 all-target-fastjar
: configure-target-fastjar all-target-zlib
1677 configure-target-libiberty
: $(ALL_GCC_C
)
1678 all-target-libiberty
: configure-target-libiberty
1679 all-target
: $(ALL_TARGET_MODULES
)
1680 install-target
: $(INSTALL_TARGET_MODULES
)
1681 install-gdb
: install-tcl install-tk install-itcl install-tix install-libgui
1682 ### other supporting targets
1688 installdirs: mkinstalldirs
1689 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1691 dir.
info: do-install-info
1692 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1693 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1694 mv
-f
dir.
info.new
dir.
info ; \
1699 @echo
"Building a full distribution of this tree isn't done"
1700 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1704 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1705 # ability to use several tags files at once, so there is probably no need
1706 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1707 # (if we felt like it) have this Makefile write a piece of elisp which
1708 # the user could load to tell emacs19 where all the TAGS files we just
1712 # with the gnu make, this is done automatically.
1714 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
) $(gcc_version_trigger
)
1715 $(SHELL
) .
/config.status
1718 # Support for building net releases
1720 # Files in devo used in any net release.
1721 # ChangeLog omitted because it may refer to files which are not in this
1722 # distribution (perhaps it would be better to include it anyway).
1723 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1724 config.guess config.if config.sub config move-if-change \
1725 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1726 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1727 mkinstalldirs ltconfig ltmain.sh missing ylwrap \
1728 libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh
1730 # Files in devo/etc used in any net release.
1731 # ChangeLog omitted because it may refer to files which are not in this
1732 # distribution (perhaps it would be better to include it anyway).
1733 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1734 make-stds.texi standards.
info*
1736 # When you use `make setup-dirs' or `make taz' you should always redefine
1738 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1740 # NOTE: No double quotes in the below. It is used within shell script
1742 VER
= ` if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1743 sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
1745 sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
1750 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
1751 $(MAKE
) -f Makefile.in do-proto-toplev \
1752 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1753 MD5PROG
="$(MD5PROG)" \
1754 SUPPORT_FILES
="$(SUPPORT_FILES)"
1755 $(MAKE
) -f Makefile.in do-md5sum \
1756 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1757 MD5PROG
="$(MD5PROG)" \
1758 SUPPORT_FILES
="$(SUPPORT_FILES)"
1759 $(MAKE
) -f Makefile.in do-tar-bz2 \
1760 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1761 MD5PROG
="$(MD5PROG)" \
1762 SUPPORT_FILES
="$(SUPPORT_FILES)"
1765 gdb-taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
1766 $(MAKE
) -f Makefile.in do-proto-toplev \
1767 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1768 MD5PROG
="$(MD5PROG)" \
1769 SUPPORT_FILES
="$(SUPPORT_FILES)"
1770 $(MAKE
) -f Makefile.in do-md5sum \
1771 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1772 MD5PROG
="$(MD5PROG)" \
1773 SUPPORT_FILES
="$(SUPPORT_FILES)"
1774 $(MAKE
) -f Makefile.in do-djunpack \
1775 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1776 MD5PROG
="$(MD5PROG)" \
1777 SUPPORT_FILES
="$(SUPPORT_FILES)"
1778 $(MAKE
) -f Makefile.in do-tar-bz2 \
1779 TOOL
=$(TOOL
) PACKAGE
="$(PACKAGE)" VER
="$(VER)" \
1780 MD5PROG
="$(MD5PROG)" \
1781 SUPPORT_FILES
="$(SUPPORT_FILES)"
1783 .PHONY
: do-proto-toplev
1784 do-proto-toplev
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex
1785 echo
"==> Making $(PACKAGE)-$(VER)/"
1786 # Take out texinfo from a few places.
1787 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1788 -e
'/^ install-texinfo /d' \
1790 mv
-f tmp Makefile.in
1793 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1794 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) \
1795 ALL_GCC
="" ALL_GCC_C
="" ALL_GCC_CXX
="" \
1796 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1797 # Make links, and run "make diststuff" or "make info" when needed.
1798 rm -rf proto-toplev
; mkdir proto-toplev
1799 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1800 for d in
$$dirs ; do \
1801 if
[ -d
$$d ]; then \
1802 if
[ ! -f
$$d/Makefile
] ; then true
; \
1803 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1804 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1805 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1806 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1808 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1809 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1811 ln
-s ..
/$$d proto-toplev
/$$d ; \
1813 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1815 cd etc
&& $(MAKE
) info
1818 mkdir proto-toplev
/etc
1819 (cd proto-toplev
/etc
; \
1820 for i in
$(ETC_SUPPORT
); do \
1821 ln
-s ..
/..
/etc
/$$i .
; \
1824 # Take out texinfo from configurable dirs
1825 rm proto-toplev
/configure.in
1826 sed
-e
'/^host_tools=/s/texinfo //' \
1827 <configure.in
>proto-toplev
/configure.in
1829 mkdir proto-toplev
/texinfo
1830 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1831 if
test -r texinfo
/util
/tex3patch
; then \
1832 mkdir proto-toplev
/texinfo
/util
&& \
1833 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1835 chmod
-R og
=u . || chmod og
=u
`find . -print`
1837 -rm -f
$(PACKAGE
)-$(VER
)
1838 ln
-s proto-toplev
$(PACKAGE
)-$(VER
)
1842 echo
"==> Making $(PACKAGE)-$(VER).tar.bz2"
1843 -rm -f
$(PACKAGE
)-$(VER
).
tar.bz2
1844 find
$(PACKAGE
)-$(VER
) -follow
-name CVS
-prune
-o
-type f
-print \
1845 |
tar cTfh
- $(PACKAGE
)-$(VER
).
tar
1846 $(BZIPPROG
) -v
-9 $(PACKAGE
)-$(VER
).
tar
1850 echo
"==> Adding md5 checksum to top-level directory"
1851 cd proto-toplev
&& find
* -follow
-name CVS
-prune
-o
-type f
-print \
1852 | xargs
$(MD5PROG
) > ..
/md5.sum
1853 mv md5.sum proto-toplev
1857 echo
"==> Adding updated djunpack.bat to top-level directory"
1858 echo
- 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/'
1859 sed
< djunpack.bat
> djunpack.new \
1860 -e
's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/'
1861 mv djunpack.new djunpack.bat
1862 -rm -f proto-toplev
/djunpack.bat
1863 ln
-s ..
/djunpack.bat proto-toplev
/djunpack.bat
1865 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex
1866 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1869 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes intl setup.com makefile.vms mkdep
1870 gas.
tar.bz2
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1871 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1872 MD5PROG
="$(MD5PROG)" \
1873 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1875 # The FSF "binutils" release includes gprof and ld.
1876 .PHONY
: binutils.
tar.bz2
1877 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof intl setup.com makefile.vms mkdep
1878 binutils.
tar.bz2
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1879 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1880 MD5PROG
="$(MD5PROG)" \
1881 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS)"
1883 .PHONY
: gas
+binutils.
tar.bz2
1884 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1885 gas
+binutils.
tar.bz2
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1886 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1887 MD5PROG
="$(MD5PROG)" \
1888 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS)"
1890 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1891 gnats.
tar.bz2
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1892 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1893 MD5PROG
="$(MD5PROG)" \
1894 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1897 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils intl
1898 gdb.
tar.bz2
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1899 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb \
1900 MD5PROG
="$(MD5PROG)" \
1901 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS)"
1903 .PHONY
: dejagnu.
tar.bz2
1904 DEJAGNU_SUPPORT_DIRS
= tcl expect libiberty
1905 dejagnu.
tar.bz2
: $(DIST_SUPPORT
) $(DEJAGNU_SUPPORT_DIRS
) dejagnu
1906 $(MAKE
) -f Makefile.in taz TOOL
=dejagnu \
1907 MD5PROG
="$(MD5PROG)" \
1908 SUPPORT_FILES
="$(DEJAGNU_SUPPORT_DIRS)"
1910 .PHONY
: gdb
+dejagnu.
tar.bz2
1911 GDBD_SUPPORT_DIRS
= $(GDB_SUPPORT_DIRS
) tcl expect dejagnu
1912 gdb
+dejagnu.
tar.bz2
: $(DIST_SUPPORT
) $(GDBD_SUPPORT_DIRS
) gdb
1913 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb PACKAGE
=gdb
+dejagnu \
1914 MD5PROG
="$(MD5PROG)" \
1915 SUPPORT_FILES
="$(GDBD_SUPPORT_DIRS)"
1917 .PHONY
: insight.
tar.bz2
1918 INSIGHT_SUPPORT_DIRS
= $(GDB_SUPPORT_DIRS
) tcl tk itcl tix libgui
1919 insight.
tar.bz2
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1920 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb PACKAGE
=insight \
1921 MD5PROG
="$(MD5PROG)" \
1922 SUPPORT_FILES
="$(INSIGHT_SUPPORT_DIRS)"
1924 .PHONY
: insight
+dejagnu.
tar.bz2
1925 INSIGHTD_SUPPORT_DIRS
= $(INSIGHT_SUPPORT_DIRS
) expect dejagnu
1926 insight
+dejagnu.
tar.bz2
: $(DIST_SUPPORT
) $(INSIGHTD_SUPPORT_DIRS
) gdb
1927 $(MAKE
) -f Makefile.in gdb-taz TOOL
=gdb PACKAGE
="insight+dejagnu" \
1928 MD5PROG
="$(MD5PROG)" \
1929 SUPPORT_FILES
="$(INSIGHTD_SUPPORT_DIRS)"
1931 .PHONY
: newlib.
tar.bz2
1932 NEWLIB_SUPPORT_DIRS
=libgloss
1933 # taz configures for the sun4 target which won't configure newlib.
1934 # We need newlib configured so that the .info files are made.
1935 # Unfortunately, it is not enough to just configure newlib separately:
1936 # taz will build the .info files but since SUBDIRS won't contain newlib,
1937 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1938 # used in building the .info files, eg: *.def, *.ref).
1939 # The problem isn't solvable however without a lot of extra work because
1940 # target libraries are built in subdir $(target_alias) which gets nuked during
1941 # the make distclean. For now punt on the issue of shipping newlib info files
1942 # with newlib net releases and wait for a day when some native target (sun4?)
1943 # supports newlib (if only minimally).
1944 newlib.
tar.bz2
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1945 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1946 MD5PROG
="$(MD5PROG)" \
1947 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1948 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1953 # end of Makefile.in