1 [+ AutoGen5 template -*- Mode: Makefile -*-
5 # Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
7 # Makefile for directory with subdirs to build.
8 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
9 # 1999, 2000, 2001, 2002 Free Software Foundation
11 # This file is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 # Tell GNU make 3.79 not to run the top level in parallel. This
27 # prevents contention for $builddir/$target/config.cache, as well
28 # as minimizing scatter in file system caches.
29 NOTPARALLEL = .NOTPARALLEL
35 exec_prefix = @exec_prefix@
39 libexecdir = @libexecdir@
41 sysconfdir = @sysconfdir@
42 sharedstatedir = @sharedstatedir@
43 localstatedir = @localstatedir@
45 includedir = @includedir@
46 oldincludedir = @oldincludedir@
49 gxx_include_dir=@gxx_include_dir@
52 build_tooldir = @build_tooldir@
54 program_transform_name = @program_transform_name@
56 man1dir = $(mandir)/man1
57 man2dir = $(mandir)/man2
58 man3dir = $(mandir)/man3
59 man4dir = $(mandir)/man4
60 man5dir = $(mandir)/man5
61 man6dir = $(mandir)/man6
62 man7dir = $(mandir)/man7
63 man8dir = $(mandir)/man8
64 man9dir = $(mandir)/man9
65 # Directory in which the compiler finds executables, libraries, etc.
66 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
69 SHELL = @config_shell@
71 # pwd command to use. Allow user to override default by setting PWDCMD in
72 # the environment to account for automounters. The make variable must not
73 # be called PWDCMD, otherwise the value set here is passed to make
74 # subprocesses and overrides the setting from the user's environment.
75 # Don't use PWD since it is a common shell environment variable and we
76 # don't want to corrupt it.
77 PWD_COMMAND = $${PWDCMD-pwd}
79 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
81 INSTALL_PROGRAM_ARGS =
83 INSTALL = $(SHELL) $$s/install-sh -c
84 INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
85 INSTALL_SCRIPT = $(INSTALL)
86 INSTALL_DATA = $(INSTALL) -m 644
88 INSTALL_DOSREL = install-dosrel-fake
95 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
96 # here so that they can be overridden by Makefile fragments.
97 HOST_CC = $(CC_FOR_BUILD)
99 BUILD_PREFIX_1 = loser-
101 # These flag values are normally overridden by the configure script.
106 LIBCFLAGS = $(CFLAGS)
107 CFLAGS_FOR_BUILD = $(CFLAGS)
108 # During gcc bootstrap, if we use some random cc for stage1 then
109 # CFLAGS will be just -g. We want to ensure that TARGET libraries
110 # (which we know are built with gcc) are built with optimizations so
111 # prepend -O2 when setting CFLAGS_FOR_TARGET.
112 CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
114 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
120 # Use -O2 to stress test the compiler.
121 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
122 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
123 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
132 # These values are substituted by configure.
133 DEFAULT_YACC = @DEFAULT_YACC@
134 DEFAULT_LEX = @DEFAULT_LEX@
135 DEFAULT_M4 = @DEFAULT_M4@
137 BISON = `if [ -f $$r/bison/bison ] ; then \
138 echo $$r/bison/bison -L $$s/bison/ ; \
143 YACC = `if [ -f $$r/bison/bison ] ; then \
144 echo $$r/bison/bison -y -L $$s/bison/ ; \
145 elif [ -f $$r/byacc/byacc ] ; then \
146 echo $$r/byacc/byacc ; \
148 echo ${DEFAULT_YACC} ; \
151 LEX = `if [ -f $$r/flex/flex ] ; \
152 then echo $$r/flex/flex ; \
153 else echo ${DEFAULT_LEX} ; fi`
155 M4 = `if [ -f $$r/m4/m4 ] ; \
156 then echo $$r/m4/m4 ; \
157 else echo ${DEFAULT_M4} ; fi`
159 # For an installed makeinfo, we require it to be from texinfo 4.2 or
160 # higher, else we use the "missing" dummy.
161 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
162 then echo $$r/texinfo/makeinfo/makeinfo ; \
163 else if (makeinfo --version \
164 | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
165 then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
167 # This just becomes part of the MAKEINFO definition passed down to
168 # sub-makes. It lets flags be given on the command line while still
169 # using the makeinfo from the object tree.
170 # (Default to avoid splitting info files.)
171 MAKEINFOFLAGS = --no-split
173 EXPECT = `if [ -f $$r/expect/expect ] ; \
174 then echo $$r/expect/expect ; \
175 else echo expect ; fi`
177 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
178 then echo $$s/dejagnu/runtest ; \
179 else echo runtest ; fi`
182 # compilers to use to create programs which must be run in the build
185 CXX_FOR_BUILD = $(CXX)
187 SUBDIRS = @configdirs@
189 # This is set by the configure script to the list of directories which
190 # should be built using the target tools.
191 TARGET_CONFIGDIRS = @target_configdirs@
193 # Target libraries are put under this directory:
194 # Changed by configure to $(target_alias) if cross.
195 TARGET_SUBDIR = @target_subdir@
197 BUILD_CONFIGDIRS = libiberty
198 BUILD_SUBDIR = @build_subdir@
200 # This is set by the configure script to the arguments to use when configuring
201 # directories built for the target.
202 TARGET_CONFIGARGS = @target_configargs@
204 # This is set by the configure script to the arguments to use when configuring
205 # directories built for the build system.
206 BUILD_CONFIGARGS = @build_configargs@
208 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
210 SET_LIB_PATH = @SET_LIB_PATH@
212 # This is the name of the environment variable used for the path to
213 # the libraries. This may be changed by configure.in.
214 RPATH_ENVVAR = @RPATH_ENVVAR@
216 # This is the list of directories that may be needed in RPATH_ENVVAR
217 # so that programs built for the host machine work.
218 HOST_LIB_PATH = $$r/bfd:$$r/opcodes
220 # This is the list of directories that may be needed in RPATH_ENVVAR
221 # so that prorgams built for the target machine work.
222 TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
224 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
225 # Some platforms don't like blank entries, so we remove duplicate,
226 # leading and trailing colons.
227 REALLY_SET_LIB_PATH = \
228 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
231 INSTALL_TARGET = installdirs \
234 $(INSTALL_TARGET_MODULES) \
235 $(INSTALL_X11_MODULES) \
238 INSTALL_TARGET_CROSS = installdirs \
241 $(INSTALL_TARGET_MODULES) \
242 $(INSTALL_X11_MODULES) \
245 # Should be substed by configure.in
246 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
247 CC_FOR_TARGET = @CC_FOR_TARGET@
248 CXX_FOR_TARGET = @CXX_FOR_TARGET@
249 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
250 GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
252 # If GCC_FOR_TARGET is not overriden on the command line, then this
253 # variable is passed down to the gcc Makefile, where it is used to
254 # build libgcc2.a. We define it here so that it can itself be
255 # overridden on the command line.
256 GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
259 if [ -f $$r/gas/as-new ] ; then \
260 echo $$r/gas/as-new ; \
261 elif [ -f $$r/gcc/xgcc ]; then \
262 $(CC_FOR_TARGET) -print-prog-name=as ; \
264 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
267 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
272 if [ -f $$r/ld/ld-new ] ; then \
273 echo $$r/ld/ld-new ; \
274 elif [ -f $$r/gcc/xgcc ]; then \
275 $(CC_FOR_TARGET) -print-prog-name=ld ; \
277 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
280 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
284 DLLTOOL_FOR_TARGET = ` \
285 if [ -f $$r/binutils/dlltool ] ; then \
286 echo $$r/binutils/dlltool ; \
288 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
291 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
295 WINDRES_FOR_TARGET = ` \
296 if [ -f $$r/binutils/windres ] ; then \
297 echo $$r/binutils/windres ; \
299 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
302 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
307 if [ -f $$r/binutils/ar ] ; then \
308 echo $$r/binutils/ar ; \
310 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
313 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
317 RANLIB_FOR_TARGET = ` \
318 if [ -f $$r/binutils/ranlib ] ; then \
319 echo $$r/binutils/ranlib ; \
321 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
322 if [ x'$(RANLIB)' != x ]; then \
328 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
333 if [ -f $$r/binutils/nm-new ] ; then \
334 echo $$r/binutils/nm-new ; \
335 elif [ -f $$r/gcc/xgcc ]; then \
336 $(CC_FOR_TARGET) -print-prog-name=nm ; \
338 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
341 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
345 # The first rule in the file had better be this one. Don't put any above it.
346 # This lives here to allow makefile fragments to contain dependencies.
350 # These can be overridden by config/mt-*.
351 # The _TARGET_ is because they're specified in mt-foo.
352 # The _HOST_ is because they're programs that run on the host.
353 EXTRA_TARGET_HOST_ALL_MODULES =
354 EXTRA_TARGET_HOST_INSTALL_MODULES =
355 EXTRA_TARGET_HOST_CHECK_MODULES =
357 #### host and target specific makefile fragments come in here.
360 # Flags to pass down to all sub-makes.
361 # Please keep these in alphabetical order.
362 BASE_FLAGS_TO_PASS = \
363 "AR_FLAGS=$(AR_FLAGS)" \
364 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
365 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
367 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
368 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
370 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
371 "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
372 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
373 "CXXFLAGS=$(CXXFLAGS)" \
374 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
375 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
376 "DESTDIR=$(DESTDIR)" \
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 "libstdcxx_incdir=$(libstdcxx_incdir)" \
411 "libsubdir=$(libsubdir)" \
412 "localstatedir=$(localstatedir)" \
414 "oldincludedir=$(oldincludedir)" \
416 "sbindir=$(sbindir)" \
417 "sharedstatedir=$(sharedstatedir)" \
418 "sysconfdir=$(sysconfdir)" \
419 "tooldir=$(tooldir)" \
420 "build_tooldir=$(build_tooldir)" \
421 "gxx_include_dir=$(gxx_include_dir)" \
422 "gcc_version=$(gcc_version)" \
423 "gcc_version_trigger=$(gcc_version_trigger)" \
424 "target_alias=$(target_alias)"
426 # For any flags above that may contain shell code that varies from one
427 # target library to another. When doing recursive invocations of the
428 # top-level Makefile, we don't want the outer make to evaluate them,
429 # so we pass these variables down unchanged. They must not contain
430 # single nor double quotes.
432 CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)'
434 # Flags to pass down to most sub-makes, in which we're building with
435 # the host environment.
436 # If any variables are added here, they must be added to do-*, below.
442 'DLLTOOL=$(DLLTOOL)' \
445 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
448 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
450 # Flags that are concerned with the location of the X11 include files
453 # NOTE: until the top-level is getting the values via autoconf, it only
454 # causes problems to have this top-level Makefile overriding the autoconf-set
455 # values in child directories. Only variables that don't conflict with
456 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
458 X11_FLAGS_TO_PASS = \
459 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
460 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
462 # Flags to pass down to makes which are built with the target environment.
463 # The double $ decreases the length of the command line; the variables
464 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
465 # If any variables are added here, they must be added to do-*, below.
466 EXTRA_TARGET_FLAGS = \
467 'AR=$$(AR_FOR_TARGET)' \
468 'AS=$$(AS_FOR_TARGET)' \
469 'CC=$$(CC_FOR_TARGET)' \
470 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
471 'CXX=$$(CXX_FOR_TARGET)' \
472 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
473 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
474 'LD=$$(LD_FOR_TARGET)' \
475 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
476 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
477 'NM=$$(NM_FOR_TARGET)' \
478 'RANLIB=$$(RANLIB_FOR_TARGET)' \
479 'WINDRES=$$(WINDRES_FOR_TARGET)'
481 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
483 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
484 # unfortunately needs the native compiler and the target ar and
486 # If any variables are added here, they must be added to do-*, below.
487 # The HOST_* variables are a special case, which are used for the gcc
488 # cross-building scheme.
494 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
495 'HOST_CC=$(CC_FOR_BUILD)' \
496 'BUILD_PREFIX=$(BUILD_PREFIX)' \
497 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
499 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
500 'WINDRES=$$(WINDRES_FOR_TARGET)' \
501 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
502 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
503 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
504 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
505 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
506 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
507 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
508 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
509 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
510 "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
511 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
513 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
515 # This is a list of the targets for all of the modules which are compiled
516 # using the build machine's native compiler. Configure edits the second
517 # macro for build!=host builds.
518 ALL_BUILD_MODULES_LIST = \
520 ALL_BUILD_MODULES = @all_build_modules@
522 # This is a list of the configure targets for all of the modules which
523 # are compiled using the native tools.
524 CONFIGURE_BUILD_MODULES = \
525 configure-build-libiberty
527 # This is a list of the targets for all of the modules which are compiled
528 # using $(FLAGS_TO_PASS).
530 FOR host_modules +] \
532 ENDFOR host_modules +] \
533 $(EXTRA_TARGET_HOST_ALL_MODULES)
535 # This is a list of the check targets for all of the modules which are
536 # compiled using $(FLAGS_TO_PASS).
538 # The list is in two parts. The first lists those tools which
539 # are tested as part of the host's native tool-chain, and not
540 # tested in a cross configuration.
541 NATIVE_CHECK_MODULES = \
548 CROSS_CHECK_MODULES =[+
549 FOR host_modules +][+
550 IF (not (or (exist? "no_check_cross") (exist? "no_check")))
554 ENDFOR host_modules +] \
555 $(EXTRA_TARGET_HOST_CHECK_MODULES)
557 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
559 # This is a list of the install targets for all of the modules which are
560 # compiled using $(FLAGS_TO_PASS).
563 IF (not (exist? "no_install")) +] \
565 ENDIF no_install +][+
566 ENDFOR host_modules +] \
567 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
569 # This is a list of the targets for all of the modules which are compiled
570 # using $(X11_FLAGS_TO_PASS).
579 # This is a list of the check targets for all of the modules which are
580 # compiled using $(X11_FLAGS_TO_PASS).
581 CHECK_X11_MODULES = \
589 # This is a list of the install targets for all the modules which are
590 # compiled using $(X11_FLAGS_TO_PASS).
591 INSTALL_X11_MODULES = \
599 # This is a list of the targets for all of the modules which are compiled
600 # using $(TARGET_FLAGS_TO_PASS).
601 ALL_TARGET_MODULES =[+
602 FOR target_modules +] \
603 all-target-[+module+][+
604 ENDFOR target_modules +]
606 # This is a list of the configure targets for all of the modules which
607 # are compiled using the target tools.
608 CONFIGURE_TARGET_MODULES =[+
609 FOR target_modules +] \
610 configure-target-[+module+][+
611 ENDFOR target_modules +]
613 # This is a list of the check targets for all of the modules which are
614 # compiled using $(TARGET_FLAGS_TO_PASS).
615 CHECK_TARGET_MODULES =[+
616 FOR target_modules +][+
617 IF (not (exist? "no_check")) +] \
618 check-target-[+module+][+
620 ENDFOR target_modules +]
622 # This is a list of the install targets for all of the modules which are
623 # compiled using $(TARGET_FLAGS_TO_PASS).
624 INSTALL_TARGET_MODULES =[+
625 FOR target_modules +][+
626 IF (not (exist? "no_install")) +] \
627 install-target-[+module+][+
628 ENDIF no_install +][+
629 ENDFOR target_modules +]
631 # This is a list of the targets for which we can do a clean-{target}.
633 FOR host_modules +][+
634 IF (not (exist? "no_clean")) +] \
637 ENDFOR host_modules +]
639 # All of the target modules that can be cleaned
640 CLEAN_TARGET_MODULES =[+
641 FOR target_modules +][+
642 IF (not (exist? "no_clean")) +] \
643 clean-target-[+module+][+
645 ENDFOR target_modules +]
647 # All of the x11 modules that can be cleaned
648 CLEAN_X11_MODULES = \
656 # The target built for a native build.
659 $(ALL_BUILD_MODULES) \
662 $(ALL_TARGET_MODULES) \
665 # Do a target for all the subdirectories. A ``make do-X'' will do a
666 # ``make X'' in all subdirectories (because, in general, there is a
667 # dependency (below) of X upon do-X, a ``make X'' will also do this,
668 # but it may do additional work as well).
669 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
670 # because it is so large that it can easily overflow the command line
671 # length limit on some systems.
680 do-maintainer-clean \
684 @target=`echo $@ | sed -e 's/^do-//'`; \
685 r=`${PWD_COMMAND}`; export r; \
686 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
688 for i in $(SUBDIRS) -dummy-; do \
689 if [ -f ./$$i/Makefile ]; then \
692 for flag in $(EXTRA_GCC_FLAGS); do \
693 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
697 for flag in $(EXTRA_HOST_FLAGS); do \
698 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
703 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
704 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
705 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
706 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
708 then true; else exit 1; fi; \
711 @target=`echo $@ | sed -e 's/^do-//'`; \
712 r=`${PWD_COMMAND}`; export r; \
713 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
715 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
716 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
717 for flag in $(EXTRA_TARGET_FLAGS); do \
718 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
720 if (cd $(TARGET_SUBDIR)/$$i; \
721 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
722 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
723 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
724 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
726 then true; else exit 1; fi; \
730 # Here are the targets which correspond to the do-X targets.
732 .PHONY: info installcheck dvi install-info
733 .PHONY: clean distclean mostlyclean maintainer-clean realclean
734 .PHONY: local-clean local-distclean local-maintainer-clean
736 installcheck: do-installcheck
739 # Make sure makeinfo is built before we do a `make info'.
742 install-info: do-install-info dir.info
743 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
744 if [ -f dir.info ] ; then \
745 $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
749 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
752 -rm -f Makefile config.status config.cache mh-frag mt-frag
753 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
754 rm -rf $(TARGET_SUBDIR); \
756 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
757 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
758 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
759 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
760 -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
762 local-maintainer-clean:
763 @echo "This command is intended for maintainers to use;"
764 @echo "it deletes files that may require special tools to rebuild."
766 clean: do-clean local-clean
767 mostlyclean: do-mostlyclean local-clean
768 distclean: do-distclean local-clean local-distclean
769 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
770 maintainer-clean: local-distclean
771 realclean: maintainer-clean
773 # This rule is used to clean specific modules.
774 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
775 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
776 @dir=`echo $@ | sed -e 's/clean-//'`; \
777 if [ -f ./$${dir}/Makefile ] ; then \
778 r=`${PWD_COMMAND}`; export r; \
779 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
781 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
786 .PHONY: $(CLEAN_TARGET_MODULES)
787 $(CLEAN_TARGET_MODULES):
788 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
789 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
790 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
791 r=`${PWD_COMMAND}`; export r; \
792 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
794 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
799 clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
801 test ! -d gcc/libgcc || \
802 (cd gcc/libgcc && find . -type d -print) | \
803 while read d; do rm -f gcc/$$d/libgcc.a || : ; done
808 .PHONY: check do-check
810 $(MAKE) do-check NOTPARALLEL=parallel-ok
812 do-check: $(CHECK_MODULES) \
813 $(CHECK_TARGET_MODULES) \
814 $(CHECK_X11_MODULES) \
817 # Automated reporting of test results.
819 warning.log: build.log
820 $(srcdir)/contrib/warn_summary build.log > $@
823 if test x'$(BOOT_CFLAGS)' != x''; then \
824 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
826 $(srcdir)/contrib/test_summary -t >$@
828 echo If you really want to send e-mail, run ./$@ now
830 mail-report-with-warnings.log: warning.log
831 if test x'$(BOOT_CFLAGS)' != x''; then \
832 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
834 $(srcdir)/contrib/test_summary -t -i warning.log >$@
836 echo If you really want to send e-mail, run ./$@ now
838 # Installation targets.
840 .PHONY: install install-cross uninstall source-vault binary-vault vault-install
841 install: $(INSTALL_TARGET)
842 install-cross: $(INSTALL_TARGET_CROSS)
845 @echo "the uninstall target is not supported in this tree"
848 $(MAKE) -f ./release/Build-A-Release \
849 host=$(host_alias) source-vault
852 $(MAKE) -f ./release/Build-A-Release \
853 host=$(host_alias) target=$(target_alias)
856 @if [ -f ./release/vault-install ] ; then \
857 ./release/vault-install $(host_alias) $(target_alias) ; \
863 install.all: install-no-fixedincludes
864 @if [ -f ./gcc/Makefile ] ; then \
865 r=`${PWD_COMMAND}` ; export r ; \
868 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
873 # install-no-fixedincludes is used because Cygnus can not distribute
874 # the fixed header files.
875 .PHONY: install-no-fixedincludes
876 install-no-fixedincludes: \
879 $(INSTALL_TARGET_MODULES) \
880 $(INSTALL_X11_MODULES) \
883 # Install the gcc headers files, but not the fixed include files,
884 # which Cygnus is not allowed to distribute. This rule is very
885 # dependent on the workings of the gcc Makefile.in.
886 .PHONY: gcc-no-fixedincludes
887 gcc-no-fixedincludes:
888 @if [ -f ./gcc/Makefile ]; then \
889 rm -rf gcc/tmp-include; \
890 mv gcc/include gcc/tmp-include 2>/dev/null; \
892 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
893 touch gcc/stmp-fixinc gcc/include/fixed; \
894 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
895 r=`${PWD_COMMAND}`; export r; \
896 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
899 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
900 rm -rf gcc/include; \
901 mv gcc/tmp-include gcc/include 2>/dev/null; \
904 # This rule is used to build the modules which are built with the
905 # build machine's native compiler.
906 .PHONY: $(ALL_BUILD_MODULES)
907 $(ALL_BUILD_MODULES):
908 dir=`echo $@ | sed -e 's/all-build-//'`; \
909 if [ -f ./$${dir}/Makefile ] ; then \
910 r=`${PWD_COMMAND}`; export r; \
911 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
912 (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \
917 # This rule is used to configure the modules which are built with the
919 .PHONY: $(CONFIGURE_BUILD_MODULES)
920 $(CONFIGURE_BUILD_MODULES):
921 @dir=`echo $@ | sed -e 's/configure-build-//'`; \
922 if [ ! -d $(BUILD_SUBDIR) ]; then \
924 elif [ -f $(BUILD_SUBDIR)/$${dir}/Makefile ] ; then \
926 elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
927 if [ -d $(srcdir)/$${dir} ]; then \
928 [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\
929 r=`${PWD_COMMAND}`; export r; \
930 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
931 AR="$(AR_FOR_BUILD)"; export AR; \
932 AS="$(AS_FOR_BUILD)"; export AS; \
933 CC="$(CC_FOR_BUILD)"; export CC; \
934 CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
935 CXX="$(CXX_FOR_BUILD)"; export CXX; \
936 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
937 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
938 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
939 LD="$(LD_FOR_BUILD)"; export LD; \
940 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
941 NM="$(NM_FOR_BUILD)"; export NM; \
942 RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
943 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
944 echo Configuring in $(BUILD_SUBDIR)/$${dir}; \
945 cd "$(BUILD_SUBDIR)/$${dir}" || exit 1; \
947 /* | [A-Za-z]:[\\/]*) \
948 topdir=$(srcdir) ;; \
950 case "$(BUILD_SUBDIR)" in \
951 .) topdir="../$(srcdir)" ;; \
952 *) topdir="../../$(srcdir)" ;; \
955 if [ "$(srcdir)" = "." ] ; then \
956 if [ "$(BUILD_SUBDIR)" != "." ] ; then \
957 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
958 if [ -f Makefile ]; then \
959 if $(MAKE) distclean; then \
973 srcdiroption="--srcdir=."; \
976 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
977 libsrcdir="$$s/$${dir}"; \
979 if [ -f $${libsrcdir}/configure ] ; then \
980 rm -f no-such-file skip-this-dir; \
981 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
982 $(BUILD_CONFIGARGS) $${srcdiroption} \
983 --with-build-subdir="$(BUILD_SUBDIR)"; \
985 rm -f no-such-file skip-this-dir; \
986 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
987 $(BUILD_CONFIGARGS) $${srcdiroption} \
988 --with-build-subdir="$(BUILD_SUBDIR)"; \
990 if [ -f skip-this-dir ] ; then \
992 rm -f skip-this-dir; \
993 cd ..; rmdir $${dir} || true; \
1004 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1005 # build a target all-X means to cd to X and make all.
1006 .PHONY: $(ALL_MODULES)
1008 @dir=`echo $@ | sed -e 's/all-//'`; \
1009 if [ -f ./$${dir}/Makefile ] ; then \
1010 r=`${PWD_COMMAND}`; export r; \
1011 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1013 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1018 # These rules are used to check the modules which use FLAGS_TO_PASS.
1019 # To build a target check-X means to cd to X and make check. Some
1020 # modules are only tested in a native toolchain.
1022 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1023 $(NATIVE_CHECK_MODULES):
1024 @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
1025 dir=`echo $@ | sed -e 's/check-//'`; \
1026 if [ -f ./$${dir}/Makefile ] ; then \
1027 r=`${PWD_COMMAND}`; export r; \
1028 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1030 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1036 $(CROSS_CHECK_MODULES):
1037 @dir=`echo $@ | sed -e 's/check-//'`; \
1038 if [ -f ./$${dir}/Makefile ] ; then \
1039 r=`${PWD_COMMAND}`; export r; \
1040 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1042 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1047 # This rule is used to install the modules which use FLAGS_TO_PASS.
1048 # To build a target install-X means to cd to X and make install.
1049 .PHONY: $(INSTALL_MODULES)
1050 $(INSTALL_MODULES): installdirs
1051 @dir=`echo $@ | sed -e 's/install-//'`; \
1052 if [ -f ./$${dir}/Makefile ] ; then \
1053 r=`${PWD_COMMAND}`; export r; \
1054 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1056 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1061 # This rule is used to configure the modules which are built with the
1063 .PHONY: $(CONFIGURE_TARGET_MODULES)
1064 $(CONFIGURE_TARGET_MODULES):
1065 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1066 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1067 r=`${PWD_COMMAND}`; export r; \
1068 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1069 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1070 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1071 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1072 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1074 echo "Multilibs changed for $${dir}, reconfiguring"; \
1075 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1076 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1079 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1082 fi; exit 0 # break command into two pieces
1083 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1084 if [ ! -d $(TARGET_SUBDIR) ]; then \
1086 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1088 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1089 if [ -d $(srcdir)/$${dir} ]; then \
1090 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1091 r=`${PWD_COMMAND}`; export r; \
1092 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1094 AR="$(AR_FOR_TARGET)"; export AR; \
1095 AS="$(AS_FOR_TARGET)"; export AS; \
1096 CC="$(CC_FOR_TARGET)"; export CC; \
1097 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1098 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1099 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1100 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
1101 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1102 LD="$(LD_FOR_TARGET)"; export LD; \
1103 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1104 NM="$(NM_FOR_TARGET)"; export NM; \
1105 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1106 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1107 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1108 cd "$(TARGET_SUBDIR)/$${dir}" || exit 1; \
1110 /* | [A-Za-z]:[\\/]*) \
1111 topdir=$(srcdir) ;; \
1113 case "$(TARGET_SUBDIR)" in \
1114 .) topdir="../$(srcdir)" ;; \
1115 *) topdir="../../$(srcdir)" ;; \
1118 if [ "$(srcdir)" = "." ] ; then \
1119 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1120 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1121 if [ -f Makefile ]; then \
1122 if $(MAKE) distclean; then \
1136 srcdiroption="--srcdir=."; \
1139 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1140 libsrcdir="$$s/$${dir}"; \
1142 if [ -f $${libsrcdir}/configure ] ; then \
1143 rm -f no-such-file skip-this-dir; \
1144 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1145 $(TARGET_CONFIGARGS) $${srcdiroption} \
1146 --with-target-subdir="$(TARGET_SUBDIR)"; \
1148 rm -f no-such-file skip-this-dir; \
1149 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1150 $(TARGET_CONFIGARGS) $${srcdiroption} \
1151 --with-target-subdir="$(TARGET_SUBDIR)"; \
1153 if [ -f skip-this-dir ] ; then \
1155 rm -f skip-this-dir; \
1156 cd ..; rmdir $${dir} || true; \
1167 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1168 # To build a target all-X means to cd to X and make all.
1169 .PHONY: $(ALL_TARGET_MODULES)
1170 $(ALL_TARGET_MODULES):
1171 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1172 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1173 r=`${PWD_COMMAND}`; export r; \
1174 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1176 (cd $(TARGET_SUBDIR)/$${dir}; \
1177 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1182 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1183 # To build a target install-X means to cd to X and make install.
1184 .PHONY: $(CHECK_TARGET_MODULES)
1185 $(CHECK_TARGET_MODULES):
1186 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1187 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1188 r=`${PWD_COMMAND}`; export r; \
1189 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1191 (cd $(TARGET_SUBDIR)/$${dir}; \
1192 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1197 # This rule is used to install the modules which use
1198 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1200 .PHONY: $(INSTALL_TARGET_MODULES)
1201 $(INSTALL_TARGET_MODULES): installdirs
1202 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1203 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1204 r=`${PWD_COMMAND}`; export r; \
1205 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1207 (cd $(TARGET_SUBDIR)/$${dir}; \
1208 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1213 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1214 # To build a target all-X means to cd to X and make all.
1215 .PHONY: $(ALL_X11_MODULES)
1217 @dir=`echo $@ | sed -e 's/all-//'`; \
1218 if [ -f ./$${dir}/Makefile ] ; then \
1219 r=`${PWD_COMMAND}`; export r; \
1220 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1223 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1228 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1229 # To build a target check-X means to cd to X and make all.
1230 .PHONY: $(CHECK_X11_MODULES)
1231 $(CHECK_X11_MODULES):
1232 @dir=`echo $@ | sed -e 's/check-//'`; \
1233 if [ -f ./$${dir}/Makefile ] ; then \
1234 r=`${PWD_COMMAND}`; export r; \
1235 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1238 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1243 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1244 # To build a target install-X means to cd to X and make install.
1245 .PHONY: $(INSTALL_X11_MODULES)
1246 $(INSTALL_X11_MODULES): installdirs
1247 @dir=`echo $@ | sed -e 's/install-//'`; \
1248 if [ -f ./$${dir}/Makefile ] ; then \
1249 r=`${PWD_COMMAND}`; export r; \
1250 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1253 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1258 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1261 @if [ -f ./gcc/Makefile ] ; then \
1262 r=`${PWD_COMMAND}`; export r; \
1263 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1265 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1270 # Building GCC uses some tools for rebuilding "source" files
1271 # like texinfo, bison/byacc, etc. So we must depend on those.
1273 # While building GCC, it may be necessary to run various target
1274 # programs like the assembler, linker, etc. So we depend on
1277 # In theory, on an SMP all those dependencies can be resolved
1280 .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
1281 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap
1282 @r=`${PWD_COMMAND}`; export r; \
1283 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1285 echo "Bootstrapping the compiler"; \
1286 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
1287 @r=`${PWD_COMMAND}`; export r; \
1288 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1290 *bootstrap4-lean ) \
1291 msg="Comparing stage3 and stage4 of the compiler"; \
1292 compare=compare3-lean ;; \
1293 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1294 compare=compare3 ;; \
1295 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
1296 compare=compare-lean ;; \
1297 * ) msg="Comparing stage2 and stage3 of the compiler"; \
1298 compare=compare ;; \
1302 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
1303 @r=`${PWD_COMMAND}`; export r; \
1304 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
1306 echo "Building runtime libraries"; \
1307 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
1310 cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1311 @r=`${PWD_COMMAND}`; export r; \
1312 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1314 echo "Building the C and C++ compiler"; \
1315 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
1316 @r=`${PWD_COMMAND}`; export r; \
1317 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
1319 echo "Building runtime libraries"; \
1320 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
1321 LANGUAGES="c c++" all
1325 @if [ -f ./gcc/Makefile ] ; then \
1326 r=`${PWD_COMMAND}`; export r; \
1327 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1329 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1334 .PHONY: check-gcc-c++
1336 @if [ -f ./gcc/Makefile ] ; then \
1337 r=`${PWD_COMMAND}`; export r; \
1338 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1340 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
1347 $(MAKE) check-target-libstdc++-v3 check-gcc-c++ NOTPARALLEL=parallel-ok
1351 @if [ -f ./gcc/Makefile ] ; then \
1352 r=`${PWD_COMMAND}`; export r; \
1353 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1355 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1360 .PHONY: install-gcc-cross
1362 @if [ -f ./gcc/Makefile ] ; then \
1363 r=`${PWD_COMMAND}`; export r; \
1364 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1366 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1370 # EXPERIMENTAL STUFF
1371 # This rule is used to install the modules which use FLAGS_TO_PASS.
1372 # To build a target install-X means to cd to X and make install.
1373 .PHONY: install-dosrel
1374 install-dosrel: installdirs info
1375 @dir=`echo $@ | sed -e 's/install-//'`; \
1376 if [ -f ./$${dir}/Makefile ] ; then \
1377 r=`${PWD_COMMAND}`; export r; \
1378 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1380 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1385 install-dosrel-fake:
1388 ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss
1389 ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3
1391 # This is a list of inter-dependencies among modules.
1393 all-autoconf: all-m4 all-texinfo
1394 all-automake: all-m4 all-texinfo
1396 all-bfd: all-libiberty all-intl
1397 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1398 all-bison: all-texinfo
1399 configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads
1403 all-dejagnu: all-tcl all-expect all-tk
1404 all-diff: all-libiberty
1406 configure-target-examples: $(ALL_GCC_C)
1407 all-expect: all-tcl all-tk
1408 all-fileutils: all-libiberty
1411 all-flex: all-libiberty all-bison all-byacc
1412 all-gas: all-libiberty all-opcodes all-bfd all-intl
1414 all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib
1415 all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
1417 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1420 configure-target-gperf: $(ALL_GCC_CXX)
1421 all-target-gperf: all-target-libiberty all-target-libstdc++-v3
1422 all-gprof: all-libiberty all-bfd all-opcodes all-intl
1423 all-grep: all-libiberty
1425 all-gzip: all-libiberty
1426 all-hello: all-libiberty
1429 all-itcl: all-tcl all-tk
1430 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1431 configure-target-libgloss: $(ALL_GCC)
1432 all-target-libgloss: configure-target-newlib
1433 all-libgui: all-tcl all-tk all-itcl
1436 all-build-libiberty: configure-build-libiberty
1438 configure-target-libffi: $(ALL_GCC_C)
1439 configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
1440 all-target-libjava: all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
1441 configure-target-libstdc++-v3: $(ALL_GCC_C)
1442 all-target-libstdc++-v3: all-target-libiberty
1444 configure-target-libf2c: $(ALL_GCC_C)
1445 all-target-libf2c: all-target-libiberty
1446 configure-target-libobjc: $(ALL_GCC_C)
1447 all-target-libobjc: all-target-libiberty
1448 all-m4: all-libiberty all-texinfo
1449 all-make: all-libiberty
1451 configure-target-newlib: $(ALL_GCC)
1452 configure-target-libtermcap: $(ALL_GCC_C)
1453 all-opcodes: all-bfd all-libiberty
1454 all-patch: all-libiberty
1456 all-prms: all-libiberty
1457 configure-target-qthreads: $(ALL_GCC_C)
1460 all-recode: all-libiberty
1461 all-sed: all-libiberty
1462 all-send-pr: all-prms
1464 all-sid: all-tcl all-tk
1465 all-sim: all-libiberty all-bfd all-opcodes all-readline
1466 all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui
1467 all-tar: all-libiberty
1469 all-tclX: all-tcl all-tk
1471 all-texinfo: all-libiberty
1474 all-tix: all-tcl all-tk
1476 configure-target-rda: $(ALL_GCC_C)
1477 configure-target-winsup: $(ALL_GCC_C)
1478 all-target-winsup: all-target-libiberty all-target-libtermcap
1479 all-uudecode: all-libiberty
1482 configure-target-zlib: $(ALL_GCC_C)
1483 all-fastjar: all-zlib all-libiberty
1484 configure-target-fastjar: configure-target-zlib
1485 all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty
1486 configure-target-libiberty: $(ALL_GCC_C)
1487 configure-target: $(CONFIGURE_TARGET_MODULES)
1488 all-target: $(ALL_TARGET_MODULES)
1489 install-target: $(INSTALL_TARGET_MODULES)
1490 install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
1491 install-sid: install-tcl install-tk
1493 # We put install-opcodes before install-binutils because the installed
1494 # binutils might be on PATH, and they might need the shared opcodes
1496 install-binutils: install-opcodes
1498 # We put install-tcl before install-itcl because itcl wants to run a
1499 # program on installation which uses the Tcl libraries.
1500 install-itcl: install-tcl
1503 # Dependencies of all-target-foo on configure-target-foo.
1504 [+ FOR target_modules +]all-target-[+module+]: configure-target-[+module+]
1505 [+ ENDFOR target_modules +]
1507 ### other supporting targets
1510 $(DESTDIR)$(prefix) \
1511 $(DESTDIR)$(exec_prefix)
1513 installdirs: mkinstalldirs
1514 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1516 dir.info: do-install-info
1517 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1518 $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1519 mv -f dir.info.new dir.info ; \
1524 @echo "Building a full distribution of this tree isn't done"
1525 @echo "via 'make dist'. Check out the etc/ subdirectory"
1529 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1530 # ability to use several tags files at once, so there is probably no need
1531 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1532 # (if we felt like it) have this Makefile write a piece of elisp which
1533 # the user could load to tell emacs19 where all the TAGS files we just
1537 # Rebuilding Makefile.in, using autogen.
1538 $(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
1539 cd $(srcdir) && autogen Makefile.def
1541 # with the gnu make, this is done automatically.
1543 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
1544 $(SHELL) ./config.status
1551 # end of Makefile.in