Fixed a typo.
[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 60# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
7c1c728e 61# cygwin host.
8270cd76
ILT
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 \
10b2757b 580 all-tcl8.1 \
79337c85
ILT
581 all-texinfo \
582 all-textutils \
583 all-tgas \
584 all-time \
585 all-uudecode \
eebe454c
TT
586 $(start-sanitize-ide) \
587 all-vmake \
588 $(end-sanitize-ide) \
456876c8 589 all-wdiff \
61821e29 590 all-zip \
456876c8 591 $(EXTRA_TARGET_HOST_ALL_MODULES)
753d5049 592
4f0b8f27
TL
593# This is a list of the check targets for all of the modules which are
594# compiled using $(FLAGS_TO_PASS).
595#
d237841c
BC
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 = \
3a671555 600 check-bison \
d237841c 601 check-byacc \
61821e29
TT
602 check-flex \
603 check-zip
4f0b8f27 604
d237841c 605CROSS_CHECK_MODULES = \
53c403df 606 check-apache \
258950c5 607 check-ash \
6a42d184 608 check-autoconf \
08168809 609 check-automake \
5db223e4 610 check-bash \
6a42d184
DZ
611 check-bfd \
612 check-binutils \
e677105c 613 check-bzip2 \
97b951fb 614 check-cvssrc \
97840afa 615 check-db \
6a42d184
DZ
616 check-dejagnu \
617 check-diff \
618 check-etc \
619 check-fileutils \
97840afa 620 check-findutils \
6a42d184 621 check-find \
bcbcf456
BE
622 $(start-sanitize-cygnus) \
623 check-flexlm \
624 $(end-sanitize-cygnus) \
6a42d184
DZ
625 check-gas \
626 check-gawk \
f46d03c5 627 check-gettext \
ba26181f 628 check-gnuserv \
6a42d184
DZ
629 check-gprof \
630 check-grep \
631 check-gzip \
632 check-hello \
3718029f
ILT
633 $(start-sanitize-ide) \
634 check-ilu \
635 $(end-sanitize-ide) \
6a42d184 636 check-indent \
13d7cbe2 637 check-inet \
f46d03c5 638 check-intl \
6a42d184 639 check-ispell \
97840afa 640 check-itcl \
c070fb34
ILT
641 $(start-sanitize-ide) \
642 check-jstools \
643 $(end-sanitize-ide) \
6a42d184 644 check-ld \
67ae6381 645 check-libgui \
6a42d184 646 check-libiberty \
43e1bf25 647 $(start-sanitize-ide) \
eebe454c 648 check-libide \
f46d03c5 649 check-libidetcl \
43e1bf25 650 $(end-sanitize-ide) \
c99e91d2 651 check-libtool \
6a42d184
DZ
652 check-m4 \
653 check-make \
654 check-mmcheckoc \
655 check-opcodes \
656 check-patch \
0f8f1d33 657 check-perl \
6a42d184
DZ
658 check-prms \
659 check-rcs \
660 check-readline \
661 check-recode \
662 check-sed \
663 check-send-pr \
664 check-shellutils \
b0dae4d7 665 $(start-sanitize-cygnus) \
abc93570 666 check-snavigator \
b0dae4d7 667 $(end-sanitize-cygnus) \
6a42d184
DZ
668 check-sim \
669 check-tar \
670 check-tcl \
671 check-texinfo \
672 check-textutils \
673 check-tgas \
674 check-time \
675 check-uudecode \
eebe454c
TT
676 $(start-sanitize-ide) \
677 check-vmake \
678 $(end-sanitize-ide) \
456876c8
DE
679 check-wdiff \
680 $(EXTRA_TARGET_HOST_CHECK_MODULES)
d237841c
BC
681
682CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
6a42d184
DZ
683
684# This is a list of the install targets for all of the modules which are
79337c85 685# compiled using $(FLAGS_TO_PASS).
27349293
ILT
686# We put install-opcodes before install-binutils because the installed
687# binutils might be on PATH, and they might need the shared opcodes
688# library.
abc93570
ILT
689# We put install-tcl before install-itcl because itcl wants to run a
690# program on installation which uses the Tcl libraries.
79337c85 691INSTALL_MODULES = \
53c403df 692 install-apache \
258950c5 693 install-ash \
79337c85 694 install-autoconf \
08168809 695 install-automake \
5db223e4 696 install-bash \
79337c85 697 install-bfd \
e677105c 698 install-bzip2 \
27349293 699 install-opcodes \
79337c85 700 install-binutils \
3a671555 701 install-bison \
79337c85 702 install-byacc \
97b951fb 703 install-cvssrc \
97840afa 704 install-db \
79337c85
ILT
705 install-dejagnu \
706 install-diff \
753d5049 707 install-dosutils \
79337c85
ILT
708 install-etc \
709 install-fileutils \
97840afa 710 install-findutils \
79337c85
ILT
711 install-find \
712 install-flex \
bcbcf456
BE
713 $(start-sanitize-cygnus) \
714 install-flexlm \
715 $(end-sanitize-cygnus) \
79337c85
ILT
716 install-gas \
717 install-gawk \
f46d03c5 718 install-gettext \
ba26181f 719 install-gnuserv \
79337c85
ILT
720 install-gprof \
721 install-grep \
19b1d034 722 install-grez \
79337c85
ILT
723 install-gzip \
724 install-hello \
3718029f
ILT
725 $(start-sanitize-ide) \
726 install-ilu \
727 $(end-sanitize-ide) \
79337c85 728 install-indent \
13d7cbe2 729 install-inet \
f46d03c5 730 install-intl \
79337c85 731 install-ispell \
abc93570 732 install-tcl \
10b2757b 733 install-tcl8.1 \
97840afa 734 install-itcl \
c070fb34
ILT
735 $(start-sanitize-ide) \
736 install-jstools \
737 $(end-sanitize-ide) \
79337c85 738 install-ld \
67ae6381 739 install-libgui \
79337c85 740 install-libiberty \
43e1bf25 741 $(start-sanitize-ide) \
eebe454c 742 install-libide \
f46d03c5 743 install-libidetcl \
43e1bf25 744 $(end-sanitize-ide) \
c99e91d2 745 install-libtool \
79337c85
ILT
746 install-m4 \
747 install-make \
748 install-mmalloc \
79337c85 749 install-patch \
0f8f1d33 750 install-perl \
79337c85
ILT
751 install-prms \
752 install-rcs \
753 install-readline \
754 install-recode \
755 install-sed \
756 install-send-pr \
757 install-shellutils \
758 install-sim \
b0dae4d7 759 $(start-sanitize-cygnus) \
abc93570 760 install-snavigator \
b0dae4d7 761 $(end-sanitize-cygnus) \
79337c85 762 install-tar \
79337c85
ILT
763 install-texinfo \
764 install-textutils \
765 install-tgas \
766 install-time \
767 install-uudecode \
eebe454c
TT
768 $(start-sanitize-ide) \
769 install-vmake \
770 $(end-sanitize-ide) \
d8ea6d40 771 install-wdiff \
61821e29 772 install-zip \
d8ea6d40 773 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
79337c85 774
6a42d184 775# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
776# using $(X11_FLAGS_TO_PASS).
777ALL_X11_MODULES = \
778 all-emacs \
4d802af9 779 all-emacs19 \
04103845 780 all-gdb \
79337c85 781 all-expect \
65e21701 782 all-gash \
0f8f1d33 783 all-guile \
79337c85 784 all-tclX \
9239dc26 785 all-tk \
10b2757b 786 all-tk8.1 \
9239dc26 787 all-tix
79337c85 788
6a42d184
DZ
789# This is a list of the check targets for all of the modules which are
790# compiled using $(X11_FLAGS_TO_PASS).
791CHECK_X11_MODULES = \
792 check-emacs \
04103845 793 check-gdb \
0f8f1d33 794 check-guile \
6a42d184 795 check-expect \
65e21701 796 check-gash \
9239dc26
ILT
797 check-tclX \
798 check-tk \
799 check-tix
6a42d184 800
79337c85
ILT
801# This is a list of the install targets for all the modules which are
802# compiled using $(X11_FLAGS_TO_PASS).
803INSTALL_X11_MODULES = \
804 install-emacs \
4d802af9 805 install-emacs19 \
04103845 806 install-gdb \
0f8f1d33 807 install-guile \
79337c85 808 install-expect \
65e21701 809 install-gash \
79337c85 810 install-tclX \
9239dc26 811 install-tk \
10b2757b 812 install-tk8.1 \
9239dc26 813 install-tix
fca4f908 814
6a42d184 815# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
816# using $(TARGET_FLAGS_TO_PASS).
817ALL_TARGET_MODULES = \
ab1cbc67
PB
818 all-target-libio \
819 all-target-libstdc++ \
f46d03c5
ILT
820 all-target-librx \
821 all-target-libg++ \
ab1cbc67
PB
822 all-target-newlib \
823 all-target-winsup \
d8ea6d40
FL
824 $(start-sanitize-dsp) \
825 all-target-libdsp \
826 $(end-sanitize-dsp) \
ab1cbc67 827 all-target-libgloss \
4c0b7ebc 828 all-target-libiberty \
10be59aa 829 all-target-gperf \
664298e6 830 all-target-examples \
f4434c50 831 all-target-libstub \
06855275 832 $(start-sanitize-java) \
3970ecc7 833 all-target-libjava \
06855275 834 all-target-boehm-gc \
d8ea6d40 835 all-target-qthreads \
06855275
SG
836 $(end-sanitize-java) \
837 all-target-cygmon
79337c85 838
ca2ce3b3
ILT
839# This is a list of the configure targets for all of the modules which
840# are compiled using the target tools.
841CONFIGURE_TARGET_MODULES = \
d8ea6d40
FL
842 $(start-sanitize-dsp) \
843 configure-target-libdsp \
844 $(end-sanitize-dsp) \
ab1cbc67
PB
845 configure-target-libio \
846 configure-target-libstdc++ \
f46d03c5
ILT
847 configure-target-librx \
848 configure-target-libg++ \
ab1cbc67
PB
849 configure-target-newlib \
850 configure-target-winsup \
851 configure-target-libgloss \
4c0b7ebc 852 configure-target-libiberty \
10be59aa 853 configure-target-gperf \
664298e6 854 configure-target-examples \
f4434c50 855 configure-target-libstub \
06855275 856 $(start-sanitize-java) \
3970ecc7 857 configure-target-libjava \
06855275 858 configure-target-boehm-gc \
d8ea6d40 859 configure-target-qthreads \
06855275
SG
860 $(end-sanitize-java) \
861 configure-target-cygmon
ca2ce3b3 862
6a42d184
DZ
863# This is a list of the check targets for all of the modules which are
864# compiled using $(TARGET_FLAGS_TO_PASS).
865CHECK_TARGET_MODULES = \
d8ea6d40
FL
866 $(start-sanitize-dsp) \
867 check-target-libdsp \
868 $(end-sanitize-dsp) \
ab1cbc67
PB
869 check-target-libio \
870 check-target-libstdc++ \
f46d03c5 871 check-target-libg++ \
ab1cbc67
PB
872 check-target-newlib \
873 check-target-winsup \
10be59aa 874 check-target-libiberty \
06855275 875 $(start-sanitize-java) \
3970ecc7 876 check-target-libjava \
06855275 877 check-target-boehm-gc \
d8ea6d40 878 check-target-qthreads \
06855275
SG
879 $(end-sanitize-java) \
880 check-target-gperf
6a42d184
DZ
881
882# This is a list of the install targets for all of the modules which are
79337c85
ILT
883# compiled using $(TARGET_FLAGS_TO_PASS).
884INSTALL_TARGET_MODULES = \
d8ea6d40
FL
885 $(start-sanitize-dsp) \
886 install-target-libdsp \
887 $(end-sanitize-dsp) \
ab1cbc67
PB
888 install-target-libio \
889 install-target-libstdc++ \
f46d03c5 890 install-target-libg++ \
ab1cbc67
PB
891 install-target-newlib \
892 install-target-winsup \
893 install-target-libgloss \
10be59aa 894 install-target-libiberty \
06855275 895 $(start-sanitize-java) \
3970ecc7 896 install-target-libjava \
06855275 897 install-target-boehm-gc \
d8ea6d40 898 install-target-qthreads \
06855275
SG
899 $(end-sanitize-java) \
900 install-target-gperf
7481617f 901
7508666f
MM
902# This is a list of the targets for which we can do a clean-{target}.
903CLEAN_MODULES = \
13d7cbe2 904 clean-apache \
258950c5 905 clean-ash \
7508666f 906 clean-autoconf \
08168809 907 clean-automake \
5db223e4 908 clean-bash \
7508666f
MM
909 clean-bfd \
910 clean-binutils \
3a671555 911 clean-bison \
7508666f 912 clean-byacc \
e677105c 913 clean-bzip2 \
0ab3f086
BK
914 $(start-sanitize-cygnus) \
915 clean-cgen \
916 $(end-sanitize-cygnus) \
97b951fb 917 clean-cvssrc \
97840afa 918 clean-db \
7508666f
MM
919 clean-dejagnu \
920 clean-diff \
921 clean-dosutils \
922 clean-etc \
923 clean-fileutils \
97840afa 924 clean-findutils \
7508666f
MM
925 clean-find \
926 clean-flex \
bcbcf456
BE
927 $(start-sanitize-cygnus) \
928 clean-flexlm \
929 $(end-sanitize-cygnus) \
7508666f
MM
930 clean-gas \
931 clean-gawk \
f46d03c5 932 clean-gettext \
ba26181f 933 clean-gnuserv \
7508666f
MM
934 clean-gprof \
935 clean-grep \
936 clean-grez \
937 clean-gzip \
938 clean-hello \
3718029f
ILT
939 $(start-sanitize-ide) \
940 clean-ilu \
941 $(end-sanitize-ide) \
7508666f 942 clean-indent \
13d7cbe2 943 clean-inet \
f46d03c5 944 clean-intl \
7508666f 945 clean-ispell \
97840afa 946 clean-itcl \
c070fb34
ILT
947 $(start-sanitize-ide) \
948 clean-jstools \
949 $(end-sanitize-ide) \
7508666f 950 clean-ld \
67ae6381 951 clean-libgui \
7508666f 952 clean-libiberty \
43e1bf25 953 $(start-sanitize-ide) \
eebe454c 954 clean-libide \
f46d03c5 955 clean-libidetcl \
43e1bf25 956 $(end-sanitize-ide) \
c99e91d2 957 clean-libtool \
7508666f
MM
958 clean-m4 \
959 clean-make \
960 clean-mmalloc \
961 clean-opcodes \
962 clean-patch \
963 clean-perl \
964 clean-prms \
965 clean-rcs \
966 clean-readline \
967 clean-release \
968 clean-recode \
969 clean-sed \
970 clean-send-pr \
971 clean-shellutils \
972 clean-sim \
b0dae4d7 973 $(start-sanitize-cygnus) \
abc93570 974 clean-snavigator \
b0dae4d7 975 $(end-sanitize-cygnus) \
7508666f
MM
976 clean-tar \
977 clean-tcl \
978 clean-texinfo \
979 clean-textutils \
980 clean-tgas \
981 clean-time \
982 clean-uudecode \
eebe454c
TT
983 $(start-sanitize-ide) \
984 clean-vmake \
985 $(end-sanitize-ide) \
61821e29
TT
986 clean-wdiff \
987 clean-zip
7508666f
MM
988
989# All of the target modules that can be cleaned
990CLEAN_TARGET_MODULES = \
d8ea6d40
FL
991 $(start-sanitize-dsp) \
992 clean-target-libdsp \
993 $(end-sanitize-dsp) \
7508666f
MM
994 clean-target-libio \
995 clean-target-libstdc++ \
f46d03c5
ILT
996 clean-target-librx \
997 clean-target-libg++ \
7508666f
MM
998 clean-target-newlib \
999 clean-target-winsup \
1000 clean-target-libgloss \
1001 clean-target-libiberty \
10be59aa 1002 clean-target-gperf \
664298e6 1003 clean-target-examples \
f4434c50 1004 clean-target-libstub \
06855275 1005 $(start-sanitize-java) \
3970ecc7 1006 clean-target-libjava \
06855275 1007 clean-target-boehm-gc \
d8ea6d40 1008 clean-target-qthreads \
06855275
SG
1009 $(end-sanitize-java) \
1010 clean-target-cygmon
7508666f
MM
1011
1012# All of the x11 modules that can be cleaned
1013CLEAN_X11_MODULES = \
1014 clean-emacs \
1015 clean-emacs19 \
1016 clean-gdb \
1017 clean-expect \
1018 clean-gash \
1019 clean-guile \
1020 clean-tclX \
9239dc26
ILT
1021 clean-tk \
1022 clean-tix
7508666f 1023
79337c85
ILT
1024# The target built for a native build.
1025.PHONY: all.normal
1026all.normal: \
1027 $(ALL_MODULES) \
46d0ca81 1028 $(ALL_X11_MODULES) \
2e482734 1029 $(ALL_TARGET_MODULES) \
79337c85
ILT
1030 all-gcc
1031
0ef4728f 1032# Do a target for all the subdirectories. A ``make do-X'' will do a
53222cbd
RP
1033# ``make X'' in all subdirectories (because, in general, there is a
1034# dependency (below) of X upon do-X, a ``make X'' will also do this,
1035# but it may do additional work as well).
0ef4728f
ILT
1036# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
1037# because it is so large that it can easily overflow the command line
1038# length limit on some systems.
79337c85 1039DO_X = \
79337c85
ILT
1040 do-clean \
1041 do-distclean \
1042 do-dvi \
1043 do-info \
1044 do-install-info \
1045 do-installcheck \
1046 do-mostlyclean \
ca2ce3b3 1047 do-maintainer-clean \
753d5049 1048 do-TAGS
79337c85
ILT
1049.PHONY: $(DO_X)
1050$(DO_X):
0ef4728f 1051 @target=`echo $@ | sed -e 's/^do-//'`; \
5cc73086 1052 r=`pwd`; export r; \
81eb5025 1053 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1054 $(SET_LIB_PATH) \
ab1cbc67 1055 for i in $(SUBDIRS) -dummy-; do \
36286a3e 1056 if [ -f ./$$i/Makefile ]; then \
0ef4728f 1057 case $$i in \
0ef4728f 1058 gcc) \
6d681784 1059 for flag in $(EXTRA_GCC_FLAGS); do \
0f8f1d33 1060 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
6d681784 1061 done; \
0ef4728f
ILT
1062 ;; \
1063 *) \
6d681784 1064 for flag in $(EXTRA_HOST_FLAGS); do \
0f8f1d33 1065 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
6d681784 1066 done; \
0ef4728f
ILT
1067 ;; \
1068 esac ; \
d29cd970 1069 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
0ef4728f 1070 if (cd ./$$i; \
6d681784 1071 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
64434418 1072 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
753d5049 1073 "RANLIB=$${RANLIB}" \
d29cd970 1074 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
6d681784 1075 $${target}); \
0ef4728f
ILT
1076 then true; else exit 1; fi; \
1077 else true; fi; \
ec7a8792
ILT
1078 done
1079 @target=`echo $@ | sed -e 's/^do-//'`; \
1080 r=`pwd`; export r; \
81eb5025 1081 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1082 $(SET_LIB_PATH) \
ab1cbc67
PB
1083 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1084 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1085 for flag in $(EXTRA_TARGET_FLAGS); do \
0f8f1d33 1086 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
ab1cbc67 1087 done; \
d29cd970 1088 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
ab1cbc67
PB
1089 if (cd $(TARGET_SUBDIR)/$$i; \
1090 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
64434418 1091 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
ab1cbc67 1092 "RANLIB=$${RANLIB}" \
d29cd970 1093 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
ab1cbc67
PB
1094 $${target}); \
1095 then true; else exit 1; fi; \
1096 else true; fi; \
0ef4728f 1097 done
fb90daeb 1098
79337c85
ILT
1099# Here are the targets which correspond to the do-X targets.
1100
65088029 1101.PHONY: info installcheck dvi install-info
ca2ce3b3
ILT
1102.PHONY: clean distclean mostlyclean maintainer-clean realclean
1103.PHONY: local-clean local-distclean local-maintainer-clean
0ef4728f 1104info: do-info
1a14993c 1105installcheck: do-installcheck
0ef4728f 1106dvi: do-dvi
9a9e8e7f 1107
97840afa
TT
1108# Make sure makeinfo is built before we do a `make info'.
1109do-info: all-texinfo
1110
f35c6160 1111install-info: do-install-info dir.info
81eb5025 1112 s=`cd $(srcdir); pwd`; export s; \
72c09fbc
SC
1113 if [ -f dir.info ] ; then \
1114 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
50fbe976 1115 else true ; fi
4d714963 1116
0ef4728f 1117local-clean:
e677105c 1118 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
3b30df82 1119
0ef4728f 1120local-distclean:
e677105c 1121 -rm -f Makefile config.status config.cache mh-frag mt-frag
8c5bc3e3
ILT
1122 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1123 rm -rf $(TARGET_SUBDIR); \
1124 else true; fi
7fcfdcf7 1125
ca2ce3b3
ILT
1126local-maintainer-clean:
1127 @echo "This command is intended for maintainers to use;"
1128 @echo "it deletes files that may require special tools to rebuild."
1129
0ef4728f
ILT
1130clean: do-clean local-clean
1131mostlyclean: do-mostlyclean local-clean
1132distclean: do-distclean local-clean local-distclean
ca2ce3b3
ILT
1133maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1134maintainer-clean: local-distclean
1135realclean: maintainer-clean
0ef4728f 1136
7508666f
MM
1137# This rule is used to clean specific modules.
1138.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1139$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1140 @dir=`echo $@ | sed -e 's/clean-//'`; \
1141 if [ -f ./$${dir}/Makefile ] ; then \
1142 r=`pwd`; export r; \
81eb5025 1143 s=`cd $(srcdir); pwd`; export s; \
7508666f
MM
1144 $(SET_LIB_PATH) \
1145 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1146 else \
1147 true; \
1148 fi
1149
1150.PHONY: $(CLEAN_TARGET_MODULES)
1151$(CLEAN_TARGET_MODULES):
1152 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
062aded9 1153 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
7508666f
MM
1154 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1155 r=`pwd`; export r; \
81eb5025 1156 s=`cd $(srcdir); pwd`; export s; \
7508666f
MM
1157 $(SET_LIB_PATH) \
1158 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1159 else \
1160 true; \
1161 fi
1162
1163clean-target: $(CLEAN_TARGET_MODULES)
1164
65088029
ILT
1165# Check target.
1166
1167.PHONY: check
1168check: $(CHECK_MODULES) \
1169 $(CHECK_TARGET_MODULES) \
1170 $(CHECK_X11_MODULES) \
1171 check-gcc
1172
e677105c
DE
1173# Automated reporting of test results.
1174
1175warning.log: build.log
1176 $(srcdir)/contrib/warn_summary build.log > $@
1177
1178mail-report.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 >$@
1183 chmod +x $@
1184 echo If you really want to send e-mail, run ./$@ now
1185
1186mail-report-with-warnings.log: warning.log
1187 if test x'$(BOOT_CFLAGS)' != x''; then \
1188 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1189 fi; \
1190 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1191 chmod +x $@
1192 echo If you really want to send e-mail, run ./$@ now
1193
79337c85 1194# Installation targets.
4d714963 1195
e677105c 1196.PHONY: install install-cross uninstall source-vault binary-vault vault-install
98a33b6d 1197install: $(INSTALL_TARGET)
e677105c 1198install-cross: $(INSTALL_TARGET_CROSS)
b26ff9d8 1199
79337c85
ILT
1200uninstall:
1201 @echo "the uninstall target is not supported in this tree"
1202
04103845
DE
1203source-vault:
1204 $(MAKE) -f ./release/Build-A-Release \
1205 host=$(host_alias) source-vault
1206
1207binary-vault:
1208 $(MAKE) -f ./release/Build-A-Release \
1209 host=$(host_alias) target=$(target_alias)
1210
275049c0
JK
1211vault-install:
1212 @if [ -f ./release/vault-install ] ; then \
1213 ./release/vault-install $(host_alias) $(target_alias) ; \
96bfa612
KR
1214 else \
1215 true ; \
275049c0
JK
1216 fi
1217
79337c85 1218.PHONY: install.all
06a07944
RP
1219install.all: install-no-fixedincludes
1220 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1221 r=`pwd` ; export r ; \
b6ae0f10 1222 $(SET_LIB_PATH) \
06a07944
RP
1223 (cd ./gcc; \
1224 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1225 else \
1226 true ; \
1227 fi
5a63b336 1228
424c7ca7 1229# inet-install is used because the I*Net wants DejaGNU installed but
f2b43566 1230# not built. Similarly, gzip is built but not installed.
424c7ca7 1231inet-install:
f2b43566 1232 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
424c7ca7 1233
96bfa612 1234# install-no-fixedincludes is used because Cygnus can not distribute
79337c85
ILT
1235# the fixed header files.
1236.PHONY: install-no-fixedincludes
1237install-no-fixedincludes: \
ff290baf 1238 installdirs \
79337c85
ILT
1239 $(INSTALL_MODULES) \
1240 $(INSTALL_TARGET_MODULES) \
96bfa612 1241 $(INSTALL_X11_MODULES) \
f35c6160 1242 gcc-no-fixedincludes
d1bea4c7 1243
5cc24596 1244# Install the gcc headers files, but not the fixed include files,
79337c85
ILT
1245# which Cygnus is not allowed to distribute. This rule is very
1246# dependent on the workings of the gcc Makefile.in.
1247.PHONY: gcc-no-fixedincludes
06a07944 1248gcc-no-fixedincludes:
5cc24596
PB
1249 @if [ -f ./gcc/Makefile ]; then \
1250 rm -rf gcc/tmp-include; \
1251 mv gcc/include gcc/tmp-include 2>/dev/null; \
1252 mkdir gcc/include; \
7f9cb3b2 1253 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
753d5049 1254 touch gcc/stmp-fixinc gcc/include/fixed; \
a54e05f6 1255 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
5cc73086 1256 r=`pwd`; export r; \
81eb5025 1257 s=`cd $(srcdir); pwd` ; export s; \
b6ae0f10 1258 $(SET_LIB_PATH) \
5cc24596
PB
1259 (cd ./gcc; \
1260 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1261 rm -rf gcc/include; \
1262 mv gcc/tmp-include gcc/include 2>/dev/null; \
1263 else true; fi
dcbfc14d 1264
2ec9f3fd
KS
1265# start-sanitize-ide
1266# Install Foundry. Avoid installing a bunch of stuff we don't need.
1267install-foundry:
1268 mods="$(INSTALL_MODULES)"; \
1269 x11_mods="$(INSTALL_X11_MODULES)"; \
1270 for d in install-tcl install-tk install-itcl install-tix install-ilu; do \
1271 mods="`echo $${mods} | sed -e "s/$$d//"`"; \
1272 x11_mods="`echo $${x11_mods} | sed -e "s/$$d//"`"; \
1273 done; \
1274 $(MAKE) INSTALL_MODULES="$${mods}" INSTALL_X11_MODULES="$${x11_mods}" install
1275 for d in tcl tk itcl tix ilu; do \
1276 if [ -f $$d/Makefile ]; then \
1277 r=`pwd`; export r; \
1278 s=`cd $(srcdir); pwd`; export s; \
1279 $(SET_LIB_PATH) \
1280 (cd $$d; $(MAKE) $(FLAGS_TO_PASS) install-minimal); \
1281 else \
1282 true; \
1283 fi; \
d8ea6d40
FL
1284 date '+%D %r' > builddate \
1285 $(INSTALL_DATA) builddate $(datadir)/builddate ; \
2ec9f3fd
KS
1286 done
1287# end-sanitize-ide
1288
79337c85
ILT
1289# This rule is used to build the modules which use FLAGS_TO_PASS. To
1290# build a target all-X means to cd to X and make all.
3de70f1d 1291#
055cca84 1292# all-gui, and all-libproc are handled specially because
4d802af9
MT
1293# they are still experimental, and if they fail to build, that
1294# shouldn't stop "make all".
04103845
DE
1295.PHONY: $(ALL_MODULES) all-gui all-libproc
1296$(ALL_MODULES) all-gui all-libproc:
79337c85 1297 @dir=`echo $@ | sed -e 's/all-//'`; \
472af17f
ILT
1298 if [ -f ./$${dir}/Makefile ] ; then \
1299 r=`pwd`; export r; \
81eb5025 1300 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1301 $(SET_LIB_PATH) \
472af17f 1302 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
07362bd9 1303 else \
79337c85 1304 true; \
07362bd9
DZ
1305 fi
1306
80cbf870
ILT
1307# These rules are used to check the modules which use FLAGS_TO_PASS.
1308# To build a target check-X means to cd to X and make check. Some
1309# modules are only tested in a native toolchain.
4f0b8f27 1310
d237841c
BC
1311.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1312$(NATIVE_CHECK_MODULES):
39cc6dae
RS
1313 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1314 dir=`echo $@ | sed -e 's/check-//'`; \
472af17f
ILT
1315 if [ -f ./$${dir}/Makefile ] ; then \
1316 r=`pwd`; export r; \
81eb5025 1317 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1318 $(SET_LIB_PATH) \
472af17f
ILT
1319 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1320 else \
1321 true; \
4f0b8f27
TL
1322 fi; \
1323 fi
1324
1325$(CROSS_CHECK_MODULES):
6a42d184
DZ
1326 @dir=`echo $@ | sed -e 's/check-//'`; \
1327 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1328 r=`pwd`; export r; \
81eb5025 1329 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1330 $(SET_LIB_PATH) \
6a42d184
DZ
1331 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1332 else \
1333 true; \
1334 fi
1335
79337c85
ILT
1336# This rule is used to install the modules which use FLAGS_TO_PASS.
1337# To build a target install-X means to cd to X and make install.
1338.PHONY: $(INSTALL_MODULES)
ff290baf 1339$(INSTALL_MODULES): installdirs
79337c85
ILT
1340 @dir=`echo $@ | sed -e 's/install-//'`; \
1341 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1342 r=`pwd`; export r; \
81eb5025 1343 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1344 $(SET_LIB_PATH) \
f35c6160 1345 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
07362bd9 1346 else \
79337c85 1347 true; \
07362bd9
DZ
1348 fi
1349
ca2ce3b3
ILT
1350# This rule is used to configure the modules which are built with the
1351# target tools.
1352.PHONY: $(CONFIGURE_TARGET_MODULES)
1353$(CONFIGURE_TARGET_MODULES):
ab1cbc67 1354 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
354a86c7 1355 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
59d3634c 1356 r=`pwd`; export r; \
f2b43566
ILT
1357 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1358 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1359 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1360 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1361 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1362 else \
1363 echo "Multilibs changed for $${dir}, reconfiguring"; \
1364 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1365 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1366 fi; \
354a86c7 1367 else \
354a86c7
MM
1368 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1369 fi; \
062aded9 1370 fi; \
354a86c7
MM
1371 fi; exit 0 # break command into two pieces
1372 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
3e288e27
SG
1373 if [ ! -d $(TARGET_SUBDIR) ]; then \
1374 true; \
1375 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
ca2ce3b3
ILT
1376 true; \
1377 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
efd7b806 1378 if [ -d $(srcdir)/$${dir} ]; then \
ab1cbc67 1379 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
efd7b806 1380 r=`pwd`; export r; \
81eb5025 1381 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1382 $(SET_LIB_PATH) \
efd7b806
SC
1383 AR="$(AR_FOR_TARGET)"; export AR; \
1384 AS="$(AS_FOR_TARGET)"; export AS; \
1385 CC="$(CC_FOR_TARGET)"; export CC; \
1386 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1387 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1388 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
b6ae0f10 1389 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
054f9ada 1390 LD="$(LD_FOR_TARGET)"; export LD; \
276c2d7d 1391 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
efd7b806
SC
1392 NM="$(NM_FOR_TARGET)"; export NM; \
1393 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
d29cd970 1394 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
19b1d034 1395 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
ab1cbc67 1396 cd $(TARGET_SUBDIR)/$${dir}; \
283a2b3d
DE
1397 case $(srcdir) in \
1398 /*) \
1399 topdir=$(srcdir) ;; \
1400 *) \
1401 case "$(TARGET_SUBDIR)" in \
1402 .) topdir="../$(srcdir)" ;; \
1403 *) topdir="../../$(srcdir)" ;; \
1404 esac ;; \
1405 esac; \
1406 if [ "$(srcdir)" = "." ] ; then \
1407 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
81eb5025 1408 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
0f8f1d33
TT
1409 if [ -f Makefile ]; then \
1410 if $(MAKE) distclean; then \
1411 true; \
1412 else \
1413 exit 1; \
1414 fi; \
1415 else \
1416 true; \
1417 fi; \
283a2b3d
DE
1418 else \
1419 exit 1; \
1420 fi; \
1421 else \
1422 true; \
1423 fi; \
1424 srcdiroption="--srcdir=."; \
1425 libsrcdir="."; \
1426 else \
1427 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
81eb5025 1428 libsrcdir="$$s/$${dir}"; \
283a2b3d
DE
1429 fi; \
1430 if [ -f $${libsrcdir}/configure ] ; then \
e677105c
DE
1431 rm -f no-such-file; \
1432 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
283a2b3d
DE
1433 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1434 --with-target-subdir="$(TARGET_SUBDIR)"; \
19b1d034 1435 else \
e677105c
DE
1436 rm -f no-such-file; \
1437 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
283a2b3d
DE
1438 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1439 --with-target-subdir="$(TARGET_SUBDIR)"; \
19b1d034 1440 fi; \
efd7b806
SC
1441 else \
1442 true; \
9908eb6a 1443 fi; \
ca2ce3b3
ILT
1444 else \
1445 true; \
1446 fi
1447
6a42d184
DZ
1448# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1449# To build a target all-X means to cd to X and make all.
79337c85
ILT
1450.PHONY: $(ALL_TARGET_MODULES)
1451$(ALL_TARGET_MODULES):
ab1cbc67
PB
1452 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1453 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1454 r=`pwd`; export r; \
81eb5025 1455 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1456 $(SET_LIB_PATH) \
ab1cbc67 1457 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
07362bd9 1458 else \
79337c85 1459 true; \
07362bd9
DZ
1460 fi
1461
6a42d184
DZ
1462# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1463# To build a target install-X means to cd to X and make install.
1464.PHONY: $(CHECK_TARGET_MODULES)
1465$(CHECK_TARGET_MODULES):
136ca05d 1466 @dir=`echo $@ | sed -e 's/check-target-//'`; \
ab1cbc67 1467 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1468 r=`pwd`; export r; \
81eb5025 1469 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1470 $(SET_LIB_PATH) \
ab1cbc67 1471 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
6a42d184
DZ
1472 else \
1473 true; \
1474 fi
1475
79337c85
ILT
1476# This rule is used to install the modules which use
1477# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1478# and make install.
1479.PHONY: $(INSTALL_TARGET_MODULES)
ff290baf 1480$(INSTALL_TARGET_MODULES): installdirs
ab1cbc67
PB
1481 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1482 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1483 r=`pwd`; export r; \
81eb5025 1484 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1485 $(SET_LIB_PATH) \
ab1cbc67
PB
1486 (cd $(TARGET_SUBDIR)/$${dir}; \
1487 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
07362bd9 1488 else \
79337c85 1489 true; \
07362bd9
DZ
1490 fi
1491
6a42d184 1492# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
1493# To build a target all-X means to cd to X and make all.
1494.PHONY: $(ALL_X11_MODULES)
1495$(ALL_X11_MODULES):
1496 @dir=`echo $@ | sed -e 's/all-//'`; \
1497 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1498 r=`pwd`; export r; \
81eb5025 1499 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1500 $(SET_LIB_PATH) \
79337c85
ILT
1501 (cd $${dir}; \
1502 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
07362bd9 1503 else \
79337c85 1504 true; \
07362bd9
DZ
1505 fi
1506
6a42d184
DZ
1507# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1508# To build a target check-X means to cd to X and make all.
1509.PHONY: $(CHECK_X11_MODULES)
1510$(CHECK_X11_MODULES):
1511 @dir=`echo $@ | sed -e 's/check-//'`; \
1512 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1513 r=`pwd`; export r; \
81eb5025 1514 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1515 $(SET_LIB_PATH) \
6a42d184
DZ
1516 (cd $${dir}; \
1517 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1518 else \
1519 true; \
1520 fi
1521
1522# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
1523# To build a target install-X means to cd to X and make install.
1524.PHONY: $(INSTALL_X11_MODULES)
48a3d5e5 1525$(INSTALL_X11_MODULES): installdirs
6a42d184 1526 @dir=`echo $@ | sed -e 's/install-//'`; \
79337c85 1527 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1528 r=`pwd`; export r; \
81eb5025 1529 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1530 $(SET_LIB_PATH) \
79337c85
ILT
1531 (cd $${dir}; \
1532 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
07362bd9 1533 else \
79337c85 1534 true; \
07362bd9
DZ
1535 fi
1536
79337c85
ILT
1537# gcc is the only module which uses GCC_FLAGS_TO_PASS.
1538.PHONY: all-gcc
1539all-gcc:
1540 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1541 r=`pwd`; export r; \
81eb5025 1542 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1543 $(SET_LIB_PATH) \
79337c85 1544 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
07362bd9 1545 else \
79337c85 1546 true; \
07362bd9
DZ
1547 fi
1548
e677105c
DE
1549# Building GCC uses some tools for rebuilding "source" files
1550# like texinfo, bison/byacc, etc. So we must depend on those.
1551#
1552# While building GCC, it may be necessary to run various target
1553# programs like the assembler, linker, etc. So we depend on
1554# those too.
1555#
1556# In theory, on an SMP all those dependencies can be resolved
1557# in parallel.
1558#
1559.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1560bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1561 @r=`pwd`; export r; \
1562 s=`cd $(srcdir); pwd`; export s; \
1563 $(SET_LIB_PATH) \
1564 echo "Bootstrapping the compiler"; \
1565 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
1566 @r=`pwd`; export r; \
1567 s=`cd $(srcdir); pwd`; export s; \
1568 case "$@" in \
1569 *bootstrap4-lean ) \
1570 msg="Comparing stage3 and stage4 of the compiler"; \
1571 compare=compare3-lean ;; \
1572 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1573 compare=compare3 ;; \
1574 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
1575 compare=compare-lean ;; \
1576 * ) msg="Comparing stage2 and stage3 of the compiler"; \
1577 compare=compare ;; \
1578 esac; \
1579 $(SET_LIB_PATH) \
1580 echo "$$msg"; \
1581 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
1582 @r=`pwd`; export r; \
1583 s=`cd $(srcdir); pwd` ; export s; \
1584 $(SET_LIB_PATH) \
1585 echo "Building runtime libraries"; \
1586 $(MAKE) $(BASE_FLAGS_TO_PASS) all
1587
1588.PHONY: cross
1589cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1590 @r=`pwd`; export r; \
1591 s=`cd $(srcdir); pwd`; export s; \
1592 $(SET_LIB_PATH) \
1593 echo "Building the C and C++ compiler"; \
1594 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
1595 @r=`pwd`; export r; \
1596 s=`cd $(srcdir); pwd` ; export s; \
1597 $(SET_LIB_PATH) \
1598 echo "Building runtime libraries"; \
1599 $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++"
4c0b7ebc 1600
65088029
ILT
1601.PHONY: check-gcc
1602check-gcc:
1603 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1604 r=`pwd`; export r; \
81eb5025 1605 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1606 $(SET_LIB_PATH) \
65088029
ILT
1607 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1608 else \
1609 true; \
1610 fi
1611
79337c85
ILT
1612.PHONY: install-gcc
1613install-gcc:
1614 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1615 r=`pwd`; export r; \
81eb5025 1616 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1617 $(SET_LIB_PATH) \
79337c85 1618 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
07362bd9 1619 else \
79337c85 1620 true; \
07362bd9
DZ
1621 fi
1622
e677105c
DE
1623.PHONY: install-gcc-cross
1624install-gcc-cross:
1625 @if [ -f ./gcc/Makefile ] ; then \
1626 r=`pwd`; export r; \
1627 s=`cd $(srcdir); pwd`; export s; \
1628 $(SET_LIB_PATH) \
1629 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1630 else \
1631 true; \
1632 fi
753d5049
SC
1633# EXPERIMENTAL STUFF
1634# This rule is used to install the modules which use FLAGS_TO_PASS.
1635# To build a target install-X means to cd to X and make install.
09985c96 1636.PHONY: install-dosrel
ff290baf 1637install-dosrel: installdirs info
753d5049
SC
1638 @dir=`echo $@ | sed -e 's/install-//'`; \
1639 if [ -f ./$${dir}/Makefile ] ; then \
1640 r=`pwd`; export r; \
81eb5025 1641 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1642 $(SET_LIB_PATH) \
753d5049
SC
1643 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1644 else \
1645 true; \
1646 fi
1647
09985c96 1648install-dosrel-fake:
a987271c 1649
753d5049 1650
79337c85 1651# This is a list of inter-dependencies among modules.
53c403df 1652all-apache:
258950c5 1653all-ash:
3a671555 1654all-autoconf: all-m4 all-texinfo
d8ea6d40 1655all-automake: all-m4 all-texinfo
5db223e4 1656all-bash:
6bf191bf
TT
1657all-bfd: all-libiberty all-intl
1658all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
97036944 1659all-bison: all-texinfo
06855275 1660# start-sanitize-java
ba7634ad 1661all-target-boehm-gc: configure-target-boehm-gc
06855275 1662# end-sanitize-java
79337c85 1663all-byacc:
e677105c 1664all-bzip2:
0ab3f086 1665# start-sanitize-cygnus
e677105c 1666all-cgen: all-libiberty
0ab3f086
BK
1667# These two have dependencies on cgen, and while this section is alphabetically
1668# sorted, I wish to keep these together until things settle.
1669all-opcodes: all-cgen
1670all-sim: all-cgen
1671# end-sanitize-cygnus
97b951fb 1672all-cvssrc:
664298e6 1673configure-target-cygmon: $(ALL_GCC)
f4434c50 1674all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub
2e482734 1675all-db:
4d802af9 1676all-dejagnu: all-tcl all-expect all-tk
79337c85
ILT
1677all-diff: all-libiberty
1678all-emacs:
3a671555 1679all-emacs19: all-bison all-byacc
79337c85 1680all-etc:
4c0b7ebc
DE
1681configure-target-examples: $(ALL_GCC)
1682all-target-examples: configure-target-examples
c6ba9ae0 1683all-expect: all-tcl all-tk
275049c0 1684all-fileutils: all-libiberty
97840afa 1685all-findutils:
79337c85 1686all-find:
3a671555 1687all-flex: all-libiberty all-bison all-byacc
bcbcf456
BE
1688# start-sanitize-cygnus
1689all-flexlm:
1690# end-sanitize-cygnus
6bf191bf 1691all-gas: all-libiberty all-opcodes all-bfd all-intl
65e21701 1692all-gash: all-tcl
79337c85 1693all-gawk:
fc3524a9 1694ALL_GCC = all-gcc
3a671555
JM
1695all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1696all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
43e1bf25
JL
1697GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1698# start-sanitize-ide
f46d03c5 1699GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui all-libide all-libidetcl
43e1bf25 1700# end-sanitize-ide
3a671555 1701all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
f46d03c5 1702all-gettext:
ba26181f 1703all-gnuserv:
10be59aa 1704configure-target-gperf: $(ALL_GCC)
97b951fb 1705all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
6bf191bf 1706all-gprof: all-libiberty all-bfd all-opcodes all-intl
b6ae0f10 1707all-grez: all-libiberty all-bfd all-opcodes
ab1cbc67 1708all-gui: all-gdb all-libproc all-target-librx
0f8f1d33 1709all-guile:
79337c85
ILT
1710all-gzip: all-libiberty
1711all-hello: all-libiberty
3718029f
ILT
1712# start-sanitize-ide
1713all-ilu:
1714# end-sanitize-ide
79337c85 1715all-indent:
8d1d94b6 1716all-inet: all-tcl all-send-pr all-perl
f46d03c5 1717all-intl:
3585593d 1718all-ispell: all-emacs19
10b2757b 1719all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1
c070fb34 1720# start-sanitize-ide
f46d03c5 1721all-jstools: all-tcl all-tk all-tix all-libgui all-libide all-libidetcl
c070fb34 1722# end-sanitize-ide
6bf191bf 1723all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
d8ea6d40
FL
1724# start-sanitize-dsp
1725all-target-libdsp: configure-target-libdsp configure-target-newlib
1726configure-target-libdsp: $(ALL_GCC)
1727# end-sanitize-dsp
283a2b3d 1728configure-target-libg++: $(ALL_GCC) configure-target-librx
ab1cbc67
PB
1729all-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++
1730configure-target-libgloss: $(ALL_GCC)
283a2b3d 1731all-target-libgloss: configure-target-libgloss configure-target-newlib
ab1cbc67
PB
1732configure-target-libio: $(ALL_GCC)
1733all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
2ec9f3fd 1734check-target-libio: all-target-libstdc++
10b2757b 1735all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
79337c85 1736all-libiberty:
87d36c31 1737# start-sanitize-ide
f46d03c5
ILT
1738all-libide: all-ilu
1739all-libidetcl: all-tcl all-tk all-itcl all-ilu all-libgui all-libide
87d36c31 1740# end-sanitize-ide
06855275 1741# start-sanitize-java
d8ea6d40 1742configure-target-libjava: $(ALL_GCC) configure-target-boehm-gc configure-target-qthreads
61821e29 1743all-target-libjava: configure-target-libjava all-gcc all-zip all-target-newlib all-target-boehm-gc all-target-qthreads
06855275 1744# end-sanitize-java
ab1cbc67
PB
1745configure-target-librx: $(ALL_GCC) configure-target-newlib
1746all-target-librx: configure-target-librx
1747configure-target-libstdc++: $(ALL_GCC)
1748all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
f4434c50
BM
1749configure-target-libstub: $(ALL_GCC)
1750all-target-libstub: configure-target-libstub
c99e91d2 1751all-libtool:
79337c85
ILT
1752all-m4: all-libiberty
1753all-make: all-libiberty
1754all-mmalloc:
ab1cbc67
PB
1755configure-target-newlib: $(ALL_GCC)
1756all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
b6ae0f10 1757all-opcodes: all-bfd all-libiberty
be2c65d3 1758all-patch: all-libiberty
0f8f1d33 1759all-perl:
b255ccdb 1760all-prms: all-libiberty
d8ea6d40
FL
1761# start-sanitize-java
1762all-target-qthreads: configure-target-qthreads
1763# end-sanitize-java
79337c85
ILT
1764all-rcs:
1765all-readline:
1766all-recode: all-libiberty
ac259c28
JM
1767all-sed: all-libiberty
1768all-send-pr: all-prms
79337c85 1769all-shellutils:
97036944 1770all-sim: all-libiberty all-bfd all-opcodes all-readline
b0dae4d7 1771# start-sanitize-cygnus
10b2757b 1772all-snavigator: all-tcl8.1 all-tk8.1 all-tix all-itcl all-db all-grep all-flexlm all-libgui
b0dae4d7 1773# end-sanitize-cygnus
07362bd9 1774all-tar: all-libiberty
79337c85 1775all-tcl:
10b2757b 1776all-tcl8.1:
79337c85
ILT
1777all-tclX: all-tcl all-tk
1778all-tk: all-tcl
10b2757b 1779all-tk8.1: all-tcl8.1
79337c85
ILT
1780all-texinfo: all-libiberty
1781all-textutils:
b6ae0f10 1782all-tgas: all-libiberty all-bfd all-opcodes
79337c85 1783all-time:
10b2757b 1784all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1
eebe454c 1785# start-sanitize-ide
f46d03c5 1786all-vmake: all-tcl all-tk all-itcl all-tix all-libgui all-libide all-libidetcl
eebe454c 1787# end-sanitize-ide
79337c85 1788all-wdiff:
fd249336 1789all-target-winsup: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
ab1cbc67 1790configure-target-winsup: configure-target-newlib
79337c85 1791all-uudecode: all-libiberty
61821e29 1792all-zip:
ab1cbc67
PB
1793configure-target-libiberty: $(ALL_GCC)
1794all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
0f8f1d33
TT
1795all-target: $(ALL_TARGET_MODULES)
1796install-target: $(INSTALL_TARGET_MODULES)
abc93570 1797# start-sanitize-gdbtk
bfde75f7 1798install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
abc93570 1799#end-sanitize-gdbtk
79337c85 1800### other supporting targets
07362bd9 1801
79337c85
ILT
1802MAKEDIRS= \
1803 $(prefix) \
9deb9485 1804 $(exec_prefix)
ff290baf
ILT
1805.PHONY: installdirs
1806installdirs: mkinstalldirs
fab3dd2d 1807 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
23e3e7f9 1808
79337c85
ILT
1809dir.info: do-install-info
1810 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1811 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1812 mv -f dir.info.new dir.info ; \
1813 else true ; \
72c09fbc 1814 fi
6b7e5998 1815
b1cceba2
DZ
1816dist:
1817 @echo "Building a full distribution of this tree isn't done"
1818 @echo "via 'make dist'. Check out the etc/ subdirectory"
1819
eb02fd64
RP
1820etags tags: TAGS
1821
753d5049
SC
1822# Right now this just builds TAGS in each subdirectory. emacs19 has the
1823# ability to use several tags files at once, so there is probably no need
1824# to combine them into one big TAGS file (like CVS 1.3 does). We could
1825# (if we felt like it) have this Makefile write a piece of elisp which
1826# the user could load to tell emacs19 where all the TAGS files we just
1827# built are.
1828TAGS: do-TAGS
eb02fd64 1829
eb02fd64
RP
1830# with the gnu make, this is done automatically.
1831
e677105c 1832Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
a26878d1 1833 $(SHELL) ./config.status
eb02fd64 1834
11954bf1 1835#
01ec9588 1836# Support for building net releases
11954bf1 1837
01ec9588
JK
1838# Files in devo used in any net release.
1839# ChangeLog omitted because it may refer to files which are not in this
1840# distribution (perhaps it would be better to include it anyway).
d94d255d 1841DEVO_SUPPORT= README Makefile.in configure configure.in \
e677105c 1842 config.guess config.if config.sub config move-if-change \
5f69e8bc 1843 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
08499fc2 1844 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
6e68a23e 1845 mkinstalldirs ltconfig ltmain.sh missing ylwrap
01ec9588
JK
1846
1847# Files in devo/etc used in any net release.
1848# ChangeLog omitted because it may refer to files which are not in this
1849# distribution (perhaps it would be better to include it anyway).
f046ec67
JM
1850ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1851 make-stds.texi standards.info*
01ec9588 1852
40e16078
KR
1853# When you use `make setup-dirs' or `make taz' you should always redefine
1854# this macro.
1855SUPPORT_FILES = list-of-support-files-for-tool-in-question
40e16078 1856
a54e05f6
KR
1857.PHONY: taz
1858
484fa12d
JW
1859taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1860 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
258950c5 1861 # Take out texinfo from a few places.
484fa12d
JW
1862 sed -e '/^all\.normal: /s/\all-texinfo //' \
1863 -e '/^ install-texinfo /d' \
484fa12d
JW
1864 <Makefile.in >tmp
1865 mv -f tmp Makefile.in
65e21701 1866 #
1d5fcc66
PB
1867 $(start-sanitize-Sanitize)
1868 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1869 $(end-sanitize-Sanitize)
40e16078 1870 ./configure sun4
ab1cbc67
PB
1871 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1872 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
aaefc574 1873 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
6b9e3a78 1874 # Make links, and run "make diststuff" or "make info" when needed.
a54e05f6 1875 rm -rf proto-toplev ; mkdir proto-toplev
7f9cb3b2 1876 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
a54e05f6
KR
1877 for d in $$dirs ; do \
1878 if [ -d $$d ]; then \
ab1cbc67
PB
1879 if [ ! -f $$d/Makefile ] ; then true ; \
1880 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1881 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
6b9e3a78 1882 elif grep '^info:' $$d/Makefile >/dev/null ; then \
ab1cbc67 1883 (cd $$d ; $(MAKE) info ) || exit 1 ; \
6b9e3a78 1884 fi ; \
7f9cb3b2
KR
1885 if [ -d $$d/proto-$$d.dir ]; then \
1886 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1887 else \
1888 ln -s ../$$d proto-toplev/$$d ; \
1889 fi ; \
a54e05f6 1890 else ln -s ../$$d proto-toplev/$$d ; fi ; \
40e16078 1891 done
3dbe0fa2 1892 cd etc ; $(MAKE) info
5600fbd2 1893 $(MAKE) distclean
a54e05f6 1894 #
40e16078 1895 mkdir proto-toplev/etc
15408b3b
KR
1896 (cd proto-toplev/etc; \
1897 for i in $(ETC_SUPPORT); do \
40e16078 1898 ln -s ../../etc/$$i . ; \
15408b3b 1899 done)
a54e05f6 1900 #
04103845 1901 # Take out texinfo from configurable dirs
40e16078
KR
1902 rm proto-toplev/configure.in
1903 sed -e '/^host_tools=/s/texinfo //' \
40e16078 1904 <configure.in >proto-toplev/configure.in
a54e05f6 1905 #
40e16078 1906 mkdir proto-toplev/texinfo
8d190aa3
KR
1907 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1908 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1909 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1910 if test -r texinfo/util/tex3patch ; then \
1911 mkdir proto-toplev/texinfo/util && \
1912 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1913 else true; fi
d8ea6d40 1914 chmod -R og=u . || chmod og=u `find . -print`
19ebe123
ILT
1915 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1916 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1917 else \
1918 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1919 fi; \
1920 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
b5dbae28
KR
1921
1922do-tar-gz:
1923 echo "==> Making $(TOOL)-$(VER).tar.gz"
1924 -rm -f $(TOOL)-$(VER)
1925 ln -s proto-toplev $(TOOL)-$(VER)
1926 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1927 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
40e16078 1928
484fa12d 1929TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
7f9cb3b2 1930DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
40e16078 1931
96bfa612 1932.PHONY: gas.tar.gz
1e93b49b 1933GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms
96bfa612 1934gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
484fa12d
JW
1935 $(MAKE) -f Makefile.in taz TOOL=gas \
1936 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
40e16078 1937
7f9cb3b2 1938# The FSF "binutils" release includes gprof and ld.
96bfa612 1939.PHONY: binutils.tar.gz
1e93b49b 1940BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms
96bfa612 1941binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
484fa12d 1942 $(MAKE) -f Makefile.in taz TOOL=binutils \
2492f942 1943 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
7f9cb3b2 1944
96bfa612 1945.PHONY: gas+binutils.tar.gz
b0dae4d7 1946GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
96bfa612 1947gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
484fa12d 1948 $(MAKE) -f Makefile.in taz TOOL=gas \
2492f942 1949 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
79337c85 1950
5600fbd2 1951.PHONY: libg++.tar.gz
ab1cbc67 1952LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
5600fbd2 1953libg++.tar.gz: $(DIST_SUPPORT) libg++
484fa12d
JW
1954 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1955 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
5600fbd2 1956
49dfa984
JM
1957GNATS_SUPPORT_DIRS=include libiberty send-pr
1958gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
a0bd8e18 1959 $(MAKE) -f Makefile.in taz TOOL=gnats \
49dfa984
JM
1960 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1961
1d5fcc66 1962.PHONY: gdb.tar.gz
1e93b49b 1963GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
ca2ce3b3 1964GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1d5fcc66
PB
1965gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1966 $(MAKE) -f Makefile.in taz TOOL=gdb \
ca2ce3b3 1967 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1d5fcc66 1968
7166a308 1969.PHONY: newlib.tar.gz
a220ba0f 1970NEWLIB_SUPPORT_DIRS=libgloss
04103845 1971# taz configures for the sun4 target which won't configure newlib.
a220ba0f
SC
1972# We need newlib configured so that the .info files are made.
1973# Unfortunately, it is not enough to just configure newlib separately:
1974# taz will build the .info files but since SUBDIRS won't contain newlib,
1975# distclean won't be run (leaving Makefile, config.status, and the tmp files
1976# used in building the .info files, eg: *.def, *.ref).
4c0b7ebc
DE
1977# The problem isn't solvable however without a lot of extra work because
1978# target libraries are built in subdir $(target_alias) which gets nuked during
1979# the make distclean. For now punt on the issue of shipping newlib info files
1980# with newlib net releases and wait for a day when some native target (sun4?)
1981# supports newlib (if only minimally).
7166a308
KR
1982newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1983 $(MAKE) -f Makefile.in taz TOOL=newlib \
1984 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
6b9e3a78 1985 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
7166a308 1986
79337c85 1987.NOEXPORT:
05992891 1988MAKEOVERRIDES=
79337c85 1989
eb02fd64 1990# end of Makefile.in
This page took 0.370375 seconds and 4 git commands to generate.