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