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.
88 CFLAGS_FOR_TARGET = $(CFLAGS)
90 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
94 CHILLFLAGS = $(CFLAGS)
98 # Use -O2 to stress test the compiler.
99 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions
100 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
101 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions
114 # These values are substituted by configure.
119 BISON = `if [ -f $$r/bison/bison ] ; then \
120 echo $$r/bison/bison -L $$s/bison/ ; \
125 YACC = `if [ -f $$r/bison/bison ] ; then \
126 echo $$r/bison/bison -y -L $$s/bison/ ; \
127 elif [ -f $$r/byacc/byacc ] ; then \
128 echo $$r/byacc/byacc ; \
130 echo ${DEFAULT_YACC} ; \
133 LEX = `if [ -f $$r/flex/flex ] ; \
134 then echo $$r/flex/flex ; \
135 else echo ${DEFAULT_LEX} ; fi`
137 M4 = `if [ -f $$r/m4/m4 ] ; \
138 then echo $$r/m4/m4 ; \
139 else echo ${DEFAULT_M4} ; fi`
141 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
142 then echo $$r/texinfo/makeinfo/makeinfo ; \
143 else echo makeinfo ; fi`
145 # This just becomes part of the MAKEINFO definition passed down to
146 # sub-makes. It lets flags be given on the command line while still
147 # using the makeinfo from the object tree.
150 EXPECT = `if [ -f $$r/expect/expect ] ; \
151 then echo $$r/expect/expect ; \
152 else echo expect ; fi`
154 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
155 then echo $$s/dejagnu/runtest ; \
156 else echo runtest ; fi`
159 # compilers to use to create programs which must be run in the build
162 CXX_FOR_BUILD = $(CXX)
164 SUBDIRS = "this is set via configure, don't edit this"
167 # This is set by the configure script to the list of directories which
168 # should be built using the target tools.
171 TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon
173 # Target libraries are put under this directory:
174 # Changed by configure to $(target_alias) if cross.
177 # This is set by the configure script to the arguments passed to configure.
180 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
184 # This is the name of the environment variable used for the path to
185 # the libraries. This may be changed by configure.in.
186 RPATH_ENVVAR = LD_LIBRARY_PATH
188 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
189 REALLY_SET_LIB_PATH = \
190 if [ x"$$$(RPATH_ENVVAR)" != x ]; then \
191 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
193 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \
195 export $(RPATH_ENVVAR);
198 INSTALL_TARGET = installdirs \
201 $(INSTALL_TARGET_MODULES) \
202 $(INSTALL_X11_MODULES) \
205 INSTALL_TARGET_CROSS = installdirs \
208 $(INSTALL_TARGET_MODULES) \
209 $(INSTALL_X11_MODULES) \
213 if [ -f $$r/gcc/xgcc ] ; then \
214 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
215 case "$(target_canonical)" in \
216 i[3456]86-*-cygwin*) \
217 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; \
220 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
224 echo $$r/gcc/xgcc -B$$r/gcc/; \
227 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
230 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
234 # If CC_FOR_TARGET is not overriden on the command line, then this
235 # variable is passed down to the gcc Makefile, where it is used to
236 # build libgcc2.a. We define it here so that it can itself be
237 # overridden on the command line.
238 GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
240 CHILL_FOR_TARGET = ` \
241 if [ -f $$r/gcc/xgcc ] ; then \
242 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
244 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
247 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
252 if [ -f $$r/gcc/xgcc ] ; then \
253 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
254 case "$(target_canonical)" in \
255 i[3456]86-*-cygwin*) \
256 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; \
259 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
263 echo $$r/gcc/xgcc -B$$r/gcc/; \
266 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
269 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
274 if [ -f $$r/gas/as-new ] ; then \
275 echo $$r/gas/as-new ; \
277 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
280 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
285 if [ -f $$r/ld/ld-new ] ; then \
286 echo $$r/ld/ld-new ; \
288 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
291 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
295 DLLTOOL_FOR_TARGET = ` \
296 if [ -f $$r/binutils/dlltool ] ; then \
297 echo $$r/binutils/dlltool ; \
299 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
302 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
306 WINDRES_FOR_TARGET = ` \
307 if [ -f $$r/binutils/windres ] ; then \
308 echo $$r/binutils/windres ; \
310 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
313 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
318 if [ -f $$r/binutils/ar ] ; then \
319 echo $$r/binutils/ar ; \
321 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
324 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
328 RANLIB_FOR_TARGET = ` \
329 if [ -f $$r/binutils/ranlib ] ; then \
330 echo $$r/binutils/ranlib ; \
332 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
335 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
340 if [ -f $$r/binutils/nm-new ] ; then \
341 echo $$r/binutils/nm-new ; \
343 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
346 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
350 # The first rule in the file had better be this one. Don't put any above it.
351 # This lives here to allow makefile fragments to contain dependencies.
355 # These can be overridden by config/mt-*.
356 # The _TARGET_ is because they're specified in mt-foo.
357 # The _HOST_ is because they're programs that run on the host.
358 EXTRA_TARGET_HOST_ALL_MODULES =
359 EXTRA_TARGET_HOST_INSTALL_MODULES =
360 EXTRA_TARGET_HOST_CHECK_MODULES =
362 #### host and target specific makefile fragments come in here.
365 # Flags to pass down to all sub-makes.
366 # Please keep these in alphabetical order.
367 BASE_FLAGS_TO_PASS = \
368 "AR_FLAGS=$(AR_FLAGS)" \
369 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
370 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
372 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
373 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
375 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
376 "CHILLFLAGS=$(CHILLFLAGS)" \
377 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
378 "CHILL_LIB=$(CHILL_LIB)" \
379 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
380 "CXXFLAGS=$(CXXFLAGS)" \
381 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
382 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
383 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
384 "INSTALL=$(INSTALL)" \
385 "INSTALL_DATA=$(INSTALL_DATA)" \
386 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
387 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
388 "LDFLAGS=$(LDFLAGS)" \
390 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
391 "LIBCFLAGS=$(LIBCFLAGS)" \
392 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
393 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
394 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
397 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
398 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
399 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
400 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
403 "RUNTEST=$(RUNTEST)" \
404 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
405 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
406 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
409 "datadir=$(datadir)" \
410 "exec_prefix=$(exec_prefix)" \
411 "includedir=$(includedir)" \
412 "infodir=$(infodir)" \
414 "libexecdir=$(libexecdir)" \
415 "lispdir=$(lispdir)" \
416 "localstatedir=$(localstatedir)" \
418 "oldincludedir=$(oldincludedir)" \
420 "sbindir=$(sbindir)" \
421 "sharedstatedir=$(sharedstatedir)" \
422 "sysconfdir=$(sysconfdir)" \
423 "tooldir=$(tooldir)" \
424 "gxx_include_dir=$(gxx_include_dir)" \
425 "gcc_version=$(gcc_version)" \
426 "gcc_version_trigger=$(gcc_version_trigger)" \
427 "target_alias=$(target_alias)" \
428 "libsubdir=$(libsubdir)"
430 # Flags to pass down to most sub-makes, in which we're building with
431 # the host environment.
432 # If any variables are added here, they must be added to do-*, below.
438 'DLLTOOL=$(DLLTOOL)' \
444 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
446 # Flags that are concerned with the location of the X11 include files
449 # NOTE: until the top-level is getting the values via autoconf, it only
450 # causes problems to have this top-level Makefile overriding the autoconf-set
451 # values in child directories. Only variables that don't conflict with
452 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
454 X11_FLAGS_TO_PASS = \
455 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
456 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
458 # Flags to pass down to makes which are built with the target environment.
459 # The double $ decreases the length of the command line; the variables
460 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
461 # If any variables are added here, they must be added to do-*, below.
462 EXTRA_TARGET_FLAGS = \
463 'AR=$$(AR_FOR_TARGET)' \
464 'AS=$$(AS_FOR_TARGET)' \
465 'CC=$$(CC_FOR_TARGET)' \
466 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
467 'CXX=$$(CXX_FOR_TARGET)' \
468 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
469 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
470 'LD=$$(LD_FOR_TARGET)' \
471 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
472 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
473 'NM=$$(NM_FOR_TARGET)' \
474 'RANLIB=$$(RANLIB_FOR_TARGET)' \
475 'WINDRES=$$(WINDRES_FOR_TARGET)'
477 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
479 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
480 # unfortunately needs the native compiler and the target ar and
482 # If any variables are added here, they must be added to do-*, below.
483 # The HOST_* variables are a special case, which are used for the gcc
484 # cross-building scheme.
490 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
491 'HOST_CC=$(CC_FOR_BUILD)' \
492 'HOST_PREFIX=$(HOST_PREFIX)' \
493 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
496 'WINDRES=$$(WINDRES_FOR_TARGET)' \
497 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
498 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
499 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
500 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
501 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
502 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
503 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
504 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
505 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
506 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
508 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
510 # This is a list of the targets for all of the modules which are compiled
511 # using $(FLAGS_TO_PASS).
576 $(EXTRA_TARGET_HOST_ALL_MODULES)
578 # This is a list of the check targets for all of the modules which are
579 # compiled using $(FLAGS_TO_PASS).
581 # The list is in two parts. The first lists those tools which
582 # are tested as part of the host's native tool-chain, and not
583 # tested in a cross configuration.
584 NATIVE_CHECK_MODULES = \
590 CROSS_CHECK_MODULES = \
646 $(EXTRA_TARGET_HOST_CHECK_MODULES)
648 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
650 # This is a list of the install targets for all of the modules which are
651 # compiled using $(FLAGS_TO_PASS).
652 # We put install-opcodes before install-binutils because the installed
653 # binutils might be on PATH, and they might need the shared opcodes
655 # We put install-tcl before install-itcl because itcl wants to run a
656 # program on installation which uses the Tcl libraries.
720 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
722 # This is a list of the targets for all of the modules which are compiled
723 # using $(X11_FLAGS_TO_PASS).
736 # This is a list of the check targets for all of the modules which are
737 # compiled using $(X11_FLAGS_TO_PASS).
738 CHECK_X11_MODULES = \
748 # This is a list of the install targets for all the modules which are
749 # compiled using $(X11_FLAGS_TO_PASS).
750 INSTALL_X11_MODULES = \
762 # This is a list of the targets for all of the modules which are compiled
763 # using $(TARGET_FLAGS_TO_PASS).
764 ALL_TARGET_MODULES = \
766 all-target-libstdc++ \
770 all-target-libtermcap \
772 all-target-libgloss \
773 all-target-libiberty \
775 all-target-examples \
780 # This is a list of the configure targets for all of the modules which
781 # are compiled using the target tools.
782 CONFIGURE_TARGET_MODULES = \
783 configure-target-libio \
784 configure-target-libstdc++ \
785 configure-target-librx \
786 configure-target-libg++ \
787 configure-target-newlib \
788 configure-target-libtermcap \
789 configure-target-winsup \
790 configure-target-libgloss \
791 configure-target-libiberty \
792 configure-target-gperf \
793 configure-target-examples \
794 configure-target-libstub \
795 configure-target-bsp \
796 configure-target-cygmon
798 # This is a list of the check targets for all of the modules which are
799 # compiled using $(TARGET_FLAGS_TO_PASS).
800 CHECK_TARGET_MODULES = \
802 check-target-libstdc++ \
803 check-target-libg++ \
804 check-target-newlib \
805 check-target-winsup \
806 check-target-libiberty \
809 # This is a list of the install targets for all of the modules which are
810 # compiled using $(TARGET_FLAGS_TO_PASS).
811 INSTALL_TARGET_MODULES = \
812 install-target-libio \
813 install-target-libstdc++ \
814 install-target-libg++ \
815 install-target-newlib \
816 install-target-libtermcap \
817 install-target-winsup \
818 install-target-libgloss \
819 install-target-libiberty \
823 # This is a list of the targets for which we can do a clean-{target}.
888 # All of the target modules that can be cleaned
889 CLEAN_TARGET_MODULES = \
891 clean-target-libstdc++ \
893 clean-target-libg++ \
894 clean-target-newlib \
895 clean-target-winsup \
896 clean-target-libgloss \
897 clean-target-libiberty \
899 clean-target-examples \
900 clean-target-libstub \
904 # All of the x11 modules that can be cleaned
905 CLEAN_X11_MODULES = \
916 # The target built for a native build.
921 $(ALL_TARGET_MODULES) \
924 # Do a target for all the subdirectories. A ``make do-X'' will do a
925 # ``make X'' in all subdirectories (because, in general, there is a
926 # dependency (below) of X upon do-X, a ``make X'' will also do this,
927 # but it may do additional work as well).
928 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
929 # because it is so large that it can easily overflow the command line
930 # length limit on some systems.
939 do-maintainer-clean \
943 @target=`echo $@ | sed -e 's/^do-//'`; \
945 s=`cd $(srcdir); pwd`; export s; \
947 for i in $(SUBDIRS) -dummy-; do \
948 if [ -f ./$$i/Makefile ]; then \
951 for flag in $(EXTRA_GCC_FLAGS); do \
952 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
956 for flag in $(EXTRA_HOST_FLAGS); do \
957 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
961 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
963 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
964 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
965 "RANLIB=$${RANLIB}" \
966 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
968 then true; else exit 1; fi; \
971 @target=`echo $@ | sed -e 's/^do-//'`; \
973 s=`cd $(srcdir); pwd`; export s; \
975 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
976 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
977 for flag in $(EXTRA_TARGET_FLAGS); do \
978 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
980 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
981 if (cd $(TARGET_SUBDIR)/$$i; \
982 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
983 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
984 "RANLIB=$${RANLIB}" \
985 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
987 then true; else exit 1; fi; \
991 # Here are the targets which correspond to the do-X targets.
993 .PHONY: info installcheck dvi install-info
994 .PHONY: clean distclean mostlyclean maintainer-clean realclean
995 .PHONY: local-clean local-distclean local-maintainer-clean
997 installcheck: do-installcheck
1000 # Make sure makeinfo is built before we do a `make info'.
1001 do-info: all-texinfo
1003 install-info: do-install-info dir.info
1004 s=`cd $(srcdir); pwd`; export s; \
1005 if [ -f dir.info ] ; then \
1006 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1010 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
1013 -rm -f Makefile config.status config.cache mh-frag mt-frag
1014 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1015 rm -rf $(TARGET_SUBDIR); \
1018 local-maintainer-clean:
1019 @echo "This command is intended for maintainers to use;"
1020 @echo "it deletes files that may require special tools to rebuild."
1022 clean: do-clean local-clean
1023 mostlyclean: do-mostlyclean local-clean
1024 distclean: do-distclean local-clean local-distclean
1025 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1026 maintainer-clean: local-distclean
1027 realclean: maintainer-clean
1029 # This rule is used to clean specific modules.
1030 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1031 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1032 @dir=`echo $@ | sed -e 's/clean-//'`; \
1033 if [ -f ./$${dir}/Makefile ] ; then \
1034 r=`pwd`; export r; \
1035 s=`cd $(srcdir); pwd`; export s; \
1037 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1042 .PHONY: $(CLEAN_TARGET_MODULES)
1043 $(CLEAN_TARGET_MODULES):
1044 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1045 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1046 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1047 r=`pwd`; export r; \
1048 s=`cd $(srcdir); pwd`; export s; \
1050 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1055 clean-target: $(CLEAN_TARGET_MODULES)
1060 check: $(CHECK_MODULES) \
1061 $(CHECK_TARGET_MODULES) \
1062 $(CHECK_X11_MODULES) \
1065 # Automated reporting of test results.
1067 warning.log: build.log
1068 $(srcdir)/contrib/warn_summary build.log > $@
1071 if test x'$(BOOT_CFLAGS)' != x''; then \
1072 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1074 $(srcdir)/contrib/test_summary -t >$@
1076 echo If you really want to send e-mail, run ./$@ now
1078 mail-report-with-warnings.log: warning.log
1079 if test x'$(BOOT_CFLAGS)' != x''; then \
1080 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1082 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1084 echo If you really want to send e-mail, run ./$@ now
1086 # Installation targets.
1088 .PHONY: install install-cross uninstall source-vault binary-vault vault-install
1089 install: $(INSTALL_TARGET)
1090 install-cross: $(INSTALL_TARGET_CROSS)
1093 @echo "the uninstall target is not supported in this tree"
1096 $(MAKE) -f ./release/Build-A-Release \
1097 host=$(host_alias) source-vault
1100 $(MAKE) -f ./release/Build-A-Release \
1101 host=$(host_alias) target=$(target_alias)
1104 @if [ -f ./release/vault-install ] ; then \
1105 ./release/vault-install $(host_alias) $(target_alias) ; \
1111 install.all: install-no-fixedincludes
1112 @if [ -f ./gcc/Makefile ] ; then \
1113 r=`pwd` ; export r ; \
1116 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1121 # inet-install is used because the I*Net wants DejaGNU installed but
1122 # not built. Similarly, gzip is built but not installed.
1124 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1126 # install-no-fixedincludes is used because Cygnus can not distribute
1127 # the fixed header files.
1128 .PHONY: install-no-fixedincludes
1129 install-no-fixedincludes: \
1131 $(INSTALL_MODULES) \
1132 $(INSTALL_TARGET_MODULES) \
1133 $(INSTALL_X11_MODULES) \
1134 gcc-no-fixedincludes
1136 # Install the gcc headers files, but not the fixed include files,
1137 # which Cygnus is not allowed to distribute. This rule is very
1138 # dependent on the workings of the gcc Makefile.in.
1139 .PHONY: gcc-no-fixedincludes
1140 gcc-no-fixedincludes:
1141 @if [ -f ./gcc/Makefile ]; then \
1142 rm -rf gcc/tmp-include; \
1143 mv gcc/include gcc/tmp-include 2>/dev/null; \
1144 mkdir gcc/include; \
1145 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1146 touch gcc/stmp-fixinc gcc/include/fixed; \
1147 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1148 r=`pwd`; export r; \
1149 s=`cd $(srcdir); pwd` ; export s; \
1152 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1153 rm -rf gcc/include; \
1154 mv gcc/tmp-include gcc/include 2>/dev/null; \
1158 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1159 # build a target all-X means to cd to X and make all.
1161 # all-gui, and all-libproc are handled specially because
1162 # they are still experimental, and if they fail to build, that
1163 # shouldn't stop "make all".
1164 .PHONY: $(ALL_MODULES) all-gui all-libproc
1165 $(ALL_MODULES) all-gui all-libproc:
1166 @dir=`echo $@ | sed -e 's/all-//'`; \
1167 if [ -f ./$${dir}/Makefile ] ; then \
1168 r=`pwd`; export r; \
1169 s=`cd $(srcdir); pwd`; export s; \
1171 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1176 # These rules are used to check the modules which use FLAGS_TO_PASS.
1177 # To build a target check-X means to cd to X and make check. Some
1178 # modules are only tested in a native toolchain.
1180 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1181 $(NATIVE_CHECK_MODULES):
1182 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1183 dir=`echo $@ | sed -e 's/check-//'`; \
1184 if [ -f ./$${dir}/Makefile ] ; then \
1185 r=`pwd`; export r; \
1186 s=`cd $(srcdir); pwd`; export s; \
1188 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1194 $(CROSS_CHECK_MODULES):
1195 @dir=`echo $@ | sed -e 's/check-//'`; \
1196 if [ -f ./$${dir}/Makefile ] ; then \
1197 r=`pwd`; export r; \
1198 s=`cd $(srcdir); pwd`; export s; \
1200 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1205 # This rule is used to install the modules which use FLAGS_TO_PASS.
1206 # To build a target install-X means to cd to X and make install.
1207 .PHONY: $(INSTALL_MODULES)
1208 $(INSTALL_MODULES): installdirs
1209 @dir=`echo $@ | sed -e 's/install-//'`; \
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) install); \
1219 # This rule is used to configure the modules which are built with the
1221 .PHONY: $(CONFIGURE_TARGET_MODULES)
1222 $(CONFIGURE_TARGET_MODULES):
1223 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1224 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1225 r=`pwd`; export r; \
1226 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1227 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1228 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1229 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1230 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1232 echo "Multilibs changed for $${dir}, reconfiguring"; \
1233 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1234 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1237 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1240 fi; exit 0 # break command into two pieces
1241 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1242 if [ ! -d $(TARGET_SUBDIR) ]; then \
1244 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1246 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1247 if [ -d $(srcdir)/$${dir} ]; then \
1248 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1249 r=`pwd`; export r; \
1250 s=`cd $(srcdir); pwd`; export s; \
1252 AR="$(AR_FOR_TARGET)"; export AR; \
1253 AS="$(AS_FOR_TARGET)"; export AS; \
1254 CC="$(CC_FOR_TARGET)"; export CC; \
1255 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1256 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1257 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1258 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1259 LD="$(LD_FOR_TARGET)"; export LD; \
1260 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1261 NM="$(NM_FOR_TARGET)"; export NM; \
1262 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1263 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1264 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1265 cd $(TARGET_SUBDIR)/$${dir}; \
1268 topdir=$(srcdir) ;; \
1270 case "$(TARGET_SUBDIR)" in \
1271 .) topdir="../$(srcdir)" ;; \
1272 *) topdir="../../$(srcdir)" ;; \
1275 if [ "$(srcdir)" = "." ] ; then \
1276 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1277 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1278 if [ -f Makefile ]; then \
1279 if $(MAKE) distclean; then \
1293 srcdiroption="--srcdir=."; \
1296 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1297 libsrcdir="$$s/$${dir}"; \
1299 if [ -f $${libsrcdir}/configure ] ; then \
1300 rm -f no-such-file skip-this-dir; \
1301 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1302 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1303 --with-target-subdir="$(TARGET_SUBDIR)"; \
1305 rm -f no-such-file skip-this-dir; \
1306 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1307 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1308 --with-target-subdir="$(TARGET_SUBDIR)"; \
1310 if [ -f skip-this-dir ] ; then \
1312 rm -f skip-this-dir; \
1313 cd ..; rmdir $${dir} || true; \
1324 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1325 # To build a target all-X means to cd to X and make all.
1326 .PHONY: $(ALL_TARGET_MODULES)
1327 $(ALL_TARGET_MODULES):
1328 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1329 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1330 r=`pwd`; export r; \
1331 s=`cd $(srcdir); pwd`; export s; \
1333 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1338 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1339 # To build a target install-X means to cd to X and make install.
1340 .PHONY: $(CHECK_TARGET_MODULES)
1341 $(CHECK_TARGET_MODULES):
1342 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1343 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1344 r=`pwd`; export r; \
1345 s=`cd $(srcdir); pwd`; export s; \
1347 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1352 # This rule is used to install the modules which use
1353 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1355 .PHONY: $(INSTALL_TARGET_MODULES)
1356 $(INSTALL_TARGET_MODULES): installdirs
1357 @dir=`echo $@ | sed -e 's/install-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}; \
1363 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1368 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1369 # To build a target all-X means to cd to X and make all.
1370 .PHONY: $(ALL_X11_MODULES)
1372 @dir=`echo $@ | sed -e 's/all-//'`; \
1373 if [ -f ./$${dir}/Makefile ] ; then \
1374 r=`pwd`; export r; \
1375 s=`cd $(srcdir); pwd`; export s; \
1378 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1383 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1384 # To build a target check-X means to cd to X and make all.
1385 .PHONY: $(CHECK_X11_MODULES)
1386 $(CHECK_X11_MODULES):
1387 @dir=`echo $@ | sed -e 's/check-//'`; \
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) check); \
1398 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1399 # To build a target install-X means to cd to X and make install.
1400 .PHONY: $(INSTALL_X11_MODULES)
1401 $(INSTALL_X11_MODULES): installdirs
1402 @dir=`echo $@ | sed -e 's/install-//'`; \
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) install); \
1413 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1416 @if [ -f ./gcc/Makefile ] ; then \
1417 r=`pwd`; export r; \
1418 s=`cd $(srcdir); pwd`; export s; \
1420 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1425 # Building GCC uses some tools for rebuilding "source" files
1426 # like texinfo, bison/byacc, etc. So we must depend on those.
1428 # While building GCC, it may be necessary to run various target
1429 # programs like the assembler, linker, etc. So we depend on
1432 # In theory, on an SMP all those dependencies can be resolved
1435 .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1436 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1437 @r=`pwd`; export r; \
1438 s=`cd $(srcdir); pwd`; export s; \
1440 echo "Bootstrapping the compiler"; \
1441 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
1442 @r=`pwd`; export r; \
1443 s=`cd $(srcdir); pwd`; export s; \
1445 *bootstrap4-lean ) \
1446 msg="Comparing stage3 and stage4 of the compiler"; \
1447 compare=compare3-lean ;; \
1448 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1449 compare=compare3 ;; \
1450 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
1451 compare=compare-lean ;; \
1452 * ) msg="Comparing stage2 and stage3 of the compiler"; \
1453 compare=compare ;; \
1457 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
1458 @r=`pwd`; export r; \
1459 s=`cd $(srcdir); pwd` ; export s; \
1461 echo "Building runtime libraries"; \
1462 $(MAKE) $(BASE_FLAGS_TO_PASS) all
1465 cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1466 @r=`pwd`; export r; \
1467 s=`cd $(srcdir); pwd`; export s; \
1469 echo "Building the C and C++ compiler"; \
1470 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
1471 @r=`pwd`; export r; \
1472 s=`cd $(srcdir); pwd` ; export s; \
1474 echo "Building runtime libraries"; \
1475 $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++"
1479 @if [ -f ./gcc/Makefile ] ; then \
1480 r=`pwd`; export r; \
1481 s=`cd $(srcdir); pwd`; export s; \
1483 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1490 @if [ -f ./gcc/Makefile ] ; then \
1491 r=`pwd`; export r; \
1492 s=`cd $(srcdir); pwd`; export s; \
1494 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1499 .PHONY: install-gcc-cross
1501 @if [ -f ./gcc/Makefile ] ; then \
1502 r=`pwd`; export r; \
1503 s=`cd $(srcdir); pwd`; export s; \
1505 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1509 # EXPERIMENTAL STUFF
1510 # This rule is used to install the modules which use FLAGS_TO_PASS.
1511 # To build a target install-X means to cd to X and make install.
1512 .PHONY: install-dosrel
1513 install-dosrel: installdirs info
1514 @dir=`echo $@ | sed -e 's/install-//'`; \
1515 if [ -f ./$${dir}/Makefile ] ; then \
1516 r=`pwd`; export r; \
1517 s=`cd $(srcdir); pwd`; export s; \
1519 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1524 install-dosrel-fake:
1527 # This is a list of inter-dependencies among modules.
1530 all-autoconf: all-m4 all-texinfo
1531 all-automake: all-m4 all-texinfo
1533 all-bfd: all-libiberty all-intl
1534 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1535 all-bison: all-texinfo
1536 configure-target-bsp: $(ALL_GCC)
1537 all-target-bsp: configure-target-bsp all-gcc all-binutils all-target-newlib
1541 configure-target-cygmon: $(ALL_GCC)
1542 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
1544 all-dejagnu: all-tcl all-expect all-tk
1545 all-diff: all-libiberty
1547 all-emacs19: all-bison all-byacc
1549 configure-target-examples: $(ALL_GCC)
1550 all-target-examples: configure-target-examples
1551 all-expect: all-tcl all-tk
1552 all-fileutils: all-libiberty
1555 all-flex: all-libiberty all-bison all-byacc
1556 all-gas: all-libiberty all-opcodes all-bfd all-intl
1560 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1561 all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1562 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1563 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1566 configure-target-gperf: $(ALL_GCC)
1567 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
1568 all-gprof: all-libiberty all-bfd all-opcodes all-intl
1569 all-grez: all-libiberty all-bfd all-opcodes
1570 all-gui: all-gdb all-libproc all-target-librx
1572 all-gzip: all-libiberty
1573 all-hello: all-libiberty
1575 all-inet: all-tcl all-send-pr all-perl
1577 all-ispell: all-emacs19
1578 all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1
1579 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1580 configure-target-libg++: $(ALL_GCC) configure-target-librx
1581 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++
1582 configure-target-libgloss: $(ALL_GCC)
1583 all-target-libgloss: configure-target-libgloss configure-target-newlib
1584 configure-target-libio: $(ALL_GCC)
1585 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1587 all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1589 configure-target-librx: $(ALL_GCC) configure-target-newlib
1590 all-target-librx: configure-target-librx
1591 configure-target-libstdc++: $(ALL_GCC)
1592 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1593 configure-target-libstub: $(ALL_GCC)
1594 all-target-libstub: configure-target-libstub
1596 all-m4: all-libiberty
1597 all-make: all-libiberty
1599 configure-target-newlib: $(ALL_GCC)
1600 configure-target-libtermcap: $(ALL_GCC)
1601 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1602 all-target-libtermcap: configure-target-libtermcap all-binutils all-gas all-gcc
1603 all-opcodes: all-bfd all-libiberty
1604 all-patch: all-libiberty
1606 all-prms: all-libiberty
1609 all-recode: all-libiberty
1610 all-sed: all-libiberty
1611 all-send-pr: all-prms
1613 all-sim: all-libiberty all-bfd all-opcodes all-readline
1614 all-tar: all-libiberty
1617 all-tclX: all-tcl all-tk
1619 all-tk8.1: all-tcl8.1
1620 all-texinfo: all-libiberty
1622 all-tgas: all-libiberty all-bfd all-opcodes
1624 all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1
1626 all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup
1627 configure-target-winsup: configure-target-newlib
1628 all-uudecode: all-libiberty
1630 configure-target-libiberty: $(ALL_GCC)
1631 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1632 all-target: $(ALL_TARGET_MODULES)
1633 install-target: $(INSTALL_TARGET_MODULES)
1634 ### other supporting targets
1640 installdirs: mkinstalldirs
1641 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1643 dir.info: do-install-info
1644 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1645 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1646 mv -f dir.info.new dir.info ; \
1651 @echo "Building a full distribution of this tree isn't done"
1652 @echo "via 'make dist'. Check out the etc/ subdirectory"
1656 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1657 # ability to use several tags files at once, so there is probably no need
1658 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1659 # (if we felt like it) have this Makefile write a piece of elisp which
1660 # the user could load to tell emacs19 where all the TAGS files we just
1664 # with the gnu make, this is done automatically.
1666 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
1667 $(SHELL) ./config.status
1670 # Support for building net releases
1672 # Files in devo used in any net release.
1673 # ChangeLog omitted because it may refer to files which are not in this
1674 # distribution (perhaps it would be better to include it anyway).
1675 DEVO_SUPPORT= README Makefile.in configure configure.in \
1676 config.guess config.if config.sub config move-if-change \
1677 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1678 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1679 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1681 # Files in devo/etc used in any net release.
1682 # ChangeLog omitted because it may refer to files which are not in this
1683 # distribution (perhaps it would be better to include it anyway).
1684 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1685 make-stds.texi standards.info*
1687 # When you use `make setup-dirs' or `make taz' you should always redefine
1689 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1693 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1694 # Take out texinfo from a few places.
1695 sed -e '/^all\.normal: /s/\all-texinfo //' \
1696 -e '/^ install-texinfo /d' \
1698 mv -f tmp Makefile.in
1701 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1702 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1703 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1704 # Make links, and run "make diststuff" or "make info" when needed.
1705 rm -rf proto-toplev ; mkdir proto-toplev
1706 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1707 for d in $$dirs ; do \
1708 if [ -d $$d ]; then \
1709 if [ ! -f $$d/Makefile ] ; then true ; \
1710 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1711 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1712 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1713 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1715 if [ -d $$d/proto-$$d.dir ]; then \
1716 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1718 ln -s ../$$d proto-toplev/$$d ; \
1720 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1722 cd etc ; $(MAKE) info
1725 mkdir proto-toplev/etc
1726 (cd proto-toplev/etc; \
1727 for i in $(ETC_SUPPORT); do \
1728 ln -s ../../etc/$$i . ; \
1731 # Take out texinfo from configurable dirs
1732 rm proto-toplev/configure.in
1733 sed -e '/^host_tools=/s/texinfo //' \
1734 <configure.in >proto-toplev/configure.in
1736 mkdir proto-toplev/texinfo
1737 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1738 if test -r texinfo/util/tex3patch ; then \
1739 mkdir proto-toplev/texinfo/util && \
1740 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1742 chmod -R og=u . || chmod og=u `find . -print`
1743 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1744 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1746 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1748 $(MAKE) -f Makefile.in do-tar-bz2 TOOL=$(TOOL) VER=$$ver
1751 echo "==> Making $(TOOL)-$(VER).tar.bz2"
1752 -rm -f $(TOOL)-$(VER)
1753 ln -s proto-toplev $(TOOL)-$(VER)
1754 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1755 $(BZIPPROG) -v -9 $(TOOL)-$(VER).tar
1757 TEXINFO_SUPPORT= texinfo/texinfo.tex
1758 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1761 GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms
1762 gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1763 $(MAKE) -f Makefile.in taz TOOL=gas \
1764 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1766 # The FSF "binutils" release includes gprof and ld.
1767 .PHONY: binutils.tar.bz2
1768 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms
1769 binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1770 $(MAKE) -f Makefile.in taz TOOL=binutils \
1771 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)"
1773 .PHONY: gas+binutils.tar.bz2
1774 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1775 gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1776 $(MAKE) -f Makefile.in taz TOOL=gas \
1777 SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
1779 .PHONY: libg++.tar.bz2
1780 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1781 libg++.tar.bz2: $(DIST_SUPPORT) libg++
1782 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1783 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1785 GNATS_SUPPORT_DIRS=include libiberty send-pr
1786 gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1787 $(MAKE) -f Makefile.in taz TOOL=gnats \
1788 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1791 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
1792 gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1793 $(MAKE) -f Makefile.in taz TOOL=gdb \
1794 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
1796 .PHONY: newlib.tar.bz2
1797 NEWLIB_SUPPORT_DIRS=libgloss
1798 # taz configures for the sun4 target which won't configure newlib.
1799 # We need newlib configured so that the .info files are made.
1800 # Unfortunately, it is not enough to just configure newlib separately:
1801 # taz will build the .info files but since SUBDIRS won't contain newlib,
1802 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1803 # used in building the .info files, eg: *.def, *.ref).
1804 # The problem isn't solvable however without a lot of extra work because
1805 # target libraries are built in subdir $(target_alias) which gets nuked during
1806 # the make distclean. For now punt on the issue of shipping newlib info files
1807 # with newlib net releases and wait for a day when some native target (sun4?)
1808 # supports newlib (if only minimally).
1809 newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1810 $(MAKE) -f Makefile.in taz TOOL=newlib \
1811 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1812 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1817 # end of Makefile.in