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