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