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