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