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 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
191 export $(RPATH_ENVVAR
);
194 INSTALL_TARGET
= installdirs \
197 $(INSTALL_TARGET_MODULES
) \
198 $(INSTALL_X11_MODULES
) \
201 INSTALL_TARGET_CROSS
= installdirs \
204 $(INSTALL_TARGET_MODULES
) \
205 $(INSTALL_X11_MODULES
) \
209 if [ -f $$r/gcc/xgcc ] ; then \
210 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
211 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
212 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; \
214 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
217 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \
220 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
223 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
227 # If CC_FOR_TARGET is not overriden on the command line, then this
228 # variable is passed down to the gcc Makefile, where it is used to
229 # build libgcc2.a. We define it here so that it can itself be
230 # overridden on the command line.
231 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/ -B
$(build_tooldir
)/bin
/
233 CHILL_FOR_TARGET
= ` \
234 if [ -f $$r/gcc/xgcc ] ; then \
235 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -L$$r/gcc/ch/runtime/; \
237 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
240 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
245 if [ -f $$r/gcc/xgcc ] ; then \
246 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
247 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
248 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; \
250 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
253 echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \
256 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
259 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
264 if [ -f $$r/gas/as-new ] ; then \
265 echo $$r/gas/as-new ; \
267 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
270 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
275 if [ -f $$r/ld/ld-new ] ; then \
276 echo $$r/ld/ld-new ; \
278 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
281 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
285 DLLTOOL_FOR_TARGET
= ` \
286 if [ -f $$r/binutils/dlltool ] ; then \
287 echo $$r/binutils/dlltool ; \
289 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
292 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
296 WINDRES_FOR_TARGET
= ` \
297 if [ -f $$r/binutils/windres ] ; then \
298 echo $$r/binutils/windres ; \
300 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
303 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
308 if [ -f $$r/binutils/ar ] ; then \
309 echo $$r/binutils/ar ; \
311 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
314 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
318 RANLIB_FOR_TARGET
= ` \
319 if [ -f $$r/binutils/ranlib ] ; then \
320 echo $$r/binutils/ranlib ; \
322 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
325 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
330 if [ -f $$r/binutils/nm-new ] ; then \
331 echo $$r/binutils/nm-new ; \
333 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
336 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
340 # The first rule in the file had better be this one. Don't put any above it.
341 # This lives here to allow makefile fragments to contain dependencies.
345 # These can be overridden by config/mt-*.
346 # The _TARGET_ is because they're specified in mt-foo.
347 # The _HOST_ is because they're programs that run on the host.
348 EXTRA_TARGET_HOST_ALL_MODULES
=
349 EXTRA_TARGET_HOST_INSTALL_MODULES
=
350 EXTRA_TARGET_HOST_CHECK_MODULES
=
352 #### host and target specific makefile fragments come in here.
355 # Flags to pass down to all sub-makes.
356 # Please keep these in alphabetical order.
357 BASE_FLAGS_TO_PASS
= \
358 "AR_FLAGS=$(AR_FLAGS)" \
359 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
360 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
362 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
363 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
365 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
366 "CHILLFLAGS=$(CHILLFLAGS)" \
367 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
368 "CHILL_LIB=$(CHILL_LIB)" \
369 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
370 "CXXFLAGS=$(CXXFLAGS)" \
371 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
372 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
373 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
374 "INSTALL=$(INSTALL)" \
375 "INSTALL_DATA=$(INSTALL_DATA)" \
376 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
377 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
378 "LDFLAGS=$(LDFLAGS)" \
380 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
381 "LIBCFLAGS=$(LIBCFLAGS)" \
382 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
383 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
384 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
387 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
388 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
389 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
390 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
393 "RUNTEST=$(RUNTEST)" \
394 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
395 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
396 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
399 "datadir=$(datadir)" \
400 "exec_prefix=$(exec_prefix)" \
401 "includedir=$(includedir)" \
402 "infodir=$(infodir)" \
404 "libexecdir=$(libexecdir)" \
405 "lispdir=$(lispdir)" \
406 "localstatedir=$(localstatedir)" \
408 "oldincludedir=$(oldincludedir)" \
410 "sbindir=$(sbindir)" \
411 "sharedstatedir=$(sharedstatedir)" \
412 "sysconfdir=$(sysconfdir)" \
413 "tooldir=$(tooldir)" \
414 "build_tooldir=$(build_tooldir)" \
415 "gxx_include_dir=$(gxx_include_dir)" \
416 "gcc_version=$(gcc_version)" \
417 "gcc_version_trigger=$(gcc_version_trigger)" \
418 "target_alias=$(target_alias)" \
419 "libsubdir=$(libsubdir)"
421 # Flags to pass down to most sub-makes, in which we're building with
422 # the host environment.
423 # If any variables are added here, they must be added to do-*, below.
429 'DLLTOOL=$(DLLTOOL)' \
435 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
437 # Flags that are concerned with the location of the X11 include files
440 # NOTE: until the top-level is getting the values via autoconf, it only
441 # causes problems to have this top-level Makefile overriding the autoconf-set
442 # values in child directories. Only variables that don't conflict with
443 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
445 X11_FLAGS_TO_PASS
= \
446 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
447 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
449 # Flags to pass down to makes which are built with the target environment.
450 # The double $ decreases the length of the command line; the variables
451 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
452 # If any variables are added here, they must be added to do-*, below.
453 EXTRA_TARGET_FLAGS
= \
454 'AR=$$(AR_FOR_TARGET)' \
455 'AS=$$(AS_FOR_TARGET)' \
456 'CC=$$(CC_FOR_TARGET)' \
457 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
458 'CXX=$$(CXX_FOR_TARGET)' \
459 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
460 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
461 'LD=$$(LD_FOR_TARGET)' \
462 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
463 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
464 'NM=$$(NM_FOR_TARGET)' \
465 'RANLIB=$$(RANLIB_FOR_TARGET)' \
466 'WINDRES=$$(WINDRES_FOR_TARGET)'
468 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
470 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
471 # unfortunately needs the native compiler and the target ar and
473 # If any variables are added here, they must be added to do-*, below.
474 # The HOST_* variables are a special case, which are used for the gcc
475 # cross-building scheme.
477 'AR=$$(AR_FOR_TARGET)' \
481 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
482 'HOST_CC=$(CC_FOR_BUILD)' \
483 'HOST_PREFIX=$(HOST_PREFIX)' \
484 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
486 'RANLIB=$$(RANLIB_FOR_TARGET)' \
487 'WINDRES=$$(WINDRES_FOR_TARGET)' \
488 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
489 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
490 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
491 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
492 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
493 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
494 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
495 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
496 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
497 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
499 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
501 # This is a list of the targets for all of the modules which are compiled
502 # using $(FLAGS_TO_PASS).
565 $(EXTRA_TARGET_HOST_ALL_MODULES
)
567 # This is a list of the check targets for all of the modules which are
568 # compiled using $(FLAGS_TO_PASS).
570 # The list is in two parts. The first lists those tools which
571 # are tested as part of the host's native tool-chain, and not
572 # tested in a cross configuration.
573 NATIVE_CHECK_MODULES
= \
578 CROSS_CHECK_MODULES
= \
635 $(EXTRA_TARGET_HOST_CHECK_MODULES
)
637 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
639 # This is a list of the install targets for all of the modules which are
640 # compiled using $(FLAGS_TO_PASS).
641 # We put install-opcodes before install-binutils because the installed
642 # binutils might be on PATH, and they might need the shared opcodes
644 # We put install-tcl before install-itcl because itcl wants to run a
645 # program on installation which uses the Tcl libraries.
708 $(EXTRA_TARGET_HOST_INSTALL_MODULES
)
710 # This is a list of the targets for all of the modules which are compiled
711 # using $(X11_FLAGS_TO_PASS).
723 # This is a list of the check targets for all of the modules which are
724 # compiled using $(X11_FLAGS_TO_PASS).
725 CHECK_X11_MODULES
= \
735 # This is a list of the install targets for all the modules which are
736 # compiled using $(X11_FLAGS_TO_PASS).
737 INSTALL_X11_MODULES
= \
748 # This is a list of the targets for all of the modules which are compiled
749 # using $(TARGET_FLAGS_TO_PASS).
750 ALL_TARGET_MODULES
= \
752 all-target-libstdc
++ \
757 all-target-libchill \
760 all-target-libgloss \
761 all-target-libiberty \
763 all-target-examples \
767 # This is a list of the configure targets for all of the modules which
768 # are compiled using the target tools.
769 CONFIGURE_TARGET_MODULES
= \
770 configure-target-libio \
771 configure-target-libstdc
++ \
772 configure-target-librx \
773 configure-target-libg
++ \
774 configure-target-newlib \
775 configure-target-libf2c \
776 configure-target-libchill \
777 configure-target-libobjc \
778 configure-target-winsup \
779 configure-target-libgloss \
780 configure-target-libiberty \
781 configure-target-gperf \
782 configure-target-examples \
783 configure-target-libstub \
784 configure-target-cygmon
786 # This is a list of the check targets for all of the modules which are
787 # compiled using $(TARGET_FLAGS_TO_PASS).
788 CHECK_TARGET_MODULES
= \
790 check-target-libstdc
++ \
791 check-target-libg
++ \
792 check-target-newlib \
793 check-target-libf2c \
794 check-target-libchill \
795 check-target-libobjc \
796 check-target-winsup \
797 check-target-libiberty \
800 # This is a list of the install targets for all of the modules which are
801 # compiled using $(TARGET_FLAGS_TO_PASS).
802 INSTALL_TARGET_MODULES
= \
803 install-target-libio \
804 install-target-libstdc
++ \
805 install-target-libg
++ \
806 install-target-newlib \
807 install-target-libf2c \
808 install-target-libchill \
809 install-target-libobjc \
810 install-target-winsup \
811 install-target-libgloss \
812 install-target-libiberty \
815 # This is a list of the targets for which we can do a clean-{target}.
880 # All of the target modules that can be cleaned
881 CLEAN_TARGET_MODULES
= \
883 clean-target-libstdc
++ \
885 clean-target-libg
++ \
886 clean-target-newlib \
887 clean-target-libf2c \
888 clean-target-libchill \
889 clean-target-libobjc \
890 clean-target-winsup \
891 clean-target-libgloss \
892 clean-target-libiberty \
894 clean-target-examples \
895 clean-target-libstub \
898 # All of the x11 modules that can be cleaned
899 CLEAN_X11_MODULES
= \
910 # The first rule in the file had better be this one. Don't put any above it.
914 # The target built for a native build.
919 $(ALL_TARGET_MODULES
) \
922 # Do a target for all the subdirectories. A ``make do-X'' will do a
923 # ``make X'' in all subdirectories (because, in general, there is a
924 # dependency (below) of X upon do-X, a ``make X'' will also do this,
925 # but it may do additional work as well).
926 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
927 # because it is so large that it can easily overflow the command line
928 # length limit on some systems.
937 do-maintainer-clean \
941 @target
=`echo $@ | sed -e 's/^do-//'`; \
943 s
=`cd $(srcdir); pwd`; export s
; \
945 for i in
$(SUBDIRS
) -dummy-
; do \
946 if
[ -f .
/$$i/Makefile
]; then \
949 for flag in
$(EXTRA_GCC_FLAGS
); do \
950 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
954 for flag in
$(EXTRA_HOST_FLAGS
); do \
955 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
959 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
961 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
962 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
963 "RANLIB=$${RANLIB}" \
964 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
966 then true
; else exit
1; fi
; \
969 @target
=`echo $@ | sed -e 's/^do-//'`; \
971 s
=`cd $(srcdir); pwd`; export s
; \
973 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
974 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
975 for flag in
$(EXTRA_TARGET_FLAGS
); do \
976 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
978 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
979 if
(cd
$(TARGET_SUBDIR
)/$$i; \
980 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
981 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
982 "RANLIB=$${RANLIB}" \
983 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
985 then true
; else exit
1; fi
; \
989 # Here are the targets which correspond to the do-X targets.
991 .PHONY
: info installcheck dvi install-info
992 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
993 .PHONY
: local-clean local-distclean local-maintainer-clean
995 installcheck: do-installcheck
998 # Make sure makeinfo is built before we do a `make info'.
1001 install-info
: do-install-info
dir.
info
1002 s
=`cd $(srcdir); pwd`; export s
; \
1003 if
[ -f
dir.
info ] ; then \
1004 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
1008 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E *.log
1011 -rm -f Makefile config.status config.cache mh-frag mt-frag
1012 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
1013 rm -rf
$(TARGET_SUBDIR
); \
1016 local-maintainer-clean
:
1017 @echo
"This command is intended for maintainers to use;"
1018 @echo
"it deletes files that may require special tools to rebuild."
1020 clean: do-clean local-clean
1021 mostlyclean: do-mostlyclean local-clean
1022 distclean: do-distclean local-clean local-distclean
1023 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
1024 maintainer-clean
: local-distclean
1025 realclean: maintainer-clean
1027 # This rule is used to clean specific modules.
1028 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
1029 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
1030 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1031 if
[ -f .
/$${dir}/Makefile
] ; then \
1032 r
=`pwd`; export r
; \
1033 s
=`cd $(srcdir); pwd`; export s
; \
1035 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1040 .PHONY
: $(CLEAN_TARGET_MODULES
)
1041 $(CLEAN_TARGET_MODULES
):
1042 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1043 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1044 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1045 r
=`pwd`; export r
; \
1046 s
=`cd $(srcdir); pwd`; export s
; \
1048 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1053 clean-target
: $(CLEAN_TARGET_MODULES
)
1058 check: $(CHECK_MODULES
) \
1059 $(CHECK_TARGET_MODULES
) \
1060 $(CHECK_X11_MODULES
) \
1063 # Automated reporting of test results.
1065 warning.log
: build.log
1066 $(srcdir)/contrib
/warn_summary build.log
> $@
1069 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1070 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1072 $(srcdir)/contrib
/test_summary
-t
>$@
1074 echo If you really want to send e-mail
, run .
/$@ now
1076 mail-report-with-warnings.log
: warning.log
1077 if
test x
'$(BOOT_CFLAGS)' != x
''; then \
1078 BOOT_CFLAGS
='$(BOOT_CFLAGS)'; export BOOT_CFLAGS
; \
1080 $(srcdir)/contrib
/test_summary
-t
-i warning.log
>$@
1082 echo If you really want to send e-mail
, run .
/$@ now
1084 # Installation targets.
1086 .PHONY
: install install-cross
uninstall source-vault binary-vault vault-install
1087 install: $(INSTALL_TARGET
)
1088 install-cross
: $(INSTALL_TARGET_CROSS
)
1091 @echo
"the uninstall target is not supported in this tree"
1094 $(MAKE
) -f .
/release
/Build-A-Release \
1095 host
=$(host_alias
) source-vault
1098 $(MAKE
) -f .
/release
/Build-A-Release \
1099 host
=$(host_alias
) target
=$(target_alias
)
1102 @if
[ -f .
/release
/vault-install
] ; then \
1103 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1109 install.
all: install-no-fixedincludes
1110 @if
[ -f .
/gcc
/Makefile
] ; then \
1111 r
=`pwd` ; export r
; \
1114 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1119 # inet-install is used because the I*Net wants DejaGNU installed but
1120 # not built. Similarly, gzip is built but not installed.
1122 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1124 # install-no-fixedincludes is used because Cygnus can not distribute
1125 # the fixed header files.
1126 .PHONY
: install-no-fixedincludes
1127 install-no-fixedincludes
: \
1129 $(INSTALL_MODULES
) \
1130 $(INSTALL_TARGET_MODULES
) \
1131 $(INSTALL_X11_MODULES
) \
1132 gcc-no-fixedincludes
1134 # Install the gcc headers files, but not the fixed include files,
1135 # which Cygnus is not allowed to distribute. This rule is very
1136 # dependent on the workings of the gcc Makefile.in.
1137 .PHONY
: gcc-no-fixedincludes
1138 gcc-no-fixedincludes
:
1139 @if
[ -f .
/gcc
/Makefile
]; then \
1140 rm -rf gcc
/tmp-include
; \
1141 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1142 mkdir gcc
/include; \
1143 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1144 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1145 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1146 r
=`pwd`; export r
; \
1147 s
=`cd $(srcdir); pwd` ; export s
; \
1150 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1151 rm -rf gcc
/include; \
1152 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1155 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1156 # build a target all-X means to cd to X and make all.
1158 # all-gui, and all-libproc are handled specially because
1159 # they are still experimental, and if they fail to build, that
1160 # shouldn't stop "make all".
1161 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1162 $(ALL_MODULES
) all-gui all-libproc
:
1163 @
dir=`echo $@ | sed -e 's/all-//'`; \
1164 if
[ -f .
/$${dir}/Makefile
] ; then \
1165 r
=`pwd`; export r
; \
1166 s
=`cd $(srcdir); pwd`; export s
; \
1168 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1173 # These rules are used to check the modules which use FLAGS_TO_PASS.
1174 # To build a target check-X means to cd to X and make check. Some
1175 # modules are only tested in a native toolchain.
1177 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1178 $(NATIVE_CHECK_MODULES
):
1179 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1180 dir=`echo $@ | sed -e 's/check-//'`; \
1181 if
[ -f .
/$${dir}/Makefile
] ; then \
1182 r
=`pwd`; export r
; \
1183 s
=`cd $(srcdir); pwd`; export s
; \
1185 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1191 $(CROSS_CHECK_MODULES
):
1192 @
dir=`echo $@ | sed -e 's/check-//'`; \
1193 if
[ -f .
/$${dir}/Makefile
] ; then \
1194 r
=`pwd`; export r
; \
1195 s
=`cd $(srcdir); pwd`; export s
; \
1197 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1202 # This rule is used to install the modules which use FLAGS_TO_PASS.
1203 # To build a target install-X means to cd to X and make install.
1204 .PHONY
: $(INSTALL_MODULES
)
1205 $(INSTALL_MODULES
): installdirs
1206 @
dir=`echo $@ | sed -e 's/install-//'`; \
1207 if
[ -f .
/$${dir}/Makefile
] ; then \
1208 r
=`pwd`; export r
; \
1209 s
=`cd $(srcdir); pwd`; export s
; \
1211 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1216 # This rule is used to configure the modules which are built with the
1218 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1219 $(CONFIGURE_TARGET_MODULES
):
1220 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1221 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1222 r
=`pwd`; export r
; \
1223 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1224 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1225 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1226 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1227 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1229 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1230 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1231 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1234 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1237 fi
; exit
0 # break command into two pieces
1238 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1239 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1241 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1243 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1244 if
[ -d
$(srcdir)/$${dir} ]; then \
1245 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1246 r
=`pwd`; export r
; \
1247 s
=`cd $(srcdir); pwd`; export s
; \
1249 AR
="$(AR_FOR_TARGET)"; export AR
; \
1250 AS
="$(AS_FOR_TARGET)"; export AS
; \
1251 CC
="$(CC_FOR_TARGET)"; export CC
; \
1252 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1253 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1254 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1255 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1256 LD
="$(LD_FOR_TARGET)"; export LD
; \
1257 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1258 NM
="$(NM_FOR_TARGET)"; export NM
; \
1259 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1260 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1261 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1262 cd
$(TARGET_SUBDIR
)/$${dir}; \
1265 topdir
=$(srcdir) ;; \
1267 case
"$(TARGET_SUBDIR)" in \
1268 .
) topdir
="../$(srcdir)" ;; \
1269 *) topdir
="../../$(srcdir)" ;; \
1272 if
[ "$(srcdir)" = "." ] ; then \
1273 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1274 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1275 if
[ -f Makefile
]; then \
1276 if
$(MAKE
) distclean; then \
1290 srcdiroption
="--srcdir=."; \
1293 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1294 libsrcdir
="$$s/$${dir}"; \
1296 if
[ -f
$${libsrcdir}/configure
] ; then \
1297 rm -f no-such-file skip-this-dir
; \
1298 CONFIG_SITE
=no-such-file
$(SHELL
) $${libsrcdir}/configure \
1299 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1300 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1302 rm -f no-such-file skip-this-dir
; \
1303 CONFIG_SITE
=no-such-file
$(SHELL
) $$s/configure \
1304 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1305 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1307 if
[ -f skip-this-dir
] ; then \
1309 rm -f skip-this-dir
; \
1310 cd ..
; rmdir
$${dir} || true
; \
1321 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1322 # To build a target all-X means to cd to X and make all.
1323 .PHONY
: $(ALL_TARGET_MODULES
)
1324 $(ALL_TARGET_MODULES
):
1325 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1326 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1327 r
=`pwd`; export r
; \
1328 s
=`cd $(srcdir); pwd`; export s
; \
1330 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1335 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1336 # To build a target install-X means to cd to X and make install.
1337 .PHONY
: $(CHECK_TARGET_MODULES
)
1338 $(CHECK_TARGET_MODULES
):
1339 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1340 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1341 r
=`pwd`; export r
; \
1342 s
=`cd $(srcdir); pwd`; export s
; \
1344 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1349 # This rule is used to install the modules which use
1350 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1352 .PHONY
: $(INSTALL_TARGET_MODULES
)
1353 $(INSTALL_TARGET_MODULES
): installdirs
1354 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1355 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1356 r
=`pwd`; export r
; \
1357 s
=`cd $(srcdir); pwd`; export s
; \
1359 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1360 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1365 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1366 # To build a target all-X means to cd to X and make all.
1367 .PHONY
: $(ALL_X11_MODULES
)
1369 @
dir=`echo $@ | sed -e 's/all-//'`; \
1370 if
[ -f .
/$${dir}/Makefile
] ; then \
1371 r
=`pwd`; export r
; \
1372 s
=`cd $(srcdir); pwd`; export s
; \
1375 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1380 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1381 # To build a target check-X means to cd to X and make all.
1382 .PHONY
: $(CHECK_X11_MODULES
)
1383 $(CHECK_X11_MODULES
):
1384 @
dir=`echo $@ | sed -e 's/check-//'`; \
1385 if
[ -f .
/$${dir}/Makefile
] ; then \
1386 r
=`pwd`; export r
; \
1387 s
=`cd $(srcdir); pwd`; export s
; \
1390 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1395 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1396 # To build a target install-X means to cd to X and make install.
1397 .PHONY
: $(INSTALL_X11_MODULES
)
1398 $(INSTALL_X11_MODULES
): installdirs
1399 @
dir=`echo $@ | sed -e 's/install-//'`; \
1400 if
[ -f .
/$${dir}/Makefile
] ; then \
1401 r
=`pwd`; export r
; \
1402 s
=`cd $(srcdir); pwd`; export s
; \
1405 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1410 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1413 @if
[ -f .
/gcc
/Makefile
] ; then \
1414 r
=`pwd`; export r
; \
1415 s
=`cd $(srcdir); pwd`; export s
; \
1417 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1422 # Building GCC uses some tools for rebuilding "source" files
1423 # like texinfo, bison/byacc, etc. So we must depend on those.
1425 # While building GCC, it may be necessary to run various target
1426 # programs like the assembler, linker, etc. So we depend on
1429 # In theory, on an SMP all those dependencies can be resolved
1432 .PHONY
: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1433 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1434 @r
=`pwd`; export r
; \
1435 s
=`cd $(srcdir); pwd`; export s
; \
1437 echo
"Bootstrapping the compiler"; \
1438 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $@
1439 @r
=`pwd`; export r
; \
1440 s
=`cd $(srcdir); pwd`; export s
; \
1442 *bootstrap4-lean
) \
1443 msg
="Comparing stage3 and stage4 of the compiler"; \
1444 compare
=compare3-lean
;; \
1445 *bootstrap4
) msg
="Comparing stage3 and stage4 of the compiler"; \
1446 compare
=compare3
;; \
1447 *-lean
) msg
="Comparing stage2 and stage3 of the compiler"; \
1448 compare
=compare-lean
;; \
1449 * ) msg
="Comparing stage2 and stage3 of the compiler"; \
1450 compare
=compare
;; \
1454 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) $$compare
1455 @r
=`pwd`; export r
; \
1456 s
=`cd $(srcdir); pwd` ; export s
; \
1458 echo
"Building runtime libraries"; \
1459 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all
1462 cross
: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1463 @r
=`pwd`; export r
; \
1464 s
=`cd $(srcdir); pwd`; export s
; \
1466 echo
"Building the C and C++ compiler"; \
1467 cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++"
1468 @r
=`pwd`; export r
; \
1469 s
=`cd $(srcdir); pwd` ; export s
; \
1471 echo
"Building runtime libraries"; \
1472 $(MAKE
) $(BASE_FLAGS_TO_PASS
) all LANGUAGES
="c c++"
1476 @if
[ -f .
/gcc
/Makefile
] ; then \
1477 r
=`pwd`; export r
; \
1478 s
=`cd $(srcdir); pwd`; export s
; \
1480 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1487 @if
[ -f .
/gcc
/Makefile
] ; then \
1488 r
=`pwd`; export r
; \
1489 s
=`cd $(srcdir); pwd`; export s
; \
1491 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1496 .PHONY
: install-gcc-cross
1498 @if
[ -f .
/gcc
/Makefile
] ; then \
1499 r
=`pwd`; export r
; \
1500 s
=`cd $(srcdir); pwd`; export s
; \
1502 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) LANGUAGES
="c c++" install); \
1506 # EXPERIMENTAL STUFF
1507 # This rule is used to install the modules which use FLAGS_TO_PASS.
1508 # To build a target install-X means to cd to X and make install.
1509 .PHONY
: install-dosrel
1510 install-dosrel
: installdirs info
1511 @
dir=`echo $@ | sed -e 's/install-//'`; \
1512 if
[ -f .
/$${dir}/Makefile
] ; then \
1513 r
=`pwd`; export r
; \
1514 s
=`cd $(srcdir); pwd`; export s
; \
1516 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1521 install-dosrel-fake
:
1524 # This is a list of inter-dependencies among modules.
1527 all-autoconf
: all-m4 all-texinfo
1528 all-automake
: all-m4 all-texinfo
1530 all-bfd
: all-libiberty all-intl
1531 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1532 all-bison
: all-texinfo
1536 configure-target-cygmon
: $(ALL_GCC
)
1537 all-target-cygmon
: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub
1539 all-dejagnu
: all-tcl all-expect all-tk
1540 all-diff
: all-libiberty
1542 all-emacs19
: all-bison all-byacc
1544 configure-target-examples
: $(ALL_GCC
)
1545 all-target-examples
: configure-target-examples
1546 all-expect
: all-tcl all-tk
1547 all-fileutils
: all-libiberty
1550 all-flex
: all-libiberty all-bison all-byacc
1551 all-gas
: all-libiberty all-opcodes all-bfd all-intl
1555 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld
1556 all-bootstrap
: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1557 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui
1558 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1561 configure-target-gperf
: $(ALL_GCC
)
1562 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++
1563 all-gprof
: all-libiberty all-bfd all-opcodes all-intl
1564 all-grep
: all-libiberty
1565 all-grez
: all-libiberty all-bfd all-opcodes
1566 all-gui
: all-gdb all-libproc all-target-librx
1568 all-gzip
: all-libiberty
1569 all-hello
: all-libiberty
1571 all-inet
: all-tcl all-send-pr all-perl
1573 all-ispell
: all-emacs19
1574 all-itcl
: all-tcl all-tk
1575 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1576 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1577 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
++
1578 configure-target-libgloss
: $(ALL_GCC
)
1579 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1580 configure-target-libio
: $(ALL_GCC
)
1581 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1582 check-target-libio
: all-target-libstdc
++
1583 all-libgui
: all-tcl all-tk all-itcl
1585 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1586 all-target-librx
: configure-target-librx
1587 configure-target-libstdc
++: $(ALL_GCC
)
1588 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1589 configure-target-libstub
: $(ALL_GCC
)
1590 all-target-libstub
: configure-target-libstub
1592 all-target-libf2c
: configure-target-libf2c all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1593 all-target-libchill
: configure-target-libchill all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1594 all-target-libobjc
: configure-target-libobjc all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1595 all-m4
: all-libiberty
1596 all-make
: all-libiberty
1598 configure-target-newlib
: $(ALL_GCC
)
1599 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1600 all-opcodes
: all-bfd all-libiberty
1601 all-patch
: all-libiberty
1603 all-prms
: all-libiberty
1606 all-recode
: all-libiberty
1607 all-sed
: all-libiberty
1608 all-send-pr
: all-prms
1610 all-sim
: all-libiberty all-bfd all-opcodes all-readline
1611 all-snavigator
: all-tcl all-tk all-itcl all-db all-grep all-libgui
1612 all-tar
: all-libiberty
1614 all-tclX
: all-tcl all-tk
1616 all-texinfo
: all-libiberty
1618 all-tgas
: all-libiberty all-bfd all-opcodes
1620 all-tix
: all-tcl all-tk
1622 all-target-winsup
: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
1623 configure-target-winsup
: configure-target-newlib
1624 all-uudecode
: all-libiberty
1625 configure-target-libiberty
: $(ALL_GCC
)
1626 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1627 all-target
: $(ALL_TARGET_MODULES
)
1628 install-target
: $(INSTALL_TARGET_MODULES
)
1630 ### other supporting targets
1636 installdirs: mkinstalldirs
1637 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1639 dir.
info: do-install-info
1640 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1641 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1642 mv
-f
dir.
info.new
dir.
info ; \
1647 @echo
"Building a full distribution of this tree isn't done"
1648 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1652 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1653 # ability to use several tags files at once, so there is probably no need
1654 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1655 # (if we felt like it) have this Makefile write a piece of elisp which
1656 # the user could load to tell emacs19 where all the TAGS files we just
1660 # with the gnu make, this is done automatically.
1662 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
) $(gcc_version_trigger
)
1663 $(SHELL
) .
/config.status
1666 # Support for building net releases
1668 # Files in devo used in any net release.
1669 # ChangeLog omitted because it may refer to files which are not in this
1670 # distribution (perhaps it would be better to include it anyway).
1671 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1672 config.guess config.if config.sub config move-if-change \
1673 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1674 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1675 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1677 # Files in devo/etc used in any net release.
1678 # ChangeLog omitted because it may refer to files which are not in this
1679 # distribution (perhaps it would be better to include it anyway).
1680 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1681 make-stds.texi standards.
info*
1683 # When you use `make setup-dirs' or `make taz' you should always redefine
1685 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1689 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1690 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1691 # Take out texinfo from a few places
1692 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1693 -e
'/^ install-texinfo /d' \
1695 mv
-f tmp Makefile.in
1698 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1699 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1700 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1701 # Make links, and run "make diststuff" or "make info" when needed.
1702 rm -rf proto-toplev
; mkdir proto-toplev
1703 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1704 for d in
$$dirs ; do \
1705 if
[ -d
$$d ]; then \
1706 if
[ ! -f
$$d/Makefile
] ; then true
; \
1707 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1708 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1709 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1710 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1712 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1713 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1715 ln
-s ..
/$$d proto-toplev
/$$d ; \
1717 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1719 cd etc
; $(MAKE
) info
1722 mkdir proto-toplev
/etc
1723 (cd proto-toplev
/etc
; \
1724 for i in
$(ETC_SUPPORT
); do \
1725 ln
-s ..
/..
/etc
/$$i .
; \
1728 # Take out texinfo from configurable dirs
1729 rm proto-toplev
/configure.in
1730 sed
-e
'/^host_tools=/s/texinfo //' \
1731 <configure.in
>proto-toplev
/configure.in
1733 mkdir proto-toplev
/texinfo
1734 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1735 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1736 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1737 if
test -r texinfo
/util
/tex3patch
; then \
1738 mkdir proto-toplev
/texinfo
/util
&& \
1739 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1741 chmod
-R og
=u . || chmod og
=u
`find . -print`
1742 if grep AM_INIT_AUTOMAKE
$(TOOL
)/configure.in
>/dev
/null
2>&1; then \
1743 ver
=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1745 ver
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1747 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) VER
=$$ver
1750 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1751 -rm -f
$(TOOL
)-$(VER
)
1752 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1753 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1754 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1756 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1757 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1760 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes intl setup.com makefile.vms
1761 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1762 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1763 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1765 # The FSF "binutils" release includes gprof and ld.
1766 .PHONY
: binutils.
tar.gz
1767 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof intl setup.com makefile.vms
1768 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1769 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1770 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1772 .PHONY
: gas
+binutils.
tar.gz
1773 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1774 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1775 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1776 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1778 .PHONY
: libg
++.
tar.gz
1779 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1780 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1781 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1782 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1784 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1785 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1786 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1787 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1790 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils intl
1791 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1792 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1793 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1794 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1796 .PHONY
: newlib.
tar.gz
1797 NEWLIB_SUPPORT_DIRS
=libgloss
1798 # taz configures for the sun4 target which won't configure newlib.
1799 # We need newlib configured so that the .info files are made.
1800 # Unfortunately, it is not enough to just configure newlib separately:
1801 # taz will build the .info files but since SUBDIRS won't contain newlib,
1802 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1803 # used in building the .info files, eg: *.def, *.ref).
1804 # The problem isn't solvable however without a lot of extra work because
1805 # target libraries are built in subdir $(target_alias) which gets nuked during
1806 # the make distclean. For now punt on the issue of shipping newlib info files
1807 # with newlib net releases and wait for a day when some native target (sun4?)
1808 # supports newlib (if only minimally).
1809 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1810 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1811 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1812 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1817 # end of Makefile.in