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