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