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