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