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