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