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