Daily bump.
[official-gcc.git] / Makefile.in
blob4a761096539bb18528e5f93f2abd4ba8a2f533e9
2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
4 # 1999, 2000, 2001, 2002 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.
21 # Tell GNU make 3.79 not to run the top level in parallel. This
22 # prevents contention for $builddir/$target/config.cache, as well
23 # as minimizing scatter in file system caches.
24 NOTPARALLEL = .NOTPARALLEL
25 $(NOTPARALLEL):
27 srcdir = .
29 prefix = /usr/local
30 exec_prefix = $(prefix)
32 bindir=${exec_prefix}/bin
33 sbindir=${exec_prefix}/sbin
34 libexecdir=${exec_prefix}/libexec
35 datadir=${prefix}/share
36 sysconfdir=${prefix}/etc
37 sharedstatedir=${prefix}/com
38 localstatedir=${prefix}/var
39 libdir=${exec_prefix}/lib
40 includedir=${prefix}/include
41 oldincludedir=/usr/include
42 infodir=${prefix}/info
43 mandir=${prefix}/man
44 gxx_include_dir=${includedir}/g++
46 tooldir = $(exec_prefix)/$(target_alias)
47 build_tooldir = $(exec_prefix)/$(target_alias)
49 program_transform_name =
51 man1dir = $(mandir)/man1
52 man2dir = $(mandir)/man2
53 man3dir = $(mandir)/man3
54 man4dir = $(mandir)/man4
55 man5dir = $(mandir)/man5
56 man6dir = $(mandir)/man6
57 man7dir = $(mandir)/man7
58 man8dir = $(mandir)/man8
59 man9dir = $(mandir)/man9
60 infodir = $(prefix)/info
61 includedir = $(prefix)/include
62 # Directory in which the compiler finds executables, libraries, etc.
63 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
64 GDB_NLM_DEPS =
66 SHELL = /bin/sh
68 # pwd command to use. Allow user to override default by setting PWDCMD in
69 # the environment to account for automounters. The make variable must not
70 # be called PWDCMD, otherwise the value set here is passed to make
71 # subprocesses and overrides the setting from the user's environment.
72 PWD = $${PWDCMD-pwd}
74 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
75 # cygwin host.
76 INSTALL_PROGRAM_ARGS =
78 INSTALL = $(SHELL) $$s/install-sh -c
79 INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
80 INSTALL_SCRIPT = $(INSTALL)
81 INSTALL_DATA = $(INSTALL) -m 644
83 INSTALL_DOSREL = install-dosrel-fake
85 AS = as
86 AR = ar
87 AR_FLAGS = rc
88 CC = cc
90 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
91 # here so that they can be overridden by Makefile fragments.
92 HOST_CC = $(CC_FOR_BUILD)
93 BUILD_PREFIX =
94 BUILD_PREFIX_1 = loser-
96 # These flag values are normally overridden by the configure script.
97 CFLAGS = -g
98 CXXFLAGS = -g -O2
100 LDFLAGS =
101 LIBCFLAGS = $(CFLAGS)
102 CFLAGS_FOR_BUILD = $(CFLAGS)
103 # During gcc bootstrap, if we use some random cc for stage1 then
104 # CFLAGS will be just -g. We want to ensure that TARGET libraries
105 # (which we know are built with gcc) are built with optimizations so
106 # prepend -O2 when setting CFLAGS_FOR_TARGET.
107 CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
108 LDFLAGS_FOR_TARGET =
109 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
110 PICFLAG =
111 PICFLAG_FOR_TARGET =
113 CXX = c++
115 # Use -O2 to stress test the compiler.
116 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
117 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
118 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
120 DLLTOOL = dlltool
121 WINDRES = windres
123 NM = nm
125 LD = ld
127 BZIPPROG = bzip2
128 MD5PROG = md5sum
130 # These values are substituted by configure.
131 DEFAULT_YACC = yacc
132 DEFAULT_LEX = lex
133 DEFAULT_M4 = m4
135 BISON = `if [ -f $$r/bison/bison ] ; then \
136 echo $$r/bison/bison -L $$s/bison/ ; \
137 else \
138 echo bison ; \
141 YACC = `if [ -f $$r/bison/bison ] ; then \
142 echo $$r/bison/bison -y -L $$s/bison/ ; \
143 elif [ -f $$r/byacc/byacc ] ; then \
144 echo $$r/byacc/byacc ; \
145 else \
146 echo ${DEFAULT_YACC} ; \
149 LEX = `if [ -f $$r/flex/flex ] ; \
150 then echo $$r/flex/flex ; \
151 else echo ${DEFAULT_LEX} ; fi`
153 M4 = `if [ -f $$r/m4/m4 ] ; \
154 then echo $$r/m4/m4 ; \
155 else echo ${DEFAULT_M4} ; fi`
157 # For an installed makeinfo, we require it to be from texinfo 4 or
158 # higher, else we use the "missing" dummy.
159 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
160 then echo $$r/texinfo/makeinfo/makeinfo ; \
161 else if (makeinfo --version \
162 | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \
163 then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
165 # This just becomes part of the MAKEINFO definition passed down to
166 # sub-makes. It lets flags be given on the command line while still
167 # using the makeinfo from the object tree.
168 MAKEINFOFLAGS =
170 EXPECT = `if [ -f $$r/expect/expect ] ; \
171 then echo $$r/expect/expect ; \
172 else echo expect ; fi`
174 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
175 then echo $$s/dejagnu/runtest ; \
176 else echo runtest ; fi`
179 # compilers to use to create programs which must be run in the build
180 # environment.
181 CC_FOR_BUILD = $(CC)
182 CXX_FOR_BUILD = $(CXX)
184 SUBDIRS = "this is set via configure, don't edit this"
185 OTHERS =
187 # This is set by the configure script to the list of directories which
188 # should be built using the target tools.
189 TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libobjc
191 # Target libraries are put under this directory:
192 # Changed by configure to $(target_alias) if cross.
193 TARGET_SUBDIR = .
195 BUILD_CONFIGDIRS = libiberty
196 BUILD_SUBDIR = .
198 # This is set by the configure script to the arguments to use when configuring
199 # directories built for the target.
200 TARGET_CONFIGARGS =
202 # This is set by the configure script to the arguments to use when configuring
203 # directories built for the build system.
204 BUILD_CONFIGARGS =
206 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
207 # was used.
208 SET_LIB_PATH =
210 # This is the name of the environment variable used for the path to
211 # the libraries. This may be changed by configure.in.
212 RPATH_ENVVAR = LD_LIBRARY_PATH
214 # This is the list of directories that may be needed in RPATH_ENVVAR
215 # so that programs built for the host machine work.
216 HOST_LIB_PATH = $$r/bfd:$$r/opcodes
218 # This is the list of directories that may be needed in RPATH_ENVVAR
219 # so that prorgams built for the target machine work.
220 TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
222 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
223 # Some platforms don't like blank entries, so we remove duplicate,
224 # leading and trailing colons.
225 REALLY_SET_LIB_PATH = \
226 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
228 ALL = all.normal
229 INSTALL_TARGET = installdirs \
230 install-gcc \
231 $(INSTALL_MODULES) \
232 $(INSTALL_TARGET_MODULES) \
233 $(INSTALL_X11_MODULES) \
234 $(INSTALL_DOSREL)
236 INSTALL_TARGET_CROSS = installdirs \
237 install-gcc-cross \
238 $(INSTALL_MODULES) \
239 $(INSTALL_TARGET_MODULES) \
240 $(INSTALL_X11_MODULES) \
241 $(INSTALL_DOSREL)
243 # Should be substed by configure.in
244 FLAGS_FOR_TARGET =
245 CC_FOR_TARGET =
246 CXX_FOR_TARGET =
247 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE =
248 GCJ_FOR_TARGET =
250 # If GCC_FOR_TARGET is not overriden on the command line, then this
251 # variable is passed down to the gcc Makefile, where it is used to
252 # build libgcc2.a. We define it here so that it can itself be
253 # overridden on the command line.
254 GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
256 AS_FOR_TARGET = ` \
257 if [ -f $$r/gas/as-new ] ; then \
258 echo $$r/gas/as-new ; \
259 elif [ -f $$r/gcc/xgcc ]; then \
260 $(CC_FOR_TARGET) -print-prog-name=as ; \
261 else \
262 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
263 echo $(AS); \
264 else \
265 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
266 fi; \
269 LD_FOR_TARGET = ` \
270 if [ -f $$r/ld/ld-new ] ; then \
271 echo $$r/ld/ld-new ; \
272 elif [ -f $$r/gcc/xgcc ]; then \
273 $(CC_FOR_TARGET) -print-prog-name=ld ; \
274 else \
275 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
276 echo $(LD); \
277 else \
278 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
279 fi; \
282 DLLTOOL_FOR_TARGET = ` \
283 if [ -f $$r/binutils/dlltool ] ; then \
284 echo $$r/binutils/dlltool ; \
285 else \
286 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
287 echo $(DLLTOOL); \
288 else \
289 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
290 fi; \
293 WINDRES_FOR_TARGET = ` \
294 if [ -f $$r/binutils/windres ] ; then \
295 echo $$r/binutils/windres ; \
296 else \
297 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
298 echo $(WINDRES); \
299 else \
300 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
301 fi; \
304 AR_FOR_TARGET = ` \
305 if [ -f $$r/binutils/ar ] ; then \
306 echo $$r/binutils/ar ; \
307 else \
308 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
309 echo $(AR); \
310 else \
311 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
312 fi; \
315 RANLIB_FOR_TARGET = ` \
316 if [ -f $$r/binutils/ranlib ] ; then \
317 echo $$r/binutils/ranlib ; \
318 else \
319 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
320 if [ x'$(RANLIB)' != x ]; then \
321 echo $(RANLIB); \
322 else \
323 echo ranlib; \
324 fi; \
325 else \
326 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
327 fi; \
330 NM_FOR_TARGET = ` \
331 if [ -f $$r/binutils/nm-new ] ; then \
332 echo $$r/binutils/nm-new ; \
333 elif [ -f $$r/gcc/xgcc ]; then \
334 $(CC_FOR_TARGET) -print-prog-name=nm ; \
335 else \
336 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
337 echo $(NM); \
338 else \
339 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
340 fi; \
343 # The first rule in the file had better be this one. Don't put any above it.
344 # This lives here to allow makefile fragments to contain dependencies.
345 all: all.normal
346 .PHONY: all
348 # These can be overridden by config/mt-*.
349 # The _TARGET_ is because they're specified in mt-foo.
350 # The _HOST_ is because they're programs that run on the host.
351 EXTRA_TARGET_HOST_ALL_MODULES =
352 EXTRA_TARGET_HOST_INSTALL_MODULES =
353 EXTRA_TARGET_HOST_CHECK_MODULES =
355 #### host and target specific makefile fragments come in here.
358 # Flags to pass down to all sub-makes.
359 # Please keep these in alphabetical order.
360 BASE_FLAGS_TO_PASS = \
361 "AR_FLAGS=$(AR_FLAGS)" \
362 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
363 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
364 "BISON=$(BISON)" \
365 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
366 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
367 "CFLAGS=$(CFLAGS)" \
368 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
369 "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
370 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
371 "CXXFLAGS=$(CXXFLAGS)" \
372 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
373 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
374 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
375 "INSTALL=$(INSTALL)" \
376 "INSTALL_DATA=$(INSTALL_DATA)" \
377 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
378 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
379 "LDFLAGS=$(LDFLAGS)" \
380 "LEX=$(LEX)" \
381 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
382 "LIBCFLAGS=$(LIBCFLAGS)" \
383 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
384 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
385 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
386 "M4=$(M4)" \
387 "MAKE=$(MAKE)" \
388 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
389 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
390 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
391 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
392 "SHELL=$(SHELL)" \
393 "EXPECT=$(EXPECT)" \
394 "RUNTEST=$(RUNTEST)" \
395 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
396 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
397 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
398 "YACC=$(YACC)" \
399 "bindir=$(bindir)" \
400 "datadir=$(datadir)" \
401 "exec_prefix=$(exec_prefix)" \
402 "includedir=$(includedir)" \
403 "infodir=$(infodir)" \
404 "libdir=$(libdir)" \
405 "libexecdir=$(libexecdir)" \
406 "lispdir=$(lispdir)" \
407 "libstdcxx_incdir=$(libstdcxx_incdir)" \
408 "libsubdir=$(libsubdir)" \
409 "localstatedir=$(localstatedir)" \
410 "mandir=$(mandir)" \
411 "oldincludedir=$(oldincludedir)" \
412 "prefix=$(prefix)" \
413 "sbindir=$(sbindir)" \
414 "sharedstatedir=$(sharedstatedir)" \
415 "sysconfdir=$(sysconfdir)" \
416 "tooldir=$(tooldir)" \
417 "build_tooldir=$(build_tooldir)" \
418 "gxx_include_dir=$(gxx_include_dir)" \
419 "gcc_version=$(gcc_version)" \
420 "gcc_version_trigger=$(gcc_version_trigger)" \
421 "target_alias=$(target_alias)"
423 # For any flags above that may contain shell code that varies from one
424 # target library to another. When doing recursive invocations of the
425 # top-level Makefile, we don't want the outer make to evaluate them,
426 # so we pass these variables down unchanged. They must not contain
427 # single nor double quotes.
428 RECURSE_FLAGS = \
429 CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)'
431 # Flags to pass down to most sub-makes, in which we're building with
432 # the host environment.
433 # If any variables are added here, they must be added to do-*, below.
434 EXTRA_HOST_FLAGS = \
435 'AR=$(AR)' \
436 'AS=$(AS)' \
437 'CC=$(CC)' \
438 'CXX=$(CXX)' \
439 'DLLTOOL=$(DLLTOOL)' \
440 'LD=$(LD)' \
441 'NM=$(NM)' \
442 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
443 'WINDRES=$(WINDRES)'
445 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
447 # Flags that are concerned with the location of the X11 include files
448 # and library files
450 # NOTE: until the top-level is getting the values via autoconf, it only
451 # causes problems to have this top-level Makefile overriding the autoconf-set
452 # values in child directories. Only variables that don't conflict with
453 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
455 X11_FLAGS_TO_PASS = \
456 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
457 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
459 # Flags to pass down to makes which are built with the target environment.
460 # The double $ decreases the length of the command line; the variables
461 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
462 # If any variables are added here, they must be added to do-*, below.
463 EXTRA_TARGET_FLAGS = \
464 'AR=$$(AR_FOR_TARGET)' \
465 'AS=$$(AS_FOR_TARGET)' \
466 'CC=$$(CC_FOR_TARGET)' \
467 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
468 'CXX=$$(CXX_FOR_TARGET)' \
469 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
470 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
471 'LD=$$(LD_FOR_TARGET)' \
472 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
473 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
474 'NM=$$(NM_FOR_TARGET)' \
475 'RANLIB=$$(RANLIB_FOR_TARGET)' \
476 'WINDRES=$$(WINDRES_FOR_TARGET)'
478 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
480 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
481 # unfortunately needs the native compiler and the target ar and
482 # ranlib.
483 # If any variables are added here, they must be added to do-*, below.
484 # The HOST_* variables are a special case, which are used for the gcc
485 # cross-building scheme.
486 EXTRA_GCC_FLAGS = \
487 'AR=$(AR)' \
488 'AS=$(AS)' \
489 'CC=$(CC)' \
490 'CXX=$(CXX)' \
491 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
492 'HOST_CC=$(CC_FOR_BUILD)' \
493 'BUILD_PREFIX=$(BUILD_PREFIX)' \
494 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
495 'NM=$(NM)' \
496 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
497 'WINDRES=$$(WINDRES_FOR_TARGET)' \
498 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
499 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
500 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
501 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
502 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
503 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
504 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
505 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
506 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
507 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
508 "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
509 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
511 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
513 # This is a list of the targets for all of the modules which are compiled
514 # using the build machine's native compiler. Configure edits the second
515 # macro for build!=host builds.
516 ALL_BUILD_MODULES_LIST = \
517 all-build-libiberty
518 ALL_BUILD_MODULES =
520 # This is a list of the configure targets for all of the modules which
521 # are compiled using the native tools.
522 CONFIGURE_BUILD_MODULES = \
523 configure-build-libiberty
525 # This is a list of the targets for all of the modules which are compiled
526 # using $(FLAGS_TO_PASS).
527 ALL_MODULES = \
528 all-apache \
529 all-ash \
530 all-autoconf \
531 all-automake \
532 all-bash \
533 all-bfd \
534 all-binutils \
535 all-bison \
536 all-byacc \
537 all-bzip2 \
538 all-cgen \
539 all-cvssrc \
540 all-db \
541 all-dejagnu \
542 all-diff \
543 all-dosutils \
544 all-etc \
545 all-fastjar \
546 all-fileutils \
547 all-findutils \
548 all-find \
549 all-flex \
550 all-gas \
551 all-gawk \
552 all-gettext \
553 all-gnuserv \
554 all-gprof \
555 all-grep \
556 all-grez \
557 all-gzip \
558 all-hello \
559 all-indent \
560 all-inet \
561 all-intl \
562 all-ispell \
563 all-itcl \
564 all-ld \
565 all-libgui \
566 all-libiberty \
567 all-libtool \
568 all-m4 \
569 all-make \
570 all-mmalloc \
571 all-opcodes \
572 all-patch \
573 all-perl \
574 all-prms \
575 all-rcs \
576 all-readline \
577 all-release \
578 all-recode \
579 all-sed \
580 all-send-pr \
581 all-shellutils \
582 all-sid \
583 all-sim \
584 all-snavigator \
585 all-tar \
586 all-tcl \
587 all-texinfo \
588 all-textutils \
589 all-tgas \
590 all-time \
591 all-uudecode \
592 all-wdiff \
593 all-zip \
594 all-zlib \
595 $(EXTRA_TARGET_HOST_ALL_MODULES)
597 # This is a list of the check targets for all of the modules which are
598 # compiled using $(FLAGS_TO_PASS).
600 # The list is in two parts. The first lists those tools which
601 # are tested as part of the host's native tool-chain, and not
602 # tested in a cross configuration.
603 NATIVE_CHECK_MODULES = \
604 check-bison \
605 check-byacc \
606 check-fastjar \
607 check-flex \
608 check-zip
610 CROSS_CHECK_MODULES = \
611 check-apache \
612 check-ash \
613 check-autoconf \
614 check-automake \
615 check-bash \
616 check-bfd \
617 check-binutils \
618 check-bzip2 \
619 check-cgen \
620 check-cvssrc \
621 check-db \
622 check-dejagnu \
623 check-diff \
624 check-etc \
625 check-fileutils \
626 check-findutils \
627 check-find \
628 check-gas \
629 check-gawk \
630 check-gettext \
631 check-gnuserv \
632 check-gprof \
633 check-grep \
634 check-gzip \
635 check-hello \
636 check-indent \
637 check-inet \
638 check-intl \
639 check-ispell \
640 check-itcl \
641 check-ld \
642 check-libgui \
643 check-libiberty \
644 check-libtool \
645 check-m4 \
646 check-make \
647 check-mmcheckoc \
648 check-opcodes \
649 check-patch \
650 check-perl \
651 check-prms \
652 check-rcs \
653 check-readline \
654 check-recode \
655 check-sed \
656 check-send-pr \
657 check-shellutils \
658 check-snavigator \
659 check-sid \
660 check-sim \
661 check-tar \
662 check-tcl \
663 check-texinfo \
664 check-textutils \
665 check-tgas \
666 check-time \
667 check-uudecode \
668 check-wdiff \
669 $(EXTRA_TARGET_HOST_CHECK_MODULES)
671 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
673 # This is a list of the install targets for all of the modules which are
674 # compiled using $(FLAGS_TO_PASS).
675 # We put install-opcodes before install-binutils because the installed
676 # binutils might be on PATH, and they might need the shared opcodes
677 # library.
678 # We put install-tcl before install-itcl because itcl wants to run a
679 # program on installation which uses the Tcl libraries.
680 INSTALL_MODULES = \
681 install-apache \
682 install-ash \
683 install-autoconf \
684 install-automake \
685 install-bash \
686 install-bfd \
687 install-bzip2 \
688 install-opcodes \
689 install-binutils \
690 install-bison \
691 install-byacc \
692 install-cgen \
693 install-cvssrc \
694 install-db \
695 install-dejagnu \
696 install-diff \
697 install-dosutils \
698 install-etc \
699 install-fastjar \
700 install-fileutils \
701 install-findutils \
702 install-find \
703 install-flex \
704 install-gas \
705 install-gawk \
706 install-gettext \
707 install-gnuserv \
708 install-gprof \
709 install-grep \
710 install-grez \
711 install-gzip \
712 install-hello \
713 install-indent \
714 install-inet \
715 install-intl \
716 install-ispell \
717 install-tcl \
718 install-itcl \
719 install-ld \
720 install-libgui \
721 install-libiberty \
722 install-libtool \
723 install-m4 \
724 install-make \
725 install-mmalloc \
726 install-patch \
727 install-perl \
728 install-prms \
729 install-rcs \
730 install-readline \
731 install-recode \
732 install-sed \
733 install-send-pr \
734 install-shellutils \
735 install-sid \
736 install-sim \
737 install-snavigator \
738 install-tar \
739 install-textutils \
740 install-tgas \
741 install-time \
742 install-uudecode \
743 install-wdiff \
744 install-zip \
745 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
747 # This is a list of the targets for all of the modules which are compiled
748 # using $(X11_FLAGS_TO_PASS).
749 ALL_X11_MODULES = \
750 all-emacs \
751 all-emacs19 \
752 all-gdb \
753 all-expect \
754 all-guile \
755 all-tclX \
756 all-tk \
757 all-tix
759 # This is a list of the check targets for all of the modules which are
760 # compiled using $(X11_FLAGS_TO_PASS).
761 CHECK_X11_MODULES = \
762 check-emacs \
763 check-gdb \
764 check-guile \
765 check-expect \
766 check-tclX \
767 check-tk \
768 check-tix
770 # This is a list of the install targets for all the modules which are
771 # compiled using $(X11_FLAGS_TO_PASS).
772 INSTALL_X11_MODULES = \
773 install-emacs \
774 install-emacs19 \
775 install-gdb \
776 install-guile \
777 install-expect \
778 install-tclX \
779 install-tk \
780 install-tix
782 # This is a list of the targets for all of the modules which are compiled
783 # using $(TARGET_FLAGS_TO_PASS).
784 ALL_TARGET_MODULES = \
785 all-target-libstdc++-v3 \
786 all-target-librx \
787 all-target-newlib \
788 all-target-libf2c \
789 all-target-libobjc \
790 all-target-libtermcap \
791 all-target-winsup \
792 all-target-libgloss \
793 all-target-libiberty \
794 all-target-gperf \
795 all-target-examples \
796 all-target-libstub \
797 all-target-libffi \
798 all-target-libjava \
799 all-target-zlib \
800 all-target-boehm-gc \
801 all-target-qthreads \
802 all-target-bsp \
803 all-target-cygmon
805 # This is a list of the configure targets for all of the modules which
806 # are compiled using the target tools.
807 CONFIGURE_TARGET_MODULES = \
808 configure-target-libstdc++-v3 \
809 configure-target-librx \
810 configure-target-newlib \
811 configure-target-libf2c \
812 configure-target-libobjc \
813 configure-target-libtermcap \
814 configure-target-winsup \
815 configure-target-libgloss \
816 configure-target-libiberty \
817 configure-target-gperf \
818 configure-target-examples \
819 configure-target-libstub \
820 configure-target-libffi \
821 configure-target-libjava \
822 configure-target-zlib \
823 configure-target-boehm-gc \
824 configure-target-qthreads \
825 configure-target-bsp \
826 configure-target-cygmon
828 # This is a list of the check targets for all of the modules which are
829 # compiled using $(TARGET_FLAGS_TO_PASS).
830 CHECK_TARGET_MODULES = \
831 check-target-libstdc++-v3 \
832 check-target-newlib \
833 check-target-libf2c \
834 check-target-libobjc \
835 check-target-winsup \
836 check-target-libiberty \
837 check-target-libffi \
838 check-target-libjava \
839 check-target-zlib \
840 check-target-boehm-gc \
841 check-target-qthreads \
842 check-target-gperf
844 # This is a list of the install targets for all of the modules which are
845 # compiled using $(TARGET_FLAGS_TO_PASS).
846 INSTALL_TARGET_MODULES = \
847 install-target-libstdc++-v3 \
848 install-target-newlib \
849 install-target-libf2c \
850 install-target-libobjc \
851 install-target-libtermcap \
852 install-target-winsup \
853 install-target-libgloss \
854 install-target-libiberty \
855 install-target-bsp \
856 install-target-libjava \
857 install-target-zlib \
858 install-target-boehm-gc \
859 install-target-qthreads \
860 install-target-gperf
862 # This is a list of the targets for which we can do a clean-{target}.
863 CLEAN_MODULES = \
864 clean-apache \
865 clean-ash \
866 clean-autoconf \
867 clean-automake \
868 clean-bash \
869 clean-bfd \
870 clean-binutils \
871 clean-bison \
872 clean-byacc \
873 clean-bzip2 \
874 clean-cgen \
875 clean-cvssrc \
876 clean-db \
877 clean-dejagnu \
878 clean-diff \
879 clean-dosutils \
880 clean-etc \
881 clean-fastjar \
882 clean-fileutils \
883 clean-findutils \
884 clean-find \
885 clean-flex \
886 clean-gas \
887 clean-gawk \
888 clean-gettext \
889 clean-gnuserv \
890 clean-gprof \
891 clean-grep \
892 clean-grez \
893 clean-gzip \
894 clean-hello \
895 clean-indent \
896 clean-inet \
897 clean-intl \
898 clean-ispell \
899 clean-itcl \
900 clean-ld \
901 clean-libgui \
902 clean-libiberty \
903 clean-libtool \
904 clean-m4 \
905 clean-make \
906 clean-mmalloc \
907 clean-opcodes \
908 clean-patch \
909 clean-perl \
910 clean-prms \
911 clean-rcs \
912 clean-readline \
913 clean-release \
914 clean-recode \
915 clean-sed \
916 clean-send-pr \
917 clean-shellutils \
918 clean-sid \
919 clean-sim \
920 clean-snavigator \
921 clean-tar \
922 clean-tcl \
923 clean-texinfo \
924 clean-textutils \
925 clean-tgas \
926 clean-time \
927 clean-uudecode \
928 clean-wdiff \
929 clean-zip \
930 clean-zlib
932 # All of the target modules that can be cleaned
933 CLEAN_TARGET_MODULES = \
934 clean-target-libstdc++-v3 \
935 clean-target-librx \
936 clean-target-newlib \
937 clean-target-libf2c \
938 clean-target-libobjc \
939 clean-target-winsup \
940 clean-target-libgloss \
941 clean-target-libiberty \
942 clean-target-gperf \
943 clean-target-examples \
944 clean-target-libstub \
945 clean-target-libffi \
946 clean-target-libjava \
947 clean-target-zlib \
948 clean-target-boehm-gc \
949 clean-target-qthreads \
950 clean-target-bsp \
951 clean-target-cygmon
953 # All of the x11 modules that can be cleaned
954 CLEAN_X11_MODULES = \
955 clean-emacs \
956 clean-emacs19 \
957 clean-gdb \
958 clean-expect \
959 clean-guile \
960 clean-tclX \
961 clean-tk \
962 clean-tix
964 # The target built for a native build.
965 .PHONY: all.normal
966 all.normal: \
967 $(ALL_BUILD_MODULES) \
968 $(ALL_MODULES) \
969 $(ALL_X11_MODULES) \
970 $(ALL_TARGET_MODULES) \
971 all-gcc
973 # Do a target for all the subdirectories. A ``make do-X'' will do a
974 # ``make X'' in all subdirectories (because, in general, there is a
975 # dependency (below) of X upon do-X, a ``make X'' will also do this,
976 # but it may do additional work as well).
977 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
978 # because it is so large that it can easily overflow the command line
979 # length limit on some systems.
980 DO_X = \
981 do-clean \
982 do-distclean \
983 do-dvi \
984 do-info \
985 do-install-info \
986 do-installcheck \
987 do-mostlyclean \
988 do-maintainer-clean \
989 do-TAGS
990 .PHONY: $(DO_X)
991 $(DO_X):
992 @target=`echo $@ | sed -e 's/^do-//'`; \
993 r=`${PWD}`; export r; \
994 s=`cd $(srcdir); ${PWD}`; export s; \
995 $(SET_LIB_PATH) \
996 for i in $(SUBDIRS) -dummy-; do \
997 if [ -f ./$$i/Makefile ]; then \
998 case $$i in \
999 gcc) \
1000 for flag in $(EXTRA_GCC_FLAGS); do \
1001 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1002 done; \
1003 ;; \
1004 *) \
1005 for flag in $(EXTRA_HOST_FLAGS); do \
1006 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1007 done; \
1008 ;; \
1009 esac ; \
1010 if (cd ./$$i; \
1011 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1012 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1013 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1014 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1015 $${target}); \
1016 then true; else exit 1; fi; \
1017 else true; fi; \
1018 done
1019 @target=`echo $@ | sed -e 's/^do-//'`; \
1020 r=`${PWD}`; export r; \
1021 s=`cd $(srcdir); ${PWD}`; export s; \
1022 $(SET_LIB_PATH) \
1023 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1024 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1025 for flag in $(EXTRA_TARGET_FLAGS); do \
1026 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1027 done; \
1028 if (cd $(TARGET_SUBDIR)/$$i; \
1029 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1030 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1031 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1032 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1033 $${target}); \
1034 then true; else exit 1; fi; \
1035 else true; fi; \
1036 done
1038 # Here are the targets which correspond to the do-X targets.
1040 .PHONY: info installcheck dvi install-info
1041 .PHONY: clean distclean mostlyclean maintainer-clean realclean
1042 .PHONY: local-clean local-distclean local-maintainer-clean
1043 info: do-info
1044 installcheck: do-installcheck
1045 dvi: do-dvi
1047 # Make sure makeinfo is built before we do a `make info'.
1048 do-info: all-texinfo
1050 install-info: do-install-info dir.info
1051 s=`cd $(srcdir); ${PWD}`; export s; \
1052 if [ -f dir.info ] ; then \
1053 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1054 else true ; fi
1056 local-clean:
1057 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
1059 local-distclean:
1060 -rm -f Makefile config.status config.cache mh-frag mt-frag
1061 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1062 rm -rf $(TARGET_SUBDIR); \
1063 else true; fi
1064 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
1065 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
1066 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
1067 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
1068 -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
1070 local-maintainer-clean:
1071 @echo "This command is intended for maintainers to use;"
1072 @echo "it deletes files that may require special tools to rebuild."
1074 clean: do-clean local-clean
1075 mostlyclean: do-mostlyclean local-clean
1076 distclean: do-distclean local-clean local-distclean
1077 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1078 maintainer-clean: local-distclean
1079 realclean: maintainer-clean
1081 # This rule is used to clean specific modules.
1082 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1083 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1084 @dir=`echo $@ | sed -e 's/clean-//'`; \
1085 if [ -f ./$${dir}/Makefile ] ; then \
1086 r=`${PWD}`; export r; \
1087 s=`cd $(srcdir); ${PWD}`; export s; \
1088 $(SET_LIB_PATH) \
1089 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1090 else \
1091 true; \
1094 .PHONY: $(CLEAN_TARGET_MODULES)
1095 $(CLEAN_TARGET_MODULES):
1096 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1097 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1098 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1099 r=`${PWD}`; export r; \
1100 s=`cd $(srcdir); ${PWD}`; export s; \
1101 $(SET_LIB_PATH) \
1102 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1103 else \
1104 true; \
1107 clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
1108 clean-target-libgcc:
1109 test ! -d gcc/libgcc || \
1110 (cd gcc/libgcc && find . -type d -print) | \
1111 while read d; do rm -f gcc/$$d/libgcc.a || : ; done
1112 -rm -rf gcc/libgcc
1114 # Check target.
1116 .PHONY: check do-check
1117 check:
1118 $(MAKE) do-check NOTPARALLEL=parallel-ok
1120 do-check: $(CHECK_MODULES) \
1121 $(CHECK_TARGET_MODULES) \
1122 $(CHECK_X11_MODULES) \
1123 check-gcc
1125 # Automated reporting of test results.
1127 warning.log: build.log
1128 $(srcdir)/contrib/warn_summary build.log > $@
1130 mail-report.log:
1131 if test x'$(BOOT_CFLAGS)' != x''; then \
1132 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1133 fi; \
1134 $(srcdir)/contrib/test_summary -t >$@
1135 chmod +x $@
1136 echo If you really want to send e-mail, run ./$@ now
1138 mail-report-with-warnings.log: warning.log
1139 if test x'$(BOOT_CFLAGS)' != x''; then \
1140 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1141 fi; \
1142 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1143 chmod +x $@
1144 echo If you really want to send e-mail, run ./$@ now
1146 # Installation targets.
1148 .PHONY: install install-cross uninstall source-vault binary-vault vault-install
1149 install: $(INSTALL_TARGET)
1150 install-cross: $(INSTALL_TARGET_CROSS)
1152 uninstall:
1153 @echo "the uninstall target is not supported in this tree"
1155 source-vault:
1156 $(MAKE) -f ./release/Build-A-Release \
1157 host=$(host_alias) source-vault
1159 binary-vault:
1160 $(MAKE) -f ./release/Build-A-Release \
1161 host=$(host_alias) target=$(target_alias)
1163 vault-install:
1164 @if [ -f ./release/vault-install ] ; then \
1165 ./release/vault-install $(host_alias) $(target_alias) ; \
1166 else \
1167 true ; \
1170 .PHONY: install.all
1171 install.all: install-no-fixedincludes
1172 @if [ -f ./gcc/Makefile ] ; then \
1173 r=`${PWD}` ; export r ; \
1174 $(SET_LIB_PATH) \
1175 (cd ./gcc; \
1176 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1177 else \
1178 true ; \
1181 # inet-install is used because the I*Net wants DejaGNU installed but
1182 # not built. Similarly, gzip is built but not installed.
1183 inet-install:
1184 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1186 # install-no-fixedincludes is used because Cygnus can not distribute
1187 # the fixed header files.
1188 .PHONY: install-no-fixedincludes
1189 install-no-fixedincludes: \
1190 installdirs \
1191 $(INSTALL_MODULES) \
1192 $(INSTALL_TARGET_MODULES) \
1193 $(INSTALL_X11_MODULES) \
1194 gcc-no-fixedincludes
1196 # Install the gcc headers files, but not the fixed include files,
1197 # which Cygnus is not allowed to distribute. This rule is very
1198 # dependent on the workings of the gcc Makefile.in.
1199 .PHONY: gcc-no-fixedincludes
1200 gcc-no-fixedincludes:
1201 @if [ -f ./gcc/Makefile ]; then \
1202 rm -rf gcc/tmp-include; \
1203 mv gcc/include gcc/tmp-include 2>/dev/null; \
1204 mkdir gcc/include; \
1205 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1206 touch gcc/stmp-fixinc gcc/include/fixed; \
1207 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1208 r=`${PWD}`; export r; \
1209 s=`cd $(srcdir); ${PWD}` ; export s; \
1210 $(SET_LIB_PATH) \
1211 (cd ./gcc; \
1212 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1213 rm -rf gcc/include; \
1214 mv gcc/tmp-include gcc/include 2>/dev/null; \
1215 else true; fi
1217 # This rule is used to build the modules which are built with the
1218 # build machine's native compiler.
1219 .PHONY: $(ALL_BUILD_MODULES)
1220 $(ALL_BUILD_MODULES):
1221 dir=`echo $@ | sed -e 's/all-build-//'`; \
1222 if [ -f ./$${dir}/Makefile ] ; then \
1223 r=`${PWD}`; export r; \
1224 s=`cd $(srcdir); ${PWD}`; export s; \
1225 (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \
1226 else \
1227 true; \
1230 # This rule is used to configure the modules which are built with the
1231 # native tools.
1232 .PHONY: $(CONFIGURE_BUILD_MODULES)
1233 $(CONFIGURE_BUILD_MODULES):
1234 @dir=`echo $@ | sed -e 's/configure-build-//'`; \
1235 if [ ! -d $(BUILD_SUBDIR) ]; then \
1236 true; \
1237 elif [ -f $(BUILD_SUBDIR)/$${dir}/Makefile ] ; then \
1238 true; \
1239 elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1240 if [ -d $(srcdir)/$${dir} ]; then \
1241 [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\
1242 r=`${PWD}`; export r; \
1243 s=`cd $(srcdir); ${PWD}`; export s; \
1244 AR="$(AR_FOR_BUILD)"; export AR; \
1245 AS="$(AS_FOR_BUILD)"; export AS; \
1246 CC="$(CC_FOR_BUILD)"; export CC; \
1247 CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
1248 CXX="$(CXX_FOR_BUILD)"; export CXX; \
1249 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
1250 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
1251 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
1252 LD="$(LD_FOR_BUILD)"; export LD; \
1253 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
1254 NM="$(NM_FOR_BUILD)"; export NM; \
1255 RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
1256 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
1257 echo Configuring in $(BUILD_SUBDIR)/$${dir}; \
1258 cd "$(BUILD_SUBDIR)/$${dir}" || exit 1; \
1259 case $(srcdir) in \
1260 /* | [A-Za-z]:[\\/]*) \
1261 topdir=$(srcdir) ;; \
1262 *) \
1263 case "$(BUILD_SUBDIR)" in \
1264 .) topdir="../$(srcdir)" ;; \
1265 *) topdir="../../$(srcdir)" ;; \
1266 esac ;; \
1267 esac; \
1268 if [ "$(srcdir)" = "." ] ; then \
1269 if [ "$(BUILD_SUBDIR)" != "." ] ; then \
1270 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1271 if [ -f Makefile ]; then \
1272 if $(MAKE) distclean; then \
1273 true; \
1274 else \
1275 exit 1; \
1276 fi; \
1277 else \
1278 true; \
1279 fi; \
1280 else \
1281 exit 1; \
1282 fi; \
1283 else \
1284 true; \
1285 fi; \
1286 srcdiroption="--srcdir=."; \
1287 libsrcdir="."; \
1288 else \
1289 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1290 libsrcdir="$$s/$${dir}"; \
1291 fi; \
1292 if [ -f $${libsrcdir}/configure ] ; then \
1293 rm -f no-such-file skip-this-dir; \
1294 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1295 $(BUILD_CONFIGARGS) $${srcdiroption} \
1296 --with-build-subdir="$(BUILD_SUBDIR)"; \
1297 else \
1298 rm -f no-such-file skip-this-dir; \
1299 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1300 $(BUILD_CONFIGARGS) $${srcdiroption} \
1301 --with-build-subdir="$(BUILD_SUBDIR)"; \
1302 fi || exit 1; \
1303 if [ -f skip-this-dir ] ; then \
1304 sh skip-this-dir; \
1305 rm -f skip-this-dir; \
1306 cd ..; rmdir $${dir} || true; \
1307 else \
1308 true; \
1309 fi; \
1310 else \
1311 true; \
1312 fi; \
1313 else \
1314 true; \
1317 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1318 # build a target all-X means to cd to X and make all.
1320 # all-gui, and all-libproc are handled specially because
1321 # they are still experimental, and if they fail to build, that
1322 # shouldn't stop "make all".
1323 .PHONY: $(ALL_MODULES) all-gui all-libproc
1324 $(ALL_MODULES) all-gui all-libproc:
1325 @dir=`echo $@ | sed -e 's/all-//'`; \
1326 if [ -f ./$${dir}/Makefile ] ; then \
1327 r=`${PWD}`; export r; \
1328 s=`cd $(srcdir); ${PWD}`; export s; \
1329 $(SET_LIB_PATH) \
1330 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1331 else \
1332 true; \
1335 # These rules are used to check the modules which use FLAGS_TO_PASS.
1336 # To build a target check-X means to cd to X and make check. Some
1337 # modules are only tested in a native toolchain.
1339 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1340 $(NATIVE_CHECK_MODULES):
1341 @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
1342 dir=`echo $@ | sed -e 's/check-//'`; \
1343 if [ -f ./$${dir}/Makefile ] ; then \
1344 r=`${PWD}`; export r; \
1345 s=`cd $(srcdir); ${PWD}`; export s; \
1346 $(SET_LIB_PATH) \
1347 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1348 else \
1349 true; \
1350 fi; \
1353 $(CROSS_CHECK_MODULES):
1354 @dir=`echo $@ | sed -e 's/check-//'`; \
1355 if [ -f ./$${dir}/Makefile ] ; then \
1356 r=`${PWD}`; export r; \
1357 s=`cd $(srcdir); ${PWD}`; export s; \
1358 $(SET_LIB_PATH) \
1359 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1360 else \
1361 true; \
1364 # This rule is used to install the modules which use FLAGS_TO_PASS.
1365 # To build a target install-X means to cd to X and make install.
1366 .PHONY: $(INSTALL_MODULES)
1367 $(INSTALL_MODULES): installdirs
1368 @dir=`echo $@ | sed -e 's/install-//'`; \
1369 if [ -f ./$${dir}/Makefile ] ; then \
1370 r=`${PWD}`; export r; \
1371 s=`cd $(srcdir); ${PWD}`; export s; \
1372 $(SET_LIB_PATH) \
1373 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1374 else \
1375 true; \
1378 # This rule is used to configure the modules which are built with the
1379 # target tools.
1380 .PHONY: $(CONFIGURE_TARGET_MODULES)
1381 $(CONFIGURE_TARGET_MODULES):
1382 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1383 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1384 r=`${PWD}`; export r; \
1385 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1386 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1387 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1388 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1389 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1390 else \
1391 echo "Multilibs changed for $${dir}, reconfiguring"; \
1392 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1393 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1394 fi; \
1395 else \
1396 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1397 fi; \
1398 fi; \
1399 fi; exit 0 # break command into two pieces
1400 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1401 if [ ! -d $(TARGET_SUBDIR) ]; then \
1402 true; \
1403 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1404 true; \
1405 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1406 if [ -d $(srcdir)/$${dir} ]; then \
1407 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1408 r=`${PWD}`; export r; \
1409 s=`cd $(srcdir); ${PWD}`; export s; \
1410 $(SET_LIB_PATH) \
1411 AR="$(AR_FOR_TARGET)"; export AR; \
1412 AS="$(AS_FOR_TARGET)"; export AS; \
1413 CC="$(CC_FOR_TARGET)"; export CC; \
1414 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1415 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1416 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1417 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
1418 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1419 LD="$(LD_FOR_TARGET)"; export LD; \
1420 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1421 NM="$(NM_FOR_TARGET)"; export NM; \
1422 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1423 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1424 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1425 cd "$(TARGET_SUBDIR)/$${dir}" || exit 1; \
1426 case $(srcdir) in \
1427 /* | [A-Za-z]:[\\/]*) \
1428 topdir=$(srcdir) ;; \
1429 *) \
1430 case "$(TARGET_SUBDIR)" in \
1431 .) topdir="../$(srcdir)" ;; \
1432 *) topdir="../../$(srcdir)" ;; \
1433 esac ;; \
1434 esac; \
1435 if [ "$(srcdir)" = "." ] ; then \
1436 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1437 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1438 if [ -f Makefile ]; then \
1439 if $(MAKE) distclean; then \
1440 true; \
1441 else \
1442 exit 1; \
1443 fi; \
1444 else \
1445 true; \
1446 fi; \
1447 else \
1448 exit 1; \
1449 fi; \
1450 else \
1451 true; \
1452 fi; \
1453 srcdiroption="--srcdir=."; \
1454 libsrcdir="."; \
1455 else \
1456 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1457 libsrcdir="$$s/$${dir}"; \
1458 fi; \
1459 if [ -f $${libsrcdir}/configure ] ; then \
1460 rm -f no-such-file skip-this-dir; \
1461 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1462 $(TARGET_CONFIGARGS) $${srcdiroption} \
1463 --with-target-subdir="$(TARGET_SUBDIR)"; \
1464 else \
1465 rm -f no-such-file skip-this-dir; \
1466 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1467 $(TARGET_CONFIGARGS) $${srcdiroption} \
1468 --with-target-subdir="$(TARGET_SUBDIR)"; \
1469 fi || exit 1; \
1470 if [ -f skip-this-dir ] ; then \
1471 sh skip-this-dir; \
1472 rm -f skip-this-dir; \
1473 cd ..; rmdir $${dir} || true; \
1474 else \
1475 true; \
1476 fi; \
1477 else \
1478 true; \
1479 fi; \
1480 else \
1481 true; \
1484 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1485 # To build a target all-X means to cd to X and make all.
1486 .PHONY: $(ALL_TARGET_MODULES)
1487 $(ALL_TARGET_MODULES):
1488 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1489 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1490 r=`${PWD}`; export r; \
1491 s=`cd $(srcdir); ${PWD}`; export s; \
1492 $(SET_LIB_PATH) \
1493 (cd $(TARGET_SUBDIR)/$${dir}; \
1494 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1495 else \
1496 true; \
1499 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1500 # To build a target install-X means to cd to X and make install.
1501 .PHONY: $(CHECK_TARGET_MODULES)
1502 $(CHECK_TARGET_MODULES):
1503 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1504 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1505 r=`${PWD}`; export r; \
1506 s=`cd $(srcdir); ${PWD}`; export s; \
1507 $(SET_LIB_PATH) \
1508 (cd $(TARGET_SUBDIR)/$${dir}; \
1509 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1510 else \
1511 true; \
1514 # This rule is used to install the modules which use
1515 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1516 # and make install.
1517 .PHONY: $(INSTALL_TARGET_MODULES)
1518 $(INSTALL_TARGET_MODULES): installdirs
1519 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1520 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1521 r=`${PWD}`; export r; \
1522 s=`cd $(srcdir); ${PWD}`; export s; \
1523 $(SET_LIB_PATH) \
1524 (cd $(TARGET_SUBDIR)/$${dir}; \
1525 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1526 else \
1527 true; \
1530 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1531 # To build a target all-X means to cd to X and make all.
1532 .PHONY: $(ALL_X11_MODULES)
1533 $(ALL_X11_MODULES):
1534 @dir=`echo $@ | sed -e 's/all-//'`; \
1535 if [ -f ./$${dir}/Makefile ] ; then \
1536 r=`${PWD}`; export r; \
1537 s=`cd $(srcdir); ${PWD}`; export s; \
1538 $(SET_LIB_PATH) \
1539 (cd $${dir}; \
1540 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1541 else \
1542 true; \
1545 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1546 # To build a target check-X means to cd to X and make all.
1547 .PHONY: $(CHECK_X11_MODULES)
1548 $(CHECK_X11_MODULES):
1549 @dir=`echo $@ | sed -e 's/check-//'`; \
1550 if [ -f ./$${dir}/Makefile ] ; then \
1551 r=`${PWD}`; export r; \
1552 s=`cd $(srcdir); ${PWD}`; export s; \
1553 $(SET_LIB_PATH) \
1554 (cd $${dir}; \
1555 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1556 else \
1557 true; \
1560 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1561 # To build a target install-X means to cd to X and make install.
1562 .PHONY: $(INSTALL_X11_MODULES)
1563 $(INSTALL_X11_MODULES): installdirs
1564 @dir=`echo $@ | sed -e 's/install-//'`; \
1565 if [ -f ./$${dir}/Makefile ] ; then \
1566 r=`${PWD}`; export r; \
1567 s=`cd $(srcdir); ${PWD}`; export s; \
1568 $(SET_LIB_PATH) \
1569 (cd $${dir}; \
1570 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1571 else \
1572 true; \
1575 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1576 .PHONY: all-gcc
1577 all-gcc:
1578 @if [ -f ./gcc/Makefile ] ; then \
1579 r=`${PWD}`; export r; \
1580 s=`cd $(srcdir); ${PWD}`; export s; \
1581 $(SET_LIB_PATH) \
1582 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1583 else \
1584 true; \
1587 # Building GCC uses some tools for rebuilding "source" files
1588 # like texinfo, bison/byacc, etc. So we must depend on those.
1590 # While building GCC, it may be necessary to run various target
1591 # programs like the assembler, linker, etc. So we depend on
1592 # those too.
1594 # In theory, on an SMP all those dependencies can be resolved
1595 # in parallel.
1597 .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1598 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-bootstrap
1599 @r=`${PWD}`; export r; \
1600 s=`cd $(srcdir); ${PWD}`; export s; \
1601 $(SET_LIB_PATH) \
1602 echo "Bootstrapping the compiler"; \
1603 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
1604 @r=`${PWD}`; export r; \
1605 s=`cd $(srcdir); ${PWD}`; export s; \
1606 case "$@" in \
1607 *bootstrap4-lean ) \
1608 msg="Comparing stage3 and stage4 of the compiler"; \
1609 compare=compare3-lean ;; \
1610 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1611 compare=compare3 ;; \
1612 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
1613 compare=compare-lean ;; \
1614 * ) msg="Comparing stage2 and stage3 of the compiler"; \
1615 compare=compare ;; \
1616 esac; \
1617 $(SET_LIB_PATH) \
1618 echo "$$msg"; \
1619 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
1620 @r=`${PWD}`; export r; \
1621 s=`cd $(srcdir); ${PWD}` ; export s; \
1622 $(SET_LIB_PATH) \
1623 echo "Building runtime libraries"; \
1624 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
1626 .PHONY: cross
1627 cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1628 @r=`${PWD}`; export r; \
1629 s=`cd $(srcdir); ${PWD}`; export s; \
1630 $(SET_LIB_PATH) \
1631 echo "Building the C and C++ compiler"; \
1632 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
1633 @r=`${PWD}`; export r; \
1634 s=`cd $(srcdir); ${PWD}` ; export s; \
1635 $(SET_LIB_PATH) \
1636 echo "Building runtime libraries"; \
1637 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
1638 LANGUAGES="c c++" all
1640 .PHONY: check-gcc
1641 check-gcc:
1642 @if [ -f ./gcc/Makefile ] ; then \
1643 r=`${PWD}`; export r; \
1644 s=`cd $(srcdir); ${PWD}`; export s; \
1645 $(SET_LIB_PATH) \
1646 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1647 else \
1648 true; \
1651 .PHONY: check-c++
1652 check-c++:
1653 @if [ -f ./gcc/Makefile ] ; then \
1654 r=`${PWD}`; export r; \
1655 s=`cd $(srcdir); ${PWD}`; export s; \
1656 $(SET_LIB_PATH) \
1657 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
1658 $(MAKE) check-target-libstdc++-v3; \
1659 else \
1660 true; \
1663 .PHONY: install-gcc
1664 install-gcc:
1665 @if [ -f ./gcc/Makefile ] ; then \
1666 r=`${PWD}`; export r; \
1667 s=`cd $(srcdir); ${PWD}`; export s; \
1668 $(SET_LIB_PATH) \
1669 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1670 else \
1671 true; \
1674 .PHONY: install-gcc-cross
1675 install-gcc-cross:
1676 @if [ -f ./gcc/Makefile ] ; then \
1677 r=`${PWD}`; export r; \
1678 s=`cd $(srcdir); ${PWD}`; export s; \
1679 $(SET_LIB_PATH) \
1680 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1681 else \
1682 true; \
1684 # EXPERIMENTAL STUFF
1685 # This rule is used to install the modules which use FLAGS_TO_PASS.
1686 # To build a target install-X means to cd to X and make install.
1687 .PHONY: install-dosrel
1688 install-dosrel: installdirs info
1689 @dir=`echo $@ | sed -e 's/install-//'`; \
1690 if [ -f ./$${dir}/Makefile ] ; then \
1691 r=`${PWD}`; export r; \
1692 s=`cd $(srcdir); ${PWD}`; export s; \
1693 $(SET_LIB_PATH) \
1694 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1695 else \
1696 true; \
1699 install-dosrel-fake:
1701 ALL_GCC = all-gcc
1702 ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss
1703 ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3
1705 # This is a list of inter-dependencies among modules.
1706 all-apache:
1707 all-ash:
1708 all-autoconf: all-m4 all-texinfo
1709 all-automake: all-m4 all-texinfo
1710 all-bash:
1711 all-bfd: all-libiberty all-intl
1712 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1713 all-bison: all-texinfo
1714 configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads
1715 all-target-boehm-gc: configure-target-boehm-gc
1716 configure-target-bsp: $(ALL_GCC_C)
1717 all-target-bsp: configure-target-bsp
1718 all-byacc:
1719 all-bzip2:
1720 all-cgen: all-libiberty
1721 all-cvssrc:
1722 configure-target-cygmon: $(ALL_GCC_C)
1723 all-target-cygmon: configure-target-cygmon all-target-libiberty all-target-libstub all-target-bsp
1724 all-db:
1725 all-dejagnu: all-tcl all-expect all-tk
1726 all-diff: all-libiberty
1727 all-emacs:
1728 all-emacs19: all-bison all-byacc
1729 all-etc:
1730 configure-target-examples: $(ALL_GCC_C)
1731 all-target-examples: configure-target-examples
1732 all-expect: all-tcl all-tk
1733 all-fileutils: all-libiberty
1734 all-findutils:
1735 all-find:
1736 all-flex: all-libiberty all-bison all-byacc
1737 all-gas: all-libiberty all-opcodes all-bfd all-intl
1738 all-gawk:
1739 all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib
1740 all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
1741 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1742 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1743 all-gettext:
1744 all-gnuserv:
1745 configure-target-gperf: $(ALL_GCC_CXX)
1746 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++-v3
1747 all-gprof: all-libiberty all-bfd all-opcodes all-intl
1748 all-grep: all-libiberty
1749 all-grez: all-libiberty all-bfd all-opcodes
1750 all-gui: all-gdb all-libproc all-target-librx
1751 all-guile:
1752 all-gzip: all-libiberty
1753 all-hello: all-libiberty
1754 all-indent:
1755 all-inet: all-tcl all-send-pr all-perl
1756 all-intl:
1757 all-ispell: all-emacs19
1758 all-itcl: all-tcl all-tk
1759 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1760 configure-target-libgloss: $(ALL_GCC)
1761 all-target-libgloss: configure-target-libgloss configure-target-newlib
1762 all-libgui: all-tcl all-tk all-itcl
1763 all-libiberty:
1765 all-build-libiberty: configure-build-libiberty
1767 configure-target-libffi: $(ALL_GCC_C)
1768 all-target-libffi: configure-target-libffi
1769 configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
1770 all-target-libjava: configure-target-libjava all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
1771 configure-target-librx: $(ALL_GCC_C)
1772 all-target-librx: configure-target-librx
1773 configure-target-libstdc++-v3: $(ALL_GCC_C)
1774 all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-libiberty
1775 configure-target-libstub: $(ALL_GCC_C)
1776 all-target-libstub: configure-target-libstub
1777 all-libtool:
1778 configure-target-libf2c: $(ALL_GCC_C)
1779 all-target-libf2c: configure-target-libf2c all-target-libiberty
1780 configure-target-libobjc: $(ALL_GCC_C)
1781 all-target-libobjc: configure-target-libobjc all-target-libiberty
1782 all-m4: all-libiberty all-texinfo
1783 all-make: all-libiberty
1784 all-mmalloc:
1785 configure-target-newlib: $(ALL_GCC)
1786 all-target-newlib: configure-target-newlib
1787 configure-target-libtermcap: $(ALL_GCC_C)
1788 all-target-libtermcap: configure-target-libtermcap
1789 all-opcodes: all-bfd all-libiberty all-cgen
1790 all-patch: all-libiberty
1791 all-perl:
1792 all-prms: all-libiberty
1793 configure-target-qthreads: $(ALL_GCC_C)
1794 all-target-qthreads: configure-target-qthreads
1795 all-rcs:
1796 all-readline:
1797 all-recode: all-libiberty
1798 all-sed: all-libiberty
1799 all-send-pr: all-prms
1800 all-shellutils:
1801 all-sid: all-tcl all-tk
1802 all-sim: all-libiberty all-bfd all-opcodes all-readline all-cgen
1803 all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui
1804 all-tar: all-libiberty
1805 all-tcl:
1806 all-tclX: all-tcl all-tk
1807 all-tk: all-tcl
1808 all-texinfo: all-libiberty
1809 all-textutils:
1810 all-tgas: all-libiberty all-bfd all-opcodes
1811 all-time:
1812 all-tix: all-tcl all-tk
1813 all-wdiff:
1814 configure-target-winsup: $(ALL_GCC_C)
1815 all-target-winsup: all-target-libiberty all-target-libtermcap configure-target-winsup
1816 all-uudecode: all-libiberty
1817 all-zip:
1818 all-zlib:
1819 configure-target-zlib: $(ALL_GCC_C)
1820 all-target-zlib: configure-target-zlib
1821 all-fastjar: all-zlib all-libiberty
1822 configure-target-fastjar: configure-target-zlib
1823 all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty
1824 configure-target-libiberty: $(ALL_GCC_C)
1825 all-target-libiberty: configure-target-libiberty
1826 all-target: $(ALL_TARGET_MODULES)
1827 install-target: $(INSTALL_TARGET_MODULES)
1828 install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
1829 install-sid: install-tcl install-tk
1830 ### other supporting targets
1832 MAKEDIRS= \
1833 $(DESTDIR)$(prefix) \
1834 $(DESTDIR)$(exec_prefix)
1835 .PHONY: installdirs
1836 installdirs: mkinstalldirs
1837 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1839 dir.info: do-install-info
1840 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1841 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1842 mv -f dir.info.new dir.info ; \
1843 else true ; \
1846 dist:
1847 @echo "Building a full distribution of this tree isn't done"
1848 @echo "via 'make dist'. Check out the etc/ subdirectory"
1850 etags tags: TAGS
1852 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1853 # ability to use several tags files at once, so there is probably no need
1854 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1855 # (if we felt like it) have this Makefile write a piece of elisp which
1856 # the user could load to tell emacs19 where all the TAGS files we just
1857 # built are.
1858 TAGS: do-TAGS
1860 # with the gnu make, this is done automatically.
1862 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
1863 $(SHELL) ./config.status
1866 # Support for building net releases
1868 # Files in devo used in any net release.
1869 # ChangeLog omitted because it may refer to files which are not in this
1870 # distribution (perhaps it would be better to include it anyway).
1871 DEVO_SUPPORT= README Makefile.in configure configure.in \
1872 config.guess config.if config.sub config move-if-change \
1873 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1874 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1875 mkinstalldirs ltconfig ltmain.sh missing ylwrap \
1876 libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh
1878 # Files in devo/etc used in any net release.
1879 # ChangeLog omitted because it may refer to files which are not in this
1880 # distribution (perhaps it would be better to include it anyway).
1881 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1882 make-stds.texi standards.info* configure.texi configure.info* \
1883 configbuild.* configdev.*
1886 # When you use `make setup-dirs' or `make taz' you should always redefine
1887 # this macro.
1888 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1890 # NOTE: No double quotes in the below. It is used within shell script
1891 # as VER="$(VER)"
1892 VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \
1893 sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
1894 elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1895 sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
1896 elif test -f $(TOOL)/version.in; then \
1897 head -1 $(TOOL)/version.in; \
1898 elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
1899 sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
1900 else \
1901 echo VERSION; \
1903 PACKAGE = $(TOOL)
1905 .PHONY: taz
1906 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1907 $(MAKE) -f Makefile.in do-proto-toplev \
1908 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1909 MD5PROG="$(MD5PROG)" \
1910 SUPPORT_FILES="$(SUPPORT_FILES)"
1911 $(MAKE) -f Makefile.in do-md5sum \
1912 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1913 MD5PROG="$(MD5PROG)" \
1914 SUPPORT_FILES="$(SUPPORT_FILES)"
1915 $(MAKE) -f Makefile.in do-tar \
1916 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1917 MD5PROG="$(MD5PROG)" \
1918 SUPPORT_FILES="$(SUPPORT_FILES)"
1919 $(MAKE) -f Makefile.in do-bz2 \
1920 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1921 MD5PROG="$(MD5PROG)" \
1922 SUPPORT_FILES="$(SUPPORT_FILES)"
1924 .PHONY: gdb-tar
1925 gdb-tar: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1926 $(MAKE) -f Makefile.in do-proto-toplev \
1927 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1928 MD5PROG="$(MD5PROG)" \
1929 SUPPORT_FILES="$(SUPPORT_FILES)"
1930 $(MAKE) -f Makefile.in do-md5sum \
1931 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1932 MD5PROG="$(MD5PROG)" \
1933 SUPPORT_FILES="$(SUPPORT_FILES)"
1934 $(MAKE) -f Makefile.in do-djunpack \
1935 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1936 MD5PROG="$(MD5PROG)" \
1937 SUPPORT_FILES="$(SUPPORT_FILES)"
1938 $(MAKE) -f Makefile.in do-tar \
1939 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1940 MD5PROG="$(MD5PROG)" \
1941 SUPPORT_FILES="$(SUPPORT_FILES)"
1943 .PHONY: gdb-taz
1944 gdb-taz: gdb-tar $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1945 $(MAKE) -f Makefile.in gdb-tar \
1946 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1947 MD5PROG="$(MD5PROG)" \
1948 SUPPORT_FILES="$(SUPPORT_FILES)"
1949 $(MAKE) -f Makefile.in do-bz2 \
1950 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
1951 MD5PROG="$(MD5PROG)" \
1952 SUPPORT_FILES="$(SUPPORT_FILES)"
1954 .PHONY: do-proto-toplev
1955 do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1956 echo "==> Making $(PACKAGE)-$(VER)/"
1957 # Take out texinfo from a few places.
1958 sed -e '/^all\.normal: /s/\all-texinfo //' \
1959 -e '/^ install-texinfo /d' \
1960 <Makefile.in >tmp
1961 mv -f tmp Makefile.in
1963 ./configure sun4
1964 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1965 || $(MAKE) $(CONFIGURE_TARGET_MODULES) \
1966 ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \
1967 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1968 # Make links, and run "make diststuff" or "make info" when needed.
1969 rm -rf proto-toplev ; mkdir proto-toplev
1970 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1971 for d in $$dirs ; do \
1972 if [ -d $$d ]; then \
1973 if [ ! -f $$d/Makefile ] ; then true ; \
1974 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1975 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1976 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1977 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1978 fi ; \
1979 if [ -d $$d/proto-$$d.dir ]; then \
1980 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1981 else \
1982 ln -s ../$$d proto-toplev/$$d ; \
1983 fi ; \
1984 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1985 done
1986 cd etc && $(MAKE) info
1987 $(MAKE) distclean
1989 mkdir proto-toplev/etc
1990 (cd proto-toplev/etc; \
1991 for i in $(ETC_SUPPORT); do \
1992 ln -s ../../etc/$$i . ; \
1993 done)
1995 # Take out texinfo from configurable dirs
1996 rm proto-toplev/configure.in
1997 sed -e '/^host_tools=/s/texinfo //' \
1998 <configure.in >proto-toplev/configure.in
2000 mkdir proto-toplev/texinfo
2001 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
2002 if test -r texinfo/util/tex3patch ; then \
2003 mkdir proto-toplev/texinfo/util && \
2004 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
2005 else true; fi
2006 chmod -R og=u . || chmod og=u `find . -print`
2008 # Create .gmo files from .po files.
2009 for f in `find . -name '*.po' -type f -print`; do \
2010 msgfmt -o `echo $$f | sed -e 's/\.po$$/.gmo/'` $$f ; \
2011 done
2013 -rm -f $(PACKAGE)-$(VER)
2014 ln -s proto-toplev $(PACKAGE)-$(VER)
2016 .PHONY: do-tar
2017 do-tar:
2018 echo "==> Making $(PACKAGE)-$(VER).tar"
2019 -rm -f $(PACKAGE)-$(VER).tar
2020 find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \
2021 | tar cTfh - $(PACKAGE)-$(VER).tar
2023 .PHONY: do-bz2
2024 do-bz2:
2025 echo "==> Bzipping $(PACKAGE)-$(VER).tar.bz2"
2026 -rm -f $(PACKAGE)-$(VER).tar.bz2
2027 $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar
2029 .PHONY: do-md5sum
2030 do-md5sum:
2031 echo "==> Adding md5 checksum to top-level directory"
2032 cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \
2033 | xargs $(MD5PROG) > ../md5.sum
2034 mv md5.sum proto-toplev
2036 .PHONY: do-djunpack
2037 do-djunpack:
2038 echo "==> Adding updated djunpack.bat to top-level directory"
2039 echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/'
2040 sed < djunpack.bat > djunpack.new \
2041 -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/'
2042 mv djunpack.new djunpack.bat
2043 -rm -f proto-toplev/djunpack.bat
2044 ln -s ../djunpack.bat proto-toplev/djunpack.bat
2046 TEXINFO_SUPPORT= texinfo/texinfo.tex
2047 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
2049 .PHONY: gas.tar.bz2
2050 GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep
2051 gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
2052 $(MAKE) -f Makefile.in taz TOOL=gas \
2053 MD5PROG="$(MD5PROG)" \
2054 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
2056 # The FSF "binutils" release includes gprof and ld.
2057 .PHONY: binutils.tar.bz2
2058 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep
2059 binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
2060 $(MAKE) -f Makefile.in taz TOOL=binutils \
2061 MD5PROG="$(MD5PROG)" \
2062 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)"
2064 .PHONY: gas+binutils.tar.bz2
2065 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
2066 gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
2067 $(MAKE) -f Makefile.in taz TOOL=gas \
2068 MD5PROG="$(MD5PROG)" \
2069 SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
2071 GNATS_SUPPORT_DIRS=include libiberty send-pr
2072 gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
2073 $(MAKE) -f Makefile.in taz TOOL=gnats \
2074 MD5PROG="$(MD5PROG)" \
2075 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
2077 .PHONY: gdb.tar.bz2
2078 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
2079 gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
2080 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \
2081 MD5PROG="$(MD5PROG)" \
2082 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
2083 .PHONY: gdb.tar
2084 gdb.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
2085 $(MAKE) -f Makefile.in gdb-tar TOOL=gdb \
2086 MD5PROG="$(MD5PROG)" \
2087 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
2089 DEJAGNU_SUPPORT_DIRS= tcl expect libiberty
2090 .PHONY: dejagnu.tar.bz2
2091 dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu
2092 $(MAKE) -f Makefile.in taz TOOL=dejagnu \
2093 MD5PROG="$(MD5PROG)" \
2094 SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)"
2096 .PHONY: gdb+dejagnu.tar.bz2
2097 GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu
2098 gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
2099 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \
2100 MD5PROG="$(MD5PROG)" \
2101 SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
2102 .PHONY: gdb+dejagnu.tar
2103 gdb+dejagnu.tar: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
2104 $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE=gdb+dejagnu \
2105 MD5PROG="$(MD5PROG)" \
2106 SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
2108 .PHONY: insight.tar.bz2
2109 INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui
2110 insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
2111 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \
2112 MD5PROG="$(MD5PROG)" \
2113 SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
2114 .PHONY: insight.tar
2115 insight.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
2116 $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE=insight \
2117 MD5PROG="$(MD5PROG)" \
2118 SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
2120 .PHONY: insight+dejagnu.tar.bz2
2121 INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu
2122 insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb
2123 $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \
2124 MD5PROG="$(MD5PROG)" \
2125 SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
2126 .PHONY: insight+dejagnu.tar
2127 insight+dejagnu.tar: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb
2128 $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE="insight+dejagnu" \
2129 MD5PROG="$(MD5PROG)" \
2130 SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
2132 .PHONY: newlib.tar.bz2
2133 NEWLIB_SUPPORT_DIRS=libgloss
2134 # taz configures for the sun4 target which won't configure newlib.
2135 # We need newlib configured so that the .info files are made.
2136 # Unfortunately, it is not enough to just configure newlib separately:
2137 # taz will build the .info files but since SUBDIRS won't contain newlib,
2138 # distclean won't be run (leaving Makefile, config.status, and the tmp files
2139 # used in building the .info files, eg: *.def, *.ref).
2140 # The problem isn't solvable however without a lot of extra work because
2141 # target libraries are built in subdir $(target_alias) which gets nuked during
2142 # the make distclean. For now punt on the issue of shipping newlib info files
2143 # with newlib net releases and wait for a day when some native target (sun4?)
2144 # supports newlib (if only minimally).
2145 newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
2146 $(MAKE) -f Makefile.in taz TOOL=newlib \
2147 MD5PROG="$(MD5PROG)" \
2148 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
2149 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
2151 .NOEXPORT:
2152 MAKEOVERRIDES=
2154 # end of Makefile.in