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