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