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