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