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