* interp.c: (SYS_wait): Define as SYS_wait4 if available and
[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
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
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
4d714963 31datadir = $(prefix)/lib
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
51489233 89NM = nm
5cc73086
KR
90# Not plain GZIP, since gzip looks there for extra command-line options.
91GZIPPROG = gzip
eb02fd64 92
40e16078 93# BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
5cc73086
KR
94BISON = `if [ -f $$r/byacc/byacc ] ; \
95 then echo $$r/byacc/byacc ; \
378fd382 96 else echo byacc ; \
06a07944 97 fi`
2645fb0c 98
5cc73086
KR
99LEX = `if [ -f $$r/flex/flex ] ; \
100 then echo $$r/flex/flex ; \
2198e4ba
MT
101 else echo flex ; fi`
102
5cc73086
KR
103M4 = `if [ -f $$r/m4/m4 ] ; \
104 then echo $$r/m4/m4 ; \
65e21701
KR
105 else echo m4 ; fi`
106
5cc73086
KR
107MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
108 then echo $$r/texinfo/makeinfo/makeinfo ; \
77806c3e 109 else echo makeinfo ; fi`
484fa12d 110
9823504d
ILT
111# This just becomes part of the MAKEINFO definition passed down to
112# sub-makes. It lets flags be given on the command line while still
113# using the makeinfo from the object tree.
114MAKEINFOFLAGS =
b772d75e 115
5cc73086
KR
116EXPECT = `if [ -f $$r/expect/expect ] ; \
117 then echo $$r/expect/expect ; \
a54e05f6
KR
118 else echo expect ; fi`
119
120RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
121 then echo $${srcroot}/dejagnu/runtest ; \
6a42d184
DZ
122 else echo runtest ; fi`
123
f980fcfb
JG
124
125# libraries that may need to be augmented on a system-by-system basis
126X11_LIB = -lX11
127
e85e07cb 128# compilers to use to create programs which must be run in the build
440868a0
ILT
129# environment.
130CC_FOR_BUILD = $(CC)
e85e07cb 131CXX_FOR_BUILD = $(CXX)
440868a0 132
9f73dd6a 133SUBDIRS = "this is set via configure, don't edit this"
6a3958b2
RP
134OTHERS =
135
a0f47eb7 136ALL = all.normal
f35c6160
DZ
137INSTALL_TARGET = install-dirs \
138 $(INSTALL_MODULES) \
139 $(INSTALL_TARGET_MODULES) \
140 $(INSTALL_X11_MODULES) \
753d5049 141 install-gcc \
09985c96 142 $(INSTALL_DOSREL)
753d5049 143
fb660409 144
51489233 145CC_FOR_TARGET = ` \
5cc73086 146 if [ -f $$r/gcc/Makefile ] ; then \
753d5049
SC
147 if [ -f $$r/newlib/Makefile ] ; then \
148 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
149 else \
150 echo $$r/gcc/xgcc -B$$r/gcc/; \
151 fi; \
51489233 152 else \
378fd382 153 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
154 echo $(CC); \
155 else \
ea6d5817 156 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
51489233
ILT
157 fi; \
158 fi`
159
a4e879a1 160# start-sanitize-chill
7d9f0c54 161CHILL_FOR_TARGET = ` \
5cc73086 162 if [ -f $$r/gcc/Makefile ] ; then \
04103845 163 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
7d9f0c54
MW
164 else \
165 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
166 echo $(CC); \
167 else \
ea6d5817 168 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
7d9f0c54
MW
169 fi; \
170 fi`
34b3298b 171
a4e879a1 172# end-sanitize-chill
7d9f0c54 173
d1bea4c7 174CXX_FOR_TARGET = ` \
5cc73086 175 if [ -f $$r/gcc/Makefile ] ; then \
753d5049
SC
176 if [ -f $$r/newlib/Makefile ] ; then \
177 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
178 else \
179 echo $$r/gcc/xgcc -B$$r/gcc/; \
180 fi; \
fca4f908 181 else \
e85e07cb
ILT
182 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
183 echo $(CXX); \
fca4f908 184 else \
ea6d5817 185 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
fca4f908
MW
186 fi; \
187 fi`
188
440868a0 189AS_FOR_TARGET = ` \
ea6d5817 190 if [ -f $$r/gas/as.new ] ; then \
5cc73086 191 echo $$r/gas/as.new ; \
440868a0 192 else \
e85e07cb 193 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
440868a0
ILT
194 echo $(AS); \
195 else \
ea6d5817 196 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
81246025 197 fi; \
440868a0
ILT
198 fi`
199
51489233 200AR_FOR_TARGET = ` \
5cc73086
KR
201 if [ -f $$r/binutils/ar ] ; then \
202 echo $$r/binutils/ar ; \
51489233 203 else \
378fd382 204 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
205 echo $(AR); \
206 else \
ea6d5817 207 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
81246025 208 fi; \
51489233
ILT
209 fi`
210
211RANLIB_FOR_TARGET = ` \
5cc73086
KR
212 if [ -f $$r/binutils/ranlib ] ; then \
213 echo $$r/binutils/ranlib ; \
51489233 214 else \
378fd382 215 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
216 echo $(RANLIB); \
217 else \
ea6d5817 218 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
81246025 219 fi; \
51489233
ILT
220 fi`
221
222NM_FOR_TARGET = ` \
ea6d5817 223 if [ -f $$r/binutils/nm.new ] ; then \
753d5049 224 echo $$r/binutils/nm.new ; \
51489233 225 else \
378fd382 226 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
227 echo $(NM); \
228 else \
ea6d5817 229 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
81246025 230 fi; \
51489233
ILT
231 fi`
232
eb02fd64 233#### host and target specific makefile fragments come in here.
ec342d7d 234###
eb02fd64 235
0ef4728f
ILT
236# Flags to pass down to all sub-makes.
237# Please keep these in alphabetical order.
238BASE_FLAGS_TO_PASS = \
2198e4ba 239 "AR_FLAGS=$(AR_FLAGS)" \
d09de70e 240 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
0ef4728f 241 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
378fd382 242 "BISON=$(BISON)" \
378fd382 243 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
0ef4728f 244 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
2198e4ba 245 "CFLAGS=$(CFLAGS)" \
3585593d 246 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
a4e879a1 247 $(start-sanitize-chill)\
7d9f0c54
MW
248 "CHILLFLAGS=$(CHILLFLAGS)" \
249 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
250 "CHILL_LIB=$(CHILL_LIB)" \
a4e879a1 251 $(end-sanitize-chill)\
0ef4728f
ILT
252 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
253 "CXXFLAGS=$(CXXFLAGS)" \
3585593d 254 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
0ef4728f 255 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
a9a2f22f 256 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
2198e4ba
MT
257 "INSTALL=$(INSTALL)" \
258 "INSTALL_DATA=$(INSTALL_DATA)" \
440868a0 259 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
f35c6160 260 "INSTALL_XFORM=$(INSTALL_XFORM)" \
378fd382
DZ
261 "LDFLAGS=$(LDFLAGS)" \
262 "LEX=$(LEX)" \
3585593d
BK
263 "LIBCFLAGS=$(LIBCFLAGS)" \
264 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
04103845
DE
265 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
266 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
65e21701 267 "M4=$(M4)" \
9823504d 268 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
0ef4728f 269 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
04103845
DE
270 "PICFLAG=$(PICFLAG)" \
271 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
d09de70e 272 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
49dfa984 273 "SHELL=$(SHELL)" \
a54e05f6 274 "EXPECT=$(EXPECT)" \
6a42d184 275 "RUNTEST=$(RUNTEST)" \
86365152 276 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
5cc73086 277 "YACC=$(BISON)" \
378fd382
DZ
278 "exec_prefix=$(exec_prefix)" \
279 "prefix=$(prefix)" \
280 "tooldir=$(tooldir)"
2198e4ba 281
0ef4728f
ILT
282# Flags to pass down to most sub-makes, in which we're building with
283# the host environment.
6d681784 284# If any variables are added here, they must be added to do-*, below.
0ef4728f 285EXTRA_HOST_FLAGS = \
6d681784
JG
286 'AR=$(AR)' \
287 'AS=$(AS)' \
288 'CC=$(CC)' \
289 'CXX=$(CXX)' \
290 'NM=$(NM)' \
753d5049 291 'RANLIB=$(RANLIB)'
0ef4728f
ILT
292
293FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
294
d1bea4c7
DZ
295# Flags that are concerned with the location of the X11 include files
296# and library files
297X11_FLAGS_TO_PASS = \
298 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
f980fcfb
JG
299 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
300 "X11_LIB=$(X11_LIB)"
d1bea4c7 301
0ef4728f
ILT
302# Flags to pass down to makes which are built with the target environment.
303# The double $ decreases the length of the command line; the variables
304# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
6d681784 305# If any variables are added here, they must be added to do-*, below.
0ef4728f
ILT
306EXTRA_TARGET_FLAGS = \
307 'AR=$$(AR_FOR_TARGET)' \
308 'AS=$$(AS_FOR_TARGET)' \
309 'CC=$$(CC_FOR_TARGET)' \
3585593d 310 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
0ef4728f 311 'CXX=$$(CXX_FOR_TARGET)' \
3585593d
BK
312 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
313 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
314 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
0ef4728f 315 'NM=$$(NM_FOR_TARGET)' \
04103845 316 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
753d5049 317 'RANLIB=$$(RANLIB_FOR_TARGET)'
0ef4728f
ILT
318
319TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
51489233 320
f4e414f1
ILT
321# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
322# unfortunately needs the native compiler and the target ar and
0ef4728f 323# ranlib.
66957ce4
ILT
324# If any variables are added here, they must be added to do-*, below.
325# The HOST_* variables are a special case, which are used for the gcc
326# cross-building scheme.
0ef4728f
ILT
327EXTRA_GCC_FLAGS = \
328 'AR=$$(AR_FOR_TARGET)' \
6d681784
JG
329 'AS=$(AS)' \
330 'CC=$(CC)' \
331 'CXX=$(CXX)' \
a54e05f6
KR
332 'HOST_CC=$(CC_FOR_BUILD)' \
333 'HOST_PREFIX=$(HOST_PREFIX)' \
334 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
6d681784 335 'NM=$(NM)' \
753d5049 336 'RANLIB=$$(RANLIB_FOR_TARGET)'
0ef4728f 337
34b3298b 338GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
f4e414f1 339
6a42d184 340# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
341# using $(FLAGS_TO_PASS).
342ALL_MODULES = \
343 all-autoconf \
344 all-bfd \
345 all-binutils \
346 all-byacc \
347 all-cvs \
348 all-dejagnu \
349 all-diff \
ac259c28 350 all-dosutils \
79337c85
ILT
351 all-etc \
352 all-fileutils \
353 all-find \
354 all-flex \
355 all-gas \
356 all-gawk \
79337c85
ILT
357 all-gprof \
358 all-grep \
359 all-gzip \
360 all-hello \
361 all-indent \
362 all-ispell \
363 all-ld \
364 all-libiberty \
365 all-m4 \
366 all-make \
367 all-mmalloc \
368 all-opcodes \
369 all-patch \
370 all-prms \
371 all-rcs \
372 all-readline \
275049c0 373 all-release \
79337c85
ILT
374 all-recode \
375 all-sed \
376 all-send-pr \
377 all-shellutils \
378 all-sim \
379 all-tar \
380 all-tcl \
381 all-texinfo \
382 all-textutils \
383 all-tgas \
384 all-time \
385 all-uudecode \
753d5049
SC
386 all-wdiff
387
6a42d184
DZ
388# This is a list of the check targets for all of the modules which are
389# compiled using $(FLAGS_TO_PASS).
4f0b8f27
TL
390# This is a list of the check targets for all of the modules which are
391# compiled using $(FLAGS_TO_PASS).
392#
d237841c
BC
393# The list is in two parts. The first lists those tools which
394# are tested as part of the host's native tool-chain, and not
395# tested in a cross configuration.
396NATIVE_CHECK_MODULES = \
397 check-byacc \
4f0b8f27
TL
398 check-flex
399
d237841c 400CROSS_CHECK_MODULES = \
6a42d184
DZ
401 check-autoconf \
402 check-bfd \
403 check-binutils \
6a42d184
DZ
404 check-cvs \
405 check-dejagnu \
406 check-diff \
407 check-etc \
408 check-fileutils \
409 check-find \
6a42d184
DZ
410 check-gas \
411 check-gawk \
6a42d184
DZ
412 check-gprof \
413 check-grep \
414 check-gzip \
415 check-hello \
416 check-indent \
417 check-ispell \
418 check-ld \
419 check-libiberty \
420 check-m4 \
421 check-make \
422 check-mmcheckoc \
423 check-opcodes \
424 check-patch \
425 check-prms \
426 check-rcs \
427 check-readline \
428 check-recode \
429 check-sed \
430 check-send-pr \
431 check-shellutils \
432 check-sim \
433 check-tar \
434 check-tcl \
435 check-texinfo \
436 check-textutils \
437 check-tgas \
438 check-time \
439 check-uudecode \
440 check-wdiff
d237841c
BC
441
442CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
6a42d184
DZ
443
444# This is a list of the install targets for all of the modules which are
79337c85
ILT
445# compiled using $(FLAGS_TO_PASS).
446INSTALL_MODULES = \
447 install-autoconf \
448 install-bfd \
449 install-binutils \
450 install-byacc \
451 install-cvs \
452 install-dejagnu \
453 install-diff \
753d5049 454 install-dosutils \
79337c85
ILT
455 install-etc \
456 install-fileutils \
457 install-find \
458 install-flex \
459 install-gas \
460 install-gawk \
79337c85
ILT
461 install-gprof \
462 install-grep \
463 install-gzip \
464 install-hello \
465 install-indent \
466 install-ispell \
467 install-ld \
468 install-libiberty \
469 install-m4 \
470 install-make \
471 install-mmalloc \
472 install-opcodes \
473 install-patch \
474 install-prms \
475 install-rcs \
476 install-readline \
477 install-recode \
478 install-sed \
479 install-send-pr \
480 install-shellutils \
481 install-sim \
482 install-tar \
483 install-tcl \
484 install-texinfo \
485 install-textutils \
486 install-tgas \
487 install-time \
488 install-uudecode \
489 install-wdiff
490
6a42d184 491# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
492# using $(X11_FLAGS_TO_PASS).
493ALL_X11_MODULES = \
494 all-emacs \
4d802af9 495 all-emacs19 \
04103845 496 all-gdb \
79337c85 497 all-expect \
65e21701 498 all-gash \
79337c85
ILT
499 all-tclX \
500 all-tk
501
6a42d184
DZ
502# This is a list of the check targets for all of the modules which are
503# compiled using $(X11_FLAGS_TO_PASS).
504CHECK_X11_MODULES = \
505 check-emacs \
04103845 506 check-gdb \
6a42d184 507 check-expect \
65e21701 508 check-gash \
6a42d184
DZ
509 check-tclX \
510 check-tk
511
79337c85
ILT
512# This is a list of the install targets for all the modules which are
513# compiled using $(X11_FLAGS_TO_PASS).
514INSTALL_X11_MODULES = \
515 install-emacs \
4d802af9 516 install-emacs19 \
04103845 517 install-gdb \
79337c85 518 install-expect \
65e21701 519 install-gash \
79337c85
ILT
520 install-tclX \
521 install-tk
fca4f908 522
6a42d184 523# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
524# using $(TARGET_FLAGS_TO_PASS).
525ALL_TARGET_MODULES = \
526 $(start-sanitize-chill) \
527 all-chillrt \
528 $(end-sanitize-chill) \
6214eb23 529 all-libio \
4be4b991 530 all-libstdc++ \
1d5fcc66 531 all-librx \
79337c85
ILT
532 all-libg++ \
533 all-newlib \
15408b3b 534 all-libgloss \
79337c85
ILT
535 all-xiberty
536
6a42d184
DZ
537# This is a list of the check targets for all of the modules which are
538# compiled using $(TARGET_FLAGS_TO_PASS).
539CHECK_TARGET_MODULES = \
540 $(start-sanitize-chill) \
541 check-chillrt \
542 $(end-sanitize-chill) \
6214eb23 543 check-libio \
4be4b991 544 check-libstdc++ \
6a42d184
DZ
545 check-libg++ \
546 check-newlib \
547 check-xiberty
548
549# This is a list of the install targets for all of the modules which are
79337c85
ILT
550# compiled using $(TARGET_FLAGS_TO_PASS).
551INSTALL_TARGET_MODULES = \
552 $(start-sanitize-chill) \
553 install-chillrt \
554 $(end-sanitize-chill) \
6214eb23 555 install-libio \
4be4b991 556 install-libstdc++ \
79337c85
ILT
557 install-libg++ \
558 install-newlib \
15408b3b 559 install-libgloss \
79337c85 560 install-xiberty
4d714963 561
79337c85
ILT
562# This is a shell case of all modules which are compiled using
563# $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
4be4b991 564TARGET_LIBS = libio | libstdc++ | librx | libg++ | newlib | xiberty
a4e879a1 565# start-sanitize-chill
4be4b991 566TARGET_LIBS = chillrt | libio | libstdc++ | librx | libg++ | newlib | xiberty
a4e879a1 567# end-sanitize-chill
7481617f 568
79337c85 569# The first rule in the file had better be this one. Don't put any above it.
a59b94d2 570all: all.normal
79337c85
ILT
571.PHONY: all
572
573# The target built for a native build.
574.PHONY: all.normal
575all.normal: \
576 $(ALL_MODULES) \
577 $(ALL_TARGET_MODULES) \
46d0ca81 578 $(ALL_X11_MODULES) \
79337c85
ILT
579 all-gcc
580
0ef4728f 581# Do a target for all the subdirectories. A ``make do-X'' will do a
53222cbd
RP
582# ``make X'' in all subdirectories (because, in general, there is a
583# dependency (below) of X upon do-X, a ``make X'' will also do this,
584# but it may do additional work as well).
0ef4728f
ILT
585# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
586# because it is so large that it can easily overflow the command line
587# length limit on some systems.
79337c85 588DO_X = \
79337c85
ILT
589 do-clean \
590 do-distclean \
591 do-dvi \
592 do-info \
593 do-install-info \
594 do-installcheck \
595 do-mostlyclean \
753d5049
SC
596 do-realclean \
597 do-TAGS
79337c85
ILT
598.PHONY: $(DO_X)
599$(DO_X):
0ef4728f 600 @target=`echo $@ | sed -e 's/^do-//'`; \
5cc73086 601 r=`pwd`; export r; \
0ef4728f
ILT
602 srcroot=`cd $(srcdir); pwd`; export srcroot; \
603 for i in $(SUBDIRS); do \
36286a3e 604 if [ -f ./$$i/Makefile ]; then \
0ef4728f
ILT
605 case $$i in \
606 $(TARGET_LIBS) ) \
6d681784
JG
607 for flag in $(EXTRA_TARGET_FLAGS); do \
608 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
609 done; \
0ef4728f
ILT
610 ;; \
611 gcc) \
6d681784
JG
612 for flag in $(EXTRA_GCC_FLAGS); do \
613 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
614 done; \
0ef4728f
ILT
615 ;; \
616 *) \
6d681784
JG
617 for flag in $(EXTRA_HOST_FLAGS); do \
618 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
619 done; \
0ef4728f
ILT
620 ;; \
621 esac ; \
753d5049 622 export AR AS CC CXX NM RANLIB; \
0ef4728f 623 if (cd ./$$i; \
6d681784
JG
624 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
625 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
753d5049 626 "RANLIB=$${RANLIB}" \
6d681784 627 $${target}); \
0ef4728f
ILT
628 then true; else exit 1; fi; \
629 else true; fi; \
630 done
fb90daeb 631
79337c85
ILT
632# Here are the targets which correspond to the do-X targets.
633
65088029 634.PHONY: info installcheck dvi install-info
79337c85 635.PHONY: clean distclean mostlyclean realclean local-clean local-distclean
0ef4728f 636info: do-info
1a14993c 637installcheck: do-installcheck
0ef4728f 638dvi: do-dvi
9a9e8e7f 639
f35c6160
DZ
640install-info: do-install-info dir.info
641 srcroot=`cd $(srcdir); pwd`; export srcroot; \
72c09fbc
SC
642 if [ -f dir.info ] ; then \
643 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
50fbe976 644 else true ; fi
4d714963 645
0ef4728f 646local-clean:
7fed4078 647 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
3b30df82 648
0ef4728f 649local-distclean:
7fed4078 650 -rm -f Makefile config.status
7fcfdcf7 651
0ef4728f
ILT
652clean: do-clean local-clean
653mostlyclean: do-mostlyclean local-clean
654distclean: do-distclean local-clean local-distclean
655realclean: do-realclean local-clean local-distclean
656
65088029
ILT
657# Check target.
658
659.PHONY: check
660check: $(CHECK_MODULES) \
661 $(CHECK_TARGET_MODULES) \
662 $(CHECK_X11_MODULES) \
663 check-gcc
664
79337c85 665# Installation targets.
4d714963 666
04103845 667.PHONY: install uninstall source-vault binary-vault vault-install
98a33b6d 668install: $(INSTALL_TARGET)
b26ff9d8 669
79337c85
ILT
670uninstall:
671 @echo "the uninstall target is not supported in this tree"
672
04103845
DE
673source-vault:
674 $(MAKE) -f ./release/Build-A-Release \
675 host=$(host_alias) source-vault
676
677binary-vault:
678 $(MAKE) -f ./release/Build-A-Release \
679 host=$(host_alias) target=$(target_alias)
680
275049c0
JK
681vault-install:
682 @if [ -f ./release/vault-install ] ; then \
683 ./release/vault-install $(host_alias) $(target_alias) ; \
96bfa612
KR
684 else \
685 true ; \
275049c0
JK
686 fi
687
79337c85 688.PHONY: install.all
06a07944
RP
689install.all: install-no-fixedincludes
690 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 691 r=`pwd` ; export r ; \
06a07944
RP
692 (cd ./gcc; \
693 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
694 else \
695 true ; \
696 fi
5a63b336 697
96bfa612 698# install-no-fixedincludes is used because Cygnus can not distribute
79337c85
ILT
699# the fixed header files.
700.PHONY: install-no-fixedincludes
701install-no-fixedincludes: \
702 install-dirs \
79337c85
ILT
703 $(INSTALL_MODULES) \
704 $(INSTALL_TARGET_MODULES) \
96bfa612 705 $(INSTALL_X11_MODULES) \
f35c6160 706 gcc-no-fixedincludes
d1bea4c7 707
5cc24596 708# Install the gcc headers files, but not the fixed include files,
79337c85
ILT
709# which Cygnus is not allowed to distribute. This rule is very
710# dependent on the workings of the gcc Makefile.in.
711.PHONY: gcc-no-fixedincludes
06a07944 712gcc-no-fixedincludes:
5cc24596
PB
713 @if [ -f ./gcc/Makefile ]; then \
714 rm -rf gcc/tmp-include; \
715 mv gcc/include gcc/tmp-include 2>/dev/null; \
716 mkdir gcc/include; \
7f9cb3b2 717 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
753d5049 718 touch gcc/stmp-fixinc gcc/include/fixed; \
a54e05f6 719 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
5cc73086 720 r=`pwd`; export r; \
5cc24596
PB
721 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
722 (cd ./gcc; \
723 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
724 rm -rf gcc/include; \
725 mv gcc/tmp-include gcc/include 2>/dev/null; \
726 else true; fi
dcbfc14d 727
79337c85
ILT
728# This rule is used to build the modules which use FLAGS_TO_PASS. To
729# build a target all-X means to cd to X and make all.
3de70f1d 730#
055cca84 731# all-gui, and all-libproc are handled specially because
4d802af9
MT
732# they are still experimental, and if they fail to build, that
733# shouldn't stop "make all".
04103845
DE
734.PHONY: $(ALL_MODULES) all-gui all-libproc
735$(ALL_MODULES) all-gui all-libproc:
79337c85 736 @dir=`echo $@ | sed -e 's/all-//'`; \
472af17f
ILT
737 if [ -f ./$${dir}/Makefile ] ; then \
738 r=`pwd`; export r; \
739 srcroot=`cd $(srcdir); pwd`; export srcroot; \
740 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
07362bd9 741 else \
79337c85 742 true; \
07362bd9
DZ
743 fi
744
80cbf870
ILT
745# These rules are used to check the modules which use FLAGS_TO_PASS.
746# To build a target check-X means to cd to X and make check. Some
747# modules are only tested in a native toolchain.
4f0b8f27 748
d237841c
BC
749.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
750$(NATIVE_CHECK_MODULES):
39cc6dae
RS
751 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
752 dir=`echo $@ | sed -e 's/check-//'`; \
472af17f
ILT
753 if [ -f ./$${dir}/Makefile ] ; then \
754 r=`pwd`; export r; \
755 srcroot=`cd $(srcdir); pwd`; export srcroot; \
756 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
757 else \
758 true; \
4f0b8f27
TL
759 fi; \
760 fi
761
762$(CROSS_CHECK_MODULES):
6a42d184
DZ
763 @dir=`echo $@ | sed -e 's/check-//'`; \
764 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 765 r=`pwd`; export r; \
6a42d184
DZ
766 srcroot=`cd $(srcdir); pwd`; export srcroot; \
767 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
768 else \
769 true; \
770 fi
771
79337c85
ILT
772# This rule is used to install the modules which use FLAGS_TO_PASS.
773# To build a target install-X means to cd to X and make install.
774.PHONY: $(INSTALL_MODULES)
775$(INSTALL_MODULES): install-dirs
776 @dir=`echo $@ | sed -e 's/install-//'`; \
777 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 778 r=`pwd`; export r; \
79337c85 779 srcroot=`cd $(srcdir); pwd`; export srcroot; \
f35c6160 780 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
07362bd9 781 else \
79337c85 782 true; \
07362bd9
DZ
783 fi
784
6a42d184
DZ
785# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
786# To build a target all-X means to cd to X and make all.
79337c85
ILT
787.PHONY: $(ALL_TARGET_MODULES)
788$(ALL_TARGET_MODULES):
789 @dir=`echo $@ | sed -e 's/all-//'`; \
790 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 791 r=`pwd`; export r; \
79337c85
ILT
792 srcroot=`cd $(srcdir); pwd`; export srcroot; \
793 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
07362bd9 794 else \
79337c85 795 true; \
07362bd9
DZ
796 fi
797
6a42d184
DZ
798# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
799# To build a target install-X means to cd to X and make install.
800.PHONY: $(CHECK_TARGET_MODULES)
801$(CHECK_TARGET_MODULES):
802 @dir=`echo $@ | sed -e 's/check-//'`; \
803 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 804 r=`pwd`; export r; \
6a42d184
DZ
805 srcroot=`cd $(srcdir); pwd`; export srcroot; \
806 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \
807 else \
808 true; \
809 fi
810
79337c85
ILT
811# This rule is used to install the modules which use
812# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
813# and make install.
814.PHONY: $(INSTALL_TARGET_MODULES)
815$(INSTALL_TARGET_MODULES): install-dirs
816 @dir=`echo $@ | sed -e 's/install-//'`; \
817 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 818 r=`pwd`; export r; \
79337c85
ILT
819 srcroot=`cd $(srcdir); pwd`; export srcroot; \
820 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
07362bd9 821 else \
79337c85 822 true; \
07362bd9
DZ
823 fi
824
6a42d184 825# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
826# To build a target all-X means to cd to X and make all.
827.PHONY: $(ALL_X11_MODULES)
828$(ALL_X11_MODULES):
829 @dir=`echo $@ | sed -e 's/all-//'`; \
830 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 831 r=`pwd`; export r; \
79337c85
ILT
832 srcroot=`cd $(srcdir); pwd`; export srcroot; \
833 (cd $${dir}; \
834 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
07362bd9 835 else \
79337c85 836 true; \
07362bd9
DZ
837 fi
838
6a42d184
DZ
839# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
840# To build a target check-X means to cd to X and make all.
841.PHONY: $(CHECK_X11_MODULES)
842$(CHECK_X11_MODULES):
843 @dir=`echo $@ | sed -e 's/check-//'`; \
844 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 845 r=`pwd`; export r; \
6a42d184
DZ
846 srcroot=`cd $(srcdir); pwd`; export srcroot; \
847 (cd $${dir}; \
848 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
849 else \
850 true; \
851 fi
852
853# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
854# To build a target install-X means to cd to X and make install.
855.PHONY: $(INSTALL_X11_MODULES)
856$(INSTALL_X11_MODULES):
6a42d184 857 @dir=`echo $@ | sed -e 's/install-//'`; \
79337c85 858 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 859 r=`pwd`; export r; \
79337c85
ILT
860 srcroot=`cd $(srcdir); pwd`; export srcroot; \
861 (cd $${dir}; \
862 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
07362bd9 863 else \
79337c85 864 true; \
07362bd9
DZ
865 fi
866
79337c85
ILT
867# gcc is the only module which uses GCC_FLAGS_TO_PASS.
868.PHONY: all-gcc
869all-gcc:
870 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 871 r=`pwd`; export r; \
79337c85
ILT
872 srcroot=`cd $(srcdir); pwd`; export srcroot; \
873 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
07362bd9 874 else \
79337c85 875 true; \
07362bd9
DZ
876 fi
877
65088029
ILT
878.PHONY: check-gcc
879check-gcc:
880 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 881 r=`pwd`; export r; \
65088029
ILT
882 srcroot=`cd $(srcdir); pwd`; export srcroot; \
883 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
884 else \
885 true; \
886 fi
887
79337c85
ILT
888.PHONY: install-gcc
889install-gcc:
890 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 891 r=`pwd`; export r; \
79337c85
ILT
892 srcroot=`cd $(srcdir); pwd`; export srcroot; \
893 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
07362bd9 894 else \
79337c85 895 true; \
07362bd9
DZ
896 fi
897
753d5049
SC
898
899# EXPERIMENTAL STUFF
900# This rule is used to install the modules which use FLAGS_TO_PASS.
901# To build a target install-X means to cd to X and make install.
09985c96
SC
902.PHONY: install-dosrel
903install-dosrel: install-dirs info
753d5049
SC
904 @dir=`echo $@ | sed -e 's/install-//'`; \
905 if [ -f ./$${dir}/Makefile ] ; then \
906 r=`pwd`; export r; \
907 srcroot=`cd $(srcdir); pwd`; export srcroot; \
908 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
909 else \
910 true; \
911 fi
912
09985c96 913install-dosrel-fake:
a987271c 914
753d5049 915
79337c85 916# This is a list of inter-dependencies among modules.
65e21701 917all-autoconf: all-m4
79337c85 918all-bfd:
dfe44004 919all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
79337c85
ILT
920all-byacc:
921# start-sanitize-chill
922all-chillrt: all-binutils all-gas all-gcc all-newlib
923# end-sanitize-chill
924all-cvs:
4d802af9 925all-dejagnu: all-tcl all-expect all-tk
79337c85
ILT
926all-diff: all-libiberty
927all-emacs:
1d5fcc66 928all-emacs19: all-byacc
79337c85 929all-etc:
c6ba9ae0 930all-expect: all-tcl all-tk
275049c0 931all-fileutils: all-libiberty
79337c85 932all-find:
7dcc0664 933all-flex: all-libiberty all-byacc
79337c85 934all-gas: all-libiberty all-opcodes all-bfd
65e21701 935all-gash: all-tcl
79337c85 936all-gawk:
04103845
DE
937all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld
938all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements)
79337c85 939all-gprof: all-libiberty all-bfd
6214eb23 940all-grep: all-libiberty
4d802af9 941all-gui: all-gdb all-libproc all-librx
79337c85
ILT
942all-gzip: all-libiberty
943all-hello: all-libiberty
944all-indent:
3585593d 945all-ispell: all-emacs19
79337c85 946all-ld: all-libiberty all-bfd all-byacc all-flex
04103845 947all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-librx all-libstdc++
ea6d5817 948all-libio: all-gas all-ld all-gcc all-xiberty all-newlib
79337c85 949all-libiberty:
ea6d5817 950all-libstdc++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio
79337c85
ILT
951all-m4: all-libiberty
952all-make: all-libiberty
953all-mmalloc:
ea6d5817 954all-newlib: all-binutils all-gas all-gcc
275049c0 955all-opcodes: all-bfd
79337c85 956all-patch:
b255ccdb 957all-prms: all-libiberty
79337c85
ILT
958all-rcs:
959all-readline:
960all-recode: all-libiberty
ac259c28
JM
961all-sed: all-libiberty
962all-send-pr: all-prms
79337c85
ILT
963all-shellutils:
964all-sim: all-libiberty all-bfd
07362bd9 965all-tar: all-libiberty
79337c85
ILT
966all-tcl:
967all-tclX: all-tcl all-tk
968all-tk: all-tcl
969all-texinfo: all-libiberty
970all-textutils:
971all-tgas: all-libiberty all-bfd
972all-time:
973all-wdiff:
974all-uudecode: all-libiberty
055cca84 975all-xiberty: all-gcc all-ld all-newlib
07362bd9 976
79337c85 977### other supporting targets
07362bd9 978
79337c85
ILT
979MAKEDIRS= \
980 $(prefix) \
981 $(exec_prefix) \
982 $(tooldir)
fca4f908 983
79337c85
ILT
984.PHONY: install-dirs
985install-dirs:
986 @for i in $(MAKEDIRS) ; do \
987 echo Making $$i... ; \
62cd4a20 988 parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
79337c85
ILT
989 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
990 if [ ! -d $$i ] ; then \
991 if mkdir $$i ; then \
992 true ; \
993 else \
994 exit 1 ; \
995 fi ; \
996 else \
997 true ; \
998 fi ; \
999 done
23e3e7f9 1000
618f57a9 1001
79337c85
ILT
1002dir.info: do-install-info
1003 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1004 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1005 mv -f dir.info.new dir.info ; \
1006 else true ; \
72c09fbc 1007 fi
6b7e5998 1008
b1cceba2
DZ
1009dist:
1010 @echo "Building a full distribution of this tree isn't done"
1011 @echo "via 'make dist'. Check out the etc/ subdirectory"
1012
eb02fd64
RP
1013etags tags: TAGS
1014
753d5049
SC
1015# Right now this just builds TAGS in each subdirectory. emacs19 has the
1016# ability to use several tags files at once, so there is probably no need
1017# to combine them into one big TAGS file (like CVS 1.3 does). We could
1018# (if we felt like it) have this Makefile write a piece of elisp which
1019# the user could load to tell emacs19 where all the TAGS files we just
1020# built are.
1021TAGS: do-TAGS
eb02fd64 1022
eb02fd64
RP
1023# with the gnu make, this is done automatically.
1024
01ec9588 1025Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1026 $(SHELL) ./config.status
eb02fd64 1027
11954bf1 1028#
01ec9588 1029# Support for building net releases
11954bf1 1030
01ec9588
JK
1031# Files in devo used in any net release.
1032# ChangeLog omitted because it may refer to files which are not in this
1033# distribution (perhaps it would be better to include it anyway).
d94d255d 1034DEVO_SUPPORT= README Makefile.in configure configure.in \
9823504d 1035 config.guess config.sub config move-if-change \
2492f942 1036 COPYING COPYING.LIB install.sh
01ec9588
JK
1037
1038# Files in devo/etc used in any net release.
1039# ChangeLog omitted because it may refer to files which are not in this
1040# distribution (perhaps it would be better to include it anyway).
6d681784 1041ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
275049c0 1042 configure.texi standards.texi make-stds.texi
15408b3b 1043ETC_SUPPORT_PFX=configure.info standards.info cfg-paper.info
01ec9588 1044
40e16078
KR
1045# When you use `make setup-dirs' or `make taz' you should always redefine
1046# this macro.
1047SUPPORT_FILES = list-of-support-files-for-tool-in-question
7f9cb3b2 1048# Directories that might want `make diststuff' run.
7166a308 1049DISTSTUFFDIRS= ld gprof gdb libg++ binutils gnats gas
65e21701
KR
1050# Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1051DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in
ea18081d 1052# Directories where "info" should be built.
15408b3b 1053DISTDOCDIRS= ld gprof binutils gas bfd libg++ libio gdb gnats send-pr etc
40e16078 1054
a54e05f6
KR
1055.PHONY: taz
1056
484fa12d
JW
1057taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1058 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1059 # Make sure "diststuff" files get built properly.
65e21701
KR
1060 for f in $(DISTBISONFILES) ; do \
1061 if [ -r $$f ]; then \
7b636683 1062 sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \
65e21701
KR
1063 mv -f tmp $$f ; \
1064 else true; fi ; \
1065 done
484fa12d
JW
1066 # Take out texinfo from a few places; make simple BISON=bison line.
1067 sed -e '/^all\.normal: /s/\all-texinfo //' \
1068 -e '/^ install-texinfo /d' \
1069 -e '/^BISON = /,/^$$/d' \
1070 -e '/^# BISON:/s/.*/BISON = bison -y/' \
1071 <Makefile.in >tmp
1072 mv -f tmp Makefile.in
65e21701 1073 #
1d5fcc66
PB
1074 $(start-sanitize-Sanitize)
1075 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1076 $(end-sanitize-Sanitize)
40e16078 1077 ./configure sun4
484fa12d
JW
1078 # Doc files don't change; include them in distribution.
1079 for f in $(DISTDOCDIRS) ; do \
1080 if [ -r $$f/Makefile ]; then \
ea18081d 1081 (cd $$f ; $(MAKE) info) || exit 1 ; \
484fa12d
JW
1082 else true ; fi ; \
1083 done
7f9cb3b2 1084 # Make links, and run "make diststuff" when needed.
a54e05f6
KR
1085 # The `echo' for setting `p' is to convert all whitespace to spaces.
1086 # Then the `case' further below should tell whether $$d is in
7f9cb3b2 1087 # DISTSTUFFDIRS.
a54e05f6 1088 rm -rf proto-toplev ; mkdir proto-toplev
7f9cb3b2
KR
1089 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1090 p=" `echo $(DISTSTUFFDIRS)` " ; \
a54e05f6
KR
1091 for d in $$dirs ; do \
1092 if [ -d $$d ]; then \
7f9cb3b2
KR
1093 case " $$p " in \
1094 *" $$d "*) \
04103845 1095 (cd $$d ; $(MAKE) diststuff ) || exit 1 ;; \
a54e05f6 1096 esac ; \
7f9cb3b2
KR
1097 if [ -d $$d/proto-$$d.dir ]; then \
1098 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1099 else \
1100 ln -s ../$$d proto-toplev/$$d ; \
1101 fi ; \
a54e05f6 1102 else ln -s ../$$d proto-toplev/$$d ; fi ; \
40e16078 1103 done
5600fbd2 1104 $(MAKE) distclean
a54e05f6 1105 #
40e16078 1106 mkdir proto-toplev/etc
15408b3b
KR
1107 (cd proto-toplev/etc; \
1108 for i in $(ETC_SUPPORT); do \
40e16078 1109 ln -s ../../etc/$$i . ; \
15408b3b
KR
1110 done ; \
1111 for i in $(ETC_SUPPORT_PFX); do \
1112 ln -s ../../etc/$$i* . ; \
1113 done)
a54e05f6 1114 #
04103845 1115 # Take out texinfo from configurable dirs
40e16078
KR
1116 rm proto-toplev/configure.in
1117 sed -e '/^host_tools=/s/texinfo //' \
40e16078 1118 <configure.in >proto-toplev/configure.in
a54e05f6 1119 #
40e16078
KR
1120 mkdir proto-toplev/texinfo
1121 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
7f9cb3b2 1122 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
484fa12d 1123 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
40e16078 1124 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
a561909f 1125 chmod og=u `find . -print`
7f9cb3b2 1126 (VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1d2bb445 1127 echo "==> Making $(TOOL)-$$VER.tar.gz"; \
a59b94d2 1128 rm -f $(TOOL)-$$VER; ln -s proto-toplev $(TOOL)-$$VER; \
40e16078 1129 tar cfh - $(TOOL)-$$VER \
5cc73086 1130 | $(GZIPPROG) -v -9 >$(TOOL)-$$VER.tar.gz )
40e16078 1131
484fa12d 1132TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
7f9cb3b2 1133DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
40e16078 1134
96bfa612 1135.PHONY: gas.tar.gz
7f9cb3b2 1136GAS_SUPPORT_DIRS= bfd include libiberty opcodes
96bfa612 1137gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
484fa12d
JW
1138 $(MAKE) -f Makefile.in taz TOOL=gas \
1139 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
40e16078 1140
7f9cb3b2 1141# The FSF "binutils" release includes gprof and ld.
96bfa612 1142.PHONY: binutils.tar.gz
4be4b991 1143BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof
96bfa612 1144binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
484fa12d 1145 $(MAKE) -f Makefile.in taz TOOL=binutils \
2492f942 1146 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
7f9cb3b2 1147
96bfa612 1148.PHONY: gas+binutils.tar.gz
a54e05f6 1149GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
96bfa612 1150gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
484fa12d 1151 $(MAKE) -f Makefile.in taz TOOL=gas \
2492f942 1152 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
79337c85 1153
5600fbd2 1154.PHONY: libg++.tar.gz
ea6d5817 1155LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty xiberty
5600fbd2 1156libg++.tar.gz: $(DIST_SUPPORT) libg++
484fa12d
JW
1157 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1158 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
5600fbd2 1159
49dfa984
JM
1160GNATS_SUPPORT_DIRS=include libiberty send-pr
1161gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
a0bd8e18 1162 $(MAKE) -f Makefile.in taz TOOL=gnats \
49dfa984
JM
1163 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1164
1d5fcc66 1165.PHONY: gdb.tar.gz
04103845 1166GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim
1d5fcc66
PB
1167gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1168 $(MAKE) -f Makefile.in taz TOOL=gdb \
1169 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
1170
7166a308
KR
1171.PHONY: newlib.tar.gz
1172NEWLIB_SUPPORT_DIRS=
04103845
DE
1173# taz configures for the sun4 target which won't configure newlib.
1174# compensate here by configuring newlib for a simple (no multilib support)
1175# cross target (sparc64).
7166a308 1176newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
04103845
DE
1177 rootme=`pwd` ; \
1178 cd newlib && ../configure --srcdir $$rootme/newlib \
1179 --host sun4 --target sparc64-elf
7166a308
KR
1180 $(MAKE) -f Makefile.in taz TOOL=newlib \
1181 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1182 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" \
1183 DISTDOCDIRS="$(DISTDOCDIRS) newlib"
1184
79337c85
ILT
1185.NOEXPORT:
1186MAKEOVERRIDES=
1187
1188# start-sanitize-chill
1189## This is ugly, but I don't want GNU make to put these variables in
1190## the environment. Older makes will see this as a set of targets
1191## with no dependencies and no actions.
1192unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1193# end-sanitize-chill
1194
eb02fd64 1195# end of Makefile.in
This page took 0.201673 seconds and 4 git commands to generate.