Delete sim_io_syscalls and sim_io_getstring
[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.
ab1cbc67 165TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
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
ILT
486 all-byacc \
487 all-cvs \
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
ILT
515 all-ld \
516 all-libiberty \
eebe454c
TT
517 $(start-sanitize-ide) \
518 all-libide \
519 $(end-sanitize-ide) \
79337c85
ILT
520 all-m4 \
521 all-make \
522 all-mmalloc \
523 all-opcodes \
524 all-patch \
0f8f1d33 525 all-perl \
79337c85
ILT
526 all-prms \
527 all-rcs \
528 all-readline \
275049c0 529 all-release \
79337c85
ILT
530 all-recode \
531 all-sed \
532 all-send-pr \
533 all-shellutils \
534 all-sim \
2e482734 535 all-sn \
79337c85
ILT
536 all-tar \
537 all-tcl \
538 all-texinfo \
539 all-textutils \
540 all-tgas \
541 all-time \
542 all-uudecode \
eebe454c
TT
543 $(start-sanitize-ide) \
544 all-vmake \
545 $(end-sanitize-ide) \
753d5049
SC
546 all-wdiff
547
4f0b8f27
TL
548# This is a list of the check targets for all of the modules which are
549# compiled using $(FLAGS_TO_PASS).
550#
d237841c
BC
551# The list is in two parts. The first lists those tools which
552# are tested as part of the host's native tool-chain, and not
553# tested in a cross configuration.
554NATIVE_CHECK_MODULES = \
3a671555 555 check-bison \
d237841c 556 check-byacc \
4f0b8f27
TL
557 check-flex
558
d237841c 559CROSS_CHECK_MODULES = \
53c403df 560 check-apache \
6a42d184 561 check-autoconf \
08168809 562 check-automake \
5db223e4 563 check-bash \
6a42d184
DZ
564 check-bfd \
565 check-binutils \
6a42d184 566 check-cvs \
97840afa 567 check-db \
6a42d184
DZ
568 check-dejagnu \
569 check-diff \
570 check-etc \
571 check-fileutils \
97840afa 572 check-findutils \
6a42d184 573 check-find \
6a42d184
DZ
574 check-gas \
575 check-gawk \
ba26181f 576 check-gnuserv \
6a42d184
DZ
577 check-gprof \
578 check-grep \
579 check-gzip \
580 check-hello \
3718029f
ILT
581 $(start-sanitize-ide) \
582 check-ilu \
583 $(end-sanitize-ide) \
6a42d184 584 check-indent \
13d7cbe2 585 check-inet \
6a42d184 586 check-ispell \
97840afa 587 check-itcl \
c070fb34
ILT
588 $(start-sanitize-ide) \
589 check-jstools \
590 $(end-sanitize-ide) \
6a42d184
DZ
591 check-ld \
592 check-libiberty \
eebe454c
TT
593 $(start-sanitize-ide) \
594 check-libide \
595 $(end-sanitize-ide) \
6a42d184
DZ
596 check-m4 \
597 check-make \
598 check-mmcheckoc \
599 check-opcodes \
600 check-patch \
0f8f1d33 601 check-perl \
6a42d184
DZ
602 check-prms \
603 check-rcs \
604 check-readline \
605 check-recode \
606 check-sed \
607 check-send-pr \
608 check-shellutils \
2e482734 609 check-sn \
6a42d184
DZ
610 check-sim \
611 check-tar \
612 check-tcl \
613 check-texinfo \
614 check-textutils \
615 check-tgas \
616 check-time \
617 check-uudecode \
eebe454c
TT
618 $(start-sanitize-ide) \
619 check-vmake \
620 $(end-sanitize-ide) \
6a42d184 621 check-wdiff
d237841c
BC
622
623CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
6a42d184
DZ
624
625# This is a list of the install targets for all of the modules which are
79337c85 626# compiled using $(FLAGS_TO_PASS).
27349293
ILT
627# We put install-opcodes before install-binutils because the installed
628# binutils might be on PATH, and they might need the shared opcodes
629# library.
79337c85 630INSTALL_MODULES = \
53c403df 631 install-apache \
79337c85 632 install-autoconf \
08168809 633 install-automake \
5db223e4 634 install-bash \
79337c85 635 install-bfd \
27349293 636 install-opcodes \
79337c85 637 install-binutils \
3a671555 638 install-bison \
79337c85
ILT
639 install-byacc \
640 install-cvs \
97840afa 641 install-db \
79337c85
ILT
642 install-dejagnu \
643 install-diff \
753d5049 644 install-dosutils \
79337c85
ILT
645 install-etc \
646 install-fileutils \
97840afa 647 install-findutils \
79337c85
ILT
648 install-find \
649 install-flex \
650 install-gas \
651 install-gawk \
ba26181f 652 install-gnuserv \
79337c85
ILT
653 install-gprof \
654 install-grep \
19b1d034 655 install-grez \
79337c85
ILT
656 install-gzip \
657 install-hello \
3718029f
ILT
658 $(start-sanitize-ide) \
659 install-ilu \
660 $(end-sanitize-ide) \
79337c85 661 install-indent \
13d7cbe2 662 install-inet \
79337c85 663 install-ispell \
97840afa 664 install-itcl \
c070fb34
ILT
665 $(start-sanitize-ide) \
666 install-jstools \
667 $(end-sanitize-ide) \
79337c85
ILT
668 install-ld \
669 install-libiberty \
eebe454c
TT
670 $(start-sanitize-ide) \
671 install-libide \
672 $(end-sanitize-ide) \
79337c85
ILT
673 install-m4 \
674 install-make \
675 install-mmalloc \
79337c85 676 install-patch \
0f8f1d33 677 install-perl \
79337c85
ILT
678 install-prms \
679 install-rcs \
680 install-readline \
681 install-recode \
682 install-sed \
683 install-send-pr \
684 install-shellutils \
685 install-sim \
2e482734 686 install-sn \
79337c85
ILT
687 install-tar \
688 install-tcl \
689 install-texinfo \
690 install-textutils \
691 install-tgas \
692 install-time \
693 install-uudecode \
eebe454c
TT
694 $(start-sanitize-ide) \
695 install-vmake \
696 $(end-sanitize-ide) \
79337c85
ILT
697 install-wdiff
698
6a42d184 699# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
700# using $(X11_FLAGS_TO_PASS).
701ALL_X11_MODULES = \
702 all-emacs \
4d802af9 703 all-emacs19 \
04103845 704 all-gdb \
79337c85 705 all-expect \
65e21701 706 all-gash \
0f8f1d33 707 all-guile \
79337c85 708 all-tclX \
9239dc26
ILT
709 all-tk \
710 all-tix
79337c85 711
6a42d184
DZ
712# This is a list of the check targets for all of the modules which are
713# compiled using $(X11_FLAGS_TO_PASS).
714CHECK_X11_MODULES = \
715 check-emacs \
04103845 716 check-gdb \
0f8f1d33 717 check-guile \
6a42d184 718 check-expect \
65e21701 719 check-gash \
9239dc26
ILT
720 check-tclX \
721 check-tk \
722 check-tix
6a42d184 723
79337c85
ILT
724# This is a list of the install targets for all the modules which are
725# compiled using $(X11_FLAGS_TO_PASS).
726INSTALL_X11_MODULES = \
727 install-emacs \
4d802af9 728 install-emacs19 \
04103845 729 install-gdb \
0f8f1d33 730 install-guile \
79337c85 731 install-expect \
65e21701 732 install-gash \
79337c85 733 install-tclX \
9239dc26
ILT
734 install-tk \
735 install-tix
fca4f908 736
6a42d184 737# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
738# using $(TARGET_FLAGS_TO_PASS).
739ALL_TARGET_MODULES = \
ab1cbc67
PB
740 all-target-libio \
741 all-target-libstdc++ \
742 all-target-librx \
743 all-target-libg++ \
744 all-target-newlib \
745 all-target-winsup \
746 all-target-libgloss \
4c0b7ebc 747 all-target-libiberty \
10be59aa 748 all-target-gperf \
4c0b7ebc 749 all-target-examples
79337c85 750
ca2ce3b3
ILT
751# This is a list of the configure targets for all of the modules which
752# are compiled using the target tools.
753CONFIGURE_TARGET_MODULES = \
ab1cbc67
PB
754 configure-target-libio \
755 configure-target-libstdc++ \
756 configure-target-librx \
757 configure-target-libg++ \
758 configure-target-newlib \
759 configure-target-winsup \
760 configure-target-libgloss \
4c0b7ebc 761 configure-target-libiberty \
10be59aa 762 configure-target-gperf \
4c0b7ebc 763 configure-target-examples
ca2ce3b3 764
6a42d184
DZ
765# This is a list of the check targets for all of the modules which are
766# compiled using $(TARGET_FLAGS_TO_PASS).
767CHECK_TARGET_MODULES = \
ab1cbc67
PB
768 check-target-libio \
769 check-target-libstdc++ \
770 check-target-libg++ \
771 check-target-newlib \
772 check-target-winsup \
10be59aa
BK
773 check-target-libiberty \
774 check-target-gperf
6a42d184
DZ
775
776# This is a list of the install targets for all of the modules which are
79337c85
ILT
777# compiled using $(TARGET_FLAGS_TO_PASS).
778INSTALL_TARGET_MODULES = \
ab1cbc67
PB
779 install-target-libio \
780 install-target-libstdc++ \
781 install-target-libg++ \
782 install-target-newlib \
783 install-target-winsup \
784 install-target-libgloss \
10be59aa
BK
785 install-target-libiberty \
786 install-target-gperf
7481617f 787
7508666f
MM
788# This is a list of the targets for which we can do a clean-{target}.
789CLEAN_MODULES = \
13d7cbe2 790 clean-apache \
7508666f 791 clean-autoconf \
08168809 792 clean-automake \
5db223e4 793 clean-bash \
7508666f
MM
794 clean-bfd \
795 clean-binutils \
3a671555 796 clean-bison \
7508666f
MM
797 clean-byacc \
798 clean-cvs \
97840afa 799 clean-db \
7508666f
MM
800 clean-dejagnu \
801 clean-diff \
802 clean-dosutils \
803 clean-etc \
804 clean-fileutils \
97840afa 805 clean-findutils \
7508666f
MM
806 clean-find \
807 clean-flex \
808 clean-gas \
809 clean-gawk \
ba26181f 810 clean-gnuserv \
7508666f
MM
811 clean-gprof \
812 clean-grep \
813 clean-grez \
814 clean-gzip \
815 clean-hello \
3718029f
ILT
816 $(start-sanitize-ide) \
817 clean-ilu \
818 $(end-sanitize-ide) \
7508666f 819 clean-indent \
13d7cbe2 820 clean-inet \
7508666f 821 clean-ispell \
97840afa 822 clean-itcl \
c070fb34
ILT
823 $(start-sanitize-ide) \
824 clean-jstools \
825 $(end-sanitize-ide) \
7508666f
MM
826 clean-ld \
827 clean-libiberty \
eebe454c
TT
828 $(start-sanitize-ide) \
829 clean-libide \
830 $(end-sanitize-ide) \
7508666f
MM
831 clean-m4 \
832 clean-make \
833 clean-mmalloc \
834 clean-opcodes \
835 clean-patch \
836 clean-perl \
837 clean-prms \
838 clean-rcs \
839 clean-readline \
840 clean-release \
841 clean-recode \
842 clean-sed \
843 clean-send-pr \
844 clean-shellutils \
845 clean-sim \
2e482734 846 clean-sn \
7508666f
MM
847 clean-tar \
848 clean-tcl \
849 clean-texinfo \
850 clean-textutils \
851 clean-tgas \
852 clean-time \
853 clean-uudecode \
eebe454c
TT
854 $(start-sanitize-ide) \
855 clean-vmake \
856 $(end-sanitize-ide) \
7508666f
MM
857 clean-wdiff
858
859# All of the target modules that can be cleaned
860CLEAN_TARGET_MODULES = \
861 clean-target-libio \
862 clean-target-libstdc++ \
863 clean-target-librx \
864 clean-target-libg++ \
865 clean-target-newlib \
866 clean-target-winsup \
867 clean-target-libgloss \
868 clean-target-libiberty \
10be59aa 869 clean-target-gperf \
7508666f
MM
870 clean-target-examples
871
872# All of the x11 modules that can be cleaned
873CLEAN_X11_MODULES = \
874 clean-emacs \
875 clean-emacs19 \
876 clean-gdb \
877 clean-expect \
878 clean-gash \
879 clean-guile \
880 clean-tclX \
9239dc26
ILT
881 clean-tk \
882 clean-tix
7508666f 883
79337c85 884# The first rule in the file had better be this one. Don't put any above it.
a59b94d2 885all: all.normal
79337c85
ILT
886.PHONY: all
887
888# The target built for a native build.
889.PHONY: all.normal
890all.normal: \
891 $(ALL_MODULES) \
46d0ca81 892 $(ALL_X11_MODULES) \
2e482734 893 $(ALL_TARGET_MODULES) \
79337c85
ILT
894 all-gcc
895
0ef4728f 896# Do a target for all the subdirectories. A ``make do-X'' will do a
53222cbd
RP
897# ``make X'' in all subdirectories (because, in general, there is a
898# dependency (below) of X upon do-X, a ``make X'' will also do this,
899# but it may do additional work as well).
0ef4728f
ILT
900# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
901# because it is so large that it can easily overflow the command line
902# length limit on some systems.
79337c85 903DO_X = \
79337c85
ILT
904 do-clean \
905 do-distclean \
906 do-dvi \
907 do-info \
908 do-install-info \
909 do-installcheck \
910 do-mostlyclean \
ca2ce3b3 911 do-maintainer-clean \
753d5049 912 do-TAGS
79337c85
ILT
913.PHONY: $(DO_X)
914$(DO_X):
0ef4728f 915 @target=`echo $@ | sed -e 's/^do-//'`; \
5cc73086 916 r=`pwd`; export r; \
81eb5025 917 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 918 $(SET_LIB_PATH) \
ab1cbc67 919 for i in $(SUBDIRS) -dummy-; do \
36286a3e 920 if [ -f ./$$i/Makefile ]; then \
0ef4728f 921 case $$i in \
0ef4728f 922 gcc) \
6d681784 923 for flag in $(EXTRA_GCC_FLAGS); do \
0f8f1d33 924 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
6d681784 925 done; \
0ef4728f
ILT
926 ;; \
927 *) \
6d681784 928 for flag in $(EXTRA_HOST_FLAGS); do \
0f8f1d33 929 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
6d681784 930 done; \
0ef4728f
ILT
931 ;; \
932 esac ; \
d29cd970 933 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
0ef4728f 934 if (cd ./$$i; \
6d681784 935 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
64434418 936 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
753d5049 937 "RANLIB=$${RANLIB}" \
d29cd970 938 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
6d681784 939 $${target}); \
0ef4728f
ILT
940 then true; else exit 1; fi; \
941 else true; fi; \
ec7a8792
ILT
942 done
943 @target=`echo $@ | sed -e 's/^do-//'`; \
944 r=`pwd`; export r; \
81eb5025 945 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 946 $(SET_LIB_PATH) \
ab1cbc67
PB
947 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
948 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
949 for flag in $(EXTRA_TARGET_FLAGS); do \
0f8f1d33 950 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
ab1cbc67 951 done; \
d29cd970 952 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
ab1cbc67
PB
953 if (cd $(TARGET_SUBDIR)/$$i; \
954 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
64434418 955 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
ab1cbc67 956 "RANLIB=$${RANLIB}" \
d29cd970 957 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
ab1cbc67
PB
958 $${target}); \
959 then true; else exit 1; fi; \
960 else true; fi; \
0ef4728f 961 done
fb90daeb 962
79337c85
ILT
963# Here are the targets which correspond to the do-X targets.
964
65088029 965.PHONY: info installcheck dvi install-info
ca2ce3b3
ILT
966.PHONY: clean distclean mostlyclean maintainer-clean realclean
967.PHONY: local-clean local-distclean local-maintainer-clean
0ef4728f 968info: do-info
1a14993c 969installcheck: do-installcheck
0ef4728f 970dvi: do-dvi
9a9e8e7f 971
97840afa
TT
972# Make sure makeinfo is built before we do a `make info'.
973do-info: all-texinfo
974
f35c6160 975install-info: do-install-info dir.info
81eb5025 976 s=`cd $(srcdir); pwd`; export s; \
72c09fbc
SC
977 if [ -f dir.info ] ; then \
978 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
50fbe976 979 else true ; fi
4d714963 980
0ef4728f 981local-clean:
7fed4078 982 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
3b30df82 983
0ef4728f 984local-distclean:
2e482734 985 -rm -f Makefile config.status config.cache
8c5bc3e3
ILT
986 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
987 rm -rf $(TARGET_SUBDIR); \
988 else true; fi
7fcfdcf7 989
ca2ce3b3
ILT
990local-maintainer-clean:
991 @echo "This command is intended for maintainers to use;"
992 @echo "it deletes files that may require special tools to rebuild."
993
0ef4728f
ILT
994clean: do-clean local-clean
995mostlyclean: do-mostlyclean local-clean
996distclean: do-distclean local-clean local-distclean
ca2ce3b3
ILT
997maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
998maintainer-clean: local-distclean
999realclean: maintainer-clean
0ef4728f 1000
7508666f
MM
1001# This rule is used to clean specific modules.
1002.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1003$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1004 @dir=`echo $@ | sed -e 's/clean-//'`; \
1005 if [ -f ./$${dir}/Makefile ] ; then \
1006 r=`pwd`; export r; \
81eb5025 1007 s=`cd $(srcdir); pwd`; export s; \
7508666f
MM
1008 $(SET_LIB_PATH) \
1009 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1010 else \
1011 true; \
1012 fi
1013
1014.PHONY: $(CLEAN_TARGET_MODULES)
1015$(CLEAN_TARGET_MODULES):
1016 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
062aded9 1017 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
7508666f
MM
1018 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1019 r=`pwd`; export r; \
81eb5025 1020 s=`cd $(srcdir); pwd`; export s; \
7508666f
MM
1021 $(SET_LIB_PATH) \
1022 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1023 else \
1024 true; \
1025 fi
1026
1027clean-target: $(CLEAN_TARGET_MODULES)
1028
65088029
ILT
1029# Check target.
1030
1031.PHONY: check
1032check: $(CHECK_MODULES) \
1033 $(CHECK_TARGET_MODULES) \
1034 $(CHECK_X11_MODULES) \
1035 check-gcc
1036
79337c85 1037# Installation targets.
4d714963 1038
04103845 1039.PHONY: install uninstall source-vault binary-vault vault-install
98a33b6d 1040install: $(INSTALL_TARGET)
b26ff9d8 1041
79337c85
ILT
1042uninstall:
1043 @echo "the uninstall target is not supported in this tree"
1044
04103845
DE
1045source-vault:
1046 $(MAKE) -f ./release/Build-A-Release \
1047 host=$(host_alias) source-vault
1048
1049binary-vault:
1050 $(MAKE) -f ./release/Build-A-Release \
1051 host=$(host_alias) target=$(target_alias)
1052
275049c0
JK
1053vault-install:
1054 @if [ -f ./release/vault-install ] ; then \
1055 ./release/vault-install $(host_alias) $(target_alias) ; \
96bfa612
KR
1056 else \
1057 true ; \
275049c0
JK
1058 fi
1059
79337c85 1060.PHONY: install.all
06a07944
RP
1061install.all: install-no-fixedincludes
1062 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1063 r=`pwd` ; export r ; \
b6ae0f10 1064 $(SET_LIB_PATH) \
06a07944
RP
1065 (cd ./gcc; \
1066 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1067 else \
1068 true ; \
1069 fi
5a63b336 1070
424c7ca7 1071# inet-install is used because the I*Net wants DejaGNU installed but
f2b43566 1072# not built. Similarly, gzip is built but not installed.
424c7ca7 1073inet-install:
f2b43566 1074 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
424c7ca7 1075
96bfa612 1076# install-no-fixedincludes is used because Cygnus can not distribute
79337c85
ILT
1077# the fixed header files.
1078.PHONY: install-no-fixedincludes
1079install-no-fixedincludes: \
ff290baf 1080 installdirs \
79337c85
ILT
1081 $(INSTALL_MODULES) \
1082 $(INSTALL_TARGET_MODULES) \
96bfa612 1083 $(INSTALL_X11_MODULES) \
f35c6160 1084 gcc-no-fixedincludes
d1bea4c7 1085
5cc24596 1086# Install the gcc headers files, but not the fixed include files,
79337c85
ILT
1087# which Cygnus is not allowed to distribute. This rule is very
1088# dependent on the workings of the gcc Makefile.in.
1089.PHONY: gcc-no-fixedincludes
06a07944 1090gcc-no-fixedincludes:
5cc24596
PB
1091 @if [ -f ./gcc/Makefile ]; then \
1092 rm -rf gcc/tmp-include; \
1093 mv gcc/include gcc/tmp-include 2>/dev/null; \
1094 mkdir gcc/include; \
7f9cb3b2 1095 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
753d5049 1096 touch gcc/stmp-fixinc gcc/include/fixed; \
a54e05f6 1097 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
5cc73086 1098 r=`pwd`; export r; \
81eb5025 1099 s=`cd $(srcdir); pwd` ; export s; \
b6ae0f10 1100 $(SET_LIB_PATH) \
5cc24596
PB
1101 (cd ./gcc; \
1102 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1103 rm -rf gcc/include; \
1104 mv gcc/tmp-include gcc/include 2>/dev/null; \
1105 else true; fi
dcbfc14d 1106
2ec9f3fd
KS
1107# start-sanitize-ide
1108# Install Foundry. Avoid installing a bunch of stuff we don't need.
1109install-foundry:
1110 mods="$(INSTALL_MODULES)"; \
1111 x11_mods="$(INSTALL_X11_MODULES)"; \
1112 for d in install-tcl install-tk install-itcl install-tix install-ilu; do \
1113 mods="`echo $${mods} | sed -e "s/$$d//"`"; \
1114 x11_mods="`echo $${x11_mods} | sed -e "s/$$d//"`"; \
1115 done; \
1116 $(MAKE) INSTALL_MODULES="$${mods}" INSTALL_X11_MODULES="$${x11_mods}" install
1117 for d in tcl tk itcl tix ilu; do \
1118 if [ -f $$d/Makefile ]; then \
1119 r=`pwd`; export r; \
1120 s=`cd $(srcdir); pwd`; export s; \
1121 $(SET_LIB_PATH) \
1122 (cd $$d; $(MAKE) $(FLAGS_TO_PASS) install-minimal); \
1123 else \
1124 true; \
1125 fi; \
1126 done
1127# end-sanitize-ide
1128
79337c85
ILT
1129# This rule is used to build the modules which use FLAGS_TO_PASS. To
1130# build a target all-X means to cd to X and make all.
3de70f1d 1131#
055cca84 1132# all-gui, and all-libproc are handled specially because
4d802af9
MT
1133# they are still experimental, and if they fail to build, that
1134# shouldn't stop "make all".
04103845
DE
1135.PHONY: $(ALL_MODULES) all-gui all-libproc
1136$(ALL_MODULES) all-gui all-libproc:
79337c85 1137 @dir=`echo $@ | sed -e 's/all-//'`; \
472af17f
ILT
1138 if [ -f ./$${dir}/Makefile ] ; then \
1139 r=`pwd`; export r; \
81eb5025 1140 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1141 $(SET_LIB_PATH) \
472af17f 1142 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
07362bd9 1143 else \
79337c85 1144 true; \
07362bd9
DZ
1145 fi
1146
80cbf870
ILT
1147# These rules are used to check the modules which use FLAGS_TO_PASS.
1148# To build a target check-X means to cd to X and make check. Some
1149# modules are only tested in a native toolchain.
4f0b8f27 1150
d237841c
BC
1151.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1152$(NATIVE_CHECK_MODULES):
39cc6dae
RS
1153 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1154 dir=`echo $@ | sed -e 's/check-//'`; \
472af17f
ILT
1155 if [ -f ./$${dir}/Makefile ] ; then \
1156 r=`pwd`; export r; \
81eb5025 1157 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1158 $(SET_LIB_PATH) \
472af17f
ILT
1159 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1160 else \
1161 true; \
4f0b8f27
TL
1162 fi; \
1163 fi
1164
1165$(CROSS_CHECK_MODULES):
6a42d184
DZ
1166 @dir=`echo $@ | sed -e 's/check-//'`; \
1167 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1168 r=`pwd`; export r; \
81eb5025 1169 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1170 $(SET_LIB_PATH) \
6a42d184
DZ
1171 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1172 else \
1173 true; \
1174 fi
1175
79337c85
ILT
1176# This rule is used to install the modules which use FLAGS_TO_PASS.
1177# To build a target install-X means to cd to X and make install.
1178.PHONY: $(INSTALL_MODULES)
ff290baf 1179$(INSTALL_MODULES): installdirs
79337c85
ILT
1180 @dir=`echo $@ | sed -e 's/install-//'`; \
1181 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1182 r=`pwd`; export r; \
81eb5025 1183 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1184 $(SET_LIB_PATH) \
f35c6160 1185 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
07362bd9 1186 else \
79337c85 1187 true; \
07362bd9
DZ
1188 fi
1189
ca2ce3b3
ILT
1190# This rule is used to configure the modules which are built with the
1191# target tools.
1192.PHONY: $(CONFIGURE_TARGET_MODULES)
1193$(CONFIGURE_TARGET_MODULES):
ab1cbc67 1194 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
354a86c7 1195 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
59d3634c 1196 r=`pwd`; export r; \
f2b43566
ILT
1197 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1198 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1199 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1200 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1201 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1202 else \
1203 echo "Multilibs changed for $${dir}, reconfiguring"; \
1204 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1205 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1206 fi; \
354a86c7 1207 else \
354a86c7
MM
1208 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1209 fi; \
062aded9 1210 fi; \
354a86c7
MM
1211 fi; exit 0 # break command into two pieces
1212 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
3e288e27
SG
1213 if [ ! -d $(TARGET_SUBDIR) ]; then \
1214 true; \
1215 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
ca2ce3b3
ILT
1216 true; \
1217 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
efd7b806 1218 if [ -d $(srcdir)/$${dir} ]; then \
ab1cbc67 1219 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
efd7b806 1220 r=`pwd`; export r; \
81eb5025 1221 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1222 $(SET_LIB_PATH) \
efd7b806
SC
1223 AR="$(AR_FOR_TARGET)"; export AR; \
1224 AS="$(AS_FOR_TARGET)"; export AS; \
1225 CC="$(CC_FOR_TARGET)"; export CC; \
1226 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1227 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1228 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
b6ae0f10 1229 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
054f9ada 1230 LD="$(LD_FOR_TARGET)"; export LD; \
276c2d7d 1231 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
efd7b806
SC
1232 NM="$(NM_FOR_TARGET)"; export NM; \
1233 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
d29cd970 1234 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
19b1d034 1235 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
ab1cbc67 1236 cd $(TARGET_SUBDIR)/$${dir}; \
283a2b3d
DE
1237 case $(srcdir) in \
1238 /*) \
1239 topdir=$(srcdir) ;; \
1240 *) \
1241 case "$(TARGET_SUBDIR)" in \
1242 .) topdir="../$(srcdir)" ;; \
1243 *) topdir="../../$(srcdir)" ;; \
1244 esac ;; \
1245 esac; \
1246 if [ "$(srcdir)" = "." ] ; then \
1247 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
81eb5025 1248 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
0f8f1d33
TT
1249 if [ -f Makefile ]; then \
1250 if $(MAKE) distclean; then \
1251 true; \
1252 else \
1253 exit 1; \
1254 fi; \
1255 else \
1256 true; \
1257 fi; \
283a2b3d
DE
1258 else \
1259 exit 1; \
1260 fi; \
1261 else \
1262 true; \
1263 fi; \
1264 srcdiroption="--srcdir=."; \
1265 libsrcdir="."; \
1266 else \
1267 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
81eb5025 1268 libsrcdir="$$s/$${dir}"; \
283a2b3d
DE
1269 fi; \
1270 if [ -f $${libsrcdir}/configure ] ; then \
1271 $(SHELL) $${libsrcdir}/configure \
1272 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1273 --with-target-subdir="$(TARGET_SUBDIR)"; \
19b1d034 1274 else \
81eb5025 1275 $(SHELL) $$s/configure \
283a2b3d
DE
1276 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1277 --with-target-subdir="$(TARGET_SUBDIR)"; \
19b1d034 1278 fi; \
efd7b806
SC
1279 else \
1280 true; \
9908eb6a 1281 fi; \
ca2ce3b3
ILT
1282 else \
1283 true; \
1284 fi
1285
6a42d184
DZ
1286# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1287# To build a target all-X means to cd to X and make all.
79337c85
ILT
1288.PHONY: $(ALL_TARGET_MODULES)
1289$(ALL_TARGET_MODULES):
ab1cbc67
PB
1290 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1291 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1292 r=`pwd`; export r; \
81eb5025 1293 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1294 $(SET_LIB_PATH) \
ab1cbc67 1295 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
07362bd9 1296 else \
79337c85 1297 true; \
07362bd9
DZ
1298 fi
1299
6a42d184
DZ
1300# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1301# To build a target install-X means to cd to X and make install.
1302.PHONY: $(CHECK_TARGET_MODULES)
1303$(CHECK_TARGET_MODULES):
136ca05d 1304 @dir=`echo $@ | sed -e 's/check-target-//'`; \
ab1cbc67 1305 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1306 r=`pwd`; export r; \
81eb5025 1307 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1308 $(SET_LIB_PATH) \
ab1cbc67 1309 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
6a42d184
DZ
1310 else \
1311 true; \
1312 fi
1313
79337c85
ILT
1314# This rule is used to install the modules which use
1315# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1316# and make install.
1317.PHONY: $(INSTALL_TARGET_MODULES)
ff290baf 1318$(INSTALL_TARGET_MODULES): installdirs
ab1cbc67
PB
1319 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1320 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 1321 r=`pwd`; export r; \
81eb5025 1322 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1323 $(SET_LIB_PATH) \
ab1cbc67
PB
1324 (cd $(TARGET_SUBDIR)/$${dir}; \
1325 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
07362bd9 1326 else \
79337c85 1327 true; \
07362bd9
DZ
1328 fi
1329
6a42d184 1330# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
1331# To build a target all-X means to cd to X and make all.
1332.PHONY: $(ALL_X11_MODULES)
1333$(ALL_X11_MODULES):
1334 @dir=`echo $@ | sed -e 's/all-//'`; \
1335 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1336 r=`pwd`; export r; \
81eb5025 1337 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1338 $(SET_LIB_PATH) \
79337c85
ILT
1339 (cd $${dir}; \
1340 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
07362bd9 1341 else \
79337c85 1342 true; \
07362bd9
DZ
1343 fi
1344
6a42d184
DZ
1345# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1346# To build a target check-X means to cd to X and make all.
1347.PHONY: $(CHECK_X11_MODULES)
1348$(CHECK_X11_MODULES):
1349 @dir=`echo $@ | sed -e 's/check-//'`; \
1350 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1351 r=`pwd`; export r; \
81eb5025 1352 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1353 $(SET_LIB_PATH) \
6a42d184
DZ
1354 (cd $${dir}; \
1355 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1356 else \
1357 true; \
1358 fi
1359
1360# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
1361# To build a target install-X means to cd to X and make install.
1362.PHONY: $(INSTALL_X11_MODULES)
48a3d5e5 1363$(INSTALL_X11_MODULES): installdirs
6a42d184 1364 @dir=`echo $@ | sed -e 's/install-//'`; \
79337c85 1365 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 1366 r=`pwd`; export r; \
81eb5025 1367 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1368 $(SET_LIB_PATH) \
79337c85
ILT
1369 (cd $${dir}; \
1370 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
07362bd9 1371 else \
79337c85 1372 true; \
07362bd9
DZ
1373 fi
1374
79337c85
ILT
1375# gcc is the only module which uses GCC_FLAGS_TO_PASS.
1376.PHONY: all-gcc
1377all-gcc:
1378 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1379 r=`pwd`; export r; \
81eb5025 1380 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1381 $(SET_LIB_PATH) \
79337c85 1382 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
07362bd9 1383 else \
79337c85 1384 true; \
07362bd9
DZ
1385 fi
1386
4c0b7ebc
DE
1387.PHONY: all-bootstrap
1388all-bootstrap:
1389 @if [ -f ./gcc/Makefile ] ; then \
1390 r=`pwd`; export r; \
81eb5025 1391 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1392 $(SET_LIB_PATH) \
4c0b7ebc
DE
1393 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1394 else \
1395 true; \
1396 fi
1397
65088029
ILT
1398.PHONY: check-gcc
1399check-gcc:
1400 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1401 r=`pwd`; export r; \
81eb5025 1402 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1403 $(SET_LIB_PATH) \
65088029
ILT
1404 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1405 else \
1406 true; \
1407 fi
1408
79337c85
ILT
1409.PHONY: install-gcc
1410install-gcc:
1411 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 1412 r=`pwd`; export r; \
81eb5025 1413 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1414 $(SET_LIB_PATH) \
79337c85 1415 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
07362bd9 1416 else \
79337c85 1417 true; \
07362bd9
DZ
1418 fi
1419
753d5049
SC
1420
1421# EXPERIMENTAL STUFF
1422# This rule is used to install the modules which use FLAGS_TO_PASS.
1423# To build a target install-X means to cd to X and make install.
09985c96 1424.PHONY: install-dosrel
ff290baf 1425install-dosrel: installdirs info
753d5049
SC
1426 @dir=`echo $@ | sed -e 's/install-//'`; \
1427 if [ -f ./$${dir}/Makefile ] ; then \
1428 r=`pwd`; export r; \
81eb5025 1429 s=`cd $(srcdir); pwd`; export s; \
b6ae0f10 1430 $(SET_LIB_PATH) \
753d5049
SC
1431 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1432 else \
1433 true; \
1434 fi
1435
09985c96 1436install-dosrel-fake:
a987271c 1437
753d5049 1438
79337c85 1439# This is a list of inter-dependencies among modules.
53c403df 1440all-apache:
3a671555 1441all-autoconf: all-m4 all-texinfo
08168809 1442all-automake:
5db223e4 1443all-bash:
79337c85 1444all-bfd:
3a671555 1445all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
97036944 1446all-bison: all-texinfo
79337c85 1447all-byacc:
79337c85 1448all-cvs:
2e482734 1449all-db:
4d802af9 1450all-dejagnu: all-tcl all-expect all-tk
79337c85
ILT
1451all-diff: all-libiberty
1452all-emacs:
3a671555 1453all-emacs19: all-bison all-byacc
79337c85 1454all-etc:
4c0b7ebc
DE
1455configure-target-examples: $(ALL_GCC)
1456all-target-examples: configure-target-examples
c6ba9ae0 1457all-expect: all-tcl all-tk
275049c0 1458all-fileutils: all-libiberty
97840afa 1459all-findutils:
79337c85 1460all-find:
3a671555 1461all-flex: all-libiberty all-bison all-byacc
79337c85 1462all-gas: all-libiberty all-opcodes all-bfd
65e21701 1463all-gash: all-tcl
79337c85 1464all-gawk:
fc3524a9 1465ALL_GCC = all-gcc
3a671555
JM
1466all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1467all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
2ec9f3fd 1468GDB_TK = all-tk all-tcl all-itcl all-tix all-libide
3a671555 1469all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
ba26181f 1470all-gnuserv:
10be59aa
BK
1471configure-target-gperf: $(ALL_GCC)
1472all-target-gperf: configure-target-gperf all-target-libiberty all-target-libg++
b6ae0f10 1473all-gprof: all-libiberty all-bfd all-opcodes
6214eb23 1474all-grep: all-libiberty
b6ae0f10 1475all-grez: all-libiberty all-bfd all-opcodes
ab1cbc67 1476all-gui: all-gdb all-libproc all-target-librx
0f8f1d33 1477all-guile:
79337c85
ILT
1478all-gzip: all-libiberty
1479all-hello: all-libiberty
3718029f
ILT
1480# start-sanitize-ide
1481all-ilu:
1482# end-sanitize-ide
79337c85 1483all-indent:
8d1d94b6 1484all-inet: all-tcl all-send-pr all-perl
3585593d 1485all-ispell: all-emacs19
754a6784 1486all-itcl: all-tcl all-tk
c070fb34 1487# start-sanitize-ide
2ec9f3fd 1488all-jstools: all-tcl all-tk all-tix all-libide
c070fb34 1489# end-sanitize-ide
3a671555 1490all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
283a2b3d 1491configure-target-libg++: $(ALL_GCC) configure-target-librx
ab1cbc67
PB
1492all-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++
1493configure-target-libgloss: $(ALL_GCC)
283a2b3d 1494all-target-libgloss: configure-target-libgloss configure-target-newlib
ab1cbc67
PB
1495configure-target-libio: $(ALL_GCC)
1496all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
2ec9f3fd 1497check-target-libio: all-target-libstdc++
79337c85 1498all-libiberty:
eebe454c 1499# start-sanitize-ide
8d74b2fa 1500all-libide: all-tcl all-tk all-itcl all-ilu
eebe454c 1501# end-sanitize-ide
ab1cbc67
PB
1502configure-target-librx: $(ALL_GCC) configure-target-newlib
1503all-target-librx: configure-target-librx
1504configure-target-libstdc++: $(ALL_GCC)
1505all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
79337c85
ILT
1506all-m4: all-libiberty
1507all-make: all-libiberty
1508all-mmalloc:
ab1cbc67
PB
1509configure-target-newlib: $(ALL_GCC)
1510all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
b6ae0f10 1511all-opcodes: all-bfd all-libiberty
be2c65d3 1512all-patch: all-libiberty
0f8f1d33 1513all-perl:
b255ccdb 1514all-prms: all-libiberty
79337c85
ILT
1515all-rcs:
1516all-readline:
1517all-recode: all-libiberty
ac259c28
JM
1518all-sed: all-libiberty
1519all-send-pr: all-prms
79337c85 1520all-shellutils:
97036944 1521all-sim: all-libiberty all-bfd all-opcodes all-readline
f2c2ab6b 1522all-sn: all-tcl all-tk all-tix all-itcl all-db all-grep
07362bd9 1523all-tar: all-libiberty
79337c85
ILT
1524all-tcl:
1525all-tclX: all-tcl all-tk
1526all-tk: all-tcl
1527all-texinfo: all-libiberty
1528all-textutils:
b6ae0f10 1529all-tgas: all-libiberty all-bfd all-opcodes
79337c85 1530all-time:
c446cc8b 1531all-tix: all-tcl all-tk
eebe454c 1532# start-sanitize-ide
2ec9f3fd 1533all-vmake: all-tcl all-tk all-itcl all-libide all-tix all-libide
eebe454c 1534# end-sanitize-ide
79337c85 1535all-wdiff:
97840afa 1536all-target-winsup: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
ab1cbc67 1537configure-target-winsup: configure-target-newlib
79337c85 1538all-uudecode: all-libiberty
ab1cbc67
PB
1539configure-target-libiberty: $(ALL_GCC)
1540all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
0f8f1d33 1541all-target: $(ALL_TARGET_MODULES)
f2c2ab6b 1542install-itcl: install-tcl
0f8f1d33 1543install-target: $(INSTALL_TARGET_MODULES)
07362bd9 1544
79337c85 1545### other supporting targets
07362bd9 1546
79337c85
ILT
1547MAKEDIRS= \
1548 $(prefix) \
9deb9485 1549 $(exec_prefix)
ff290baf
ILT
1550.PHONY: installdirs
1551installdirs: mkinstalldirs
fab3dd2d 1552 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
23e3e7f9 1553
79337c85
ILT
1554dir.info: do-install-info
1555 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1556 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1557 mv -f dir.info.new dir.info ; \
1558 else true ; \
72c09fbc 1559 fi
6b7e5998 1560
b1cceba2
DZ
1561dist:
1562 @echo "Building a full distribution of this tree isn't done"
1563 @echo "via 'make dist'. Check out the etc/ subdirectory"
1564
eb02fd64
RP
1565etags tags: TAGS
1566
753d5049
SC
1567# Right now this just builds TAGS in each subdirectory. emacs19 has the
1568# ability to use several tags files at once, so there is probably no need
1569# to combine them into one big TAGS file (like CVS 1.3 does). We could
1570# (if we felt like it) have this Makefile write a piece of elisp which
1571# the user could load to tell emacs19 where all the TAGS files we just
1572# built are.
1573TAGS: do-TAGS
eb02fd64 1574
eb02fd64
RP
1575# with the gnu make, this is done automatically.
1576
01ec9588 1577Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1578 $(SHELL) ./config.status
eb02fd64 1579
11954bf1 1580#
01ec9588 1581# Support for building net releases
11954bf1 1582
01ec9588
JK
1583# Files in devo used in any net release.
1584# ChangeLog omitted because it may refer to files which are not in this
1585# distribution (perhaps it would be better to include it anyway).
d94d255d 1586DEVO_SUPPORT= README Makefile.in configure configure.in \
9823504d 1587 config.guess config.sub config move-if-change \
5f69e8bc 1588 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
08499fc2 1589 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
6e68a23e 1590 mkinstalldirs ltconfig ltmain.sh missing ylwrap
01ec9588
JK
1591
1592# Files in devo/etc used in any net release.
1593# ChangeLog omitted because it may refer to files which are not in this
1594# distribution (perhaps it would be better to include it anyway).
f046ec67
JM
1595ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1596 make-stds.texi standards.info*
01ec9588 1597
40e16078
KR
1598# When you use `make setup-dirs' or `make taz' you should always redefine
1599# this macro.
1600SUPPORT_FILES = list-of-support-files-for-tool-in-question
40e16078 1601
a54e05f6
KR
1602.PHONY: taz
1603
484fa12d
JW
1604taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1605 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
484fa12d
JW
1606 # Take out texinfo from a few places; make simple BISON=bison line.
1607 sed -e '/^all\.normal: /s/\all-texinfo //' \
1608 -e '/^ install-texinfo /d' \
484fa12d
JW
1609 <Makefile.in >tmp
1610 mv -f tmp Makefile.in
65e21701 1611 #
1d5fcc66
PB
1612 $(start-sanitize-Sanitize)
1613 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1614 $(end-sanitize-Sanitize)
40e16078 1615 ./configure sun4
ab1cbc67
PB
1616 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1617 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
aaefc574 1618 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
6b9e3a78 1619 # Make links, and run "make diststuff" or "make info" when needed.
a54e05f6 1620 rm -rf proto-toplev ; mkdir proto-toplev
7f9cb3b2 1621 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
a54e05f6
KR
1622 for d in $$dirs ; do \
1623 if [ -d $$d ]; then \
ab1cbc67
PB
1624 if [ ! -f $$d/Makefile ] ; then true ; \
1625 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1626 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
6b9e3a78 1627 elif grep '^info:' $$d/Makefile >/dev/null ; then \
ab1cbc67 1628 (cd $$d ; $(MAKE) info ) || exit 1 ; \
6b9e3a78 1629 fi ; \
7f9cb3b2
KR
1630 if [ -d $$d/proto-$$d.dir ]; then \
1631 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1632 else \
1633 ln -s ../$$d proto-toplev/$$d ; \
1634 fi ; \
a54e05f6 1635 else ln -s ../$$d proto-toplev/$$d ; fi ; \
40e16078 1636 done
3dbe0fa2 1637 cd etc ; $(MAKE) info
5600fbd2 1638 $(MAKE) distclean
a54e05f6 1639 #
40e16078 1640 mkdir proto-toplev/etc
15408b3b
KR
1641 (cd proto-toplev/etc; \
1642 for i in $(ETC_SUPPORT); do \
40e16078 1643 ln -s ../../etc/$$i . ; \
15408b3b 1644 done)
a54e05f6 1645 #
04103845 1646 # Take out texinfo from configurable dirs
40e16078
KR
1647 rm proto-toplev/configure.in
1648 sed -e '/^host_tools=/s/texinfo //' \
40e16078 1649 <configure.in >proto-toplev/configure.in
a54e05f6 1650 #
40e16078 1651 mkdir proto-toplev/texinfo
8d190aa3
KR
1652 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1653 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1654 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1655 if test -r texinfo/util/tex3patch ; then \
1656 mkdir proto-toplev/texinfo/util && \
1657 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1658 else true; fi
a561909f 1659 chmod og=u `find . -print`
19ebe123
ILT
1660 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1661 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1662 else \
1663 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1664 fi; \
1665 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
b5dbae28
KR
1666
1667do-tar-gz:
1668 echo "==> Making $(TOOL)-$(VER).tar.gz"
1669 -rm -f $(TOOL)-$(VER)
1670 ln -s proto-toplev $(TOOL)-$(VER)
1671 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1672 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
40e16078 1673
484fa12d 1674TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
7f9cb3b2 1675DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
40e16078 1676
96bfa612 1677.PHONY: gas.tar.gz
2e482734 1678GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
96bfa612 1679gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
484fa12d
JW
1680 $(MAKE) -f Makefile.in taz TOOL=gas \
1681 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
40e16078 1682
7f9cb3b2 1683# The FSF "binutils" release includes gprof and ld.
96bfa612 1684.PHONY: binutils.tar.gz
2e482734 1685BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
96bfa612 1686binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
484fa12d 1687 $(MAKE) -f Makefile.in taz TOOL=binutils \
2492f942 1688 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
7f9cb3b2 1689
96bfa612 1690.PHONY: gas+binutils.tar.gz
a54e05f6 1691GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
96bfa612 1692gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
484fa12d 1693 $(MAKE) -f Makefile.in taz TOOL=gas \
2492f942 1694 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
79337c85 1695
5600fbd2 1696.PHONY: libg++.tar.gz
ab1cbc67 1697LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
5600fbd2 1698libg++.tar.gz: $(DIST_SUPPORT) libg++
484fa12d
JW
1699 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1700 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
5600fbd2 1701
49dfa984
JM
1702GNATS_SUPPORT_DIRS=include libiberty send-pr
1703gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
a0bd8e18 1704 $(MAKE) -f Makefile.in taz TOOL=gnats \
49dfa984
JM
1705 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1706
1d5fcc66 1707.PHONY: gdb.tar.gz
81597186 1708GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
ca2ce3b3 1709GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1d5fcc66
PB
1710gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1711 $(MAKE) -f Makefile.in taz TOOL=gdb \
ca2ce3b3 1712 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1d5fcc66 1713
7166a308 1714.PHONY: newlib.tar.gz
a220ba0f 1715NEWLIB_SUPPORT_DIRS=libgloss
04103845 1716# taz configures for the sun4 target which won't configure newlib.
a220ba0f
SC
1717# We need newlib configured so that the .info files are made.
1718# Unfortunately, it is not enough to just configure newlib separately:
1719# taz will build the .info files but since SUBDIRS won't contain newlib,
1720# distclean won't be run (leaving Makefile, config.status, and the tmp files
1721# used in building the .info files, eg: *.def, *.ref).
4c0b7ebc
DE
1722# The problem isn't solvable however without a lot of extra work because
1723# target libraries are built in subdir $(target_alias) which gets nuked during
1724# the make distclean. For now punt on the issue of shipping newlib info files
1725# with newlib net releases and wait for a day when some native target (sun4?)
1726# supports newlib (if only minimally).
7166a308
KR
1727newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1728 $(MAKE) -f Makefile.in taz TOOL=newlib \
1729 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
6b9e3a78 1730 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
7166a308 1731
79337c85 1732.NOEXPORT:
05992891 1733MAKEOVERRIDES=
79337c85
ILT
1734
1735# start-sanitize-chill
1736## This is ugly, but I don't want GNU make to put these variables in
1737## the environment. Older makes will see this as a set of targets
1738## with no dependencies and no actions.
1739unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1740# end-sanitize-chill
1741
eb02fd64 1742# end of Makefile.in
This page took 0.323835 seconds and 4 git commands to generate.