2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
4 # 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)
42 program_transform_name =
44 man1dir = $(mandir)/man1
45 man2dir = $(mandir)/man2
46 man3dir = $(mandir)/man3
47 man4dir = $(mandir)/man4
48 man5dir = $(mandir)/man5
49 man6dir = $(mandir)/man6
50 man7dir = $(mandir)/man7
51 man8dir = $(mandir)/man8
52 man9dir = $(mandir)/man9
53 infodir = $(prefix)/info
54 includedir = $(prefix)/include
55 # Directory in which the compiler finds executables, libraries, etc.
56 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
61 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
63 INSTALL_PROGRAM_ARGS =
65 INSTALL = $(SHELL) $$s/install-sh -c
66 INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
67 INSTALL_SCRIPT = $(INSTALL)
68 INSTALL_DATA = $(INSTALL) -m 644
70 INSTALL_DOSREL = install-dosrel-fake
77 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
78 # here so that they can be overridden by Makefile fragments.
79 HOST_CC = $(CC_FOR_BUILD)
81 HOST_PREFIX_1 = loser-
83 # These flag values are normally overridden by the configure script.
89 CFLAGS_FOR_TARGET = $(CFLAGS)
91 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
95 CHILLFLAGS = $(CFLAGS)
99 # Use -O2 to stress test the compiler.
100 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions
101 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
102 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions
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.
172 TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon
174 # Target libraries are put under this directory:
175 # Changed by configure to $(target_alias) if cross.
178 # This is set by the configure script to the arguments passed to configure.
181 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
185 # This is the name of the environment variable used for the path to
186 # the libraries. This may be changed by configure.in.
187 RPATH_ENVVAR = LD_LIBRARY_PATH
189 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
190 REALLY_SET_LIB_PATH = \
191 if [ x"$$$(RPATH_ENVVAR)" != x ]; then \
192 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
194 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \
196 export $(RPATH_ENVVAR);
199 INSTALL_TARGET = installdirs \
202 $(INSTALL_TARGET_MODULES) \
203 $(INSTALL_X11_MODULES) \
206 INSTALL_TARGET_CROSS = installdirs \
209 $(INSTALL_TARGET_MODULES) \
210 $(INSTALL_X11_MODULES) \
214 if [ -f $$r/gcc/xgcc ] ; then \
215 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
216 case "$(target_canonical)" in \
217 i[3456]86-*-cygwin*) \
218 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
221 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
225 echo $$r/gcc/xgcc -B$$r/gcc/; \
228 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
231 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
235 # If CC_FOR_TARGET is not overriden on the command line, then this
236 # variable is passed down to the gcc Makefile, where it is used to
237 # build libgcc2.a. We define it here so that it can itself be
238 # overridden on the command line.
239 GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
241 CHILL_FOR_TARGET = ` \
242 if [ -f $$r/gcc/xgcc ] ; then \
243 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
245 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
248 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
253 if [ -f $$r/gcc/xgcc ] ; then \
254 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
255 case "$(target_canonical)" in \
256 i[3456]86-*-cygwin*) \
257 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
260 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
264 echo $$r/gcc/xgcc -B$$r/gcc/; \
267 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
270 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
275 if [ -f $$r/gas/as-new ] ; then \
276 echo $$r/gas/as-new ; \
278 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
281 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
286 if [ -f $$r/ld/ld-new ] ; then \
287 echo $$r/ld/ld-new ; \
289 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
292 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
296 DLLTOOL_FOR_TARGET = ` \
297 if [ -f $$r/binutils/dlltool ] ; then \
298 echo $$r/binutils/dlltool ; \
300 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
303 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
307 WINDRES_FOR_TARGET = ` \
308 if [ -f $$r/binutils/windres ] ; then \
309 echo $$r/binutils/windres ; \
311 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
314 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
319 if [ -f $$r/binutils/ar ] ; then \
320 echo $$r/binutils/ar ; \
322 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
325 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
329 RANLIB_FOR_TARGET = ` \
330 if [ -f $$r/binutils/ranlib ] ; then \
331 echo $$r/binutils/ranlib ; \
333 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
336 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
341 if [ -f $$r/binutils/nm-new ] ; then \
342 echo $$r/binutils/nm-new ; \
344 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
347 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
351 # The first rule in the file had better be this one. Don't put any above it.
352 # This lives here to allow makefile fragments to contain dependencies.
356 # These can be overridden by config/mt-*.
357 # The _TARGET_ is because they're specified in mt-foo.
358 # The _HOST_ is because they're programs that run on the host.
359 EXTRA_TARGET_HOST_ALL_MODULES =
360 EXTRA_TARGET_HOST_INSTALL_MODULES =
361 EXTRA_TARGET_HOST_CHECK_MODULES =
363 #### host and target specific makefile fragments come in here.
366 # Flags to pass down to all sub-makes.
367 # Please keep these in alphabetical order.
368 BASE_FLAGS_TO_PASS = \
369 "AR_FLAGS=$(AR_FLAGS)" \
370 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
371 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
373 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
374 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
376 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
377 "CHILLFLAGS=$(CHILLFLAGS)" \
378 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
379 "CHILL_LIB=$(CHILL_LIB)" \
380 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
381 "CXXFLAGS=$(CXXFLAGS)" \
382 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
383 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
384 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
385 "INSTALL=$(INSTALL)" \
386 "INSTALL_DATA=$(INSTALL_DATA)" \
387 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
388 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
389 "LDFLAGS=$(LDFLAGS)" \
391 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
392 "LIBCFLAGS=$(LIBCFLAGS)" \
393 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
394 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
395 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
398 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
399 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
400 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
401 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
404 "RUNTEST=$(RUNTEST)" \
405 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
406 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
407 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
410 "datadir=$(datadir)" \
411 "exec_prefix=$(exec_prefix)" \
412 "includedir=$(includedir)" \
413 "infodir=$(infodir)" \
415 "libexecdir=$(libexecdir)" \
416 "lispdir=$(lispdir)" \
417 "localstatedir=$(localstatedir)" \
419 "oldincludedir=$(oldincludedir)" \
421 "sbindir=$(sbindir)" \
422 "sharedstatedir=$(sharedstatedir)" \
423 "sysconfdir=$(sysconfdir)" \
424 "tooldir=$(tooldir)" \
425 "gxx_include_dir=$(gxx_include_dir)" \
426 "gcc_version=$(gcc_version)" \
427 "gcc_version_trigger=$(gcc_version_trigger)" \
428 "target_alias=$(target_alias)" \
429 "libsubdir=$(libsubdir)"
431 # Flags to pass down to most sub-makes, in which we're building with
432 # the host environment.
433 # If any variables are added here, they must be added to do-*, below.
439 'DLLTOOL=$(DLLTOOL)' \
445 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
447 # Flags that are concerned with the location of the X11 include files
450 # NOTE: until the top-level is getting the values via autoconf, it only
451 # causes problems to have this top-level Makefile overriding the autoconf-set
452 # values in child directories. Only variables that don't conflict with
453 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
455 X11_FLAGS_TO_PASS = \
456 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
457 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
459 # Flags to pass down to makes which are built with the target environment.
460 # The double $ decreases the length of the command line; the variables
461 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
462 # If any variables are added here, they must be added to do-*, below.
463 EXTRA_TARGET_FLAGS = \
464 'AR=$$(AR_FOR_TARGET)' \
465 'AS=$$(AS_FOR_TARGET)' \
466 'CC=$$(CC_FOR_TARGET)' \
467 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
468 'CXX=$$(CXX_FOR_TARGET)' \
469 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
470 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
471 'LD=$$(LD_FOR_TARGET)' \
472 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
473 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
474 'NM=$$(NM_FOR_TARGET)' \
475 'RANLIB=$$(RANLIB_FOR_TARGET)' \
476 'WINDRES=$$(WINDRES_FOR_TARGET)'
478 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
480 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
481 # unfortunately needs the native compiler and the target ar and
483 # If any variables are added here, they must be added to do-*, below.
484 # The HOST_* variables are a special case, which are used for the gcc
485 # cross-building scheme.
491 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
492 'HOST_CC=$(CC_FOR_BUILD)' \
493 'HOST_PREFIX=$(HOST_PREFIX)' \
494 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
497 'WINDRES=$$(WINDRES_FOR_TARGET)' \
498 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
499 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
500 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
501 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
502 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
503 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
504 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
505 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
506 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
507 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
509 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
511 # This is a list of the targets for all of the modules which are compiled
512 # using $(FLAGS_TO_PASS).
577 $(EXTRA_TARGET_HOST_ALL_MODULES)
579 # This is a list of the check targets for all of the modules which are
580 # compiled using $(FLAGS_TO_PASS).
582 # The list is in two parts. The first lists those tools which
583 # are tested as part of the host's native tool-chain, and not
584 # tested in a cross configuration.
585 NATIVE_CHECK_MODULES = \
591 CROSS_CHECK_MODULES = \
647 $(EXTRA_TARGET_HOST_CHECK_MODULES)
649 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
651 # This is a list of the install targets for all of the modules which are
652 # compiled using $(FLAGS_TO_PASS).
653 # We put install-opcodes before install-binutils because the installed
654 # binutils might be on PATH, and they might need the shared opcodes
656 # We put install-tcl before install-itcl because itcl wants to run a
657 # program on installation which uses the Tcl libraries.
721 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
723 # This is a list of the targets for all of the modules which are compiled
724 # using $(X11_FLAGS_TO_PASS).
737 # This is a list of the check targets for all of the modules which are
738 # compiled using $(X11_FLAGS_TO_PASS).
739 CHECK_X11_MODULES = \
749 # This is a list of the install targets for all the modules which are
750 # compiled using $(X11_FLAGS_TO_PASS).
751 INSTALL_X11_MODULES = \
763 # This is a list of the targets for all of the modules which are compiled
764 # using $(TARGET_FLAGS_TO_PASS).
765 ALL_TARGET_MODULES = \
767 all-target-libstdc++ \
771 all-target-libtermcap \
773 all-target-libgloss \
774 all-target-libiberty \
776 all-target-examples \
781 # This is a list of the configure targets for all of the modules which
782 # are compiled using the target tools.
783 CONFIGURE_TARGET_MODULES = \
784 configure-target-libio \
785 configure-target-libstdc++ \
786 configure-target-librx \
787 configure-target-libg++ \
788 configure-target-newlib \
789 configure-target-libtermcap \
790 configure-target-winsup \
791 configure-target-libgloss \
792 configure-target-libiberty \
793 configure-target-gperf \
794 configure-target-examples \
795 configure-target-libstub \
796 configure-target-bsp \
797 configure-target-cygmon
799 # This is a list of the check targets for all of the modules which are
800 # compiled using $(TARGET_FLAGS_TO_PASS).
801 CHECK_TARGET_MODULES = \
803 check-target-libstdc++ \
804 check-target-libg++ \
805 check-target-newlib \
806 check-target-winsup \
807 check-target-libiberty \
810 # This is a list of the install targets for all of the modules which are
811 # compiled using $(TARGET_FLAGS_TO_PASS).
812 INSTALL_TARGET_MODULES = \
813 install-target-libio \
814 install-target-libstdc++ \
815 install-target-libg++ \
816 install-target-newlib \
817 install-target-libtermcap \
818 install-target-winsup \
819 install-target-libgloss \
820 install-target-libiberty \
824 # This is a list of the targets for which we can do a clean-{target}.
889 # All of the target modules that can be cleaned
890 CLEAN_TARGET_MODULES = \
892 clean-target-libstdc++ \
894 clean-target-libg++ \
895 clean-target-newlib \
896 clean-target-winsup \
897 clean-target-libgloss \
898 clean-target-libiberty \
900 clean-target-examples \
901 clean-target-libstub \
905 # All of the x11 modules that can be cleaned
906 CLEAN_X11_MODULES = \
917 # The target built for a native build.
922 $(ALL_TARGET_MODULES) \
925 # Do a target for all the subdirectories. A ``make do-X'' will do a
926 # ``make X'' in all subdirectories (because, in general, there is a
927 # dependency (below) of X upon do-X, a ``make X'' will also do this,
928 # but it may do additional work as well).
929 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
930 # because it is so large that it can easily overflow the command line
931 # length limit on some systems.
940 do-maintainer-clean \
944 @target=`echo $@ | sed -e 's/^do-//'`; \
946 s=`cd $(srcdir); pwd`; export s; \
948 for i in $(SUBDIRS) -dummy-; do \
949 if [ -f ./$$i/Makefile ]; then \
952 for flag in $(EXTRA_GCC_FLAGS); do \
953 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
957 for flag in $(EXTRA_HOST_FLAGS); do \
958 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
962 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
964 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
965 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
966 "RANLIB=$${RANLIB}" \
967 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
969 then true; else exit 1; fi; \
972 @target=`echo $@ | sed -e 's/^do-//'`; \
974 s=`cd $(srcdir); pwd`; export s; \
976 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
977 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
978 for flag in $(EXTRA_TARGET_FLAGS); do \
979 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
981 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
982 if (cd $(TARGET_SUBDIR)/$$i; \
983 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
984 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
985 "RANLIB=$${RANLIB}" \
986 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
988 then true; else exit 1; fi; \
992 # Here are the targets which correspond to the do-X targets.
994 .PHONY: info installcheck dvi install-info
995 .PHONY: clean distclean mostlyclean maintainer-clean realclean
996 .PHONY: local-clean local-distclean local-maintainer-clean
998 installcheck: do-installcheck
1001 # Make sure makeinfo is built before we do a `make info'.
1002 do-info: all-texinfo
1004 install-info: do-install-info dir.info
1005 s=`cd $(srcdir); pwd`; export s; \
1006 if [ -f dir.info ] ; then \
1007 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1011 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
1014 -rm -f Makefile config.status config.cache mh-frag mt-frag
1015 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1016 rm -rf $(TARGET_SUBDIR); \
1019 local-maintainer-clean:
1020 @echo "This command is intended for maintainers to use;"
1021 @echo "it deletes files that may require special tools to rebuild."
1023 clean: do-clean local-clean
1024 mostlyclean: do-mostlyclean local-clean
1025 distclean: do-distclean local-clean local-distclean
1026 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1027 maintainer-clean: local-distclean
1028 realclean: maintainer-clean
1030 # This rule is used to clean specific modules.
1031 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1032 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1033 @dir=`echo $@ | sed -e 's/clean-//'`; \
1034 if [ -f ./$${dir}/Makefile ] ; then \
1035 r=`pwd`; export r; \
1036 s=`cd $(srcdir); pwd`; export s; \
1038 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1043 .PHONY: $(CLEAN_TARGET_MODULES)
1044 $(CLEAN_TARGET_MODULES):
1045 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1046 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1047 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1048 r=`pwd`; export r; \
1049 s=`cd $(srcdir); pwd`; export s; \
1051 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1056 clean-target: $(CLEAN_TARGET_MODULES)
1061 check: $(CHECK_MODULES) \
1062 $(CHECK_TARGET_MODULES) \
1063 $(CHECK_X11_MODULES) \
1066 # Automated reporting of test results.
1068 warning.log: build.log
1069 $(srcdir)/contrib/warn_summary build.log > $@
1072 if test x'$(BOOT_CFLAGS)' != x''; then \
1073 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1075 $(srcdir)/contrib/test_summary -t >$@
1077 echo If you really want to send e-mail, run ./$@ now
1079 mail-report-with-warnings.log: warning.log
1080 if test x'$(BOOT_CFLAGS)' != x''; then \
1081 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1083 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1085 echo If you really want to send e-mail, run ./$@ now
1087 # Installation targets.
1089 .PHONY: install install-cross uninstall source-vault binary-vault vault-install
1090 install: $(INSTALL_TARGET)
1091 install-cross: $(INSTALL_TARGET_CROSS)
1094 @echo "the uninstall target is not supported in this tree"
1097 $(MAKE) -f ./release/Build-A-Release \
1098 host=$(host_alias) source-vault
1101 $(MAKE) -f ./release/Build-A-Release \
1102 host=$(host_alias) target=$(target_alias)
1105 @if [ -f ./release/vault-install ] ; then \
1106 ./release/vault-install $(host_alias) $(target_alias) ; \
1112 install.all: install-no-fixedincludes
1113 @if [ -f ./gcc/Makefile ] ; then \
1114 r=`pwd` ; export r ; \
1117 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1122 # inet-install is used because the I*Net wants DejaGNU installed but
1123 # not built. Similarly, gzip is built but not installed.
1125 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1127 # install-no-fixedincludes is used because Cygnus can not distribute
1128 # the fixed header files.
1129 .PHONY: install-no-fixedincludes
1130 install-no-fixedincludes: \
1132 $(INSTALL_MODULES) \
1133 $(INSTALL_TARGET_MODULES) \
1134 $(INSTALL_X11_MODULES) \
1135 gcc-no-fixedincludes
1137 # Install the gcc headers files, but not the fixed include files,
1138 # which Cygnus is not allowed to distribute. This rule is very
1139 # dependent on the workings of the gcc Makefile.in.
1140 .PHONY: gcc-no-fixedincludes
1141 gcc-no-fixedincludes:
1142 @if [ -f ./gcc/Makefile ]; then \
1143 rm -rf gcc/tmp-include; \
1144 mv gcc/include gcc/tmp-include 2>/dev/null; \
1145 mkdir gcc/include; \
1146 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1147 touch gcc/stmp-fixinc gcc/include/fixed; \
1148 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1149 r=`pwd`; export r; \
1150 s=`cd $(srcdir); pwd` ; export s; \
1153 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1154 rm -rf gcc/include; \
1155 mv gcc/tmp-include gcc/include 2>/dev/null; \
1159 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1160 # build a target all-X means to cd to X and make all.
1162 # all-gui, and all-libproc are handled specially because
1163 # they are still experimental, and if they fail to build, that
1164 # shouldn't stop "make all".
1165 .PHONY: $(ALL_MODULES) all-gui all-libproc
1166 $(ALL_MODULES) all-gui all-libproc:
1167 @dir=`echo $@ | sed -e 's/all-//'`; \
1168 if [ -f ./$${dir}/Makefile ] ; then \
1169 r=`pwd`; export r; \
1170 s=`cd $(srcdir); pwd`; export s; \
1172 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1177 # These rules are used to check the modules which use FLAGS_TO_PASS.
1178 # To build a target check-X means to cd to X and make check. Some
1179 # modules are only tested in a native toolchain.
1181 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1182 $(NATIVE_CHECK_MODULES):
1183 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1184 dir=`echo $@ | sed -e 's/check-//'`; \
1185 if [ -f ./$${dir}/Makefile ] ; then \
1186 r=`pwd`; export r; \
1187 s=`cd $(srcdir); pwd`; export s; \
1189 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1195 $(CROSS_CHECK_MODULES):
1196 @dir=`echo $@ | sed -e 's/check-//'`; \
1197 if [ -f ./$${dir}/Makefile ] ; then \
1198 r=`pwd`; export r; \
1199 s=`cd $(srcdir); pwd`; export s; \
1201 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1206 # This rule is used to install the modules which use FLAGS_TO_PASS.
1207 # To build a target install-X means to cd to X and make install.
1208 .PHONY: $(INSTALL_MODULES)
1209 $(INSTALL_MODULES): installdirs
1210 @dir=`echo $@ | sed -e 's/install-//'`; \
1211 if [ -f ./$${dir}/Makefile ] ; then \
1212 r=`pwd`; export r; \
1213 s=`cd $(srcdir); pwd`; export s; \
1215 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1220 # This rule is used to configure the modules which are built with the
1222 .PHONY: $(CONFIGURE_TARGET_MODULES)
1223 $(CONFIGURE_TARGET_MODULES):
1224 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1225 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1226 r=`pwd`; export r; \
1227 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1228 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1229 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1230 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1231 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1233 echo "Multilibs changed for $${dir}, reconfiguring"; \
1234 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1235 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1238 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1241 fi; exit 0 # break command into two pieces
1242 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1243 if [ ! -d $(TARGET_SUBDIR) ]; then \
1245 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1247 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1248 if [ -d $(srcdir)/$${dir} ]; then \
1249 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1250 r=`pwd`; export r; \
1251 s=`cd $(srcdir); pwd`; export s; \
1253 AR="$(AR_FOR_TARGET)"; export AR; \
1254 AS="$(AS_FOR_TARGET)"; export AS; \
1255 CC="$(CC_FOR_TARGET)"; export CC; \
1256 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1257 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1258 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1259 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1260 LD="$(LD_FOR_TARGET)"; export LD; \
1261 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1262 NM="$(NM_FOR_TARGET)"; export NM; \
1263 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1264 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1265 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1266 cd $(TARGET_SUBDIR)/$${dir}; \
1269 topdir=$(srcdir) ;; \
1271 case "$(TARGET_SUBDIR)" in \
1272 .) topdir="../$(srcdir)" ;; \
1273 *) topdir="../../$(srcdir)" ;; \
1276 if [ "$(srcdir)" = "." ] ; then \
1277 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1278 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1279 if [ -f Makefile ]; then \
1280 if $(MAKE) distclean; then \
1294 srcdiroption="--srcdir=."; \
1297 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1298 libsrcdir="$$s/$${dir}"; \
1300 if [ -f $${libsrcdir}/configure ] ; then \
1301 rm -f no-such-file skip-this-dir; \
1302 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1303 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1304 --with-target-subdir="$(TARGET_SUBDIR)"; \
1306 rm -f no-such-file skip-this-dir; \
1307 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1308 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1309 --with-target-subdir="$(TARGET_SUBDIR)"; \
1311 if [ -f skip-this-dir ] ; then \
1313 rm -f skip-this-dir; \
1314 cd ..; rmdir $${dir} || true; \
1325 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1326 # To build a target all-X means to cd to X and make all.
1327 .PHONY: $(ALL_TARGET_MODULES)
1328 $(ALL_TARGET_MODULES):
1329 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1330 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1331 r=`pwd`; export r; \
1332 s=`cd $(srcdir); pwd`; export s; \
1334 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1339 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1340 # To build a target install-X means to cd to X and make install.
1341 .PHONY: $(CHECK_TARGET_MODULES)
1342 $(CHECK_TARGET_MODULES):
1343 @dir=`echo $@ | sed -e 's/check-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) check);\
1353 # This rule is used to install the modules which use
1354 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1356 .PHONY: $(INSTALL_TARGET_MODULES)
1357 $(INSTALL_TARGET_MODULES): installdirs
1358 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1359 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1360 r=`pwd`; export r; \
1361 s=`cd $(srcdir); pwd`; export s; \
1363 (cd $(TARGET_SUBDIR)/$${dir}; \
1364 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1369 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1370 # To build a target all-X means to cd to X and make all.
1371 .PHONY: $(ALL_X11_MODULES)
1373 @dir=`echo $@ | sed -e 's/all-//'`; \
1374 if [ -f ./$${dir}/Makefile ] ; then \
1375 r=`pwd`; export r; \
1376 s=`cd $(srcdir); pwd`; export s; \
1379 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1384 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1385 # To build a target check-X means to cd to X and make all.
1386 .PHONY: $(CHECK_X11_MODULES)
1387 $(CHECK_X11_MODULES):
1388 @dir=`echo $@ | sed -e 's/check-//'`; \
1389 if [ -f ./$${dir}/Makefile ] ; then \
1390 r=`pwd`; export r; \
1391 s=`cd $(srcdir); pwd`; export s; \
1394 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1399 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1400 # To build a target install-X means to cd to X and make install.
1401 .PHONY: $(INSTALL_X11_MODULES)
1402 $(INSTALL_X11_MODULES): installdirs
1403 @dir=`echo $@ | sed -e 's/install-//'`; \
1404 if [ -f ./$${dir}/Makefile ] ; then \
1405 r=`pwd`; export r; \
1406 s=`cd $(srcdir); pwd`; export s; \
1409 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1414 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1417 @if [ -f ./gcc/Makefile ] ; then \
1418 r=`pwd`; export r; \
1419 s=`cd $(srcdir); pwd`; export s; \
1421 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1426 # Building GCC uses some tools for rebuilding "source" files
1427 # like texinfo, bison/byacc, etc. So we must depend on those.
1429 # While building GCC, it may be necessary to run various target
1430 # programs like the assembler, linker, etc. So we depend on
1433 # In theory, on an SMP all those dependencies can be resolved
1436 .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1437 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1438 @r=`pwd`; export r; \
1439 s=`cd $(srcdir); pwd`; export s; \
1441 echo "Bootstrapping the compiler"; \
1442 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
1443 @r=`pwd`; export r; \
1444 s=`cd $(srcdir); pwd`; export s; \
1446 *bootstrap4-lean ) \
1447 msg="Comparing stage3 and stage4 of the compiler"; \
1448 compare=compare3-lean ;; \
1449 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1450 compare=compare3 ;; \
1451 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
1452 compare=compare-lean ;; \
1453 * ) msg="Comparing stage2 and stage3 of the compiler"; \
1454 compare=compare ;; \
1458 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
1459 @r=`pwd`; export r; \
1460 s=`cd $(srcdir); pwd` ; export s; \
1462 echo "Building runtime libraries"; \
1463 $(MAKE) $(BASE_FLAGS_TO_PASS) all
1466 cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1467 @r=`pwd`; export r; \
1468 s=`cd $(srcdir); pwd`; export s; \
1470 echo "Building the C and C++ compiler"; \
1471 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
1472 @r=`pwd`; export r; \
1473 s=`cd $(srcdir); pwd` ; export s; \
1475 echo "Building runtime libraries"; \
1476 $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++"
1480 @if [ -f ./gcc/Makefile ] ; then \
1481 r=`pwd`; export r; \
1482 s=`cd $(srcdir); pwd`; export s; \
1484 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1491 @if [ -f ./gcc/Makefile ] ; then \
1492 r=`pwd`; export r; \
1493 s=`cd $(srcdir); pwd`; export s; \
1495 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1500 .PHONY: install-gcc-cross
1502 @if [ -f ./gcc/Makefile ] ; then \
1503 r=`pwd`; export r; \
1504 s=`cd $(srcdir); pwd`; export s; \
1506 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1510 # EXPERIMENTAL STUFF
1511 # This rule is used to install the modules which use FLAGS_TO_PASS.
1512 # To build a target install-X means to cd to X and make install.
1513 .PHONY: install-dosrel
1514 install-dosrel: installdirs info
1515 @dir=`echo $@ | sed -e 's/install-//'`; \
1516 if [ -f ./$${dir}/Makefile ] ; then \
1517 r=`pwd`; export r; \
1518 s=`cd $(srcdir); pwd`; export s; \
1520 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1525 install-dosrel-fake:
1528 # This is a list of inter-dependencies among modules.
1531 all-autoconf: all-m4 all-texinfo
1532 all-automake: all-m4 all-texinfo
1534 all-bfd: all-libiberty all-intl
1535 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1536 all-bison: all-texinfo
1537 configure-target-bsp: $(ALL_GCC)
1538 all-target-bsp: configure-target-bsp all-gcc all-binutils all-target-newlib
1542 configure-target-cygmon: $(ALL_GCC)
1543 all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub all-target-bsp
1545 all-dejagnu: all-tcl all-expect all-tk
1546 all-diff: all-libiberty
1548 all-emacs19: all-bison all-byacc
1550 configure-target-examples: $(ALL_GCC)
1551 all-target-examples: configure-target-examples
1552 all-expect: all-tcl all-tk
1553 all-fileutils: all-libiberty
1556 all-flex: all-libiberty all-bison all-byacc
1557 all-gas: all-libiberty all-opcodes all-bfd all-intl
1561 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1562 all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1563 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1564 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1567 configure-target-gperf: $(ALL_GCC)
1568 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
1569 all-gprof: all-libiberty all-bfd all-opcodes all-intl
1570 all-grez: all-libiberty all-bfd all-opcodes
1571 all-gui: all-gdb all-libproc all-target-librx
1573 all-gzip: all-libiberty
1574 all-hello: all-libiberty
1576 all-inet: all-tcl all-send-pr all-perl
1578 all-ispell: all-emacs19
1579 all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1
1580 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1581 configure-target-libg++: $(ALL_GCC) configure-target-librx
1582 all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
1583 configure-target-libgloss: $(ALL_GCC)
1584 all-target-libgloss: configure-target-libgloss configure-target-newlib
1585 configure-target-libio: $(ALL_GCC)
1586 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1588 all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1590 configure-target-librx: $(ALL_GCC) configure-target-newlib
1591 all-target-librx: configure-target-librx
1592 configure-target-libstdc++: $(ALL_GCC)
1593 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1594 configure-target-libstub: $(ALL_GCC)
1595 all-target-libstub: configure-target-libstub
1597 all-m4: all-libiberty
1598 all-make: all-libiberty
1600 configure-target-newlib: $(ALL_GCC)
1601 configure-target-libtermcap: $(ALL_GCC)
1602 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1603 all-target-libtermcap: configure-target-libtermcap all-binutils all-gas all-gcc
1604 all-opcodes: all-bfd all-libiberty
1605 all-patch: all-libiberty
1607 all-prms: all-libiberty
1610 all-recode: all-libiberty
1611 all-sed: all-libiberty
1612 all-send-pr: all-prms
1614 all-sim: all-libiberty all-bfd all-opcodes all-readline
1615 all-tar: all-libiberty
1618 all-tclX: all-tcl all-tk
1620 all-tk8.1: all-tcl8.1
1621 all-texinfo: all-libiberty
1623 all-tgas: all-libiberty all-bfd all-opcodes
1625 all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1
1627 all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup
1628 configure-target-winsup: configure-target-newlib
1629 all-uudecode: all-libiberty
1631 configure-target-libiberty: $(ALL_GCC)
1632 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1633 all-target: $(ALL_TARGET_MODULES)
1634 install-target: $(INSTALL_TARGET_MODULES)
1635 ### other supporting targets
1641 installdirs: mkinstalldirs
1642 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1644 dir.info: do-install-info
1645 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1646 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1647 mv -f dir.info.new dir.info ; \
1652 @echo "Building a full distribution of this tree isn't done"
1653 @echo "via 'make dist'. Check out the etc/ subdirectory"
1657 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1658 # ability to use several tags files at once, so there is probably no need
1659 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1660 # (if we felt like it) have this Makefile write a piece of elisp which
1661 # the user could load to tell emacs19 where all the TAGS files we just
1665 # with the gnu make, this is done automatically.
1667 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
1668 $(SHELL) ./config.status
1671 # Support for building net releases
1673 # Files in devo used in any net release.
1674 # ChangeLog omitted because it may refer to files which are not in this
1675 # distribution (perhaps it would be better to include it anyway).
1676 DEVO_SUPPORT= README Makefile.in configure configure.in \
1677 config.guess config.if config.sub config move-if-change \
1678 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1679 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1680 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1682 # Files in devo/etc used in any net release.
1683 # ChangeLog omitted because it may refer to files which are not in this
1684 # distribution (perhaps it would be better to include it anyway).
1685 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1686 make-stds.texi standards.info*
1688 # When you use `make setup-dirs' or `make taz' you should always redefine
1690 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1694 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1695 # Take out texinfo from a few places.
1696 sed -e '/^all\.normal: /s/\all-texinfo //' \
1697 -e '/^ install-texinfo /d' \
1699 mv -f tmp Makefile.in
1702 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1703 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1704 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1705 # Make links, and run "make diststuff" or "make info" when needed.
1706 rm -rf proto-toplev ; mkdir proto-toplev
1707 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1708 for d in $$dirs ; do \
1709 if [ -d $$d ]; then \
1710 if [ ! -f $$d/Makefile ] ; then true ; \
1711 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1712 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1713 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1714 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1716 if [ -d $$d/proto-$$d.dir ]; then \
1717 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1719 ln -s ../$$d proto-toplev/$$d ; \
1721 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1723 cd etc ; $(MAKE) info
1726 mkdir proto-toplev/etc
1727 (cd proto-toplev/etc; \
1728 for i in $(ETC_SUPPORT); do \
1729 ln -s ../../etc/$$i . ; \
1732 # Take out texinfo from configurable dirs
1733 rm proto-toplev/configure.in
1734 sed -e '/^host_tools=/s/texinfo //' \
1735 <configure.in >proto-toplev/configure.in
1737 mkdir proto-toplev/texinfo
1738 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1739 if test -r texinfo/util/tex3patch ; then \
1740 mkdir proto-toplev/texinfo/util && \
1741 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1743 chmod -R og=u . || chmod og=u `find . -print`
1744 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1745 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1747 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1749 $(MAKE) -f Makefile.in do-tar-bz2 TOOL=$(TOOL) VER=$$ver
1752 echo "==> Making $(TOOL)-$(VER).tar.bz2"
1753 -rm -f $(TOOL)-$(VER)
1754 ln -s proto-toplev $(TOOL)-$(VER)
1755 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1756 $(BZIPPROG) -v -9 $(TOOL)-$(VER).tar
1758 TEXINFO_SUPPORT= texinfo/texinfo.tex
1759 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1762 GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep
1763 gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1764 $(MAKE) -f Makefile.in taz TOOL=gas \
1765 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1767 # The FSF "binutils" release includes gprof and ld.
1768 .PHONY: binutils.tar.bz2
1769 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep
1770 binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1771 $(MAKE) -f Makefile.in taz TOOL=binutils \
1772 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)"
1774 .PHONY: gas+binutils.tar.bz2
1775 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1776 gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1777 $(MAKE) -f Makefile.in taz TOOL=gas \
1778 SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
1780 .PHONY: libg++.tar.bz2
1781 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1782 libg++.tar.bz2: $(DIST_SUPPORT) libg++
1783 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1784 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1786 GNATS_SUPPORT_DIRS=include libiberty send-pr
1787 gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1788 $(MAKE) -f Makefile.in taz TOOL=gnats \
1789 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1792 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
1793 gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1794 $(MAKE) -f Makefile.in taz TOOL=gdb \
1795 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
1797 .PHONY: newlib.tar.bz2
1798 NEWLIB_SUPPORT_DIRS=libgloss
1799 # taz configures for the sun4 target which won't configure newlib.
1800 # We need newlib configured so that the .info files are made.
1801 # Unfortunately, it is not enough to just configure newlib separately:
1802 # taz will build the .info files but since SUBDIRS won't contain newlib,
1803 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1804 # used in building the .info files, eg: *.def, *.ref).
1805 # The problem isn't solvable however without a lot of extra work because
1806 # target libraries are built in subdir $(target_alias) which gets nuked during
1807 # the make distclean. For now punt on the issue of shipping newlib info files
1808 # with newlib net releases and wait for a day when some native target (sun4?)
1809 # supports newlib (if only minimally).
1810 newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1811 $(MAKE) -f Makefile.in taz TOOL=newlib \
1812 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1813 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1818 # end of Makefile.in