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