* read.c (read_a_source_file): Conditionally allow matched "
[binutils.git] / Makefile.in
blob7f1bb8c2b298b6346d525ef81072c7db0b907cb1
2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
4 # 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)
42 program_transform_name =
44 man1dir = $(mandir)/man1
45 man2dir = $(mandir)/man2
46 man3dir = $(mandir)/man3
47 man4dir = $(mandir)/man4
48 man5dir = $(mandir)/man5
49 man6dir = $(mandir)/man6
50 man7dir = $(mandir)/man7
51 man8dir = $(mandir)/man8
52 man9dir = $(mandir)/man9
53 infodir = $(prefix)/info
54 includedir = $(prefix)/include
55 # Directory in which the compiler finds executables, libraries, etc.
56 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
57 GDB_NLM_DEPS =
59 SHELL = /bin/sh
61 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
62 # cygwin host.
63 INSTALL_PROGRAM_ARGS =
65 INSTALL = $(SHELL) $$s/install-sh -c
66 INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
67 INSTALL_SCRIPT = $(INSTALL)
68 INSTALL_DATA = $(INSTALL) -m 644
70 INSTALL_DOSREL = install-dosrel-fake
72 AS = as
73 AR = ar
74 AR_FLAGS = rc
75 CC = cc
77 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
78 # here so that they can be overridden by Makefile fragments.
79 HOST_CC = $(CC_FOR_BUILD)
80 HOST_PREFIX =
81 HOST_PREFIX_1 = loser-
83 # These flag values are normally overridden by the configure script.
84 CFLAGS = -g
85 CXXFLAGS = -g -O2
87 LIBCFLAGS = $(CFLAGS)
88 CFLAGS_FOR_TARGET = $(CFLAGS)
89 LDFLAGS_FOR_TARGET =
90 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
91 PICFLAG =
92 PICFLAG_FOR_TARGET =
94 CHILLFLAGS = $(CFLAGS)
95 CHILL_LIB = -lchill
96 CXX = c++
98 # Use -O2 to stress test the compiler.
99 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions
100 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
101 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions
103 RANLIB = ranlib
105 DLLTOOL = dlltool
106 WINDRES = windres
108 NM = nm
110 LD = ld
112 # Not plain GZIP, since gzip looks there for extra command-line options.
113 GZIPPROG = gzip
115 # These values are substituted by configure.
116 DEFAULT_YACC = yacc
117 DEFAULT_LEX = lex
118 DEFAULT_M4 = m4
120 BISON = `if [ -f $$r/bison/bison ] ; then \
121 echo $$r/bison/bison -L $$s/bison/ ; \
122 else \
123 echo bison ; \
126 YACC = `if [ -f $$r/bison/bison ] ; then \
127 echo $$r/bison/bison -y -L $$s/bison/ ; \
128 elif [ -f $$r/byacc/byacc ] ; then \
129 echo $$r/byacc/byacc ; \
130 else \
131 echo ${DEFAULT_YACC} ; \
134 LEX = `if [ -f $$r/flex/flex ] ; \
135 then echo $$r/flex/flex ; \
136 else echo ${DEFAULT_LEX} ; fi`
138 M4 = `if [ -f $$r/m4/m4 ] ; \
139 then echo $$r/m4/m4 ; \
140 else echo ${DEFAULT_M4} ; fi`
142 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
143 then echo $$r/texinfo/makeinfo/makeinfo ; \
144 else echo makeinfo ; fi`
146 # This just becomes part of the MAKEINFO definition passed down to
147 # sub-makes. It lets flags be given on the command line while still
148 # using the makeinfo from the object tree.
149 MAKEINFOFLAGS =
151 EXPECT = `if [ -f $$r/expect/expect ] ; \
152 then echo $$r/expect/expect ; \
153 else echo expect ; fi`
155 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
156 then echo $$s/dejagnu/runtest ; \
157 else echo runtest ; fi`
160 # compilers to use to create programs which must be run in the build
161 # environment.
162 CC_FOR_BUILD = $(CC)
163 CXX_FOR_BUILD = $(CXX)
165 SUBDIRS = "this is set via configure, don't edit this"
166 OTHERS =
168 # This is set by the configure script to the list of directories which
169 # should be built using the target tools.
172 TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon
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 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
190 REALLY_SET_LIB_PATH = \
191 if [ x"$$$(RPATH_ENVVAR)" != x ]; then \
192 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
193 else \
194 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \
195 fi; \
196 export $(RPATH_ENVVAR);
198 ALL = all.normal
199 INSTALL_TARGET = installdirs \
200 install-gcc \
201 $(INSTALL_MODULES) \
202 $(INSTALL_TARGET_MODULES) \
203 $(INSTALL_X11_MODULES) \
204 $(INSTALL_DOSREL)
206 INSTALL_TARGET_CROSS = installdirs \
207 install-gcc-cross \
208 $(INSTALL_MODULES) \
209 $(INSTALL_TARGET_MODULES) \
210 $(INSTALL_X11_MODULES) \
211 $(INSTALL_DOSREL)
213 CC_FOR_TARGET = ` \
214 if [ -f $$r/gcc/xgcc ] ; then \
215 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
216 case "$(target_canonical)" in \
217 i[3456]86-*-cygwin*) \
218 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
219 ;; \
220 *) \
221 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
222 ;; \
223 esac \
224 else \
225 echo $$r/gcc/xgcc -B$$r/gcc/; \
226 fi; \
227 else \
228 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
229 echo $(CC); \
230 else \
231 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
232 fi; \
235 # If CC_FOR_TARGET is not overriden on the command line, then this
236 # variable is passed down to the gcc Makefile, where it is used to
237 # build libgcc2.a. We define it here so that it can itself be
238 # overridden on the command line.
239 GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
241 CHILL_FOR_TARGET = ` \
242 if [ -f $$r/gcc/xgcc ] ; then \
243 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
244 else \
245 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
246 echo $(CC); \
247 else \
248 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
249 fi; \
252 CXX_FOR_TARGET = ` \
253 if [ -f $$r/gcc/xgcc ] ; then \
254 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
255 case "$(target_canonical)" in \
256 i[3456]86-*-cygwin*) \
257 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
258 ;; \
259 *) \
260 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
261 ;; \
262 esac \
263 else \
264 echo $$r/gcc/xgcc -B$$r/gcc/; \
265 fi; \
266 else \
267 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
268 echo $(CXX); \
269 else \
270 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
271 fi; \
274 AS_FOR_TARGET = ` \
275 if [ -f $$r/gas/as-new ] ; then \
276 echo $$r/gas/as-new ; \
277 else \
278 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
279 echo $(AS); \
280 else \
281 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
282 fi; \
285 LD_FOR_TARGET = ` \
286 if [ -f $$r/ld/ld-new ] ; then \
287 echo $$r/ld/ld-new ; \
288 else \
289 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
290 echo $(LD); \
291 else \
292 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
293 fi; \
296 DLLTOOL_FOR_TARGET = ` \
297 if [ -f $$r/binutils/dlltool ] ; then \
298 echo $$r/binutils/dlltool ; \
299 else \
300 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
301 echo $(DLLTOOL); \
302 else \
303 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
304 fi; \
307 WINDRES_FOR_TARGET = ` \
308 if [ -f $$r/binutils/windres ] ; then \
309 echo $$r/binutils/windres ; \
310 else \
311 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
312 echo $(WINDRES); \
313 else \
314 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
315 fi; \
318 AR_FOR_TARGET = ` \
319 if [ -f $$r/binutils/ar ] ; then \
320 echo $$r/binutils/ar ; \
321 else \
322 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
323 echo $(AR); \
324 else \
325 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
326 fi; \
329 RANLIB_FOR_TARGET = ` \
330 if [ -f $$r/binutils/ranlib ] ; then \
331 echo $$r/binutils/ranlib ; \
332 else \
333 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
334 echo $(RANLIB); \
335 else \
336 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
337 fi; \
340 NM_FOR_TARGET = ` \
341 if [ -f $$r/binutils/nm-new ] ; then \
342 echo $$r/binutils/nm-new ; \
343 else \
344 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
345 echo $(NM); \
346 else \
347 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
348 fi; \
351 # The first rule in the file had better be this one. Don't put any above it.
352 # This lives here to allow makefile fragments to contain dependencies.
353 all: all.normal
354 .PHONY: all
356 # These can be overridden by config/mt-*.
357 # The _TARGET_ is because they're specified in mt-foo.
358 # The _HOST_ is because they're programs that run on the host.
359 EXTRA_TARGET_HOST_ALL_MODULES =
360 EXTRA_TARGET_HOST_INSTALL_MODULES =
361 EXTRA_TARGET_HOST_CHECK_MODULES =
363 #### host and target specific makefile fragments come in here.
366 # Flags to pass down to all sub-makes.
367 # Please keep these in alphabetical order.
368 BASE_FLAGS_TO_PASS = \
369 "AR_FLAGS=$(AR_FLAGS)" \
370 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
371 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
372 "BISON=$(BISON)" \
373 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
374 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
375 "CFLAGS=$(CFLAGS)" \
376 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
377 "CHILLFLAGS=$(CHILLFLAGS)" \
378 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
379 "CHILL_LIB=$(CHILL_LIB)" \
380 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
381 "CXXFLAGS=$(CXXFLAGS)" \
382 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
383 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
384 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
385 "INSTALL=$(INSTALL)" \
386 "INSTALL_DATA=$(INSTALL_DATA)" \
387 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
388 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
389 "LDFLAGS=$(LDFLAGS)" \
390 "LEX=$(LEX)" \
391 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
392 "LIBCFLAGS=$(LIBCFLAGS)" \
393 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
394 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
395 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
396 "M4=$(M4)" \
397 "MAKE=$(MAKE)" \
398 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
399 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
400 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
401 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
402 "SHELL=$(SHELL)" \
403 "EXPECT=$(EXPECT)" \
404 "RUNTEST=$(RUNTEST)" \
405 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
406 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
407 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
408 "YACC=$(YACC)" \
409 "bindir=$(bindir)" \
410 "datadir=$(datadir)" \
411 "exec_prefix=$(exec_prefix)" \
412 "includedir=$(includedir)" \
413 "infodir=$(infodir)" \
414 "libdir=$(libdir)" \
415 "libexecdir=$(libexecdir)" \
416 "lispdir=$(lispdir)" \
417 "localstatedir=$(localstatedir)" \
418 "mandir=$(mandir)" \
419 "oldincludedir=$(oldincludedir)" \
420 "prefix=$(prefix)" \
421 "sbindir=$(sbindir)" \
422 "sharedstatedir=$(sharedstatedir)" \
423 "sysconfdir=$(sysconfdir)" \
424 "tooldir=$(tooldir)" \
425 "gxx_include_dir=$(gxx_include_dir)" \
426 "gcc_version=$(gcc_version)" \
427 "gcc_version_trigger=$(gcc_version_trigger)" \
428 "target_alias=$(target_alias)" \
429 "libsubdir=$(libsubdir)"
431 # Flags to pass down to most sub-makes, in which we're building with
432 # the host environment.
433 # If any variables are added here, they must be added to do-*, below.
434 EXTRA_HOST_FLAGS = \
435 'AR=$(AR)' \
436 'AS=$(AS)' \
437 'CC=$(CC)' \
438 'CXX=$(CXX)' \
439 'DLLTOOL=$(DLLTOOL)' \
440 'LD=$(LD)' \
441 'NM=$(NM)' \
442 'RANLIB=$(RANLIB)' \
443 'WINDRES=$(WINDRES)'
445 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
447 # Flags that are concerned with the location of the X11 include files
448 # and library files
450 # NOTE: until the top-level is getting the values via autoconf, it only
451 # causes problems to have this top-level Makefile overriding the autoconf-set
452 # values in child directories. Only variables that don't conflict with
453 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
455 X11_FLAGS_TO_PASS = \
456 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
457 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
459 # Flags to pass down to makes which are built with the target environment.
460 # The double $ decreases the length of the command line; the variables
461 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
462 # If any variables are added here, they must be added to do-*, below.
463 EXTRA_TARGET_FLAGS = \
464 'AR=$$(AR_FOR_TARGET)' \
465 'AS=$$(AS_FOR_TARGET)' \
466 'CC=$$(CC_FOR_TARGET)' \
467 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
468 'CXX=$$(CXX_FOR_TARGET)' \
469 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
470 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
471 'LD=$$(LD_FOR_TARGET)' \
472 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
473 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
474 'NM=$$(NM_FOR_TARGET)' \
475 'RANLIB=$$(RANLIB_FOR_TARGET)' \
476 'WINDRES=$$(WINDRES_FOR_TARGET)'
478 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
480 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
481 # unfortunately needs the native compiler and the target ar and
482 # ranlib.
483 # If any variables are added here, they must be added to do-*, below.
484 # The HOST_* variables are a special case, which are used for the gcc
485 # cross-building scheme.
486 EXTRA_GCC_FLAGS = \
487 'AR=$(AR)' \
488 'AS=$(AS)' \
489 'CC=$(CC)' \
490 'CXX=$(CXX)' \
491 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
492 'HOST_CC=$(CC_FOR_BUILD)' \
493 'HOST_PREFIX=$(HOST_PREFIX)' \
494 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
495 'NM=$(NM)' \
496 'RANLIB=$(RANLIB)' \
497 'WINDRES=$$(WINDRES_FOR_TARGET)' \
498 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
499 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
500 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
501 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
502 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
503 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
504 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
505 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
506 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
507 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
509 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
511 # This is a list of the targets for all of the modules which are compiled
512 # using $(FLAGS_TO_PASS).
513 ALL_MODULES = \
514 all-apache \
515 all-ash \
516 all-autoconf \
517 all-automake \
518 all-bash \
519 all-bfd \
520 all-binutils \
521 all-bison \
522 all-byacc \
523 all-bzip2 \
524 all-cvssrc \
525 all-db \
526 all-dejagnu \
527 all-diff \
528 all-dosutils \
529 all-etc \
530 all-fileutils \
531 all-findutils \
532 all-find \
533 all-flex \
534 all-gas \
535 all-gawk \
536 all-gettext \
537 all-gnuserv \
538 all-gprof \
539 all-grep \
540 all-grez \
541 all-gzip \
542 all-hello \
543 all-indent \
544 all-inet \
545 all-intl \
546 all-ispell \
547 all-itcl \
548 all-ld \
549 all-libgui \
550 all-libiberty \
551 all-libtool \
552 all-m4 \
553 all-make \
554 all-mmalloc \
555 all-opcodes \
556 all-patch \
557 all-perl \
558 all-prms \
559 all-rcs \
560 all-readline \
561 all-release \
562 all-recode \
563 all-sed \
564 all-send-pr \
565 all-shellutils \
566 all-sim \
567 all-tar \
568 all-tcl \
569 all-tcl8.1 \
570 all-texinfo \
571 all-textutils \
572 all-tgas \
573 all-time \
574 all-uudecode \
575 all-wdiff \
576 all-zip \
577 $(EXTRA_TARGET_HOST_ALL_MODULES)
579 # This is a list of the check targets for all of the modules which are
580 # compiled using $(FLAGS_TO_PASS).
582 # The list is in two parts. The first lists those tools which
583 # are tested as part of the host's native tool-chain, and not
584 # tested in a cross configuration.
585 NATIVE_CHECK_MODULES = \
586 check-bison \
587 check-byacc \
588 check-flex \
589 check-zip
591 CROSS_CHECK_MODULES = \
592 check-apache \
593 check-ash \
594 check-autoconf \
595 check-automake \
596 check-bash \
597 check-bfd \
598 check-binutils \
599 check-bzip2 \
600 check-cvssrc \
601 check-db \
602 check-dejagnu \
603 check-diff \
604 check-etc \
605 check-fileutils \
606 check-findutils \
607 check-find \
608 check-gas \
609 check-gawk \
610 check-gettext \
611 check-gnuserv \
612 check-gprof \
613 check-grep \
614 check-gzip \
615 check-hello \
616 check-indent \
617 check-inet \
618 check-intl \
619 check-ispell \
620 check-itcl \
621 check-ld \
622 check-libgui \
623 check-libiberty \
624 check-libtool \
625 check-m4 \
626 check-make \
627 check-mmcheckoc \
628 check-opcodes \
629 check-patch \
630 check-perl \
631 check-prms \
632 check-rcs \
633 check-readline \
634 check-recode \
635 check-sed \
636 check-send-pr \
637 check-shellutils \
638 check-sim \
639 check-tar \
640 check-tcl \
641 check-texinfo \
642 check-textutils \
643 check-tgas \
644 check-time \
645 check-uudecode \
646 check-wdiff \
647 $(EXTRA_TARGET_HOST_CHECK_MODULES)
649 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
651 # This is a list of the install targets for all of the modules which are
652 # compiled using $(FLAGS_TO_PASS).
653 # We put install-opcodes before install-binutils because the installed
654 # binutils might be on PATH, and they might need the shared opcodes
655 # library.
656 # We put install-tcl before install-itcl because itcl wants to run a
657 # program on installation which uses the Tcl libraries.
658 INSTALL_MODULES = \
659 install-apache \
660 install-ash \
661 install-autoconf \
662 install-automake \
663 install-bash \
664 install-bfd \
665 install-bzip2 \
666 install-opcodes \
667 install-binutils \
668 install-bison \
669 install-byacc \
670 install-cvssrc \
671 install-db \
672 install-dejagnu \
673 install-diff \
674 install-dosutils \
675 install-etc \
676 install-fileutils \
677 install-findutils \
678 install-find \
679 install-flex \
680 install-gas \
681 install-gawk \
682 install-gettext \
683 install-gnuserv \
684 install-gprof \
685 install-grep \
686 install-grez \
687 install-gzip \
688 install-hello \
689 install-indent \
690 install-inet \
691 install-intl \
692 install-ispell \
693 install-tcl \
694 install-tcl8.1 \
695 install-itcl \
696 install-ld \
697 install-libgui \
698 install-libiberty \
699 install-libtool \
700 install-m4 \
701 install-make \
702 install-mmalloc \
703 install-patch \
704 install-perl \
705 install-prms \
706 install-rcs \
707 install-readline \
708 install-recode \
709 install-sed \
710 install-send-pr \
711 install-shellutils \
712 install-sim \
713 install-tar \
714 install-texinfo \
715 install-textutils \
716 install-tgas \
717 install-time \
718 install-uudecode \
719 install-wdiff \
720 install-zip \
721 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
723 # This is a list of the targets for all of the modules which are compiled
724 # using $(X11_FLAGS_TO_PASS).
725 ALL_X11_MODULES = \
726 all-emacs \
727 all-emacs19 \
728 all-gdb \
729 all-expect \
730 all-gash \
731 all-guile \
732 all-tclX \
733 all-tk \
734 all-tk8.1 \
735 all-tix
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-emacs \
741 check-gdb \
742 check-guile \
743 check-expect \
744 check-gash \
745 check-tclX \
746 check-tk \
747 check-tix
749 # This is a list of the install targets for all the modules which are
750 # compiled using $(X11_FLAGS_TO_PASS).
751 INSTALL_X11_MODULES = \
752 install-emacs \
753 install-emacs19 \
754 install-gdb \
755 install-guile \
756 install-expect \
757 install-gash \
758 install-tclX \
759 install-tk \
760 install-tk8.1 \
761 install-tix
763 # This is a list of the targets for all of the modules which are compiled
764 # using $(TARGET_FLAGS_TO_PASS).
765 ALL_TARGET_MODULES = \
766 all-target-libio \
767 all-target-libstdc++ \
768 all-target-librx \
769 all-target-libg++ \
770 all-target-newlib \
771 all-target-libtermcap \
772 all-target-winsup \
773 all-target-libgloss \
774 all-target-libiberty \
775 all-target-gperf \
776 all-target-examples \
777 all-target-libstub \
778 all-target-bsp \
779 all-target-cygmon
781 # This is a list of the configure targets for all of the modules which
782 # are compiled using the target tools.
783 CONFIGURE_TARGET_MODULES = \
784 configure-target-libio \
785 configure-target-libstdc++ \
786 configure-target-librx \
787 configure-target-libg++ \
788 configure-target-newlib \
789 configure-target-libtermcap \
790 configure-target-winsup \
791 configure-target-libgloss \
792 configure-target-libiberty \
793 configure-target-gperf \
794 configure-target-examples \
795 configure-target-libstub \
796 configure-target-bsp \
797 configure-target-cygmon
799 # This is a list of the check targets for all of the modules which are
800 # compiled using $(TARGET_FLAGS_TO_PASS).
801 CHECK_TARGET_MODULES = \
802 check-target-libio \
803 check-target-libstdc++ \
804 check-target-libg++ \
805 check-target-newlib \
806 check-target-winsup \
807 check-target-libiberty \
808 check-target-gperf
810 # This is a list of the install targets for all of the modules which are
811 # compiled using $(TARGET_FLAGS_TO_PASS).
812 INSTALL_TARGET_MODULES = \
813 install-target-libio \
814 install-target-libstdc++ \
815 install-target-libg++ \
816 install-target-newlib \
817 install-target-libtermcap \
818 install-target-winsup \
819 install-target-libgloss \
820 install-target-libiberty \
821 install-target-bsp \
822 install-target-gperf
824 # This is a list of the targets for which we can do a clean-{target}.
825 CLEAN_MODULES = \
826 clean-apache \
827 clean-ash \
828 clean-autoconf \
829 clean-automake \
830 clean-bash \
831 clean-bfd \
832 clean-binutils \
833 clean-bison \
834 clean-byacc \
835 clean-bzip2 \
836 clean-cvssrc \
837 clean-db \
838 clean-dejagnu \
839 clean-diff \
840 clean-dosutils \
841 clean-etc \
842 clean-fileutils \
843 clean-findutils \
844 clean-find \
845 clean-flex \
846 clean-gas \
847 clean-gawk \
848 clean-gettext \
849 clean-gnuserv \
850 clean-gprof \
851 clean-grep \
852 clean-grez \
853 clean-gzip \
854 clean-hello \
855 clean-indent \
856 clean-inet \
857 clean-intl \
858 clean-ispell \
859 clean-itcl \
860 clean-ld \
861 clean-libgui \
862 clean-libiberty \
863 clean-libtool \
864 clean-m4 \
865 clean-make \
866 clean-mmalloc \
867 clean-opcodes \
868 clean-patch \
869 clean-perl \
870 clean-prms \
871 clean-rcs \
872 clean-readline \
873 clean-release \
874 clean-recode \
875 clean-sed \
876 clean-send-pr \
877 clean-shellutils \
878 clean-sim \
879 clean-tar \
880 clean-tcl \
881 clean-texinfo \
882 clean-textutils \
883 clean-tgas \
884 clean-time \
885 clean-uudecode \
886 clean-wdiff \
887 clean-zip
889 # All of the target modules that can be cleaned
890 CLEAN_TARGET_MODULES = \
891 clean-target-libio \
892 clean-target-libstdc++ \
893 clean-target-librx \
894 clean-target-libg++ \
895 clean-target-newlib \
896 clean-target-winsup \
897 clean-target-libgloss \
898 clean-target-libiberty \
899 clean-target-gperf \
900 clean-target-examples \
901 clean-target-libstub \
902 clean-target-bsp \
903 clean-target-cygmon
905 # All of the x11 modules that can be cleaned
906 CLEAN_X11_MODULES = \
907 clean-emacs \
908 clean-emacs19 \
909 clean-gdb \
910 clean-expect \
911 clean-gash \
912 clean-guile \
913 clean-tclX \
914 clean-tk \
915 clean-tix
917 # The target built for a native build.
918 .PHONY: all.normal
919 all.normal: \
920 $(ALL_MODULES) \
921 $(ALL_X11_MODULES) \
922 $(ALL_TARGET_MODULES) \
923 all-gcc
925 # Do a target for all the subdirectories. A ``make do-X'' will do a
926 # ``make X'' in all subdirectories (because, in general, there is a
927 # dependency (below) of X upon do-X, a ``make X'' will also do this,
928 # but it may do additional work as well).
929 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
930 # because it is so large that it can easily overflow the command line
931 # length limit on some systems.
932 DO_X = \
933 do-clean \
934 do-distclean \
935 do-dvi \
936 do-info \
937 do-install-info \
938 do-installcheck \
939 do-mostlyclean \
940 do-maintainer-clean \
941 do-TAGS
942 .PHONY: $(DO_X)
943 $(DO_X):
944 @target=`echo $@ | sed -e 's/^do-//'`; \
945 r=`pwd`; export r; \
946 s=`cd $(srcdir); pwd`; export s; \
947 $(SET_LIB_PATH) \
948 for i in $(SUBDIRS) -dummy-; do \
949 if [ -f ./$$i/Makefile ]; then \
950 case $$i in \
951 gcc) \
952 for flag in $(EXTRA_GCC_FLAGS); do \
953 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
954 done; \
955 ;; \
956 *) \
957 for flag in $(EXTRA_HOST_FLAGS); do \
958 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
959 done; \
960 ;; \
961 esac ; \
962 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
963 if (cd ./$$i; \
964 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
965 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
966 "RANLIB=$${RANLIB}" \
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'|"`; \
980 done; \
981 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
982 if (cd $(TARGET_SUBDIR)/$$i; \
983 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
984 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
985 "RANLIB=$${RANLIB}" \
986 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
987 $${target}); \
988 then true; else exit 1; fi; \
989 else true; fi; \
990 done
992 # Here are the targets which correspond to the do-X targets.
994 .PHONY: info installcheck dvi install-info
995 .PHONY: clean distclean mostlyclean maintainer-clean realclean
996 .PHONY: local-clean local-distclean local-maintainer-clean
997 info: do-info
998 installcheck: do-installcheck
999 dvi: do-dvi
1001 # Make sure makeinfo is built before we do a `make info'.
1002 do-info: all-texinfo
1004 install-info: do-install-info dir.info
1005 s=`cd $(srcdir); pwd`; export s; \
1006 if [ -f dir.info ] ; then \
1007 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1008 else true ; fi
1010 local-clean:
1011 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
1013 local-distclean:
1014 -rm -f Makefile config.status config.cache mh-frag mt-frag
1015 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1016 rm -rf $(TARGET_SUBDIR); \
1017 else true; fi
1019 local-maintainer-clean:
1020 @echo "This command is intended for maintainers to use;"
1021 @echo "it deletes files that may require special tools to rebuild."
1023 clean: do-clean local-clean
1024 mostlyclean: do-mostlyclean local-clean
1025 distclean: do-distclean local-clean local-distclean
1026 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1027 maintainer-clean: local-distclean
1028 realclean: maintainer-clean
1030 # This rule is used to clean specific modules.
1031 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1032 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1033 @dir=`echo $@ | sed -e 's/clean-//'`; \
1034 if [ -f ./$${dir}/Makefile ] ; then \
1035 r=`pwd`; export r; \
1036 s=`cd $(srcdir); pwd`; export s; \
1037 $(SET_LIB_PATH) \
1038 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1039 else \
1040 true; \
1043 .PHONY: $(CLEAN_TARGET_MODULES)
1044 $(CLEAN_TARGET_MODULES):
1045 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1046 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1047 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1048 r=`pwd`; export r; \
1049 s=`cd $(srcdir); pwd`; export s; \
1050 $(SET_LIB_PATH) \
1051 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1052 else \
1053 true; \
1056 clean-target: $(CLEAN_TARGET_MODULES)
1058 # Check target.
1060 .PHONY: check
1061 check: $(CHECK_MODULES) \
1062 $(CHECK_TARGET_MODULES) \
1063 $(CHECK_X11_MODULES) \
1064 check-gcc
1066 # Automated reporting of test results.
1068 warning.log: build.log
1069 $(srcdir)/contrib/warn_summary build.log > $@
1071 mail-report.log:
1072 if test x'$(BOOT_CFLAGS)' != x''; then \
1073 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1074 fi; \
1075 $(srcdir)/contrib/test_summary -t >$@
1076 chmod +x $@
1077 echo If you really want to send e-mail, run ./$@ now
1079 mail-report-with-warnings.log: warning.log
1080 if test x'$(BOOT_CFLAGS)' != x''; then \
1081 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1082 fi; \
1083 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1084 chmod +x $@
1085 echo If you really want to send e-mail, run ./$@ now
1087 # Installation targets.
1089 .PHONY: install install-cross uninstall source-vault binary-vault vault-install
1090 install: $(INSTALL_TARGET)
1091 install-cross: $(INSTALL_TARGET_CROSS)
1093 uninstall:
1094 @echo "the uninstall target is not supported in this tree"
1096 source-vault:
1097 $(MAKE) -f ./release/Build-A-Release \
1098 host=$(host_alias) source-vault
1100 binary-vault:
1101 $(MAKE) -f ./release/Build-A-Release \
1102 host=$(host_alias) target=$(target_alias)
1104 vault-install:
1105 @if [ -f ./release/vault-install ] ; then \
1106 ./release/vault-install $(host_alias) $(target_alias) ; \
1107 else \
1108 true ; \
1111 .PHONY: install.all
1112 install.all: install-no-fixedincludes
1113 @if [ -f ./gcc/Makefile ] ; then \
1114 r=`pwd` ; export r ; \
1115 $(SET_LIB_PATH) \
1116 (cd ./gcc; \
1117 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1118 else \
1119 true ; \
1122 # inet-install is used because the I*Net wants DejaGNU installed but
1123 # not built. Similarly, gzip is built but not installed.
1124 inet-install:
1125 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1127 # install-no-fixedincludes is used because Cygnus can not distribute
1128 # the fixed header files.
1129 .PHONY: install-no-fixedincludes
1130 install-no-fixedincludes: \
1131 installdirs \
1132 $(INSTALL_MODULES) \
1133 $(INSTALL_TARGET_MODULES) \
1134 $(INSTALL_X11_MODULES) \
1135 gcc-no-fixedincludes
1137 # Install the gcc headers files, but not the fixed include files,
1138 # which Cygnus is not allowed to distribute. This rule is very
1139 # dependent on the workings of the gcc Makefile.in.
1140 .PHONY: gcc-no-fixedincludes
1141 gcc-no-fixedincludes:
1142 @if [ -f ./gcc/Makefile ]; then \
1143 rm -rf gcc/tmp-include; \
1144 mv gcc/include gcc/tmp-include 2>/dev/null; \
1145 mkdir gcc/include; \
1146 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1147 touch gcc/stmp-fixinc gcc/include/fixed; \
1148 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1149 r=`pwd`; export r; \
1150 s=`cd $(srcdir); pwd` ; export s; \
1151 $(SET_LIB_PATH) \
1152 (cd ./gcc; \
1153 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1154 rm -rf gcc/include; \
1155 mv gcc/tmp-include gcc/include 2>/dev/null; \
1156 else true; fi
1159 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1160 # build a target all-X means to cd to X and make all.
1162 # all-gui, and all-libproc are handled specially because
1163 # they are still experimental, and if they fail to build, that
1164 # shouldn't stop "make all".
1165 .PHONY: $(ALL_MODULES) all-gui all-libproc
1166 $(ALL_MODULES) all-gui all-libproc:
1167 @dir=`echo $@ | sed -e 's/all-//'`; \
1168 if [ -f ./$${dir}/Makefile ] ; then \
1169 r=`pwd`; export r; \
1170 s=`cd $(srcdir); pwd`; export s; \
1171 $(SET_LIB_PATH) \
1172 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1173 else \
1174 true; \
1177 # These rules are used to check the modules which use FLAGS_TO_PASS.
1178 # To build a target check-X means to cd to X and make check. Some
1179 # modules are only tested in a native toolchain.
1181 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1182 $(NATIVE_CHECK_MODULES):
1183 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1184 dir=`echo $@ | sed -e 's/check-//'`; \
1185 if [ -f ./$${dir}/Makefile ] ; then \
1186 r=`pwd`; export r; \
1187 s=`cd $(srcdir); pwd`; export s; \
1188 $(SET_LIB_PATH) \
1189 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1190 else \
1191 true; \
1192 fi; \
1195 $(CROSS_CHECK_MODULES):
1196 @dir=`echo $@ | sed -e 's/check-//'`; \
1197 if [ -f ./$${dir}/Makefile ] ; then \
1198 r=`pwd`; export r; \
1199 s=`cd $(srcdir); pwd`; export s; \
1200 $(SET_LIB_PATH) \
1201 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1202 else \
1203 true; \
1206 # This rule is used to install the modules which use FLAGS_TO_PASS.
1207 # To build a target install-X means to cd to X and make install.
1208 .PHONY: $(INSTALL_MODULES)
1209 $(INSTALL_MODULES): installdirs
1210 @dir=`echo $@ | sed -e 's/install-//'`; \
1211 if [ -f ./$${dir}/Makefile ] ; then \
1212 r=`pwd`; export r; \
1213 s=`cd $(srcdir); pwd`; export s; \
1214 $(SET_LIB_PATH) \
1215 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1216 else \
1217 true; \
1220 # This rule is used to configure the modules which are built with the
1221 # target tools.
1222 .PHONY: $(CONFIGURE_TARGET_MODULES)
1223 $(CONFIGURE_TARGET_MODULES):
1224 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1225 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1226 r=`pwd`; export r; \
1227 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1228 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1229 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1230 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1231 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1232 else \
1233 echo "Multilibs changed for $${dir}, reconfiguring"; \
1234 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1235 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1236 fi; \
1237 else \
1238 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1239 fi; \
1240 fi; \
1241 fi; exit 0 # break command into two pieces
1242 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1243 if [ ! -d $(TARGET_SUBDIR) ]; then \
1244 true; \
1245 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1246 true; \
1247 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1248 if [ -d $(srcdir)/$${dir} ]; then \
1249 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1250 r=`pwd`; export r; \
1251 s=`cd $(srcdir); pwd`; export s; \
1252 $(SET_LIB_PATH) \
1253 AR="$(AR_FOR_TARGET)"; export AR; \
1254 AS="$(AS_FOR_TARGET)"; export AS; \
1255 CC="$(CC_FOR_TARGET)"; export CC; \
1256 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1257 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1258 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1259 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1260 LD="$(LD_FOR_TARGET)"; export LD; \
1261 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1262 NM="$(NM_FOR_TARGET)"; export NM; \
1263 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1264 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1265 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1266 cd $(TARGET_SUBDIR)/$${dir}; \
1267 case $(srcdir) in \
1268 /*) \
1269 topdir=$(srcdir) ;; \
1270 *) \
1271 case "$(TARGET_SUBDIR)" in \
1272 .) topdir="../$(srcdir)" ;; \
1273 *) topdir="../../$(srcdir)" ;; \
1274 esac ;; \
1275 esac; \
1276 if [ "$(srcdir)" = "." ] ; then \
1277 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1278 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1279 if [ -f Makefile ]; then \
1280 if $(MAKE) distclean; then \
1281 true; \
1282 else \
1283 exit 1; \
1284 fi; \
1285 else \
1286 true; \
1287 fi; \
1288 else \
1289 exit 1; \
1290 fi; \
1291 else \
1292 true; \
1293 fi; \
1294 srcdiroption="--srcdir=."; \
1295 libsrcdir="."; \
1296 else \
1297 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1298 libsrcdir="$$s/$${dir}"; \
1299 fi; \
1300 if [ -f $${libsrcdir}/configure ] ; then \
1301 rm -f no-such-file skip-this-dir; \
1302 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1303 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1304 --with-target-subdir="$(TARGET_SUBDIR)"; \
1305 else \
1306 rm -f no-such-file skip-this-dir; \
1307 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1308 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1309 --with-target-subdir="$(TARGET_SUBDIR)"; \
1310 fi; \
1311 if [ -f skip-this-dir ] ; then \
1312 sh skip-this-dir; \
1313 rm -f skip-this-dir; \
1314 cd ..; rmdir $${dir} || true; \
1315 else \
1316 true; \
1317 fi; \
1318 else \
1319 true; \
1320 fi; \
1321 else \
1322 true; \
1325 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1326 # To build a target all-X means to cd to X and make all.
1327 .PHONY: $(ALL_TARGET_MODULES)
1328 $(ALL_TARGET_MODULES):
1329 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1330 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1331 r=`pwd`; export r; \
1332 s=`cd $(srcdir); pwd`; export s; \
1333 $(SET_LIB_PATH) \
1334 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1335 else \
1336 true; \
1339 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1340 # To build a target install-X means to cd to X and make install.
1341 .PHONY: $(CHECK_TARGET_MODULES)
1342 $(CHECK_TARGET_MODULES):
1343 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1344 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1345 r=`pwd`; export r; \
1346 s=`cd $(srcdir); pwd`; export s; \
1347 $(SET_LIB_PATH) \
1348 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1349 else \
1350 true; \
1353 # This rule is used to install the modules which use
1354 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1355 # and make install.
1356 .PHONY: $(INSTALL_TARGET_MODULES)
1357 $(INSTALL_TARGET_MODULES): installdirs
1358 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1359 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1360 r=`pwd`; export r; \
1361 s=`cd $(srcdir); pwd`; export s; \
1362 $(SET_LIB_PATH) \
1363 (cd $(TARGET_SUBDIR)/$${dir}; \
1364 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1365 else \
1366 true; \
1369 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1370 # To build a target all-X means to cd to X and make all.
1371 .PHONY: $(ALL_X11_MODULES)
1372 $(ALL_X11_MODULES):
1373 @dir=`echo $@ | sed -e 's/all-//'`; \
1374 if [ -f ./$${dir}/Makefile ] ; then \
1375 r=`pwd`; export r; \
1376 s=`cd $(srcdir); pwd`; export s; \
1377 $(SET_LIB_PATH) \
1378 (cd $${dir}; \
1379 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1380 else \
1381 true; \
1384 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1385 # To build a target check-X means to cd to X and make all.
1386 .PHONY: $(CHECK_X11_MODULES)
1387 $(CHECK_X11_MODULES):
1388 @dir=`echo $@ | sed -e 's/check-//'`; \
1389 if [ -f ./$${dir}/Makefile ] ; then \
1390 r=`pwd`; export r; \
1391 s=`cd $(srcdir); pwd`; export s; \
1392 $(SET_LIB_PATH) \
1393 (cd $${dir}; \
1394 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1395 else \
1396 true; \
1399 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1400 # To build a target install-X means to cd to X and make install.
1401 .PHONY: $(INSTALL_X11_MODULES)
1402 $(INSTALL_X11_MODULES): installdirs
1403 @dir=`echo $@ | sed -e 's/install-//'`; \
1404 if [ -f ./$${dir}/Makefile ] ; then \
1405 r=`pwd`; export r; \
1406 s=`cd $(srcdir); pwd`; export s; \
1407 $(SET_LIB_PATH) \
1408 (cd $${dir}; \
1409 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1410 else \
1411 true; \
1414 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1415 .PHONY: all-gcc
1416 all-gcc:
1417 @if [ -f ./gcc/Makefile ] ; then \
1418 r=`pwd`; export r; \
1419 s=`cd $(srcdir); pwd`; export s; \
1420 $(SET_LIB_PATH) \
1421 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1422 else \
1423 true; \
1426 # Building GCC uses some tools for rebuilding "source" files
1427 # like texinfo, bison/byacc, etc. So we must depend on those.
1429 # While building GCC, it may be necessary to run various target
1430 # programs like the assembler, linker, etc. So we depend on
1431 # those too.
1433 # In theory, on an SMP all those dependencies can be resolved
1434 # in parallel.
1436 .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1437 bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1438 @r=`pwd`; export r; \
1439 s=`cd $(srcdir); pwd`; export s; \
1440 $(SET_LIB_PATH) \
1441 echo "Bootstrapping the compiler"; \
1442 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
1443 @r=`pwd`; export r; \
1444 s=`cd $(srcdir); pwd`; export s; \
1445 case "$@" in \
1446 *bootstrap4-lean ) \
1447 msg="Comparing stage3 and stage4 of the compiler"; \
1448 compare=compare3-lean ;; \
1449 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1450 compare=compare3 ;; \
1451 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
1452 compare=compare-lean ;; \
1453 * ) msg="Comparing stage2 and stage3 of the compiler"; \
1454 compare=compare ;; \
1455 esac; \
1456 $(SET_LIB_PATH) \
1457 echo "$$msg"; \
1458 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
1459 @r=`pwd`; export r; \
1460 s=`cd $(srcdir); pwd` ; export s; \
1461 $(SET_LIB_PATH) \
1462 echo "Building runtime libraries"; \
1463 $(MAKE) $(BASE_FLAGS_TO_PASS) all
1465 .PHONY: cross
1466 cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1467 @r=`pwd`; export r; \
1468 s=`cd $(srcdir); pwd`; export s; \
1469 $(SET_LIB_PATH) \
1470 echo "Building the C and C++ compiler"; \
1471 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
1472 @r=`pwd`; export r; \
1473 s=`cd $(srcdir); pwd` ; export s; \
1474 $(SET_LIB_PATH) \
1475 echo "Building runtime libraries"; \
1476 $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++"
1478 .PHONY: check-gcc
1479 check-gcc:
1480 @if [ -f ./gcc/Makefile ] ; then \
1481 r=`pwd`; export r; \
1482 s=`cd $(srcdir); pwd`; export s; \
1483 $(SET_LIB_PATH) \
1484 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1485 else \
1486 true; \
1489 .PHONY: install-gcc
1490 install-gcc:
1491 @if [ -f ./gcc/Makefile ] ; then \
1492 r=`pwd`; export r; \
1493 s=`cd $(srcdir); pwd`; export s; \
1494 $(SET_LIB_PATH) \
1495 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1496 else \
1497 true; \
1500 .PHONY: install-gcc-cross
1501 install-gcc-cross:
1502 @if [ -f ./gcc/Makefile ] ; then \
1503 r=`pwd`; export r; \
1504 s=`cd $(srcdir); pwd`; export s; \
1505 $(SET_LIB_PATH) \
1506 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1507 else \
1508 true; \
1510 # EXPERIMENTAL STUFF
1511 # This rule is used to install the modules which use FLAGS_TO_PASS.
1512 # To build a target install-X means to cd to X and make install.
1513 .PHONY: install-dosrel
1514 install-dosrel: installdirs info
1515 @dir=`echo $@ | sed -e 's/install-//'`; \
1516 if [ -f ./$${dir}/Makefile ] ; then \
1517 r=`pwd`; export r; \
1518 s=`cd $(srcdir); pwd`; export s; \
1519 $(SET_LIB_PATH) \
1520 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1521 else \
1522 true; \
1525 install-dosrel-fake:
1528 # This is a list of inter-dependencies among modules.
1529 all-apache:
1530 all-ash:
1531 all-autoconf: all-m4 all-texinfo
1532 all-automake: all-m4 all-texinfo
1533 all-bash:
1534 all-bfd: all-libiberty all-intl
1535 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1536 all-bison: all-texinfo
1537 configure-target-bsp: $(ALL_GCC)
1538 all-target-bsp: configure-target-bsp all-gcc all-binutils all-target-newlib
1539 all-byacc:
1540 all-bzip2:
1541 all-cvssrc:
1542 configure-target-cygmon: $(ALL_GCC)
1543 all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub all-target-bsp
1544 all-db:
1545 all-dejagnu: all-tcl all-expect all-tk
1546 all-diff: all-libiberty
1547 all-emacs:
1548 all-emacs19: all-bison all-byacc
1549 all-etc:
1550 configure-target-examples: $(ALL_GCC)
1551 all-target-examples: configure-target-examples
1552 all-expect: all-tcl all-tk
1553 all-fileutils: all-libiberty
1554 all-findutils:
1555 all-find:
1556 all-flex: all-libiberty all-bison all-byacc
1557 all-gas: all-libiberty all-opcodes all-bfd all-intl
1558 all-gash: all-tcl
1559 all-gawk:
1560 ALL_GCC = all-gcc
1561 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1562 all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1563 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1564 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1565 all-gettext:
1566 all-gnuserv:
1567 configure-target-gperf: $(ALL_GCC)
1568 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
1569 all-gprof: all-libiberty all-bfd all-opcodes all-intl
1570 all-grez: all-libiberty all-bfd all-opcodes
1571 all-gui: all-gdb all-libproc all-target-librx
1572 all-guile:
1573 all-gzip: all-libiberty
1574 all-hello: all-libiberty
1575 all-indent:
1576 all-inet: all-tcl all-send-pr all-perl
1577 all-intl:
1578 all-ispell: all-emacs19
1579 all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1
1580 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1581 configure-target-libg++: $(ALL_GCC) configure-target-librx
1582 all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
1583 configure-target-libgloss: $(ALL_GCC)
1584 all-target-libgloss: configure-target-libgloss configure-target-newlib
1585 configure-target-libio: $(ALL_GCC)
1586 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1587 check-target-libio: all-target-libstdc++
1588 all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1589 all-libiberty:
1590 configure-target-librx: $(ALL_GCC) configure-target-newlib
1591 all-target-librx: configure-target-librx
1592 configure-target-libstdc++: $(ALL_GCC)
1593 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1594 configure-target-libstub: $(ALL_GCC)
1595 all-target-libstub: configure-target-libstub
1596 all-libtool:
1597 all-m4: all-libiberty
1598 all-make: all-libiberty
1599 all-mmalloc:
1600 configure-target-newlib: $(ALL_GCC)
1601 configure-target-libtermcap: $(ALL_GCC)
1602 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1603 all-target-libtermcap: configure-target-libtermcap all-binutils all-gas all-gcc
1604 all-opcodes: all-bfd all-libiberty
1605 all-patch: all-libiberty
1606 all-perl:
1607 all-prms: all-libiberty
1608 all-rcs:
1609 all-readline:
1610 all-recode: all-libiberty
1611 all-sed: all-libiberty
1612 all-send-pr: all-prms
1613 all-shellutils:
1614 all-sim: all-libiberty all-bfd all-opcodes all-readline
1615 all-tar: all-libiberty
1616 all-tcl:
1617 all-tcl8.1:
1618 all-tclX: all-tcl all-tk
1619 all-tk: all-tcl
1620 all-tk8.1: all-tcl8.1
1621 all-texinfo: all-libiberty
1622 all-textutils:
1623 all-tgas: all-libiberty all-bfd all-opcodes
1624 all-time:
1625 all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1
1626 all-wdiff:
1627 all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup
1628 configure-target-winsup: configure-target-newlib
1629 all-uudecode: all-libiberty
1630 all-zip:
1631 configure-target-libiberty: $(ALL_GCC)
1632 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1633 all-target: $(ALL_TARGET_MODULES)
1634 install-target: $(INSTALL_TARGET_MODULES)
1635 ### other supporting targets
1637 MAKEDIRS= \
1638 $(prefix) \
1639 $(exec_prefix)
1640 .PHONY: installdirs
1641 installdirs: mkinstalldirs
1642 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1644 dir.info: do-install-info
1645 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1646 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1647 mv -f dir.info.new dir.info ; \
1648 else true ; \
1651 dist:
1652 @echo "Building a full distribution of this tree isn't done"
1653 @echo "via 'make dist'. Check out the etc/ subdirectory"
1655 etags tags: TAGS
1657 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1658 # ability to use several tags files at once, so there is probably no need
1659 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1660 # (if we felt like it) have this Makefile write a piece of elisp which
1661 # the user could load to tell emacs19 where all the TAGS files we just
1662 # built are.
1663 TAGS: do-TAGS
1665 # with the gnu make, this is done automatically.
1667 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
1668 $(SHELL) ./config.status
1671 # Support for building net releases
1673 # Files in devo used in any net release.
1674 # ChangeLog omitted because it may refer to files which are not in this
1675 # distribution (perhaps it would be better to include it anyway).
1676 DEVO_SUPPORT= README Makefile.in configure configure.in \
1677 config.guess config.if config.sub config move-if-change \
1678 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1679 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1680 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1682 # Files in devo/etc used in any net release.
1683 # ChangeLog omitted because it may refer to files which are not in this
1684 # distribution (perhaps it would be better to include it anyway).
1685 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1686 make-stds.texi standards.info*
1688 # When you use `make setup-dirs' or `make taz' you should always redefine
1689 # this macro.
1690 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1692 .PHONY: taz
1694 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1695 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1696 # Take out texinfo from a few places.
1697 sed -e '/^all\.normal: /s/\all-texinfo //' \
1698 -e '/^ install-texinfo /d' \
1699 <Makefile.in >tmp
1700 mv -f tmp Makefile.in
1702 ./configure sun4
1703 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1704 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1705 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1706 # Make links, and run "make diststuff" or "make info" when needed.
1707 rm -rf proto-toplev ; mkdir proto-toplev
1708 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1709 for d in $$dirs ; do \
1710 if [ -d $$d ]; then \
1711 if [ ! -f $$d/Makefile ] ; then true ; \
1712 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1713 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1714 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1715 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1716 fi ; \
1717 if [ -d $$d/proto-$$d.dir ]; then \
1718 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1719 else \
1720 ln -s ../$$d proto-toplev/$$d ; \
1721 fi ; \
1722 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1723 done
1724 cd etc ; $(MAKE) info
1725 $(MAKE) distclean
1727 mkdir proto-toplev/etc
1728 (cd proto-toplev/etc; \
1729 for i in $(ETC_SUPPORT); do \
1730 ln -s ../../etc/$$i . ; \
1731 done)
1733 # Take out texinfo from configurable dirs
1734 rm proto-toplev/configure.in
1735 sed -e '/^host_tools=/s/texinfo //' \
1736 <configure.in >proto-toplev/configure.in
1738 mkdir proto-toplev/texinfo
1739 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1740 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1741 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1742 if test -r texinfo/util/tex3patch ; then \
1743 mkdir proto-toplev/texinfo/util && \
1744 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1745 else true; fi
1746 chmod -R og=u . || chmod og=u `find . -print`
1747 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1748 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1749 else \
1750 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1751 fi; \
1752 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
1754 do-tar-gz:
1755 echo "==> Making $(TOOL)-$(VER).tar.gz"
1756 -rm -f $(TOOL)-$(VER)
1757 ln -s proto-toplev $(TOOL)-$(VER)
1758 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1759 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1761 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1762 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1764 .PHONY: gas.tar.gz
1765 GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms
1766 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1767 $(MAKE) -f Makefile.in taz TOOL=gas \
1768 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1770 # The FSF "binutils" release includes gprof and ld.
1771 .PHONY: binutils.tar.gz
1772 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms
1773 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1774 $(MAKE) -f Makefile.in taz TOOL=binutils \
1775 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1777 .PHONY: gas+binutils.tar.gz
1778 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1779 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1780 $(MAKE) -f Makefile.in taz TOOL=gas \
1781 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1783 .PHONY: libg++.tar.gz
1784 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1785 libg++.tar.gz: $(DIST_SUPPORT) libg++
1786 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1787 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1789 GNATS_SUPPORT_DIRS=include libiberty send-pr
1790 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1791 $(MAKE) -f Makefile.in taz TOOL=gnats \
1792 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1794 .PHONY: gdb.tar.gz
1795 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
1796 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1797 $(MAKE) -f Makefile.in taz TOOL=gdb \
1798 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
1800 .PHONY: newlib.tar.gz
1801 NEWLIB_SUPPORT_DIRS=libgloss
1802 # taz configures for the sun4 target which won't configure newlib.
1803 # We need newlib configured so that the .info files are made.
1804 # Unfortunately, it is not enough to just configure newlib separately:
1805 # taz will build the .info files but since SUBDIRS won't contain newlib,
1806 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1807 # used in building the .info files, eg: *.def, *.ref).
1808 # The problem isn't solvable however without a lot of extra work because
1809 # target libraries are built in subdir $(target_alias) which gets nuked during
1810 # the make distclean. For now punt on the issue of shipping newlib info files
1811 # with newlib net releases and wait for a day when some native target (sun4?)
1812 # supports newlib (if only minimally).
1813 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1814 $(MAKE) -f Makefile.in taz TOOL=newlib \
1815 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1816 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1818 .NOEXPORT:
1819 MAKEOVERRIDES=
1821 # end of Makefile.in