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