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 bsp 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 case "$(target_canonical)" in \
215 i[3456]86-*-cygwin*) \
216 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; \
219 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
223 echo $$r/gcc/xgcc -B$$r/gcc/; \
226 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
229 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
233 # If CC_FOR_TARGET is not overriden on the command line, then this
234 # variable is passed down to the gcc Makefile, where it is used to
235 # build libgcc2.a. We define it here so that it can itself be
236 # overridden on the command line.
237 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
239 CHILL_FOR_TARGET
= ` \
240 if [ -f $$r/gcc/xgcc ] ; then \
241 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
243 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
246 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
251 if [ -f $$r/gcc/xgcc ] ; then \
252 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
253 case "$(target_canonical)" in \
254 i[3456]86-*-cygwin*) \
255 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; \
258 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
262 echo $$r/gcc/xgcc -B$$r/gcc/; \
265 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
268 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
273 if [ -f $$r/gas/as-new ] ; then \
274 echo $$r/gas/as-new ; \
276 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
279 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
284 if [ -f $$r/ld/ld-new ] ; then \
285 echo $$r/ld/ld-new ; \
287 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
290 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
294 DLLTOOL_FOR_TARGET
= ` \
295 if [ -f $$r/binutils/dlltool ] ; then \
296 echo $$r/binutils/dlltool ; \
298 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
301 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
305 WINDRES_FOR_TARGET
= ` \
306 if [ -f $$r/binutils/windres ] ; then \
307 echo $$r/binutils/windres ; \
309 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
312 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
317 if [ -f $$r/binutils/ar ] ; then \
318 echo $$r/binutils/ar ; \
320 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
323 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
327 RANLIB_FOR_TARGET
= ` \
328 if [ -f $$r/binutils/ranlib ] ; then \
329 echo $$r/binutils/ranlib ; \
331 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
334 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
339 if [ -f $$r/binutils/nm-new ] ; then \
340 echo $$r/binutils/nm-new ; \
342 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
345 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
349 # The first rule in the file had better be this one. Don't put any above it.
350 # This lives here to allow makefile fragments to contain dependencies.
354 # These can be overridden by config/mt-*.
355 # The _TARGET_ is because they're specified in mt-foo.
356 # The _HOST_ is because they're programs that run on the host.
357 EXTRA_TARGET_HOST_ALL_MODULES
=
358 EXTRA_TARGET_HOST_INSTALL_MODULES
=
359 EXTRA_TARGET_HOST_CHECK_MODULES
=
361 #### host and target specific makefile fragments come in here.
364 # Flags to pass down to all sub-makes.
365 # Please keep these in alphabetical order.
366 BASE_FLAGS_TO_PASS
= \
367 "AR_FLAGS=$(AR_FLAGS)" \
368 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
369 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
371 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
372 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
374 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
375 "CHILLFLAGS=$(CHILLFLAGS)" \
376 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
377 "CHILL_LIB=$(CHILL_LIB)" \
378 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
379 "CXXFLAGS=$(CXXFLAGS)" \
380 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
381 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
382 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
383 "INSTALL=$(INSTALL)" \
384 "INSTALL_DATA=$(INSTALL_DATA)" \
385 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
386 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
387 "LDFLAGS=$(LDFLAGS)" \
389 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
390 "LIBCFLAGS=$(LIBCFLAGS)" \
391 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
392 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
393 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
396 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
397 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
398 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
399 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
402 "RUNTEST=$(RUNTEST)" \
403 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
404 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
405 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
408 "datadir=$(datadir)" \
409 "exec_prefix=$(exec_prefix)" \
410 "includedir=$(includedir)" \
411 "infodir=$(infodir)" \
413 "libexecdir=$(libexecdir)" \
414 "lispdir=$(lispdir)" \
415 "localstatedir=$(localstatedir)" \
417 "oldincludedir=$(oldincludedir)" \
419 "sbindir=$(sbindir)" \
420 "sharedstatedir=$(sharedstatedir)" \
421 "sysconfdir=$(sysconfdir)" \
422 "tooldir=$(tooldir)" \
423 "gxx_include_dir=$(gxx_include_dir)" \
424 "gcc_version=$(gcc_version)" \
425 "gcc_version_trigger=$(gcc_version_trigger)" \
426 "target_alias=$(target_alias)" \
427 "libsubdir=$(libsubdir)"
429 # Flags to pass down to most sub-makes, in which we're building with
430 # the host environment.
431 # If any variables are added here, they must be added to do-*, below.
437 'DLLTOOL=$(DLLTOOL)' \
443 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
445 # Flags that are concerned with the location of the X11 include files
448 # NOTE: until the top-level is getting the values via autoconf, it only
449 # causes problems to have this top-level Makefile overriding the autoconf-set
450 # values in child directories. Only variables that don't conflict with
451 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
453 X11_FLAGS_TO_PASS
= \
454 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
455 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
457 # Flags to pass down to makes which are built with the target environment.
458 # The double $ decreases the length of the command line; the variables
459 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
460 # If any variables are added here, they must be added to do-*, below.
461 EXTRA_TARGET_FLAGS
= \
462 'AR=$$(AR_FOR_TARGET)' \
463 'AS=$$(AS_FOR_TARGET)' \
464 'CC=$$(CC_FOR_TARGET)' \
465 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
466 'CXX=$$(CXX_FOR_TARGET)' \
467 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
468 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
469 'LD=$$(LD_FOR_TARGET)' \
470 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
471 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
472 'NM=$$(NM_FOR_TARGET)' \
473 'RANLIB=$$(RANLIB_FOR_TARGET)' \
474 'WINDRES=$$(WINDRES_FOR_TARGET)'
476 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
478 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
479 # unfortunately needs the native compiler and the target ar and
481 # If any variables are added here, they must be added to do-*, below.
482 # The HOST_* variables are a special case, which are used for the gcc
483 # cross-building scheme.
485 'AR=$$(AR_FOR_TARGET)' \
489 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
490 'HOST_CC=$(CC_FOR_BUILD)' \
491 'HOST_PREFIX=$(HOST_PREFIX)' \
492 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
494 'RANLIB=$$(RANLIB_FOR_TARGET)' \
495 'WINDRES=$$(WINDRES_FOR_TARGET)' \
496 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
497 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
498 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
499 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
500 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
501 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
502 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
503 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
504 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
505 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
507 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
509 # This is a list of the targets for all of the modules which are compiled
510 # using $(FLAGS_TO_PASS).
522 $(start-sanitize-cygnus
) \
524 $(end-sanitize-cygnus
) \
535 $(start-sanitize-cygnus
) \
537 $(end-sanitize-cygnus
) \
547 $(start-sanitize-ide
) \
549 $(end-sanitize-ide
) \
555 $(start-sanitize-ide
) \
557 $(end-sanitize-ide
) \
561 $(start-sanitize-ide
) \
564 $(end-sanitize-ide
) \
581 $(start-sanitize-cygnus
) \
583 $(end-sanitize-cygnus
) \
592 $(start-sanitize-ide
) \
594 $(end-sanitize-ide
) \
597 $(EXTRA_TARGET_HOST_ALL_MODULES
)
599 # This is a list of the check targets for all of the modules which are
600 # compiled using $(FLAGS_TO_PASS).
602 # The list is in two parts. The first lists those tools which
603 # are tested as part of the host's native tool-chain, and not
604 # tested in a cross configuration.
605 NATIVE_CHECK_MODULES
= \
611 CROSS_CHECK_MODULES
= \
628 $(start-sanitize-cygnus
) \
630 $(end-sanitize-cygnus
) \
639 $(start-sanitize-ide
) \
641 $(end-sanitize-ide
) \
647 $(start-sanitize-ide
) \
649 $(end-sanitize-ide
) \
653 $(start-sanitize-ide
) \
656 $(end-sanitize-ide
) \
671 $(start-sanitize-cygnus
) \
673 $(end-sanitize-cygnus
) \
682 $(start-sanitize-ide
) \
684 $(end-sanitize-ide
) \
686 $(EXTRA_TARGET_HOST_CHECK_MODULES
)
688 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
690 # This is a list of the install targets for all of the modules which are
691 # compiled using $(FLAGS_TO_PASS).
692 # We put install-opcodes before install-binutils because the installed
693 # binutils might be on PATH, and they might need the shared opcodes
695 # We put install-tcl before install-itcl because itcl wants to run a
696 # program on installation which uses the Tcl libraries.
719 $(start-sanitize-cygnus
) \
721 $(end-sanitize-cygnus
) \
731 $(start-sanitize-ide
) \
733 $(end-sanitize-ide
) \
741 $(start-sanitize-ide
) \
743 $(end-sanitize-ide
) \
747 $(start-sanitize-ide
) \
750 $(end-sanitize-ide
) \
765 $(start-sanitize-cygnus
) \
767 $(end-sanitize-cygnus
) \
774 $(start-sanitize-ide
) \
776 $(end-sanitize-ide
) \
779 $(EXTRA_TARGET_HOST_INSTALL_MODULES
)
781 # This is a list of the targets for all of the modules which are compiled
782 # using $(X11_FLAGS_TO_PASS).
795 # This is a list of the check targets for all of the modules which are
796 # compiled using $(X11_FLAGS_TO_PASS).
797 CHECK_X11_MODULES
= \
807 # This is a list of the install targets for all the modules which are
808 # compiled using $(X11_FLAGS_TO_PASS).
809 INSTALL_X11_MODULES
= \
821 # This is a list of the targets for all of the modules which are compiled
822 # using $(TARGET_FLAGS_TO_PASS).
823 ALL_TARGET_MODULES
= \
825 all-target-libstdc
++ \
829 all-target-libtermcap \
831 $(start-sanitize-dsp
) \
833 $(end-sanitize-dsp
) \
834 all-target-libgloss \
835 all-target-libiberty \
837 all-target-examples \
839 $(start-sanitize-java
) \
841 all-target-boehm-gc \
842 all-target-qthreads \
843 $(end-sanitize-java
) \
847 # This is a list of the configure targets for all of the modules which
848 # are compiled using the target tools.
849 CONFIGURE_TARGET_MODULES
= \
850 $(start-sanitize-dsp
) \
851 configure-target-libdsp \
852 $(end-sanitize-dsp
) \
853 configure-target-libio \
854 configure-target-libstdc
++ \
855 configure-target-librx \
856 configure-target-libg
++ \
857 configure-target-newlib \
858 configure-target-libtermcap \
859 configure-target-winsup \
860 configure-target-libgloss \
861 configure-target-libiberty \
862 configure-target-gperf \
863 configure-target-examples \
864 configure-target-libstub \
865 $(start-sanitize-java
) \
866 configure-target-libjava \
867 configure-target-boehm-gc \
868 configure-target-qthreads \
869 $(end-sanitize-java
) \
870 configure-target-bsp \
871 configure-target-cygmon
873 # This is a list of the check targets for all of the modules which are
874 # compiled using $(TARGET_FLAGS_TO_PASS).
875 CHECK_TARGET_MODULES
= \
876 $(start-sanitize-dsp
) \
877 check-target-libdsp \
878 $(end-sanitize-dsp
) \
880 check-target-libstdc
++ \
881 check-target-libg
++ \
882 check-target-newlib \
883 check-target-winsup \
884 check-target-libiberty \
885 $(start-sanitize-java
) \
886 check-target-libjava \
887 check-target-boehm-gc \
888 check-target-qthreads \
889 $(end-sanitize-java
) \
892 # This is a list of the install targets for all of the modules which are
893 # compiled using $(TARGET_FLAGS_TO_PASS).
894 INSTALL_TARGET_MODULES
= \
895 $(start-sanitize-dsp
) \
896 install-target-libdsp \
897 $(end-sanitize-dsp
) \
898 install-target-libio \
899 install-target-libstdc
++ \
900 install-target-libg
++ \
901 install-target-newlib \
902 install-target-libtermcap \
903 install-target-winsup \
904 install-target-libgloss \
905 install-target-libiberty \
907 $(start-sanitize-java
) \
908 install-target-libjava \
909 install-target-boehm-gc \
910 install-target-qthreads \
911 $(end-sanitize-java
) \
914 # This is a list of the targets for which we can do a clean-{target}.
926 $(start-sanitize-cygnus
) \
928 $(end-sanitize-cygnus
) \
939 $(start-sanitize-cygnus
) \
941 $(end-sanitize-cygnus
) \
951 $(start-sanitize-ide
) \
953 $(end-sanitize-ide
) \
959 $(start-sanitize-ide
) \
961 $(end-sanitize-ide
) \
965 $(start-sanitize-ide
) \
968 $(end-sanitize-ide
) \
985 $(start-sanitize-cygnus
) \
987 $(end-sanitize-cygnus
) \
995 $(start-sanitize-ide
) \
997 $(end-sanitize-ide
) \
1001 # All of the target modules that can be cleaned
1002 CLEAN_TARGET_MODULES
= \
1003 $(start-sanitize-dsp
) \
1004 clean-target-libdsp \
1005 $(end-sanitize-dsp
) \
1006 clean-target-libio \
1007 clean-target-libstdc
++ \
1008 clean-target-librx \
1009 clean-target-libg
++ \
1010 clean-target-newlib \
1011 clean-target-winsup \
1012 clean-target-libgloss \
1013 clean-target-libiberty \
1014 clean-target-gperf \
1015 clean-target-examples \
1016 clean-target-libstub \
1017 $(start-sanitize-java
) \
1018 clean-target-libjava \
1019 clean-target-boehm-gc \
1020 clean-target-qthreads \
1021 $(end-sanitize-java
) \
1025 # All of the x11 modules that can be cleaned
1026 CLEAN_X11_MODULES
= \
1037 # The target built for a native build.
1041 $(ALL_X11_MODULES
) \
1042 $(ALL_TARGET_MODULES
) \
1045 # Do a target for all the subdirectories. A ``make do-X'' will do a
1046 # ``make X'' in all subdirectories (because, in general, there is a
1047 # dependency (below) of X upon do-X, a ``make X'' will also do this,
1048 # but it may do additional work as well).
1049 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
1050 # because it is so large that it can easily overflow the command line
1051 # length limit on some systems.
1060 do-maintainer-clean \
1064 @target
=`echo $@ | sed -e 's/^do-//'`; \
1065 r
=`pwd`; export r
; \
1066 s
=`cd $(srcdir); pwd`; export s
; \
1068 for i in
$(SUBDIRS
) -dummy-
; do \
1069 if
[ -f .
/$$i/Makefile
]; then \
1072 for flag in
$(EXTRA_GCC_FLAGS
); do \
1073 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1077 for flag in
$(EXTRA_HOST_FLAGS
); do \
1078 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1082 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
1084 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
1085 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1086 "RANLIB=$${RANLIB}" \
1087 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1089 then true
; else exit
1; fi
; \
1092 @target
=`echo $@ | sed -e 's/^do-//'`; \
1093 r
=`pwd`; export r
; \
1094 s
=`cd $(srcdir); pwd`; export s
; \
1096 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
1097 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
1098 for flag in
$(EXTRA_TARGET_FLAGS
); do \
1099 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1101 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
1102 if
(cd
$(TARGET_SUBDIR
)/$$i; \
1103 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
1104 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1105 "RANLIB=$${RANLIB}" \
1106 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1108 then true
; else exit
1; fi
; \
1112 # Here are the targets which correspond to the do-X targets.
1114 .PHONY
: info installcheck dvi install-info
1115 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
1116 .PHONY
: local-clean local-distclean local-maintainer-clean
1118 installcheck: do-installcheck
1121 # Make sure makeinfo is built before we do a `make info'.
1122 do-info
: all-texinfo
1124 install-info
: do-install-info
dir.
info
1125 s
=`cd $(srcdir); pwd`; export s
; \
1126 if
[ -f
dir.
info ] ; then \
1127 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
1131 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E *.log
1134 -rm -f Makefile config.status config.cache mh-frag mt-frag
1135 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
1136 rm -rf
$(TARGET_SUBDIR
); \
1139 local-maintainer-clean
:
1140 @echo
"This command is intended for maintainers to use;"
1141 @echo
"it deletes files that may require special tools to rebuild."
1143 clean: do-clean local-clean
1144 mostlyclean: do-mostlyclean local-clean
1145 distclean: do-distclean local-clean local-distclean
1146 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
1147 maintainer-clean
: local-distclean
1148 realclean: maintainer-clean
1150 # This rule is used to clean specific modules.
1151 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
1152 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
1153 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1154 if
[ -f .
/$${dir}/Makefile
] ; then \
1155 r
=`pwd`; export r
; \
1156 s
=`cd $(srcdir); pwd`; export s
; \
1158 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1163 .PHONY
: $(CLEAN_TARGET_MODULES
)
1164 $(CLEAN_TARGET_MODULES
):
1165 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1166 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1167 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1168 r
=`pwd`; export r
; \
1169 s
=`cd $(srcdir); pwd`; export s
; \
1171 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1176 clean-target
: $(CLEAN_TARGET_MODULES
)
1181 check: $(CHECK_MODULES
) \
1182 $(CHECK_TARGET_MODULES
) \
1183 $(CHECK_X11_MODULES
) \
1186 # Automated reporting of test results.
1188 warning.log
: build.log
1189 $(srcdir)/contrib
/warn_summary build.log
> $@
1192 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1193 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1195 $(srcdir)/contrib
/test_summary
-t
>$@
1197 echo If you really want to send e-mail
, run .
/$@ now
1199 mail-report-with-warnings.log
: warning.log
1200 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1201 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1203 $(srcdir)/contrib
/test_summary
-t
-i warning.log
>$@
1205 echo If you really want to send e-mail
, run .
/$@ now
1207 # Installation targets.
1209 .PHONY
: install install-cross
uninstall source-vault binary-vault vault-install
1210 install: $(INSTALL_TARGET
)
1211 install-cross
: $(INSTALL_TARGET_CROSS
)
1214 @echo
"the uninstall target is not supported in this tree"
1217 $(MAKE
) -f .
/release
/Build-A-Release \
1218 host
=$(host_alias
) source-vault
1221 $(MAKE
) -f .
/release
/Build-A-Release \
1222 host
=$(host_alias
) target
=$(target_alias
)
1225 @if
[ -f .
/release
/vault-install
] ; then \
1226 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1232 install.
all: install-no-fixedincludes
1233 @if
[ -f .
/gcc
/Makefile
] ; then \
1234 r
=`pwd` ; export r
; \
1237 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1242 # inet-install is used because the I*Net wants DejaGNU installed but
1243 # not built. Similarly, gzip is built but not installed.
1245 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1247 # install-no-fixedincludes is used because Cygnus can not distribute
1248 # the fixed header files.
1249 .PHONY
: install-no-fixedincludes
1250 install-no-fixedincludes
: \
1252 $(INSTALL_MODULES
) \
1253 $(INSTALL_TARGET_MODULES
) \
1254 $(INSTALL_X11_MODULES
) \
1255 gcc-no-fixedincludes
1257 # Install the gcc headers files, but not the fixed include files,
1258 # which Cygnus is not allowed to distribute. This rule is very
1259 # dependent on the workings of the gcc Makefile.in.
1260 .PHONY
: gcc-no-fixedincludes
1261 gcc-no-fixedincludes
:
1262 @if
[ -f .
/gcc
/Makefile
]; then \
1263 rm -rf gcc
/tmp-include
; \
1264 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1265 mkdir gcc
/include; \
1266 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1267 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1268 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1269 r
=`pwd`; export r
; \
1270 s
=`cd $(srcdir); pwd` ; export s
; \
1273 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1274 rm -rf gcc
/include; \
1275 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1278 # start-sanitize-ide
1279 # Install Foundry. Avoid installing a bunch of stuff we don't need.
1281 mods
="$(INSTALL_MODULES)"; \
1282 x11_mods
="$(INSTALL_X11_MODULES)"; \
1283 for d in install-tcl install-tk install-itcl install-tix install-ilu
; do \
1284 mods
="`echo $${mods} | sed -e "s
/$$d//"`"; \
1285 x11_mods
="`echo $${x11_mods} | sed -e "s
/$$d//"`"; \
1287 $(MAKE
) INSTALL_MODULES
="$${mods}" INSTALL_X11_MODULES
="$${x11_mods}" install
1288 for d in tcl tk itcl tix ilu
; do \
1289 if
[ -f
$$d/Makefile
]; then \
1290 r
=`pwd`; export r
; \
1291 s
=`cd $(srcdir); pwd`; export s
; \
1293 (cd
$$d; $(MAKE
) $(FLAGS_TO_PASS
) install-minimal
); \
1297 date
'+%D %r' > builddate \
1298 $(INSTALL_DATA
) builddate
$(datadir)/builddate
; \
1302 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1303 # build a target all-X means to cd to X and make all.
1305 # all-gui, and all-libproc are handled specially because
1306 # they are still experimental, and if they fail to build, that
1307 # shouldn't stop "make all".
1308 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1309 $(ALL_MODULES
) all-gui all-libproc
:
1310 @
dir=`echo $@ | sed -e 's/all-//'`; \
1311 if
[ -f .
/$${dir}/Makefile
] ; then \
1312 r
=`pwd`; export r
; \
1313 s
=`cd $(srcdir); pwd`; export s
; \
1315 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1320 # These rules are used to check the modules which use FLAGS_TO_PASS.
1321 # To build a target check-X means to cd to X and make check. Some
1322 # modules are only tested in a native toolchain.
1324 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1325 $(NATIVE_CHECK_MODULES
):
1326 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1327 dir=`echo $@ | sed -e 's/check-//'`; \
1328 if
[ -f .
/$${dir}/Makefile
] ; then \
1329 r
=`pwd`; export r
; \
1330 s
=`cd $(srcdir); pwd`; export s
; \
1332 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1338 $(CROSS_CHECK_MODULES
):
1339 @
dir=`echo $@ | sed -e 's/check-//'`; \
1340 if
[ -f .
/$${dir}/Makefile
] ; then \
1341 r
=`pwd`; export r
; \
1342 s
=`cd $(srcdir); pwd`; export s
; \
1344 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1349 # This rule is used to install the modules which use FLAGS_TO_PASS.
1350 # To build a target install-X means to cd to X and make install.
1351 .PHONY
: $(INSTALL_MODULES
)
1352 $(INSTALL_MODULES
): installdirs
1353 @
dir=`echo $@ | sed -e 's/install-//'`; \
1354 if
[ -f .
/$${dir}/Makefile
] ; then \
1355 r
=`pwd`; export r
; \
1356 s
=`cd $(srcdir); pwd`; export s
; \
1358 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1363 # This rule is used to configure the modules which are built with the
1365 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1366 $(CONFIGURE_TARGET_MODULES
):
1367 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1368 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1369 r
=`pwd`; export r
; \
1370 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1371 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1372 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1373 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1374 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1376 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1377 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1378 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1381 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1384 fi
; exit
0 # break command into two pieces
1385 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1386 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1388 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1390 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1391 if
[ -d
$(srcdir)/$${dir} ]; then \
1392 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1393 r
=`pwd`; export r
; \
1394 s
=`cd $(srcdir); pwd`; export s
; \
1396 AR
="$(AR_FOR_TARGET)"; export AR
; \
1397 AS
="$(AS_FOR_TARGET)"; export AS
; \
1398 CC
="$(CC_FOR_TARGET)"; export CC
; \
1399 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1400 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1401 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1402 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1403 LD
="$(LD_FOR_TARGET)"; export LD
; \
1404 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1405 NM
="$(NM_FOR_TARGET)"; export NM
; \
1406 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1407 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1408 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1409 cd
$(TARGET_SUBDIR
)/$${dir}; \
1412 topdir
=$(srcdir) ;; \
1414 case
"$(TARGET_SUBDIR)" in \
1415 .
) topdir
="../$(srcdir)" ;; \
1416 *) topdir
="../../$(srcdir)" ;; \
1419 if
[ "$(srcdir)" = "." ] ; then \
1420 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1421 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1422 if
[ -f Makefile
]; then \
1423 if
$(MAKE
) distclean; then \
1437 srcdiroption
="--srcdir=."; \
1440 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1441 libsrcdir
="$$s/$${dir}"; \
1443 if
[ -f
$${libsrcdir}/configure
] ; then \
1444 rm -f no-such-file skip-this-dir
; \
1445 CONFIG_SITE
=no-such-file
$(SHELL
) $${libsrcdir}/configure \
1446 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1447 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1449 rm -f no-such-file skip-this-dir
; \
1450 CONFIG_SITE
=no-such-file
$(SHELL
) $$s/configure \
1451 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1452 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1454 if
[ -f skip-this-dir
] ; then \
1456 rm -f skip-this-dir
; \
1457 cd ..
; rmdir
$${dir} || true
; \
1468 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1469 # To build a target all-X means to cd to X and make all.
1470 .PHONY
: $(ALL_TARGET_MODULES
)
1471 $(ALL_TARGET_MODULES
):
1472 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1473 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1474 r
=`pwd`; export r
; \
1475 s
=`cd $(srcdir); pwd`; export s
; \
1477 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1482 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1483 # To build a target install-X means to cd to X and make install.
1484 .PHONY
: $(CHECK_TARGET_MODULES
)
1485 $(CHECK_TARGET_MODULES
):
1486 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1487 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1488 r
=`pwd`; export r
; \
1489 s
=`cd $(srcdir); pwd`; export s
; \
1491 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1496 # This rule is used to install the modules which use
1497 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1499 .PHONY
: $(INSTALL_TARGET_MODULES
)
1500 $(INSTALL_TARGET_MODULES
): installdirs
1501 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1502 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1503 r
=`pwd`; export r
; \
1504 s
=`cd $(srcdir); pwd`; export s
; \
1506 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1507 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1512 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1513 # To build a target all-X means to cd to X and make all.
1514 .PHONY
: $(ALL_X11_MODULES
)
1516 @
dir=`echo $@ | sed -e 's/all-//'`; \
1517 if
[ -f .
/$${dir}/Makefile
] ; then \
1518 r
=`pwd`; export r
; \
1519 s
=`cd $(srcdir); pwd`; export s
; \
1522 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1527 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1528 # To build a target check-X means to cd to X and make all.
1529 .PHONY
: $(CHECK_X11_MODULES
)
1530 $(CHECK_X11_MODULES
):
1531 @
dir=`echo $@ | sed -e 's/check-//'`; \
1532 if
[ -f .
/$${dir}/Makefile
] ; then \
1533 r
=`pwd`; export r
; \
1534 s
=`cd $(srcdir); pwd`; export s
; \
1537 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1542 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1543 # To build a target install-X means to cd to X and make install.
1544 .PHONY
: $(INSTALL_X11_MODULES
)
1545 $(INSTALL_X11_MODULES
): installdirs
1546 @
dir=`echo $@ | sed -e 's/install-//'`; \
1547 if
[ -f .
/$${dir}/Makefile
] ; then \
1548 r
=`pwd`; export r
; \
1549 s
=`cd $(srcdir); pwd`; export s
; \
1552 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1557 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1560 @if
[ -f .
/gcc
/Makefile
] ; then \
1561 r
=`pwd`; export r
; \
1562 s
=`cd $(srcdir); pwd`; export s
; \
1564 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1569 # Building GCC uses some tools for rebuilding "source" files
1570 # like texinfo, bison/byacc, etc. So we must depend on those.
1572 # While building GCC, it may be necessary to run various target
1573 # programs like the assembler, linker, etc. So we depend on
1576 # In theory, on an SMP all those dependencies can be resolved
1579 .PHONY
: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1580 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1581 @r
=`pwd`; export r
; \
1582 s
=`cd $(srcdir); pwd`; export s
; \
1584 echo
"Bootstrapping the compiler"; \
1585 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $@
1586 @r
=`pwd`; export r
; \
1587 s
=`cd $(srcdir); pwd`; export s
; \
1589 *bootstrap4-lean
) \
1590 msg
="Comparing stage3 and stage4 of the compiler"; \
1591 compare
=compare3-lean
;; \
1592 *bootstrap4
) msg
="Comparing stage3 and stage4 of the compiler"; \
1593 compare
=compare3
;; \
1594 *-lean
) msg
="Comparing stage2 and stage3 of the compiler"; \
1595 compare
=compare-lean
;; \
1596 * ) msg
="Comparing stage2 and stage3 of the compiler"; \
1597 compare
=compare
;; \
1601 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $$compare
1602 @r
=`pwd`; export r
; \
1603 s
=`cd $(srcdir); pwd` ; export s
; \
1605 echo
"Building runtime libraries"; \
1606 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all
1609 cross
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1610 @r
=`pwd`; export r
; \
1611 s
=`cd $(srcdir); pwd`; export s
; \
1613 echo
"Building the C and C++ compiler"; \
1614 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++"
1615 @r
=`pwd`; export r
; \
1616 s
=`cd $(srcdir); pwd` ; export s
; \
1618 echo
"Building runtime libraries"; \
1619 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all LANGUAGES
="c c++"
1623 @if
[ -f .
/gcc
/Makefile
] ; then \
1624 r
=`pwd`; export r
; \
1625 s
=`cd $(srcdir); pwd`; export s
; \
1627 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1634 @if
[ -f .
/gcc
/Makefile
] ; then \
1635 r
=`pwd`; export r
; \
1636 s
=`cd $(srcdir); pwd`; export s
; \
1638 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1643 .PHONY
: install-gcc-cross
1645 @if
[ -f .
/gcc
/Makefile
] ; then \
1646 r
=`pwd`; export r
; \
1647 s
=`cd $(srcdir); pwd`; export s
; \
1649 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++" install); \
1653 # EXPERIMENTAL STUFF
1654 # This rule is used to install the modules which use FLAGS_TO_PASS.
1655 # To build a target install-X means to cd to X and make install.
1656 .PHONY
: install-dosrel
1657 install-dosrel
: installdirs info
1658 @
dir=`echo $@ | sed -e 's/install-//'`; \
1659 if
[ -f .
/$${dir}/Makefile
] ; then \
1660 r
=`pwd`; export r
; \
1661 s
=`cd $(srcdir); pwd`; export s
; \
1663 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1668 install-dosrel-fake
:
1671 # This is a list of inter-dependencies among modules.
1674 all-autoconf
: all-m4 all-texinfo
1675 all-automake
: all-m4 all-texinfo
1677 all-bfd
: all-libiberty all-intl
1678 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1679 all-bison
: all-texinfo
1680 configure-target-bsp
: $(ALL_GCC
)
1681 all-target-bsp
: configure-target-bsp all-gas all-ld all-gcc
1682 # start-sanitize-java
1683 configure-target-boehm-gc
: configure-target-newlib configure-target-qthreads
1684 all-target-boehm-gc
: configure-target-boehm-gc
1688 # start-sanitize-cygnus
1689 all-cgen
: all-libiberty
1690 # These two have dependencies on cgen, and while this section is alphabetically
1691 # sorted, I wish to keep these together until things settle.
1692 all-opcodes
: all-cgen
1694 # end-sanitize-cygnus
1696 configure-target-cygmon
: $(ALL_GCC
)
1697 all-target-cygmon
: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub
1699 all-dejagnu
: all-tcl all-expect all-tk
1700 all-diff
: all-libiberty
1702 all-emacs19
: all-bison all-byacc
1704 configure-target-examples
: $(ALL_GCC
)
1705 all-target-examples
: configure-target-examples
1706 all-expect
: all-tcl all-tk
1707 all-fileutils
: all-libiberty
1710 all-flex
: all-libiberty all-bison all-byacc
1711 # start-sanitize-cygnus
1713 # end-sanitize-cygnus
1714 all-gas
: all-libiberty all-opcodes all-bfd all-intl
1718 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld
1719 all-bootstrap
: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1720 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui
1721 # start-sanitize-ide
1722 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui all-libide all-libidetcl
1724 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1727 configure-target-gperf
: $(ALL_GCC
)
1728 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++
1729 all-gprof
: all-libiberty all-bfd all-opcodes all-intl
1730 all-grez
: all-libiberty all-bfd all-opcodes
1731 all-gui
: all-gdb all-libproc all-target-librx
1733 all-gzip
: all-libiberty
1734 all-hello
: all-libiberty
1735 # start-sanitize-ide
1739 all-inet
: all-tcl all-send-pr all-perl
1741 all-ispell
: all-emacs19
1742 all-itcl
: all-tcl all-tk all-tcl8.1 all-tk8.1
1743 # start-sanitize-ide
1744 all-jstools
: all-tcl all-tk all-tix all-libgui all-libide all-libidetcl
1746 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1747 # start-sanitize-dsp
1748 all-target-libdsp
: configure-target-libdsp configure-target-newlib
1749 configure-target-libdsp
: $(ALL_GCC
)
1751 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1752 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
++
1753 configure-target-libgloss
: $(ALL_GCC
)
1754 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1755 configure-target-libio
: $(ALL_GCC
)
1756 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1757 check-target-libio
: all-target-libstdc
++
1758 all-libgui
: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1760 # start-sanitize-ide
1762 all-libidetcl
: all-tcl all-tk all-itcl all-ilu all-libgui all-libide
1764 # start-sanitize-java
1765 configure-target-libjava
: $(ALL_GCC
) configure-target-boehm-gc configure-target-qthreads configure-target-newlib
1766 all-target-libjava
: configure-target-libjava all-gcc all-zip all-target-newlib all-target-boehm-gc all-target-qthreads
1768 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1769 all-target-librx
: configure-target-librx
1770 configure-target-libstdc
++: $(ALL_GCC
)
1771 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1772 configure-target-libstub
: $(ALL_GCC
)
1773 all-target-libstub
: configure-target-libstub
1775 all-m4
: all-libiberty
1776 all-make
: all-libiberty
1778 configure-target-newlib
: $(ALL_GCC
)
1779 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1780 all-opcodes
: all-bfd all-libiberty
1781 all-patch
: all-libiberty
1783 all-prms
: all-libiberty
1784 # start-sanitize-java
1785 configure-target-qthreads
: configure-target-newlib
1786 all-target-qthreads
: configure-target-qthreads
1790 all-recode
: all-libiberty
1791 all-sed
: all-libiberty
1792 all-send-pr
: all-prms
1794 all-sim
: all-libiberty all-bfd all-opcodes all-readline
1795 # start-sanitize-cygnus
1796 all-snavigator
: all-tcl8.1 all-tk8.1 all-tix all-itcl all-db all-grep all-flexlm all-libgui
1797 # end-sanitize-cygnus
1798 all-tar
: all-libiberty
1801 all-tclX
: all-tcl all-tk
1803 all-tk8.1
: all-tcl8.1
1804 all-texinfo
: all-libiberty
1806 all-tgas
: all-libiberty all-bfd all-opcodes
1808 all-tix
: all-tcl all-tk all-tcl8.1 all-tk8.1
1809 # start-sanitize-ide
1810 all-vmake
: all-tcl all-tk all-itcl all-tix all-libgui all-libide all-libidetcl
1813 all-target-winsup
: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
1814 configure-target-winsup
: configure-target-newlib
1815 all-uudecode
: all-libiberty
1817 configure-target-libiberty
: $(ALL_GCC
)
1818 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1819 all-target
: $(ALL_TARGET_MODULES
)
1820 install-target
: $(INSTALL_TARGET_MODULES
)
1821 # start-sanitize-gdbtk
1822 install-gdb
: install-tcl install-tk install-itcl install-tix install-libgui
1824 ### other supporting targets
1830 installdirs: mkinstalldirs
1831 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1833 dir.
info: do-install-info
1834 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1835 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1836 mv
-f
dir.
info.new
dir.
info ; \
1841 @echo
"Building a full distribution of this tree isn't done"
1842 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1846 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1847 # ability to use several tags files at once, so there is probably no need
1848 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1849 # (if we felt like it) have this Makefile write a piece of elisp which
1850 # the user could load to tell emacs19 where all the TAGS files we just
1854 # with the gnu make, this is done automatically.
1856 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
) $(gcc_version_trigger
)
1857 $(SHELL
) .
/config.status
1860 # Support for building net releases
1862 # Files in devo used in any net release.
1863 # ChangeLog omitted because it may refer to files which are not in this
1864 # distribution (perhaps it would be better to include it anyway).
1865 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1866 config.guess config.if config.sub config move-if-change \
1867 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1868 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1869 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1871 # Files in devo/etc used in any net release.
1872 # ChangeLog omitted because it may refer to files which are not in this
1873 # distribution (perhaps it would be better to include it anyway).
1874 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1875 make-stds.texi standards.
info*
1877 # When you use `make setup-dirs' or `make taz' you should always redefine
1879 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1883 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1884 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1885 # Take out texinfo from a few places.
1886 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1887 -e
'/^ install-texinfo /d' \
1889 mv
-f tmp Makefile.in
1891 $(start-sanitize-Sanitize
)
1892 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1893 $(end-sanitize-Sanitize
)
1895 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1896 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1897 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1898 # Make links, and run "make diststuff" or "make info" when needed.
1899 rm -rf proto-toplev
; mkdir proto-toplev
1900 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1901 for d in
$$dirs ; do \
1902 if
[ -d
$$d ]; then \
1903 if
[ ! -f
$$d/Makefile
] ; then true
; \
1904 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1905 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1906 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1907 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1909 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1910 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1912 ln
-s ..
/$$d proto-toplev
/$$d ; \
1914 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1916 cd etc
; $(MAKE
) info
1919 mkdir proto-toplev
/etc
1920 (cd proto-toplev
/etc
; \
1921 for i in
$(ETC_SUPPORT
); do \
1922 ln
-s ..
/..
/etc
/$$i .
; \
1925 # Take out texinfo from configurable dirs
1926 rm proto-toplev
/configure.in
1927 sed
-e
'/^host_tools=/s/texinfo //' \
1928 <configure.in
>proto-toplev
/configure.in
1930 mkdir proto-toplev
/texinfo
1931 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1932 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1933 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1934 if
test -r texinfo
/util
/tex3patch
; then \
1935 mkdir proto-toplev
/texinfo
/util
&& \
1936 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1938 chmod
-R og
=u . || chmod og
=u
`find . -print`
1939 if grep AM_INIT_AUTOMAKE
$(TOOL
)/configure.in
>/dev
/null
2>&1; then \
1940 ver
=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1942 ver
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1944 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) VER
=$$ver
1947 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1948 -rm -f
$(TOOL
)-$(VER
)
1949 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1950 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1951 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1953 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1954 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1957 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes intl setup.com makefile.vms
1958 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1959 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1960 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1962 # The FSF "binutils" release includes gprof and ld.
1963 .PHONY
: binutils.
tar.gz
1964 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof intl setup.com makefile.vms
1965 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1966 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1967 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1969 .PHONY
: gas
+binutils.
tar.gz
1970 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1971 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1972 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1973 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1975 .PHONY
: libg
++.
tar.gz
1976 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1977 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1978 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1979 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1981 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1982 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1983 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1984 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1987 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils intl
1988 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1989 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1990 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1991 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1993 .PHONY
: newlib.
tar.gz
1994 NEWLIB_SUPPORT_DIRS
=libgloss
1995 # taz configures for the sun4 target which won't configure newlib.
1996 # We need newlib configured so that the .info files are made.
1997 # Unfortunately, it is not enough to just configure newlib separately:
1998 # taz will build the .info files but since SUBDIRS won't contain newlib,
1999 # distclean won't be run (leaving Makefile, config.status, and the tmp files
2000 # used in building the .info files, eg: *.def, *.ref).
2001 # The problem isn't solvable however without a lot of extra work because
2002 # target libraries are built in subdir $(target_alias) which gets nuked during
2003 # the make distclean. For now punt on the issue of shipping newlib info files
2004 # with newlib net releases and wait for a day when some native target (sun4?)
2005 # supports newlib (if only minimally).
2006 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
2007 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
2008 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
2009 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
2014 # end of Makefile.in