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
39 tooldir
= $(exec_prefix)/$(target
)
41 program_transform_name
=
43 man1dir = $(mandir)/man1
44 man2dir = $(mandir)/man2
45 man3dir = $(mandir)/man3
46 man4dir = $(mandir)/man4
47 man5dir = $(mandir)/man5
48 man6dir = $(mandir)/man6
49 man7dir = $(mandir)/man7
50 man8dir = $(mandir)/man8
51 man9dir = $(mandir)/man9
52 infodir = $(prefix)/info
53 includedir = $(prefix)/include
54 # Directory in which the compiler finds executables, libraries, etc.
55 libsubdir
= $(libdir)/gcc-lib
/$(target_alias
)/$(gcc_version
)
60 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
62 INSTALL_PROGRAM_ARGS
=
64 INSTALL
= $(SHELL
) $$s/install-sh
-c
65 INSTALL_PROGRAM
= $(INSTALL
) $(INSTALL_PROGRAM_ARGS
)
66 INSTALL_SCRIPT
= $(INSTALL
)
67 INSTALL_DATA
= $(INSTALL
) -m
644
69 INSTALL_DOSREL
= install-dosrel-fake
76 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
77 # here so that they can be overridden by Makefile fragments.
78 HOST_CC
= $(CC_FOR_BUILD
)
80 HOST_PREFIX_1
= loser-
82 # These flag values are normally overridden by the configure script.
87 CFLAGS_FOR_TARGET
= $(CFLAGS
)
89 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
93 CHILLFLAGS
= $(CFLAGS
)
97 # Use -O2 to stress test the compiler.
98 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
99 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
100 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
111 # Not plain GZIP, since gzip looks there for extra command-line options.
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 SPECIAL_LIBS
= libdsp
174 TARGET_CONFIGDIRS
= libiberty libgloss
$(SPECIAL_LIBS
) newlib libio librx libstdc
++ libg
++ winsup opcodes libstub cygmon
176 # Target libraries are put under this directory:
177 # Changed by configure to $(target_alias) if cross.
180 # This is set by the configure script to the arguments passed to configure.
183 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
187 # This is the name of the environment variable used for the path to
188 # the libraries. This may be changed by configure.in.
189 RPATH_ENVVAR
= LD_LIBRARY_PATH
191 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
192 REALLY_SET_LIB_PATH
= \
193 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
194 export $(RPATH_ENVVAR
);
197 INSTALL_TARGET
= installdirs \
200 $(INSTALL_TARGET_MODULES
) \
201 $(INSTALL_X11_MODULES
) \
204 INSTALL_TARGET_CROSS
= installdirs \
207 $(INSTALL_TARGET_MODULES
) \
208 $(INSTALL_X11_MODULES
) \
212 if [ -f $$r/gcc/xgcc ] ; then \
213 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
214 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
215 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/newlib/libc/include -nostdinc; \
217 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
220 echo $$r/gcc/xgcc -B$$r/gcc/; \
223 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
226 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
230 # If CC_FOR_TARGET is not overriden on the command line, then this
231 # variable is passed down to the gcc Makefile, where it is used to
232 # build libgcc2.a. We define it here so that it can itself be
233 # overridden on the command line.
234 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
236 CHILL_FOR_TARGET
= ` \
237 if [ -f $$r/gcc/xgcc ] ; then \
238 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
240 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
243 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
248 if [ -f $$r/gcc/xgcc ] ; then \
249 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
250 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
251 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
253 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
256 echo $$r/gcc/xgcc -B$$r/gcc/; \
259 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
262 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
267 if [ -f $$r/gas/as-new ] ; then \
268 echo $$r/gas/as-new ; \
270 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
273 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
278 if [ -f $$r/ld/ld-new ] ; then \
279 echo $$r/ld/ld-new ; \
281 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
284 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
288 DLLTOOL_FOR_TARGET
= ` \
289 if [ -f $$r/binutils/dlltool ] ; then \
290 echo $$r/binutils/dlltool ; \
292 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
295 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
299 WINDRES_FOR_TARGET
= ` \
300 if [ -f $$r/binutils/windres ] ; then \
301 echo $$r/binutils/windres ; \
303 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
306 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
311 if [ -f $$r/binutils/ar ] ; then \
312 echo $$r/binutils/ar ; \
314 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
317 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
321 RANLIB_FOR_TARGET
= ` \
322 if [ -f $$r/binutils/ranlib ] ; then \
323 echo $$r/binutils/ranlib ; \
325 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
328 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
333 if [ -f $$r/binutils/nm-new ] ; then \
334 echo $$r/binutils/nm-new ; \
336 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
339 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
343 # The first rule in the file had better be this one. Don't put any above it.
344 # This lives here to allow makefile fragments to contain dependencies.
348 # These can be overridden by config/mt-*.
349 # The _TARGET_ is because they're specified in mt-foo.
350 # The _HOST_ is because they're programs that run on the host.
351 EXTRA_TARGET_HOST_ALL_MODULES
=
352 EXTRA_TARGET_HOST_INSTALL_MODULES
=
353 EXTRA_TARGET_HOST_CHECK_MODULES
=
355 #### host and target specific makefile fragments come in here.
358 # Flags to pass down to all sub-makes.
359 # Please keep these in alphabetical order.
360 BASE_FLAGS_TO_PASS
= \
361 "AR_FLAGS=$(AR_FLAGS)" \
362 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
363 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
365 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
366 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
368 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
369 "CHILLFLAGS=$(CHILLFLAGS)" \
370 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
371 "CHILL_LIB=$(CHILL_LIB)" \
372 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
373 "CXXFLAGS=$(CXXFLAGS)" \
374 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
375 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
376 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
377 "INSTALL=$(INSTALL)" \
378 "INSTALL_DATA=$(INSTALL_DATA)" \
379 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
380 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
381 "LDFLAGS=$(LDFLAGS)" \
383 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
384 "LIBCFLAGS=$(LIBCFLAGS)" \
385 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
386 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
387 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
390 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
391 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
392 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
393 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
396 "RUNTEST=$(RUNTEST)" \
397 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
398 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
399 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
402 "datadir=$(datadir)" \
403 "exec_prefix=$(exec_prefix)" \
404 "includedir=$(includedir)" \
405 "infodir=$(infodir)" \
407 "libexecdir=$(libexecdir)" \
408 "lispdir=$(lispdir)" \
409 "localstatedir=$(localstatedir)" \
411 "oldincludedir=$(oldincludedir)" \
413 "sbindir=$(sbindir)" \
414 "sharedstatedir=$(sharedstatedir)" \
415 "sysconfdir=$(sysconfdir)" \
416 "tooldir=$(tooldir)" \
417 "gxx_include_dir=$(gxx_include_dir)" \
418 "gcc_version=$(gcc_version)" \
419 "gcc_version_trigger=$(gcc_version_trigger)" \
420 "target_alias=$(target_alias)" \
421 "libsubdir=$(libsubdir)"
423 # Flags to pass down to most sub-makes, in which we're building with
424 # the host environment.
425 # If any variables are added here, they must be added to do-*, below.
431 'DLLTOOL=$(DLLTOOL)' \
437 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
439 # Flags that are concerned with the location of the X11 include files
442 # NOTE: until the top-level is getting the values via autoconf, it only
443 # causes problems to have this top-level Makefile overriding the autoconf-set
444 # values in child directories. Only variables that don't conflict with
445 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
447 X11_FLAGS_TO_PASS
= \
448 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
449 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
451 # Flags to pass down to makes which are built with the target environment.
452 # The double $ decreases the length of the command line; the variables
453 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
454 # If any variables are added here, they must be added to do-*, below.
455 EXTRA_TARGET_FLAGS
= \
456 'AR=$$(AR_FOR_TARGET)' \
457 'AS=$$(AS_FOR_TARGET)' \
458 'CC=$$(CC_FOR_TARGET)' \
459 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
460 'CXX=$$(CXX_FOR_TARGET)' \
461 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
462 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
463 'LD=$$(LD_FOR_TARGET)' \
464 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
465 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
466 'NM=$$(NM_FOR_TARGET)' \
467 'RANLIB=$$(RANLIB_FOR_TARGET)' \
468 'WINDRES=$$(WINDRES_FOR_TARGET)'
470 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
472 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
473 # unfortunately needs the native compiler and the target ar and
475 # If any variables are added here, they must be added to do-*, below.
476 # The HOST_* variables are a special case, which are used for the gcc
477 # cross-building scheme.
479 'AR=$$(AR_FOR_TARGET)' \
483 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
484 'HOST_CC=$(CC_FOR_BUILD)' \
485 'HOST_PREFIX=$(HOST_PREFIX)' \
486 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
488 'RANLIB=$$(RANLIB_FOR_TARGET)' \
489 'WINDRES=$$(WINDRES_FOR_TARGET)' \
490 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
491 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
492 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
493 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
494 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
495 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
496 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
497 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
498 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
499 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
501 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
503 # This is a list of the targets for all of the modules which are compiled
504 # using $(FLAGS_TO_PASS).
516 $(start-sanitize-cygnus
) \
518 $(end-sanitize-cygnus
) \
529 $(start-sanitize-cygnus
) \
531 $(end-sanitize-cygnus
) \
541 $(start-sanitize-ide
) \
543 $(end-sanitize-ide
) \
549 $(start-sanitize-ide
) \
551 $(end-sanitize-ide
) \
555 $(start-sanitize-ide
) \
558 $(end-sanitize-ide
) \
575 $(start-sanitize-cygnus
) \
577 $(end-sanitize-cygnus
) \
586 $(start-sanitize-ide
) \
588 $(end-sanitize-ide
) \
591 $(EXTRA_TARGET_HOST_ALL_MODULES
)
593 # This is a list of the check targets for all of the modules which are
594 # compiled using $(FLAGS_TO_PASS).
596 # The list is in two parts. The first lists those tools which
597 # are tested as part of the host's native tool-chain, and not
598 # tested in a cross configuration.
599 NATIVE_CHECK_MODULES
= \
605 CROSS_CHECK_MODULES
= \
622 $(start-sanitize-cygnus
) \
624 $(end-sanitize-cygnus
) \
633 $(start-sanitize-ide
) \
635 $(end-sanitize-ide
) \
641 $(start-sanitize-ide
) \
643 $(end-sanitize-ide
) \
647 $(start-sanitize-ide
) \
650 $(end-sanitize-ide
) \
665 $(start-sanitize-cygnus
) \
667 $(end-sanitize-cygnus
) \
676 $(start-sanitize-ide
) \
678 $(end-sanitize-ide
) \
680 $(EXTRA_TARGET_HOST_CHECK_MODULES
)
682 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
684 # This is a list of the install targets for all of the modules which are
685 # compiled using $(FLAGS_TO_PASS).
686 # We put install-opcodes before install-binutils because the installed
687 # binutils might be on PATH, and they might need the shared opcodes
689 # We put install-tcl before install-itcl because itcl wants to run a
690 # program on installation which uses the Tcl libraries.
713 $(start-sanitize-cygnus
) \
715 $(end-sanitize-cygnus
) \
725 $(start-sanitize-ide
) \
727 $(end-sanitize-ide
) \
735 $(start-sanitize-ide
) \
737 $(end-sanitize-ide
) \
741 $(start-sanitize-ide
) \
744 $(end-sanitize-ide
) \
759 $(start-sanitize-cygnus
) \
761 $(end-sanitize-cygnus
) \
768 $(start-sanitize-ide
) \
770 $(end-sanitize-ide
) \
773 $(EXTRA_TARGET_HOST_INSTALL_MODULES
)
775 # This is a list of the targets for all of the modules which are compiled
776 # using $(X11_FLAGS_TO_PASS).
789 # This is a list of the check targets for all of the modules which are
790 # compiled using $(X11_FLAGS_TO_PASS).
791 CHECK_X11_MODULES
= \
801 # This is a list of the install targets for all the modules which are
802 # compiled using $(X11_FLAGS_TO_PASS).
803 INSTALL_X11_MODULES
= \
815 # This is a list of the targets for all of the modules which are compiled
816 # using $(TARGET_FLAGS_TO_PASS).
817 ALL_TARGET_MODULES
= \
819 all-target-libstdc
++ \
824 $(start-sanitize-dsp
) \
826 $(end-sanitize-dsp
) \
827 all-target-libgloss \
828 all-target-libiberty \
830 all-target-examples \
832 $(start-sanitize-java
) \
834 all-target-boehm-gc \
835 all-target-qthreads \
836 $(end-sanitize-java
) \
839 # This is a list of the configure targets for all of the modules which
840 # are compiled using the target tools.
841 CONFIGURE_TARGET_MODULES
= \
842 $(start-sanitize-dsp
) \
843 configure-target-libdsp \
844 $(end-sanitize-dsp
) \
845 configure-target-libio \
846 configure-target-libstdc
++ \
847 configure-target-librx \
848 configure-target-libg
++ \
849 configure-target-newlib \
850 configure-target-winsup \
851 configure-target-libgloss \
852 configure-target-libiberty \
853 configure-target-gperf \
854 configure-target-examples \
855 configure-target-libstub \
856 $(start-sanitize-java
) \
857 configure-target-libjava \
858 configure-target-boehm-gc \
859 configure-target-qthreads \
860 $(end-sanitize-java
) \
861 configure-target-cygmon
863 # This is a list of the check targets for all of the modules which are
864 # compiled using $(TARGET_FLAGS_TO_PASS).
865 CHECK_TARGET_MODULES
= \
866 $(start-sanitize-dsp
) \
867 check-target-libdsp \
868 $(end-sanitize-dsp
) \
870 check-target-libstdc
++ \
871 check-target-libg
++ \
872 check-target-newlib \
873 check-target-winsup \
874 check-target-libiberty \
875 $(start-sanitize-java
) \
876 check-target-libjava \
877 check-target-boehm-gc \
878 check-target-qthreads \
879 $(end-sanitize-java
) \
882 # This is a list of the install targets for all of the modules which are
883 # compiled using $(TARGET_FLAGS_TO_PASS).
884 INSTALL_TARGET_MODULES
= \
885 $(start-sanitize-dsp
) \
886 install-target-libdsp \
887 $(end-sanitize-dsp
) \
888 install-target-libio \
889 install-target-libstdc
++ \
890 install-target-libg
++ \
891 install-target-newlib \
892 install-target-winsup \
893 install-target-libgloss \
894 install-target-libiberty \
895 $(start-sanitize-java
) \
896 install-target-libjava \
897 install-target-boehm-gc \
898 install-target-qthreads \
899 $(end-sanitize-java
) \
902 # This is a list of the targets for which we can do a clean-{target}.
914 $(start-sanitize-cygnus
) \
916 $(end-sanitize-cygnus
) \
927 $(start-sanitize-cygnus
) \
929 $(end-sanitize-cygnus
) \
939 $(start-sanitize-ide
) \
941 $(end-sanitize-ide
) \
947 $(start-sanitize-ide
) \
949 $(end-sanitize-ide
) \
953 $(start-sanitize-ide
) \
956 $(end-sanitize-ide
) \
973 $(start-sanitize-cygnus
) \
975 $(end-sanitize-cygnus
) \
983 $(start-sanitize-ide
) \
985 $(end-sanitize-ide
) \
989 # All of the target modules that can be cleaned
990 CLEAN_TARGET_MODULES
= \
991 $(start-sanitize-dsp
) \
992 clean-target-libdsp \
993 $(end-sanitize-dsp
) \
995 clean-target-libstdc
++ \
997 clean-target-libg
++ \
998 clean-target-newlib \
999 clean-target-winsup \
1000 clean-target-libgloss \
1001 clean-target-libiberty \
1002 clean-target-gperf \
1003 clean-target-examples \
1004 clean-target-libstub \
1005 $(start-sanitize-java
) \
1006 clean-target-libjava \
1007 clean-target-boehm-gc \
1008 clean-target-qthreads \
1009 $(end-sanitize-java
) \
1012 # All of the x11 modules that can be cleaned
1013 CLEAN_X11_MODULES
= \
1024 # The target built for a native build.
1028 $(ALL_X11_MODULES
) \
1029 $(ALL_TARGET_MODULES
) \
1032 # Do a target for all the subdirectories. A ``make do-X'' will do a
1033 # ``make X'' in all subdirectories (because, in general, there is a
1034 # dependency (below) of X upon do-X, a ``make X'' will also do this,
1035 # but it may do additional work as well).
1036 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
1037 # because it is so large that it can easily overflow the command line
1038 # length limit on some systems.
1047 do-maintainer-clean \
1051 @target
=`echo $@ | sed -e 's/^do-//'`; \
1052 r
=`pwd`; export r
; \
1053 s
=`cd $(srcdir); pwd`; export s
; \
1055 for i in
$(SUBDIRS
) -dummy-
; do \
1056 if
[ -f .
/$$i/Makefile
]; then \
1059 for flag in
$(EXTRA_GCC_FLAGS
); do \
1060 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1064 for flag in
$(EXTRA_HOST_FLAGS
); do \
1065 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1069 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
1071 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
1072 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1073 "RANLIB=$${RANLIB}" \
1074 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1076 then true
; else exit
1; fi
; \
1079 @target
=`echo $@ | sed -e 's/^do-//'`; \
1080 r
=`pwd`; export r
; \
1081 s
=`cd $(srcdir); pwd`; export s
; \
1083 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
1084 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
1085 for flag in
$(EXTRA_TARGET_FLAGS
); do \
1086 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1088 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
1089 if
(cd
$(TARGET_SUBDIR
)/$$i; \
1090 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
1091 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1092 "RANLIB=$${RANLIB}" \
1093 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1095 then true
; else exit
1; fi
; \
1099 # Here are the targets which correspond to the do-X targets.
1101 .PHONY
: info installcheck dvi install-info
1102 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
1103 .PHONY
: local-clean local-distclean local-maintainer-clean
1105 installcheck: do-installcheck
1108 # Make sure makeinfo is built before we do a `make info'.
1109 do-info
: all-texinfo
1111 install-info
: do-install-info
dir.
info
1112 s
=`cd $(srcdir); pwd`; export s
; \
1113 if
[ -f
dir.
info ] ; then \
1114 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
1118 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E *.log
1121 -rm -f Makefile config.status config.cache mh-frag mt-frag
1122 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
1123 rm -rf
$(TARGET_SUBDIR
); \
1126 local-maintainer-clean
:
1127 @echo
"This command is intended for maintainers to use;"
1128 @echo
"it deletes files that may require special tools to rebuild."
1130 clean: do-clean local-clean
1131 mostlyclean: do-mostlyclean local-clean
1132 distclean: do-distclean local-clean local-distclean
1133 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
1134 maintainer-clean
: local-distclean
1135 realclean: maintainer-clean
1137 # This rule is used to clean specific modules.
1138 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
1139 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
1140 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1141 if
[ -f .
/$${dir}/Makefile
] ; then \
1142 r
=`pwd`; export r
; \
1143 s
=`cd $(srcdir); pwd`; export s
; \
1145 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1150 .PHONY
: $(CLEAN_TARGET_MODULES
)
1151 $(CLEAN_TARGET_MODULES
):
1152 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1153 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1154 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1155 r
=`pwd`; export r
; \
1156 s
=`cd $(srcdir); pwd`; export s
; \
1158 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1163 clean-target
: $(CLEAN_TARGET_MODULES
)
1168 check: $(CHECK_MODULES
) \
1169 $(CHECK_TARGET_MODULES
) \
1170 $(CHECK_X11_MODULES
) \
1173 # Automated reporting of test results.
1175 warning.log
: build.log
1176 $(srcdir)/contrib
/warn_summary build.log
> $@
1179 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1180 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1182 $(srcdir)/contrib
/test_summary
-t
>$@
1184 echo If you really want to send e-mail
, run .
/$@ now
1186 mail-report-with-warnings.log
: warning.log
1187 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1188 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1190 $(srcdir)/contrib
/test_summary
-t
-i warning.log
>$@
1192 echo If you really want to send e-mail
, run .
/$@ now
1194 # Installation targets.
1196 .PHONY
: install install-cross
uninstall source-vault binary-vault vault-install
1197 install: $(INSTALL_TARGET
)
1198 install-cross
: $(INSTALL_TARGET_CROSS
)
1201 @echo
"the uninstall target is not supported in this tree"
1204 $(MAKE
) -f .
/release
/Build-A-Release \
1205 host
=$(host_alias
) source-vault
1208 $(MAKE
) -f .
/release
/Build-A-Release \
1209 host
=$(host_alias
) target
=$(target_alias
)
1212 @if
[ -f .
/release
/vault-install
] ; then \
1213 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1219 install.
all: install-no-fixedincludes
1220 @if
[ -f .
/gcc
/Makefile
] ; then \
1221 r
=`pwd` ; export r
; \
1224 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1229 # inet-install is used because the I*Net wants DejaGNU installed but
1230 # not built. Similarly, gzip is built but not installed.
1232 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1234 # install-no-fixedincludes is used because Cygnus can not distribute
1235 # the fixed header files.
1236 .PHONY
: install-no-fixedincludes
1237 install-no-fixedincludes
: \
1239 $(INSTALL_MODULES
) \
1240 $(INSTALL_TARGET_MODULES
) \
1241 $(INSTALL_X11_MODULES
) \
1242 gcc-no-fixedincludes
1244 # Install the gcc headers files, but not the fixed include files,
1245 # which Cygnus is not allowed to distribute. This rule is very
1246 # dependent on the workings of the gcc Makefile.in.
1247 .PHONY
: gcc-no-fixedincludes
1248 gcc-no-fixedincludes
:
1249 @if
[ -f .
/gcc
/Makefile
]; then \
1250 rm -rf gcc
/tmp-include
; \
1251 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1252 mkdir gcc
/include; \
1253 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1254 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1255 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1256 r
=`pwd`; export r
; \
1257 s
=`cd $(srcdir); pwd` ; export s
; \
1260 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1261 rm -rf gcc
/include; \
1262 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1265 # start-sanitize-ide
1266 # Install Foundry. Avoid installing a bunch of stuff we don't need.
1268 mods
="$(INSTALL_MODULES)"; \
1269 x11_mods
="$(INSTALL_X11_MODULES)"; \
1270 for d in install-tcl install-tk install-itcl install-tix install-ilu
; do \
1271 mods
="`echo $${mods} | sed -e "s
/$$d//"`"; \
1272 x11_mods
="`echo $${x11_mods} | sed -e "s
/$$d//"`"; \
1274 $(MAKE
) INSTALL_MODULES
="$${mods}" INSTALL_X11_MODULES
="$${x11_mods}" install
1275 for d in tcl tk itcl tix ilu
; do \
1276 if
[ -f
$$d/Makefile
]; then \
1277 r
=`pwd`; export r
; \
1278 s
=`cd $(srcdir); pwd`; export s
; \
1280 (cd
$$d; $(MAKE
) $(FLAGS_TO_PASS
) install-minimal
); \
1284 date
'+%D %r' > builddate \
1285 $(INSTALL_DATA
) builddate
$(datadir)/builddate
; \
1289 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1290 # build a target all-X means to cd to X and make all.
1292 # all-gui, and all-libproc are handled specially because
1293 # they are still experimental, and if they fail to build, that
1294 # shouldn't stop "make all".
1295 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1296 $(ALL_MODULES
) all-gui all-libproc
:
1297 @
dir=`echo $@ | sed -e 's/all-//'`; \
1298 if
[ -f .
/$${dir}/Makefile
] ; then \
1299 r
=`pwd`; export r
; \
1300 s
=`cd $(srcdir); pwd`; export s
; \
1302 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1307 # These rules are used to check the modules which use FLAGS_TO_PASS.
1308 # To build a target check-X means to cd to X and make check. Some
1309 # modules are only tested in a native toolchain.
1311 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1312 $(NATIVE_CHECK_MODULES
):
1313 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1314 dir=`echo $@ | sed -e 's/check-//'`; \
1315 if
[ -f .
/$${dir}/Makefile
] ; then \
1316 r
=`pwd`; export r
; \
1317 s
=`cd $(srcdir); pwd`; export s
; \
1319 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1325 $(CROSS_CHECK_MODULES
):
1326 @
dir=`echo $@ | sed -e 's/check-//'`; \
1327 if
[ -f .
/$${dir}/Makefile
] ; then \
1328 r
=`pwd`; export r
; \
1329 s
=`cd $(srcdir); pwd`; export s
; \
1331 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1336 # This rule is used to install the modules which use FLAGS_TO_PASS.
1337 # To build a target install-X means to cd to X and make install.
1338 .PHONY
: $(INSTALL_MODULES
)
1339 $(INSTALL_MODULES
): installdirs
1340 @
dir=`echo $@ | sed -e 's/install-//'`; \
1341 if
[ -f .
/$${dir}/Makefile
] ; then \
1342 r
=`pwd`; export r
; \
1343 s
=`cd $(srcdir); pwd`; export s
; \
1345 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1350 # This rule is used to configure the modules which are built with the
1352 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1353 $(CONFIGURE_TARGET_MODULES
):
1354 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1355 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1356 r
=`pwd`; export r
; \
1357 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1358 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1359 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1360 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1361 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1363 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1364 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1365 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1368 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1371 fi
; exit
0 # break command into two pieces
1372 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1373 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1375 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1377 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1378 if
[ -d
$(srcdir)/$${dir} ]; then \
1379 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1380 r
=`pwd`; export r
; \
1381 s
=`cd $(srcdir); pwd`; export s
; \
1383 AR
="$(AR_FOR_TARGET)"; export AR
; \
1384 AS
="$(AS_FOR_TARGET)"; export AS
; \
1385 CC
="$(CC_FOR_TARGET)"; export CC
; \
1386 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1387 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1388 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1389 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1390 LD
="$(LD_FOR_TARGET)"; export LD
; \
1391 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1392 NM
="$(NM_FOR_TARGET)"; export NM
; \
1393 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1394 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1395 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1396 cd
$(TARGET_SUBDIR
)/$${dir}; \
1399 topdir
=$(srcdir) ;; \
1401 case
"$(TARGET_SUBDIR)" in \
1402 .
) topdir
="../$(srcdir)" ;; \
1403 *) topdir
="../../$(srcdir)" ;; \
1406 if
[ "$(srcdir)" = "." ] ; then \
1407 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1408 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1409 if
[ -f Makefile
]; then \
1410 if
$(MAKE
) distclean; then \
1424 srcdiroption
="--srcdir=."; \
1427 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1428 libsrcdir
="$$s/$${dir}"; \
1430 if
[ -f
$${libsrcdir}/configure
] ; then \
1431 rm -f no-such-file
; \
1432 CONFIG_SITE
=no-such-file
$(SHELL
) $${libsrcdir}/configure \
1433 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1434 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1436 rm -f no-such-file
; \
1437 CONFIG_SITE
=no-such-file
$(SHELL
) $$s/configure \
1438 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1439 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1448 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1449 # To build a target all-X means to cd to X and make all.
1450 .PHONY
: $(ALL_TARGET_MODULES
)
1451 $(ALL_TARGET_MODULES
):
1452 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1453 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1454 r
=`pwd`; export r
; \
1455 s
=`cd $(srcdir); pwd`; export s
; \
1457 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1462 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1463 # To build a target install-X means to cd to X and make install.
1464 .PHONY
: $(CHECK_TARGET_MODULES
)
1465 $(CHECK_TARGET_MODULES
):
1466 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1467 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1468 r
=`pwd`; export r
; \
1469 s
=`cd $(srcdir); pwd`; export s
; \
1471 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1476 # This rule is used to install the modules which use
1477 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1479 .PHONY
: $(INSTALL_TARGET_MODULES
)
1480 $(INSTALL_TARGET_MODULES
): installdirs
1481 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1482 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1483 r
=`pwd`; export r
; \
1484 s
=`cd $(srcdir); pwd`; export s
; \
1486 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1487 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1492 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1493 # To build a target all-X means to cd to X and make all.
1494 .PHONY
: $(ALL_X11_MODULES
)
1496 @
dir=`echo $@ | sed -e 's/all-//'`; \
1497 if
[ -f .
/$${dir}/Makefile
] ; then \
1498 r
=`pwd`; export r
; \
1499 s
=`cd $(srcdir); pwd`; export s
; \
1502 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1507 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1508 # To build a target check-X means to cd to X and make all.
1509 .PHONY
: $(CHECK_X11_MODULES
)
1510 $(CHECK_X11_MODULES
):
1511 @
dir=`echo $@ | sed -e 's/check-//'`; \
1512 if
[ -f .
/$${dir}/Makefile
] ; then \
1513 r
=`pwd`; export r
; \
1514 s
=`cd $(srcdir); pwd`; export s
; \
1517 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1522 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1523 # To build a target install-X means to cd to X and make install.
1524 .PHONY
: $(INSTALL_X11_MODULES
)
1525 $(INSTALL_X11_MODULES
): installdirs
1526 @
dir=`echo $@ | sed -e 's/install-//'`; \
1527 if
[ -f .
/$${dir}/Makefile
] ; then \
1528 r
=`pwd`; export r
; \
1529 s
=`cd $(srcdir); pwd`; export s
; \
1532 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1537 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1540 @if
[ -f .
/gcc
/Makefile
] ; then \
1541 r
=`pwd`; export r
; \
1542 s
=`cd $(srcdir); pwd`; export s
; \
1544 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1549 # Building GCC uses some tools for rebuilding "source" files
1550 # like texinfo, bison/byacc, etc. So we must depend on those.
1552 # While building GCC, it may be necessary to run various target
1553 # programs like the assembler, linker, etc. So we depend on
1556 # In theory, on an SMP all those dependencies can be resolved
1559 .PHONY
: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1560 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1561 @r
=`pwd`; export r
; \
1562 s
=`cd $(srcdir); pwd`; export s
; \
1564 echo
"Bootstrapping the compiler"; \
1565 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $@
1566 @r
=`pwd`; export r
; \
1567 s
=`cd $(srcdir); pwd`; export s
; \
1569 *bootstrap4-lean
) \
1570 msg
="Comparing stage3 and stage4 of the compiler"; \
1571 compare
=compare3-lean
;; \
1572 *bootstrap4
) msg
="Comparing stage3 and stage4 of the compiler"; \
1573 compare
=compare3
;; \
1574 *-lean
) msg
="Comparing stage2 and stage3 of the compiler"; \
1575 compare
=compare-lean
;; \
1576 * ) msg
="Comparing stage2 and stage3 of the compiler"; \
1577 compare
=compare
;; \
1581 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $$compare
1582 @r
=`pwd`; export r
; \
1583 s
=`cd $(srcdir); pwd` ; export s
; \
1585 echo
"Building runtime libraries"; \
1586 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all
1589 cross
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1590 @r
=`pwd`; export r
; \
1591 s
=`cd $(srcdir); pwd`; export s
; \
1593 echo
"Building the C and C++ compiler"; \
1594 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++"
1595 @r
=`pwd`; export r
; \
1596 s
=`cd $(srcdir); pwd` ; export s
; \
1598 echo
"Building runtime libraries"; \
1599 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all LANGUAGES
="c c++"
1603 @if
[ -f .
/gcc
/Makefile
] ; then \
1604 r
=`pwd`; export r
; \
1605 s
=`cd $(srcdir); pwd`; export s
; \
1607 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1614 @if
[ -f .
/gcc
/Makefile
] ; then \
1615 r
=`pwd`; export r
; \
1616 s
=`cd $(srcdir); pwd`; export s
; \
1618 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1623 .PHONY
: install-gcc-cross
1625 @if
[ -f .
/gcc
/Makefile
] ; then \
1626 r
=`pwd`; export r
; \
1627 s
=`cd $(srcdir); pwd`; export s
; \
1629 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++" install); \
1633 # EXPERIMENTAL STUFF
1634 # This rule is used to install the modules which use FLAGS_TO_PASS.
1635 # To build a target install-X means to cd to X and make install.
1636 .PHONY
: install-dosrel
1637 install-dosrel
: installdirs info
1638 @
dir=`echo $@ | sed -e 's/install-//'`; \
1639 if
[ -f .
/$${dir}/Makefile
] ; then \
1640 r
=`pwd`; export r
; \
1641 s
=`cd $(srcdir); pwd`; export s
; \
1643 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1648 install-dosrel-fake
:
1651 # This is a list of inter-dependencies among modules.
1654 all-autoconf
: all-m4 all-texinfo
1655 all-automake
: all-m4 all-texinfo
1657 all-bfd
: all-libiberty all-intl
1658 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1659 all-bison
: all-texinfo
1660 # start-sanitize-java
1661 all-target-boehm-gc
: configure-target-boehm-gc
1665 # start-sanitize-cygnus
1666 all-cgen
: all-libiberty
1667 # These two have dependencies on cgen, and while this section is alphabetically
1668 # sorted, I wish to keep these together until things settle.
1669 all-opcodes
: all-cgen
1671 # end-sanitize-cygnus
1673 configure-target-cygmon
: $(ALL_GCC
)
1674 all-target-cygmon
: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub
1676 all-dejagnu
: all-tcl all-expect all-tk
1677 all-diff
: all-libiberty
1679 all-emacs19
: all-bison all-byacc
1681 configure-target-examples
: $(ALL_GCC
)
1682 all-target-examples
: configure-target-examples
1683 all-expect
: all-tcl all-tk
1684 all-fileutils
: all-libiberty
1687 all-flex
: all-libiberty all-bison all-byacc
1688 # start-sanitize-cygnus
1690 # end-sanitize-cygnus
1691 all-gas
: all-libiberty all-opcodes all-bfd all-intl
1695 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld
1696 all-bootstrap
: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1697 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui
1698 # start-sanitize-ide
1699 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui all-libide all-libidetcl
1701 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1704 configure-target-gperf
: $(ALL_GCC
)
1705 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++
1706 all-gprof
: all-libiberty all-bfd all-opcodes all-intl
1707 all-grez
: all-libiberty all-bfd all-opcodes
1708 all-gui
: all-gdb all-libproc all-target-librx
1710 all-gzip
: all-libiberty
1711 all-hello
: all-libiberty
1712 # start-sanitize-ide
1716 all-inet
: all-tcl all-send-pr all-perl
1718 all-ispell
: all-emacs19
1719 all-itcl
: all-tcl all-tk all-tcl8.1 all-tk8.1
1720 # start-sanitize-ide
1721 all-jstools
: all-tcl all-tk all-tix all-libgui all-libide all-libidetcl
1723 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1724 # start-sanitize-dsp
1725 all-target-libdsp
: configure-target-libdsp configure-target-newlib
1726 configure-target-libdsp
: $(ALL_GCC
)
1728 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1729 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
++
1730 configure-target-libgloss
: $(ALL_GCC
)
1731 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1732 configure-target-libio
: $(ALL_GCC
)
1733 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1734 check-target-libio
: all-target-libstdc
++
1735 all-libgui
: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1737 # start-sanitize-ide
1739 all-libidetcl
: all-tcl all-tk all-itcl all-ilu all-libgui all-libide
1741 # start-sanitize-java
1742 configure-target-libjava
: $(ALL_GCC
) configure-target-boehm-gc configure-target-qthreads
1743 all-target-libjava
: configure-target-libjava all-gcc all-zip all-target-newlib all-target-boehm-gc all-target-qthreads
1745 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1746 all-target-librx
: configure-target-librx
1747 configure-target-libstdc
++: $(ALL_GCC
)
1748 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1749 configure-target-libstub
: $(ALL_GCC
)
1750 all-target-libstub
: configure-target-libstub
1752 all-m4
: all-libiberty
1753 all-make
: all-libiberty
1755 configure-target-newlib
: $(ALL_GCC
)
1756 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1757 all-opcodes
: all-bfd all-libiberty
1758 all-patch
: all-libiberty
1760 all-prms
: all-libiberty
1761 # start-sanitize-java
1762 all-target-qthreads
: configure-target-qthreads
1766 all-recode
: all-libiberty
1767 all-sed
: all-libiberty
1768 all-send-pr
: all-prms
1770 all-sim
: all-libiberty all-bfd all-opcodes all-readline
1771 # start-sanitize-cygnus
1772 all-snavigator
: all-tcl8.1 all-tk8.1 all-tix all-itcl all-db all-grep all-flexlm all-libgui
1773 # end-sanitize-cygnus
1774 all-tar
: all-libiberty
1777 all-tclX
: all-tcl all-tk
1779 all-tk8.1
: all-tcl8.1
1780 all-texinfo
: all-libiberty
1782 all-tgas
: all-libiberty all-bfd all-opcodes
1784 all-tix
: all-tcl all-tk all-tcl8.1 all-tk8.1
1785 # start-sanitize-ide
1786 all-vmake
: all-tcl all-tk all-itcl all-tix all-libgui all-libide all-libidetcl
1789 all-target-winsup
: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
1790 configure-target-winsup
: configure-target-newlib
1791 all-uudecode
: all-libiberty
1793 configure-target-libiberty
: $(ALL_GCC
)
1794 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1795 all-target
: $(ALL_TARGET_MODULES
)
1796 install-target
: $(INSTALL_TARGET_MODULES
)
1797 # start-sanitize-gdbtk
1798 install-gdb
: install-tcl install-tk install-itcl install-tix install-libgui
1800 ### other supporting targets
1806 installdirs: mkinstalldirs
1807 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1809 dir.
info: do-install-info
1810 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1811 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1812 mv
-f
dir.
info.new
dir.
info ; \
1817 @echo
"Building a full distribution of this tree isn't done"
1818 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1822 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1823 # ability to use several tags files at once, so there is probably no need
1824 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1825 # (if we felt like it) have this Makefile write a piece of elisp which
1826 # the user could load to tell emacs19 where all the TAGS files we just
1830 # with the gnu make, this is done automatically.
1832 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
) $(gcc_version_trigger
)
1833 $(SHELL
) .
/config.status
1836 # Support for building net releases
1838 # Files in devo used in any net release.
1839 # ChangeLog omitted because it may refer to files which are not in this
1840 # distribution (perhaps it would be better to include it anyway).
1841 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1842 config.guess config.if config.sub config move-if-change \
1843 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1844 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1845 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1847 # Files in devo/etc used in any net release.
1848 # ChangeLog omitted because it may refer to files which are not in this
1849 # distribution (perhaps it would be better to include it anyway).
1850 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1851 make-stds.texi standards.
info*
1853 # When you use `make setup-dirs' or `make taz' you should always redefine
1855 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1859 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1860 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1861 # Take out texinfo from a few places.
1862 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1863 -e
'/^ install-texinfo /d' \
1865 mv
-f tmp Makefile.in
1867 $(start-sanitize-Sanitize
)
1868 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1869 $(end-sanitize-Sanitize
)
1871 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1872 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1873 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1874 # Make links, and run "make diststuff" or "make info" when needed.
1875 rm -rf proto-toplev
; mkdir proto-toplev
1876 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1877 for d in
$$dirs ; do \
1878 if
[ -d
$$d ]; then \
1879 if
[ ! -f
$$d/Makefile
] ; then true
; \
1880 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1881 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1882 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1883 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1885 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1886 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1888 ln
-s ..
/$$d proto-toplev
/$$d ; \
1890 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1892 cd etc
; $(MAKE
) info
1895 mkdir proto-toplev
/etc
1896 (cd proto-toplev
/etc
; \
1897 for i in
$(ETC_SUPPORT
); do \
1898 ln
-s ..
/..
/etc
/$$i .
; \
1901 # Take out texinfo from configurable dirs
1902 rm proto-toplev
/configure.in
1903 sed
-e
'/^host_tools=/s/texinfo //' \
1904 <configure.in
>proto-toplev
/configure.in
1906 mkdir proto-toplev
/texinfo
1907 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1908 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1909 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1910 if
test -r texinfo
/util
/tex3patch
; then \
1911 mkdir proto-toplev
/texinfo
/util
&& \
1912 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1914 chmod
-R og
=u . || chmod og
=u
`find . -print`
1915 if grep AM_INIT_AUTOMAKE
$(TOOL
)/configure.in
>/dev
/null
2>&1; then \
1916 ver
=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1918 ver
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1920 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) VER
=$$ver
1923 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1924 -rm -f
$(TOOL
)-$(VER
)
1925 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1926 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1927 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1929 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1930 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1933 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes intl setup.com makefile.vms
1934 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1935 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1936 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1938 # The FSF "binutils" release includes gprof and ld.
1939 .PHONY
: binutils.
tar.gz
1940 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof intl setup.com makefile.vms
1941 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1942 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1943 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1945 .PHONY
: gas
+binutils.
tar.gz
1946 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1947 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1948 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1949 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1951 .PHONY
: libg
++.
tar.gz
1952 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1953 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1954 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1955 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1957 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1958 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1959 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1960 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1963 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils intl
1964 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1965 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1966 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1967 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1969 .PHONY
: newlib.
tar.gz
1970 NEWLIB_SUPPORT_DIRS
=libgloss
1971 # taz configures for the sun4 target which won't configure newlib.
1972 # We need newlib configured so that the .info files are made.
1973 # Unfortunately, it is not enough to just configure newlib separately:
1974 # taz will build the .info files but since SUBDIRS won't contain newlib,
1975 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1976 # used in building the .info files, eg: *.def, *.ref).
1977 # The problem isn't solvable however without a lot of extra work because
1978 # target libraries are built in subdir $(target_alias) which gets nuked during
1979 # the make distclean. For now punt on the issue of shipping newlib info files
1980 # with newlib net releases and wait for a day when some native target (sun4?)
1981 # supports newlib (if only minimally).
1982 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1983 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1984 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1985 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1990 # end of Makefile.in