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