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_alias
)
40 build_tooldir
= $(exec_prefix)/$(target_alias
)
43 program_transform_name
=
45 man1dir = $(mandir)/man1
46 man2dir = $(mandir)/man2
47 man3dir = $(mandir)/man3
48 man4dir = $(mandir)/man4
49 man5dir = $(mandir)/man5
50 man6dir = $(mandir)/man6
51 man7dir = $(mandir)/man7
52 man8dir = $(mandir)/man8
53 man9dir = $(mandir)/man9
54 infodir = $(prefix)/info
55 includedir = $(prefix)/include
56 # Directory in which the compiler finds executables, libraries, etc.
57 libsubdir
= $(libdir)/gcc-lib
/$(target_alias
)/$(gcc_version
)
62 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
64 INSTALL_PROGRAM_ARGS
=
66 INSTALL
= $(SHELL
) $$s/install-sh
-c
67 INSTALL_PROGRAM
= $(INSTALL
) $(INSTALL_PROGRAM_ARGS
)
68 INSTALL_SCRIPT
= $(INSTALL
)
69 INSTALL_DATA
= $(INSTALL
) -m
644
71 INSTALL_DOSREL
= install-dosrel-fake
78 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
79 # here so that they can be overridden by Makefile fragments.
80 HOST_CC
= $(CC_FOR_BUILD
)
82 HOST_PREFIX_1
= loser-
84 # These flag values are normally overridden by the configure script.
89 CFLAGS_FOR_TARGET
= $(CFLAGS
)
91 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
95 CHILLFLAGS
= $(CFLAGS
)
99 # Use -O2 to stress test the compiler.
100 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
101 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
102 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
113 # Not plain GZIP, since gzip looks there for extra command-line options.
116 # These values are substituted by configure.
121 BISON
= `if [ -f $$r/bison/bison ] ; then \
122 echo $$r/bison/bison -L $$s/bison/ ; \
127 YACC
= `if [ -f $$r/bison/bison ] ; then \
128 echo $$r/bison/bison -y -L $$s/bison/ ; \
129 elif [ -f $$r/byacc/byacc ] ; then \
130 echo $$r/byacc/byacc ; \
132 echo ${DEFAULT_YACC} ; \
135 LEX
= `if [ -f $$r/flex/flex ] ; \
136 then echo $$r/flex/flex ; \
137 else echo ${DEFAULT_LEX} ; fi`
139 M4
= `if [ -f $$r/m4/m4 ] ; \
140 then echo $$r/m4/m4 ; \
141 else echo ${DEFAULT_M4} ; fi`
143 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
144 then echo $$r/texinfo/makeinfo/makeinfo ; \
145 else echo makeinfo ; fi`
147 # This just becomes part of the MAKEINFO definition passed down to
148 # sub-makes. It lets flags be given on the command line while still
149 # using the makeinfo from the object tree.
152 EXPECT
= `if [ -f $$r/expect/expect ] ; \
153 then echo $$r/expect/expect ; \
154 else echo expect ; fi`
156 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
157 then echo $$s/dejagnu/runtest ; \
158 else echo runtest ; fi`
161 # compilers to use to create programs which must be run in the build
164 CXX_FOR_BUILD
= $(CXX
)
166 SUBDIRS
= "this is set via configure, don't edit this"
169 # This is set by the configure script to the list of directories which
170 # should be built using the target tools.
171 TARGET_CONFIGDIRS
= libiberty libgloss newlib libio librx libstdc
++ libg
++ winsup opcodes libstub cygmon libf2c libchill libobjc
173 # Target libraries are put under this directory:
174 # Changed by configure to $(target_alias) if cross.
177 # This is set by the configure script to the arguments passed to configure.
180 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
184 # This is the name of the environment variable used for the path to
185 # the libraries. This may be changed by configure.in.
186 RPATH_ENVVAR
= LD_LIBRARY_PATH
188 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
189 REALLY_SET_LIB_PATH
= \
190 if
[ x
"$$$(RPATH_ENVVAR)" != x
]; then \
191 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
193 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
; \
195 export $(RPATH_ENVVAR
);
198 INSTALL_TARGET
= installdirs \
201 $(INSTALL_TARGET_MODULES
) \
202 $(INSTALL_X11_MODULES
) \
205 INSTALL_TARGET_CROSS
= installdirs \
208 $(INSTALL_TARGET_MODULES
) \
209 $(INSTALL_X11_MODULES
) \
213 if [ -f $$r/gcc/xgcc ] ; then \
214 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
215 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
216 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$(build_tooldir)/bin/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
218 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
221 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \
224 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
227 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
231 # If CC_FOR_TARGET is not overriden on the command line, then this
232 # variable is passed down to the gcc Makefile, where it is used to
233 # build libgcc2.a. We define it here so that it can itself be
234 # overridden on the command line.
235 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/ -B
$(build_tooldir
)/bin
/
237 CHILL_FOR_TARGET
= ` \
238 if [ -f $$r/gcc/xgcc ] ; then \
239 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -L$$r/gcc/ch/runtime/; \
241 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
244 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
249 if [ -f $$r/gcc/xgcc ] ; then \
250 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
251 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
252 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$(build_tooldir)/bin/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
254 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
257 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \
260 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
263 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
268 if [ -f $$r/gas/as-new ] ; then \
269 echo $$r/gas/as-new ; \
271 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
274 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
279 if [ -f $$r/ld/ld-new ] ; then \
280 echo $$r/ld/ld-new ; \
282 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
285 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
289 DLLTOOL_FOR_TARGET
= ` \
290 if [ -f $$r/binutils/dlltool ] ; then \
291 echo $$r/binutils/dlltool ; \
293 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
296 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
300 WINDRES_FOR_TARGET
= ` \
301 if [ -f $$r/binutils/windres ] ; then \
302 echo $$r/binutils/windres ; \
304 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
307 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
312 if [ -f $$r/binutils/ar ] ; then \
313 echo $$r/binutils/ar ; \
315 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
318 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
322 RANLIB_FOR_TARGET
= ` \
323 if [ -f $$r/binutils/ranlib ] ; then \
324 echo $$r/binutils/ranlib ; \
326 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
329 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
334 if [ -f $$r/binutils/nm-new ] ; then \
335 echo $$r/binutils/nm-new ; \
337 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
340 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
344 # The first rule in the file had better be this one. Don't put any above it.
345 # This lives here to allow makefile fragments to contain dependencies.
349 # These can be overridden by config/mt-*.
350 # The _TARGET_ is because they're specified in mt-foo.
351 # The _HOST_ is because they're programs that run on the host.
352 EXTRA_TARGET_HOST_ALL_MODULES
=
353 EXTRA_TARGET_HOST_INSTALL_MODULES
=
354 EXTRA_TARGET_HOST_CHECK_MODULES
=
356 #### host and target specific makefile fragments come in here.
359 # Flags to pass down to all sub-makes.
360 # Please keep these in alphabetical order.
361 BASE_FLAGS_TO_PASS
= \
362 "AR_FLAGS=$(AR_FLAGS)" \
363 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
364 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
366 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
367 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
369 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
370 "CHILLFLAGS=$(CHILLFLAGS)" \
371 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
372 "CHILL_LIB=$(CHILL_LIB)" \
373 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
374 "CXXFLAGS=$(CXXFLAGS)" \
375 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
376 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
377 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
378 "INSTALL=$(INSTALL)" \
379 "INSTALL_DATA=$(INSTALL_DATA)" \
380 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
381 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
382 "LDFLAGS=$(LDFLAGS)" \
384 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
385 "LIBCFLAGS=$(LIBCFLAGS)" \
386 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
387 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
388 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
391 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
392 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
393 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
394 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
397 "RUNTEST=$(RUNTEST)" \
398 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
399 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
400 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
403 "datadir=$(datadir)" \
404 "exec_prefix=$(exec_prefix)" \
405 "includedir=$(includedir)" \
406 "infodir=$(infodir)" \
408 "libexecdir=$(libexecdir)" \
409 "lispdir=$(lispdir)" \
410 "localstatedir=$(localstatedir)" \
412 "oldincludedir=$(oldincludedir)" \
414 "sbindir=$(sbindir)" \
415 "sharedstatedir=$(sharedstatedir)" \
416 "sysconfdir=$(sysconfdir)" \
417 "tooldir=$(tooldir)" \
418 "build_tooldir=$(build_tooldir)" \
419 "gxx_include_dir=$(gxx_include_dir)" \
420 "gcc_version=$(gcc_version)" \
421 "gcc_version_trigger=$(gcc_version_trigger)" \
422 "target_alias=$(target_alias)" \
423 "libsubdir=$(libsubdir)"
425 # Flags to pass down to most sub-makes, in which we're building with
426 # the host environment.
427 # If any variables are added here, they must be added to do-*, below.
433 'DLLTOOL=$(DLLTOOL)' \
439 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
441 # Flags that are concerned with the location of the X11 include files
444 # NOTE: until the top-level is getting the values via autoconf, it only
445 # causes problems to have this top-level Makefile overriding the autoconf-set
446 # values in child directories. Only variables that don't conflict with
447 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
449 X11_FLAGS_TO_PASS
= \
450 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
451 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
453 # Flags to pass down to makes which are built with the target environment.
454 # The double $ decreases the length of the command line; the variables
455 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
456 # If any variables are added here, they must be added to do-*, below.
457 EXTRA_TARGET_FLAGS
= \
458 'AR=$$(AR_FOR_TARGET)' \
459 'AS=$$(AS_FOR_TARGET)' \
460 'CC=$$(CC_FOR_TARGET)' \
461 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
462 'CXX=$$(CXX_FOR_TARGET)' \
463 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
464 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
465 'LD=$$(LD_FOR_TARGET)' \
466 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
467 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
468 'NM=$$(NM_FOR_TARGET)' \
469 'RANLIB=$$(RANLIB_FOR_TARGET)' \
470 'WINDRES=$$(WINDRES_FOR_TARGET)'
472 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
474 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
475 # unfortunately needs the native compiler and the target ar and
477 # If any variables are added here, they must be added to do-*, below.
478 # The HOST_* variables are a special case, which are used for the gcc
479 # cross-building scheme.
485 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
486 'HOST_CC=$(CC_FOR_BUILD)' \
487 'HOST_PREFIX=$(HOST_PREFIX)' \
488 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
491 'WINDRES=$$(WINDRES_FOR_TARGET)' \
492 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
493 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
494 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
495 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
496 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
497 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
498 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
499 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
500 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
501 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
503 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
505 # This is a list of the targets for all of the modules which are compiled
506 # using $(FLAGS_TO_PASS).
569 $(EXTRA_TARGET_HOST_ALL_MODULES
)
571 # This is a list of the check targets for all of the modules which are
572 # compiled using $(FLAGS_TO_PASS).
574 # The list is in two parts. The first lists those tools which
575 # are tested as part of the host's native tool-chain, and not
576 # tested in a cross configuration.
577 NATIVE_CHECK_MODULES
= \
582 CROSS_CHECK_MODULES
= \
639 $(EXTRA_TARGET_HOST_CHECK_MODULES
)
641 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
643 # This is a list of the install targets for all of the modules which are
644 # compiled using $(FLAGS_TO_PASS).
645 # We put install-opcodes before install-binutils because the installed
646 # binutils might be on PATH, and they might need the shared opcodes
648 # We put install-tcl before install-itcl because itcl wants to run a
649 # program on installation which uses the Tcl libraries.
712 $(EXTRA_TARGET_HOST_INSTALL_MODULES
)
714 # This is a list of the targets for all of the modules which are compiled
715 # using $(X11_FLAGS_TO_PASS).
727 # This is a list of the check targets for all of the modules which are
728 # compiled using $(X11_FLAGS_TO_PASS).
729 CHECK_X11_MODULES
= \
739 # This is a list of the install targets for all the modules which are
740 # compiled using $(X11_FLAGS_TO_PASS).
741 INSTALL_X11_MODULES
= \
752 # This is a list of the targets for all of the modules which are compiled
753 # using $(TARGET_FLAGS_TO_PASS).
754 ALL_TARGET_MODULES
= \
756 all-target-libstdc
++ \
761 all-target-libchill \
764 all-target-libgloss \
765 all-target-libiberty \
767 all-target-examples \
771 # This is a list of the configure targets for all of the modules which
772 # are compiled using the target tools.
773 CONFIGURE_TARGET_MODULES
= \
774 configure-target-libio \
775 configure-target-libstdc
++ \
776 configure-target-librx \
777 configure-target-libg
++ \
778 configure-target-newlib \
779 configure-target-libf2c \
780 configure-target-libchill \
781 configure-target-libobjc \
782 configure-target-winsup \
783 configure-target-libgloss \
784 configure-target-libiberty \
785 configure-target-gperf \
786 configure-target-examples \
787 configure-target-libstub \
788 configure-target-cygmon
790 # This is a list of the check targets for all of the modules which are
791 # compiled using $(TARGET_FLAGS_TO_PASS).
792 CHECK_TARGET_MODULES
= \
794 check-target-libstdc
++ \
795 check-target-libg
++ \
796 check-target-newlib \
797 check-target-libf2c \
798 check-target-libchill \
799 check-target-libobjc \
800 check-target-winsup \
801 check-target-libiberty \
804 # This is a list of the install targets for all of the modules which are
805 # compiled using $(TARGET_FLAGS_TO_PASS).
806 INSTALL_TARGET_MODULES
= \
807 install-target-libio \
808 install-target-libstdc
++ \
809 install-target-libg
++ \
810 install-target-newlib \
811 install-target-libf2c \
812 install-target-libchill \
813 install-target-libobjc \
814 install-target-winsup \
815 install-target-libgloss \
816 install-target-libiberty \
819 # This is a list of the targets for which we can do a clean-{target}.
884 # All of the target modules that can be cleaned
885 CLEAN_TARGET_MODULES
= \
887 clean-target-libstdc
++ \
889 clean-target-libg
++ \
890 clean-target-newlib \
891 clean-target-libf2c \
892 clean-target-libchill \
893 clean-target-libobjc \
894 clean-target-winsup \
895 clean-target-libgloss \
896 clean-target-libiberty \
898 clean-target-examples \
899 clean-target-libstub \
902 # All of the x11 modules that can be cleaned
903 CLEAN_X11_MODULES
= \
914 # The first rule in the file had better be this one. Don't put any above it.
918 # The target built for a native build.
923 $(ALL_TARGET_MODULES
) \
926 # Do a target for all the subdirectories. A ``make do-X'' will do a
927 # ``make X'' in all subdirectories (because, in general, there is a
928 # dependency (below) of X upon do-X, a ``make X'' will also do this,
929 # but it may do additional work as well).
930 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
931 # because it is so large that it can easily overflow the command line
932 # length limit on some systems.
941 do-maintainer-clean \
945 @target
=`echo $@ | sed -e 's/^do-//'`; \
947 s
=`cd $(srcdir); pwd`; export s
; \
949 for i in
$(SUBDIRS
) -dummy-
; do \
950 if
[ -f .
/$$i/Makefile
]; then \
953 for flag in
$(EXTRA_GCC_FLAGS
); do \
954 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
958 for flag in
$(EXTRA_HOST_FLAGS
); do \
959 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
963 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
965 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
966 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
967 "RANLIB=$${RANLIB}" \
968 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
970 then true
; else exit
1; fi
; \
973 @target
=`echo $@ | sed -e 's/^do-//'`; \
975 s
=`cd $(srcdir); pwd`; export s
; \
977 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
978 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
979 for flag in
$(EXTRA_TARGET_FLAGS
); do \
980 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
982 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
983 if
(cd
$(TARGET_SUBDIR
)/$$i; \
984 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
985 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
986 "RANLIB=$${RANLIB}" \
987 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
989 then true
; else exit
1; fi
; \
993 # Here are the targets which correspond to the do-X targets.
995 .PHONY
: info installcheck dvi install-info
996 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
997 .PHONY
: local-clean local-distclean local-maintainer-clean
999 installcheck: do-installcheck
1002 # Make sure makeinfo is built before we do a `make info'.
1003 do-info
: all-texinfo
1005 install-info
: do-install-info
dir.
info
1006 s
=`cd $(srcdir); pwd`; export s
; \
1007 if
[ -f
dir.
info ] ; then \
1008 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
1012 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E *.log
1015 -rm -f Makefile config.status config.cache mh-frag mt-frag
1016 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
1017 rm -rf
$(TARGET_SUBDIR
); \
1020 local-maintainer-clean
:
1021 @echo
"This command is intended for maintainers to use;"
1022 @echo
"it deletes files that may require special tools to rebuild."
1024 clean: do-clean local-clean
1025 mostlyclean: do-mostlyclean local-clean
1026 distclean: do-distclean local-clean local-distclean
1027 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
1028 maintainer-clean
: local-distclean
1029 realclean: maintainer-clean
1031 # This rule is used to clean specific modules.
1032 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
1033 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
1034 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1035 if
[ -f .
/$${dir}/Makefile
] ; then \
1036 r
=`pwd`; export r
; \
1037 s
=`cd $(srcdir); pwd`; export s
; \
1039 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1044 .PHONY
: $(CLEAN_TARGET_MODULES
)
1045 $(CLEAN_TARGET_MODULES
):
1046 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1047 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1048 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1049 r
=`pwd`; export r
; \
1050 s
=`cd $(srcdir); pwd`; export s
; \
1052 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1057 clean-target
: $(CLEAN_TARGET_MODULES
)
1062 check: $(CHECK_MODULES
) \
1063 $(CHECK_TARGET_MODULES
) \
1064 $(CHECK_X11_MODULES
) \
1067 # Automated reporting of test results.
1069 warning.log
: build.log
1070 $(srcdir)/contrib
/warn_summary build.log
> $@
1073 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1074 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1076 $(srcdir)/contrib
/test_summary
-t
>$@
1078 echo If you really want to send e-mail
, run .
/$@ now
1080 mail-report-with-warnings.log
: warning.log
1081 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1082 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1084 $(srcdir)/contrib
/test_summary
-t
-i warning.log
>$@
1086 echo If you really want to send e-mail
, run .
/$@ now
1088 # Installation targets.
1090 .PHONY
: install install-cross
uninstall source-vault binary-vault vault-install
1091 install: $(INSTALL_TARGET
)
1092 install-cross
: $(INSTALL_TARGET_CROSS
)
1095 @echo
"the uninstall target is not supported in this tree"
1098 $(MAKE
) -f .
/release
/Build-A-Release \
1099 host
=$(host_alias
) source-vault
1102 $(MAKE
) -f .
/release
/Build-A-Release \
1103 host
=$(host_alias
) target
=$(target_alias
)
1106 @if
[ -f .
/release
/vault-install
] ; then \
1107 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1113 install.
all: install-no-fixedincludes
1114 @if
[ -f .
/gcc
/Makefile
] ; then \
1115 r
=`pwd` ; export r
; \
1118 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1123 # inet-install is used because the I*Net wants DejaGNU installed but
1124 # not built. Similarly, gzip is built but not installed.
1126 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1128 # install-no-fixedincludes is used because Cygnus can not distribute
1129 # the fixed header files.
1130 .PHONY
: install-no-fixedincludes
1131 install-no-fixedincludes
: \
1133 $(INSTALL_MODULES
) \
1134 $(INSTALL_TARGET_MODULES
) \
1135 $(INSTALL_X11_MODULES
) \
1136 gcc-no-fixedincludes
1138 # Install the gcc headers files, but not the fixed include files,
1139 # which Cygnus is not allowed to distribute. This rule is very
1140 # dependent on the workings of the gcc Makefile.in.
1141 .PHONY
: gcc-no-fixedincludes
1142 gcc-no-fixedincludes
:
1143 @if
[ -f .
/gcc
/Makefile
]; then \
1144 rm -rf gcc
/tmp-include
; \
1145 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1146 mkdir gcc
/include; \
1147 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1148 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1149 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1150 r
=`pwd`; export r
; \
1151 s
=`cd $(srcdir); pwd` ; export s
; \
1154 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1155 rm -rf gcc
/include; \
1156 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1159 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1160 # build a target all-X means to cd to X and make all.
1162 # all-gui, and all-libproc are handled specially because
1163 # they are still experimental, and if they fail to build, that
1164 # shouldn't stop "make all".
1165 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1166 $(ALL_MODULES
) all-gui all-libproc
:
1167 @
dir=`echo $@ | sed -e 's/all-//'`; \
1168 if
[ -f .
/$${dir}/Makefile
] ; then \
1169 r
=`pwd`; export r
; \
1170 s
=`cd $(srcdir); pwd`; export s
; \
1172 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1177 # These rules are used to check the modules which use FLAGS_TO_PASS.
1178 # To build a target check-X means to cd to X and make check. Some
1179 # modules are only tested in a native toolchain.
1181 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1182 $(NATIVE_CHECK_MODULES
):
1183 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1184 dir=`echo $@ | sed -e 's/check-//'`; \
1185 if
[ -f .
/$${dir}/Makefile
] ; then \
1186 r
=`pwd`; export r
; \
1187 s
=`cd $(srcdir); pwd`; export s
; \
1189 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1195 $(CROSS_CHECK_MODULES
):
1196 @
dir=`echo $@ | sed -e 's/check-//'`; \
1197 if
[ -f .
/$${dir}/Makefile
] ; then \
1198 r
=`pwd`; export r
; \
1199 s
=`cd $(srcdir); pwd`; export s
; \
1201 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1206 # This rule is used to install the modules which use FLAGS_TO_PASS.
1207 # To build a target install-X means to cd to X and make install.
1208 .PHONY
: $(INSTALL_MODULES
)
1209 $(INSTALL_MODULES
): installdirs
1210 @
dir=`echo $@ | sed -e 's/install-//'`; \
1211 if
[ -f .
/$${dir}/Makefile
] ; then \
1212 r
=`pwd`; export r
; \
1213 s
=`cd $(srcdir); pwd`; export s
; \
1215 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1220 # This rule is used to configure the modules which are built with the
1222 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1223 $(CONFIGURE_TARGET_MODULES
):
1224 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1225 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1226 r
=`pwd`; export r
; \
1227 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1228 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1229 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1230 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1231 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1233 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1234 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1235 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1238 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1241 fi
; exit
0 # break command into two pieces
1242 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1243 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1245 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1247 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1248 if
[ -d
$(srcdir)/$${dir} ]; then \
1249 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1250 r
=`pwd`; export r
; \
1251 s
=`cd $(srcdir); pwd`; export s
; \
1253 AR
="$(AR_FOR_TARGET)"; export AR
; \
1254 AS
="$(AS_FOR_TARGET)"; export AS
; \
1255 CC
="$(CC_FOR_TARGET)"; export CC
; \
1256 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1257 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1258 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1259 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1260 LD
="$(LD_FOR_TARGET)"; export LD
; \
1261 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1262 NM
="$(NM_FOR_TARGET)"; export NM
; \
1263 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1264 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1265 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1266 cd
$(TARGET_SUBDIR
)/$${dir}; \
1269 topdir
=$(srcdir) ;; \
1271 case
"$(TARGET_SUBDIR)" in \
1272 .
) topdir
="../$(srcdir)" ;; \
1273 *) topdir
="../../$(srcdir)" ;; \
1276 if
[ "$(srcdir)" = "." ] ; then \
1277 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1278 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1279 if
[ -f Makefile
]; then \
1280 if
$(MAKE
) distclean; then \
1294 srcdiroption
="--srcdir=."; \
1297 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1298 libsrcdir
="$$s/$${dir}"; \
1300 if
[ -f
$${libsrcdir}/configure
] ; then \
1301 rm -f no-such-file skip-this-dir
; \
1302 CONFIG_SITE
=no-such-file
$(SHELL
) $${libsrcdir}/configure \
1303 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1304 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1306 rm -f no-such-file skip-this-dir
; \
1307 CONFIG_SITE
=no-such-file
$(SHELL
) $$s/configure \
1308 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1309 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1311 if
[ -f skip-this-dir
] ; then \
1313 rm -f skip-this-dir
; \
1314 cd ..
; rmdir
$${dir} || true
; \
1325 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1326 # To build a target all-X means to cd to X and make all.
1327 .PHONY
: $(ALL_TARGET_MODULES
)
1328 $(ALL_TARGET_MODULES
):
1329 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1330 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1331 r
=`pwd`; export r
; \
1332 s
=`cd $(srcdir); pwd`; export s
; \
1334 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1339 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1340 # To build a target install-X means to cd to X and make install.
1341 .PHONY
: $(CHECK_TARGET_MODULES
)
1342 $(CHECK_TARGET_MODULES
):
1343 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1344 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1345 r
=`pwd`; export r
; \
1346 s
=`cd $(srcdir); pwd`; export s
; \
1348 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1353 # This rule is used to install the modules which use
1354 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1356 .PHONY
: $(INSTALL_TARGET_MODULES
)
1357 $(INSTALL_TARGET_MODULES
): installdirs
1358 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1359 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1360 r
=`pwd`; export r
; \
1361 s
=`cd $(srcdir); pwd`; export s
; \
1363 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1364 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1369 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1370 # To build a target all-X means to cd to X and make all.
1371 .PHONY
: $(ALL_X11_MODULES
)
1373 @
dir=`echo $@ | sed -e 's/all-//'`; \
1374 if
[ -f .
/$${dir}/Makefile
] ; then \
1375 r
=`pwd`; export r
; \
1376 s
=`cd $(srcdir); pwd`; export s
; \
1379 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1384 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1385 # To build a target check-X means to cd to X and make all.
1386 .PHONY
: $(CHECK_X11_MODULES
)
1387 $(CHECK_X11_MODULES
):
1388 @
dir=`echo $@ | sed -e 's/check-//'`; \
1389 if
[ -f .
/$${dir}/Makefile
] ; then \
1390 r
=`pwd`; export r
; \
1391 s
=`cd $(srcdir); pwd`; export s
; \
1394 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1399 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1400 # To build a target install-X means to cd to X and make install.
1401 .PHONY
: $(INSTALL_X11_MODULES
)
1402 $(INSTALL_X11_MODULES
): installdirs
1403 @
dir=`echo $@ | sed -e 's/install-//'`; \
1404 if
[ -f .
/$${dir}/Makefile
] ; then \
1405 r
=`pwd`; export r
; \
1406 s
=`cd $(srcdir); pwd`; export s
; \
1409 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1414 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1417 @if
[ -f .
/gcc
/Makefile
] ; then \
1418 r
=`pwd`; export r
; \
1419 s
=`cd $(srcdir); pwd`; export s
; \
1421 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1426 # Building GCC uses some tools for rebuilding "source" files
1427 # like texinfo, bison/byacc, etc. So we must depend on those.
1429 # While building GCC, it may be necessary to run various target
1430 # programs like the assembler, linker, etc. So we depend on
1433 # In theory, on an SMP all those dependencies can be resolved
1436 .PHONY
: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1437 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1438 @r
=`pwd`; export r
; \
1439 s
=`cd $(srcdir); pwd`; export s
; \
1441 echo
"Bootstrapping the compiler"; \
1442 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $@
1443 @r
=`pwd`; export r
; \
1444 s
=`cd $(srcdir); pwd`; export s
; \
1446 *bootstrap4-lean
) \
1447 msg
="Comparing stage3 and stage4 of the compiler"; \
1448 compare
=compare3-lean
;; \
1449 *bootstrap4
) msg
="Comparing stage3 and stage4 of the compiler"; \
1450 compare
=compare3
;; \
1451 *-lean
) msg
="Comparing stage2 and stage3 of the compiler"; \
1452 compare
=compare-lean
;; \
1453 * ) msg
="Comparing stage2 and stage3 of the compiler"; \
1454 compare
=compare
;; \
1458 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $$compare
1459 @r
=`pwd`; export r
; \
1460 s
=`cd $(srcdir); pwd` ; export s
; \
1462 echo
"Building runtime libraries"; \
1463 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all
1466 cross
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1467 @r
=`pwd`; export r
; \
1468 s
=`cd $(srcdir); pwd`; export s
; \
1470 echo
"Building the C and C++ compiler"; \
1471 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++"
1472 @r
=`pwd`; export r
; \
1473 s
=`cd $(srcdir); pwd` ; export s
; \
1475 echo
"Building runtime libraries"; \
1476 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all LANGUAGES
="c c++"
1480 @if
[ -f .
/gcc
/Makefile
] ; then \
1481 r
=`pwd`; export r
; \
1482 s
=`cd $(srcdir); pwd`; export s
; \
1484 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1491 @if
[ -f .
/gcc
/Makefile
] ; then \
1492 r
=`pwd`; export r
; \
1493 s
=`cd $(srcdir); pwd`; export s
; \
1495 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1500 .PHONY
: install-gcc-cross
1502 @if
[ -f .
/gcc
/Makefile
] ; then \
1503 r
=`pwd`; export r
; \
1504 s
=`cd $(srcdir); pwd`; export s
; \
1506 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++" install); \
1510 # EXPERIMENTAL STUFF
1511 # This rule is used to install the modules which use FLAGS_TO_PASS.
1512 # To build a target install-X means to cd to X and make install.
1513 .PHONY
: install-dosrel
1514 install-dosrel
: installdirs info
1515 @
dir=`echo $@ | sed -e 's/install-//'`; \
1516 if
[ -f .
/$${dir}/Makefile
] ; then \
1517 r
=`pwd`; export r
; \
1518 s
=`cd $(srcdir); pwd`; export s
; \
1520 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1525 install-dosrel-fake
:
1528 # This is a list of inter-dependencies among modules.
1531 all-autoconf
: all-m4 all-texinfo
1532 all-automake
: all-m4 all-texinfo
1534 all-bfd
: all-libiberty all-intl
1535 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1536 all-bison
: all-texinfo
1540 configure-target-cygmon
: $(ALL_GCC
)
1541 all-target-cygmon
: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub
1543 all-dejagnu
: all-tcl all-expect all-tk
1544 all-diff
: all-libiberty
1546 all-emacs19
: all-bison all-byacc
1548 configure-target-examples
: $(ALL_GCC
)
1549 all-target-examples
: configure-target-examples
1550 all-expect
: all-tcl all-tk
1551 all-fileutils
: all-libiberty
1554 all-flex
: all-libiberty all-bison all-byacc
1555 all-gas
: all-libiberty all-opcodes all-bfd all-intl
1559 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld
1560 all-bootstrap
: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1561 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui
1562 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1565 configure-target-gperf
: $(ALL_GCC
)
1566 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++
1567 all-gprof
: all-libiberty all-bfd all-opcodes all-intl
1568 all-grep
: all-libiberty
1569 all-grez
: all-libiberty all-bfd all-opcodes
1570 all-gui
: all-gdb all-libproc all-target-librx
1572 all-gzip
: all-libiberty
1573 all-hello
: all-libiberty
1575 all-inet
: all-tcl all-send-pr all-perl
1577 all-ispell
: all-emacs19
1578 all-itcl
: all-tcl all-tk
1579 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1580 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1581 all-target-libg
++: configure-target-libg
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc
++
1582 configure-target-libgloss
: $(ALL_GCC
)
1583 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1584 configure-target-libio
: $(ALL_GCC
)
1585 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1586 check-target-libio
: all-target-libstdc
++
1587 all-libgui
: all-tcl all-tk all-itcl
1589 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1590 all-target-librx
: configure-target-librx
1591 configure-target-libstdc
++: $(ALL_GCC
)
1592 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1593 configure-target-libstub
: $(ALL_GCC
)
1594 all-target-libstub
: configure-target-libstub
1596 all-target-libf2c
: configure-target-libf2c all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1597 all-target-libchill
: configure-target-libchill all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1598 all-target-libobjc
: configure-target-libobjc all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1599 all-m4
: all-libiberty
1600 all-make
: all-libiberty
1602 configure-target-newlib
: $(ALL_GCC
)
1603 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1604 all-opcodes
: all-bfd all-libiberty
1605 all-patch
: all-libiberty
1607 all-prms
: all-libiberty
1610 all-recode
: all-libiberty
1611 all-sed
: all-libiberty
1612 all-send-pr
: all-prms
1614 all-sim
: all-libiberty all-bfd all-opcodes all-readline
1615 all-snavigator
: all-tcl all-tk all-itcl all-db all-grep all-libgui
1616 all-tar
: all-libiberty
1618 all-tclX
: all-tcl all-tk
1620 all-texinfo
: all-libiberty
1622 all-tgas
: all-libiberty all-bfd all-opcodes
1624 all-tix
: all-tcl all-tk
1626 all-target-winsup
: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
1627 configure-target-winsup
: configure-target-newlib
1628 all-uudecode
: all-libiberty
1629 configure-target-libiberty
: $(ALL_GCC
)
1630 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1631 all-target
: $(ALL_TARGET_MODULES
)
1632 install-target
: $(INSTALL_TARGET_MODULES
)
1634 ### other supporting targets
1640 installdirs: mkinstalldirs
1641 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1643 dir.
info: do-install-info
1644 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1645 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1646 mv
-f
dir.
info.new
dir.
info ; \
1651 @echo
"Building a full distribution of this tree isn't done"
1652 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1656 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1657 # ability to use several tags files at once, so there is probably no need
1658 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1659 # (if we felt like it) have this Makefile write a piece of elisp which
1660 # the user could load to tell emacs19 where all the TAGS files we just
1664 # with the gnu make, this is done automatically.
1666 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
) $(gcc_version_trigger
)
1667 $(SHELL
) .
/config.status
1670 # Support for building net releases
1672 # Files in devo used in any net release.
1673 # ChangeLog omitted because it may refer to files which are not in this
1674 # distribution (perhaps it would be better to include it anyway).
1675 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1676 config.guess config.if config.sub config move-if-change \
1677 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1678 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1679 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1681 # Files in devo/etc used in any net release.
1682 # ChangeLog omitted because it may refer to files which are not in this
1683 # distribution (perhaps it would be better to include it anyway).
1684 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1685 make-stds.texi standards.
info*
1687 # When you use `make setup-dirs' or `make taz' you should always redefine
1689 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1693 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1694 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1695 # Take out texinfo from a few places
1696 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1697 -e
'/^ install-texinfo /d' \
1699 mv
-f tmp Makefile.in
1702 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1703 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1704 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1705 # Make links, and run "make diststuff" or "make info" when needed.
1706 rm -rf proto-toplev
; mkdir proto-toplev
1707 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1708 for d in
$$dirs ; do \
1709 if
[ -d
$$d ]; then \
1710 if
[ ! -f
$$d/Makefile
] ; then true
; \
1711 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1712 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1713 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1714 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1716 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1717 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1719 ln
-s ..
/$$d proto-toplev
/$$d ; \
1721 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1723 cd etc
; $(MAKE
) info
1726 mkdir proto-toplev
/etc
1727 (cd proto-toplev
/etc
; \
1728 for i in
$(ETC_SUPPORT
); do \
1729 ln
-s ..
/..
/etc
/$$i .
; \
1732 # Take out texinfo from configurable dirs
1733 rm proto-toplev
/configure.in
1734 sed
-e
'/^host_tools=/s/texinfo //' \
1735 <configure.in
>proto-toplev
/configure.in
1737 mkdir proto-toplev
/texinfo
1738 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1739 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1740 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1741 if
test -r texinfo
/util
/tex3patch
; then \
1742 mkdir proto-toplev
/texinfo
/util
&& \
1743 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1745 chmod
-R og
=u . || chmod og
=u
`find . -print`
1746 if grep AM_INIT_AUTOMAKE
$(TOOL
)/configure.in
>/dev
/null
2>&1; then \
1747 ver
=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1749 ver
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1751 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) VER
=$$ver
1754 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1755 -rm -f
$(TOOL
)-$(VER
)
1756 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1757 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1758 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1760 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1761 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1764 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes intl setup.com makefile.vms
1765 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1766 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1767 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1769 # The FSF "binutils" release includes gprof and ld.
1770 .PHONY
: binutils.
tar.gz
1771 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof intl setup.com makefile.vms
1772 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1773 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1774 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1776 .PHONY
: gas
+binutils.
tar.gz
1777 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1778 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1779 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1780 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1782 .PHONY
: libg
++.
tar.gz
1783 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1784 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1785 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1786 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1788 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1789 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1790 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1791 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1794 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils intl
1795 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1796 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1797 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1798 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1800 .PHONY
: newlib.
tar.gz
1801 NEWLIB_SUPPORT_DIRS
=libgloss
1802 # taz configures for the sun4 target which won't configure newlib.
1803 # We need newlib configured so that the .info files are made.
1804 # Unfortunately, it is not enough to just configure newlib separately:
1805 # taz will build the .info files but since SUBDIRS won't contain newlib,
1806 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1807 # used in building the .info files, eg: *.def, *.ref).
1808 # The problem isn't solvable however without a lot of extra work because
1809 # target libraries are built in subdir $(target_alias) which gets nuked during
1810 # the make distclean. For now punt on the issue of shipping newlib info files
1811 # with newlib net releases and wait for a day when some native target (sun4?)
1812 # supports newlib (if only minimally).
1813 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1814 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1815 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1816 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1821 # end of Makefile.in