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