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