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