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