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