Fix minor bugs reported by Carl Greco, <cgreco@parrot.creighton.edu>:
[deliverable/binutils-gdb.git] / Makefile.in
CommitLineData
eb02fd64 1#
131a3881 2# Makefile for directory with subdirs to build.
7fcfdcf7 3# Copyright (C) 1990, 1991, 1992 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
2198e4ba 27tooldir = $(libdir)
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
378fd382 48INSTALL = cp
4d714963
RP
49INSTALL_PROGRAM = $(INSTALL)
50INSTALL_DATA = $(INSTALL)
3c8735af 51
440868a0 52AS = as
ec342d7d 53AR = ar
b5329d84 54AR_FLAGS = rc
e85e07cb 55CC = cc
7d9f0c54 56$(start-sanitize-chill)
f8a6ad66 57CFLAGS = -g
7d9f0c54
MW
58CHILLFLAGS = $(CFLAGS)
59CHILL_LIB = -lchill
60$(end-sanitize-chill)
e85e07cb 61CXX = gcc
d1bea4c7 62CXXFLAGS = -g -O
4d714963 63RANLIB = ranlib
51489233 64NM = nm
eb02fd64 65
98a33b6d 66BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
06a07944 67 then echo $${rootme}/byacc/byacc ; \
378fd382 68 else echo byacc ; \
06a07944 69 fi`
2645fb0c 70
98a33b6d 71LEX = `if [ -f $${rootme}/flex/flex ] ; \
8b361a95 72 then echo $${rootme}/flex/flex ; \
2198e4ba
MT
73 else echo flex ; fi`
74
98a33b6d 75MAKEINFO = `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
77806c3e
RP
76 then echo $${rootme}/texinfo/C/makeinfo ; \
77 else echo makeinfo ; fi`
b772d75e 78
e85e07cb 79# compilers to use to create programs which must be run in the build
440868a0
ILT
80# environment.
81CC_FOR_BUILD = $(CC)
e85e07cb 82CXX_FOR_BUILD = $(CXX)
440868a0 83
9f73dd6a 84SUBDIRS = "this is set via configure, don't edit this"
6a3958b2
RP
85OTHERS =
86
a0f47eb7 87ALL = all.normal
b26ff9d8 88INSTALL_TARGET = install.all
fb660409
RP
89
90### for debugging
91#GCCVERBOSE=-v
92
51489233
ILT
93CC_FOR_TARGET = ` \
94 if [ -f $${rootme}/gcc/Makefile ] ; then \
31883f01 95 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
51489233 96 else \
378fd382 97 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
98 echo $(CC); \
99 else \
100 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
101 fi; \
102 fi`
103
7d9f0c54
MW
104GCC_FOR_TARGET = ` \
105 if [ -f $${rootme}/gcc/Makefile ] ; then \
106 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
107 else \
108 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
109 echo $(CC); \
110 else \
111 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
112 fi; \
113 fi`
114
115$(start-sanitize-chill)
116CHILL_FOR_TARGET = ` \
117 if [ -f $${rootme}/gcc/Makefile ] ; then \
118 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
119 else \
120 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
121 echo $(CC); \
122 else \
123 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
124 fi; \
125 fi`
126$(end-sanitize-chill)
127
d1bea4c7 128CXX_FOR_TARGET = ` \
fca4f908 129 if [ -f $${rootme}/gcc/Makefile ] ; then \
31883f01 130 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
fca4f908 131 else \
e85e07cb
ILT
132 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
133 echo $(CXX); \
fca4f908
MW
134 else \
135 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
136 fi; \
137 fi`
138
440868a0
ILT
139AS_FOR_TARGET = ` \
140 if [ -f $${rootme}/gas/Makefile ] ; then \
141 echo $${rootme}/gas/as.new ; \
142 else \
e85e07cb 143 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
440868a0
ILT
144 echo $(AS); \
145 else \
146 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
147 fi \
148 fi`
149
51489233
ILT
150AR_FOR_TARGET = ` \
151 if [ -f $${rootme}/binutils/Makefile ] ; then \
152 echo $${rootme}/binutils/ar ; \
153 else \
378fd382 154 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
155 echo $(AR); \
156 else \
157 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
158 fi \
159 fi`
160
161RANLIB_FOR_TARGET = ` \
162 if [ -f $${rootme}/binutils/Makefile ] ; then \
163 echo $${rootme}/binutils/ranlib ; \
164 else \
378fd382 165 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
166 echo $(RANLIB); \
167 else \
168 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
169 fi \
170 fi`
171
172NM_FOR_TARGET = ` \
173 if [ -f $${rootme}/binutils/Makefile ] ; then \
174 echo $${rootme}/binutils/nm ; \
175 else \
378fd382 176 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
177 echo $(NM); \
178 else \
179 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
180 fi \
181 fi`
182
183XTRAFLAGS = ` \
184 if [ -f $${rootme}/gcc/Makefile ] ; then \
9d401625
ILT
185 if [ -f $${rootme}/newlib/Makefile ] ; then \
186 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
51489233 187 else \
9d401625 188 echo -I$${rootme}/gcc/include ; \
51489233
ILT
189 fi ; \
190 else \
191 echo ; \
192 fi`
23e3e7f9 193
b1cceba2 194
eb02fd64 195#### host and target specific makefile fragments come in here.
ec342d7d 196###
eb02fd64 197
378fd382 198# Flags to pass down to sub-makes -- please keep these in alphabetical order
2198e4ba 199FLAGS_TO_PASS = \
2198e4ba
MT
200 "AR=$(AR)" \
201 "AR_FLAGS=$(AR_FLAGS)" \
d09de70e 202 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
378fd382 203 "BISON=$(BISON)" \
d1bea4c7
DZ
204 "CXXFLAGS=$(CXXFLAGS)" \
205 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
2198e4ba 206 "CC=$(CC)" \
378fd382 207 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
2198e4ba 208 "CFLAGS=$(CFLAGS)" \
7d9f0c54
MW
209$(start-sanitize-chill)\
210 "CHILLFLAGS=$(CHILLFLAGS)" \
211 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
212 "CHILL_LIB=$(CHILL_LIB)" \
e9a050f9 213$(end-sanitize-chill)\
d09de70e 214 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
2198e4ba
MT
215 "INSTALL=$(INSTALL)" \
216 "INSTALL_DATA=$(INSTALL_DATA)" \
440868a0 217 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
378fd382
DZ
218 "LDFLAGS=$(LDFLAGS)" \
219 "LEX=$(LEX)" \
220 "LOADLIBES=$(LOADLIBES)" \
221 "MAKEINFO=$(MAKEINFO)" \
222 "RANLIB=$(RANLIB)" \
d09de70e 223 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
378fd382
DZ
224 "exec_prefix=$(exec_prefix)" \
225 "prefix=$(prefix)" \
226 "tooldir=$(tooldir)"
2198e4ba 227
d1bea4c7
DZ
228# Flags that are concerned with the location of the X11 include files
229# and library files
230X11_FLAGS_TO_PASS = \
231 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
232 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)"
233
51489233 234# Flags to pass down to makes which are built with the target
d405f5be 235# environment (e.g. libg++, xiberty, newlib). -- keep these in alpha order please
51489233 236TARGET_FLAGS_TO_PASS = \
378fd382 237 "AR=$(AR_FOR_TARGET)" \
51489233 238 "AR_FLAGS=$(AR_FLAGS)" \
378fd382 239 "AS=$(AS_FOR_TARGET)" \
51489233 240 "BISON=$(BISON)" \
d1bea4c7
DZ
241 "CXX=$(CXX_FOR_TARGET)" \
242 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
243 "CXXFLAGS=$(CXXFLAGS)" \
378fd382
DZ
244 "CC=$(CC_FOR_TARGET)" \
245 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
246 "CFLAGS=$(CFLAGS)" \
51489233
ILT
247 "INSTALL=$(INSTALL)" \
248 "INSTALL_DATA=$(INSTALL_DATA)" \
249 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
378fd382
DZ
250 "LDFLAGS=$(LDFLAGS)" \
251 "LEX=$(LEX)" \
252 "LOADLIBES=$(LOADLIBES)" \
253 "MAKEINFO=$(MAKEINFO)" \
51489233 254 "NM=$(NM_FOR_TARGET)" \
378fd382
DZ
255 "RANLIB=$(RANLIB_FOR_TARGET)" \
256 "XTRAFLAGS=$(XTRAFLAGS)" \
257 "exec_prefix=$(exec_prefix)" \
258 "prefix=$(prefix)" \
259 "tooldir=$(tooldir)"
51489233 260
f4e414f1
ILT
261# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
262# unfortunately needs the native compiler and the target ar and
263# ranlib. Keep these in alphabetical order, please.
264GCC_FLAGS_TO_PASS = \
265 "AR=$(AR_FOR_TARGET)" \
266 "AR_FLAGS=$(AR_FLAGS)" \
267 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
268 "AS=$(AS)" \
269 "BISON=$(BISON)" \
270 "CXX=$(CXX)" \
271 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
272 "CXXFLAGS=$(CXXFLAGS)" \
273 "CC=$(CC)" \
274 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
275 "CFLAGS=$(CFLAGS)" \
276 "INSTALL=$(INSTALL)" \
277 "INSTALL_DATA=$(INSTALL_DATA)" \
278 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
279 "LDFLAGS=$(LDFLAGS)" \
280 "LEX=$(LEX)" \
281 "LOADLIBES=$(LOADLIBES)" \
282 "MAKEINFO=$(MAKEINFO)" \
283 "NM=$(NM)" \
284 "RANLIB=$(RANLIB_FOR_TARGET)" \
285 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
286 "XTRAFLAGS=$(XTRAFLAGS)" \
287 "exec_prefix=$(exec_prefix)" \
288 "prefix=$(prefix)" \
289 "tooldir=$(tooldir)"
290
fca4f908
MW
291# The first rule in the file had better be this one. Don't put any above it.
292all: $(ALL)
293
7fed4078 294.PHONY: all check dvi info install-info
f8a6ad66 295.NOEXPORT:
4d714963 296
e9b5ed59 297info check dvi:
b1cceba2 298 @rootme=`pwd` ; export rootme ; \
e9b5ed59 299 $(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
fb90daeb 300
9a9e8e7f 301install-info: install-info-dirs force
8b361a95
SEF
302 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
303 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
304 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
51489233
ILT
305 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
306 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) dir.info install-dir.info
9a9e8e7f
RP
307
308install-dir.info:
8b361a95
SEF
309 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
310 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
311 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
9a9e8e7f 312 $(INSTALL_DATA) dir.info $(infodir)/dir.info
4d714963 313
b1cceba2 314all.normal: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
868ebe79 315 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
5dca5185 316 all-gcc all-binutils all-libg++ all-readline all-z8ksim all-h8300sim all-gdb \
c4fb14b7 317 all-make all-rcs all-cvs all-diff all-grep \
98a33b6d 318 all-patch all-emacs all-ispell all-etc \
ffce44a0 319 all-tcl all-tk all-expect \
d405f5be
DZ
320 all-newlib \
321 $(start-sanitize-chill) \
322 all-chillrt \
323 $(end-sanitize-chill) \
324 all-gprof all-send_pr all-libm all-deja-gnu \
b1cceba2
DZ
325 all-fileutils all-find all-gawk all-sed all-shellutils \
326 all-textutils all-time all-wdiff
327
dcbfc14d 328
dfa891fc 329all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
d405f5be
DZ
330 all-opcodes all-z8ksim all-h8300sim all-bfd all-readline \
331 all-gdb all-binutils all-gcc all-newlib \
332 $(start-sanitize-chill) \
333 all-chillrt \
334 $(end-sanitize-chill) \
335 all-deja-gnu
4d714963 336
3b30df82
PB
337.PHONY: clean distclean mostlyclean realclean do_clean
338
339do_clean:
7fed4078 340 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
3b30df82 341
7fed4078 342clean mostlyclean: do_clean
3b30df82 343 @rootme=`pwd` ; export rootme ; \
7fed4078 344 $(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
3b30df82 345
7fed4078 346distclean realclean: do_clean
3b30df82 347 @rootme=`pwd` ; export rootme ; \
7fed4078
DZ
348 $(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
349 -rm -f Makefile config.status
7fcfdcf7 350
b1cceba2
DZ
351uninstall:
352 @echo "the uninstall target is not supported in this tree"
4d714963 353
98a33b6d 354install: $(INSTALL_TARGET)
8b361a95
SEF
355 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
356 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
357 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
b26ff9d8 358
06a07944
RP
359install.all: install-no-fixedincludes
360 @if [ -f ./gcc/Makefile ] ; then \
361 rootme=`pwd` ; export rootme ; \
362 (cd ./gcc; \
363 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
364 else \
365 true ; \
366 fi
5a63b336 367
dfa891fc
DZ
368install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
369 install-autoconf \
370 install-bfd \
371 install-binutils \
aa06ff7e 372 install-opcodes \
dfa891fc
DZ
373 install-byacc \
374 install-cvs \
375 install-diff \
fca4f908 376 install-deja-gnu \
dfa891fc 377 install-emacs \
98a33b6d 378 install-etc \
ffce44a0 379 install-expect \
dfa891fc
DZ
380 install-flex \
381 install-gas \
382 install-gdb \
383 install-glob \
384 install-gprof \
385 install-grep \
386 install-ispell \
387 install-ld \
388 install-libg++ \
389 install-libiberty \
390 install-libm \
391 install-make \
392 install-mmalloc \
393 install-newlib \
d405f5be 394 $(start-sanitize-chill) \
bc2a2c17 395 install-chillrt \
d405f5be 396 $(end-sanitize-chill) \
dfa891fc
DZ
397 install-patch \
398 install-rcs \
399 install-readline \
400 install-send_pr \
ffce44a0
DZ
401 install-tcl \
402 install-texinfo \
d1bea4c7 403 install-tk \
b1cceba2 404 install-z8ksim \
5dca5185 405 install-h8300sim \
b1cceba2
DZ
406 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
407 install-textutils install-time install-wdiff
d1bea4c7 408
5cc24596
PB
409#
410# Install the gcc headers files, but not the fixed include files,
411# which we are not allowed to distribute. This rule is very dependent
412# on the workings of the gcc Makefile.in.
413#
06a07944 414gcc-no-fixedincludes:
5cc24596
PB
415 @if [ -f ./gcc/Makefile ]; then \
416 rm -rf gcc/tmp-include; \
417 mv gcc/include gcc/tmp-include 2>/dev/null; \
418 mkdir gcc/include; \
419 touch gcc/stmp-fixincludes; \
420 rm -f gcc/stmp-headers; \
421 rootme=`pwd`; export rootme; \
422 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
423 (cd ./gcc; \
424 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
425 rm -rf gcc/include; \
426 mv gcc/tmp-include gcc/include 2>/dev/null; \
427 else true; fi
dcbfc14d
DZ
428
429install.cross: install-dirs install-libiberty install-mmalloc \
aa06ff7e 430 install-binutils install-opcodes install-byacc install-flex \
dfa891fc
DZ
431 install-ld install-gas install-readline \
432 install-glob install-gdb install-mmalloc \
d405f5be
DZ
433 install-newlib \
434 $(start-sanitize-chill) \
435 install-chillrt \
436 $(end-sanitize-chill) \
437 install-gcc install-etc install-deja-gnu
fca4f908
MW
438
439### deja-gnu
440all-deja-gnu: force
441 @if [ -f ./deja-gnu/Makefile ] ; then \
442 rootme=`pwd` ; export rootme ; \
443 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
444 else \
445 true ; \
446 fi
447
fca4f908
MW
448install-deja-gnu: force
449 @if [ -f ./deja-gnu/Makefile ] ; then \
450 rootme=`pwd` ; export rootme ; \
451 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
452 else \
453 true ; \
454 fi
23e3e7f9 455
618f57a9
RP
456### autoconf
457all-autoconf: force
a5cdd8af 458 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 459 rootme=`pwd` ; export rootme ; \
a5cdd8af 460 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
618f57a9
RP
461 else \
462 true ; \
463 fi
464
618f57a9 465install-autoconf: force
06a07944 466 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 467 rootme=`pwd` ; export rootme ; \
98a33b6d
DZ
468 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
469 else \
470 true ; \
471 fi
472
473### etc
474all-etc: force
475 @if [ -f ./etc/Makefile ] ; then \
476 rootme=`pwd` ; export rootme ; \
477 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
478 else \
479 true ; \
480 fi
481
98a33b6d
DZ
482install-etc: force
483 @if [ -f ./etc/Makefile ] ; then \
484 rootme=`pwd` ; export rootme ; \
485 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
618f57a9
RP
486 else \
487 true ; \
488 fi
489
4d714963 490### libiberty
c4fb14b7 491all-libiberty: force
06a07944 492 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 493 rootme=`pwd` ; export rootme ; \
7fcfdcf7 494 (cd ./libiberty; \
2198e4ba 495 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
496 else \
497 true ; \
498 fi
4d714963 499
4d714963 500install-libiberty: force
06a07944 501 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 502 rootme=`pwd` ; export rootme ; \
7fcfdcf7 503 (cd ./libiberty; \
2198e4ba 504 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
505 else \
506 true ; \
507 fi
23e3e7f9 508
fb90daeb
ME
509### xiberty
510all-xiberty: all-gcc all-newlib
511 @if [ -f ./xiberty/Makefile ] ; then \
512 rootme=`pwd` ; export rootme ; \
513 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
514 (cd ./xiberty; \
1b9b5090 515 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
fb90daeb
ME
516 else \
517 true ; \
518 fi
519
fb90daeb
ME
520install-xiberty: force
521 @if [ -f ./xiberty/Makefile ] ; then \
522 rootme=`pwd` ; export rootme ; \
523 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
524 (cd ./xiberty; \
1b9b5090 525 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
fb90daeb
ME
526 else \
527 true ; \
528 fi
529
66cfe047 530### mmalloc
c4fb14b7 531all-mmalloc: force
06a07944 532 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
533 rootme=`pwd` ; export rootme ; \
534 (cd ./mmalloc; \
2198e4ba 535 $(MAKE) $(FLAGS_TO_PASS) all) ; \
66cfe047
SG
536 else \
537 true ; \
538 fi
66cfe047 539
66cfe047 540install-mmalloc: force
06a07944 541 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
542 rootme=`pwd` ; export rootme ; \
543 (cd ./mmalloc; \
2198e4ba 544 $(MAKE) $(FLAGS_TO_PASS) install) ; \
66cfe047
SG
545 else \
546 true ; \
547 fi
548
4d714963 549### texinfo
c4fb14b7 550all-texinfo: all-libiberty
06a07944 551 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 552 rootme=`pwd` ; export rootme ; \
7fcfdcf7 553 (cd ./texinfo; \
2198e4ba 554 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
555 else \
556 true ; \
557 fi
4d714963 558
4d714963 559install-texinfo: force
06a07944 560 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 561 rootme=`pwd` ; export rootme ; \
7fcfdcf7 562 (cd ./texinfo; \
2198e4ba 563 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
564 else \
565 true ; \
566 fi
23e3e7f9 567
4d714963 568### bfd
c4fb14b7 569all-bfd: force
06a07944 570 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 571 rootme=`pwd` ; export rootme ; \
7fcfdcf7 572 (cd ./bfd; \
2198e4ba 573 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
574 else \
575 true ; \
576 fi
4d714963 577
4d714963 578install-bfd: force
06a07944 579 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 580 rootme=`pwd` ; export rootme ; \
7fcfdcf7 581 (cd ./bfd; \
2198e4ba 582 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
583 else \
584 true ; \
585 fi
23e3e7f9 586
aa06ff7e
SC
587
588### opcodes
589all-opcodes: force
590 @if [ -f ./opcodes/Makefile ] ; then \
591 rootme=`pwd` ; export rootme ; \
a904db53 592 (cd ./opcodes; \
aa06ff7e
SC
593 $(MAKE) $(FLAGS_TO_PASS) all) ; \
594 else \
595 true ; \
596 fi
597
aa06ff7e
SC
598install-opcodes: force
599 @if [ -f ./opcodes/Makefile ] ; then \
600 rootme=`pwd` ; export rootme ; \
a904db53 601 (cd ./opcodes; \
aa06ff7e
SC
602 $(MAKE) $(FLAGS_TO_PASS) install) ; \
603 else \
604 true ; \
605 fi
606
4d714963 607### binutils
aa06ff7e 608all-binutils: all-opcodes all-libiberty all-bfd all-flex
06a07944 609 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 610 rootme=`pwd` ; export rootme ; \
7fcfdcf7 611 (cd ./binutils; \
2198e4ba 612 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
613 else \
614 true ; \
615 fi
4d714963 616
4d714963 617install-binutils: force
06a07944 618 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 619 rootme=`pwd` ; export rootme ; \
7fcfdcf7 620 (cd ./binutils; \
2198e4ba 621 $(MAKE) $(FLAGS_TO_PASS) install) ; \
7fcfdcf7
SC
622 else \
623 true ; \
624 fi
625
626### newlib
51489233 627all-newlib: all-binutils all-ld all-gas all-gcc
06a07944 628 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 629 rootme=`pwd` ; export rootme ; \
51489233 630 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 631 (cd ./newlib; \
51489233 632 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
7fcfdcf7
SC
633 else \
634 true ; \
635 fi
7fcfdcf7 636
7fcfdcf7 637install-newlib: force
06a07944 638 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 639 rootme=`pwd` ; export rootme ; \
51489233 640 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 641 (cd ./newlib; \
51489233 642 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
643 else \
644 true ; \
645 fi
23e3e7f9 646
bc2a2c17
FF
647### start-sanitize-chill
648### chillrt
9f73dd6a 649all-chillrt: all-binutils all-ld all-gas all-gcc all-newlib
bc2a2c17
FF
650 @if [ -f ./chillrt/Makefile ] ; then \
651 rootme=`pwd` ; export rootme ; \
652 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
653 (cd ./chillrt; \
654 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
655 else \
656 true ; \
657 fi
658
659install-chillrt: force
660 @if [ -f ./chillrt/Makefile ] ; then \
661 rootme=`pwd` ; export rootme ; \
662 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
663 (cd ./chillrt; \
664 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
665 else \
666 true ; \
667 fi
668### end-sanitize-chill
669
9a14a29d 670### gprof
c4fb14b7 671all-gprof: all-libiberty all-bfd
06a07944 672 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
673 rootme=`pwd` ; export rootme ; \
674 (cd ./gprof; \
675 $(MAKE) $(FLAGS_TO_PASS) all) ; \
9a14a29d
SEF
676 else \
677 true ; \
678 fi
9a14a29d 679
9a14a29d 680install-gprof: force
06a07944 681 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
682 rootme=`pwd` ; export rootme ; \
683 (cd ./gprof; \
684 $(MAKE) $(FLAGS_TO_PASS) install) ; \
9a14a29d
SEF
685 else \
686 true ; \
687 fi
688
4d714963 689### byacc
c4fb14b7 690all-byacc: force
06a07944 691 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 692 rootme=`pwd` ; export rootme ; \
7fcfdcf7 693 (cd ./byacc; \
2198e4ba 694 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
695 else \
696 true ; \
697 fi
4d714963 698
4d714963 699install-byacc: force
06a07944 700 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 701 rootme=`pwd` ; export rootme ; \
7fcfdcf7 702 (cd ./byacc; \
2198e4ba 703 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
704 else \
705 true ; \
706 fi
23e3e7f9 707
dcbfc14d 708### flex
2198e4ba 709all-flex: all-libiberty
06a07944 710 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
711 rootme=`pwd` ; export rootme ; \
712 (cd ./flex; \
2198e4ba 713 $(MAKE) $(FLAGS_TO_PASS) all) ; \
dcbfc14d
DZ
714 else \
715 true ; \
716 fi
717
dcbfc14d 718install-flex: force
06a07944 719 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
720 rootme=`pwd` ; export rootme ; \
721 (cd ./flex; \
2198e4ba 722 $(MAKE) $(FLAGS_TO_PASS) install) ; \
dcbfc14d
DZ
723 else \
724 true ; \
725 fi
4d714963 726### gcc
378fd382 727all-gcc: all-libiberty all-byacc all-binutils
06a07944 728 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 729 rootme=`pwd` ; export rootme ; \
f4e414f1 730 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 731 (cd ./gcc; \
f4e414f1 732 $(MAKE) $(GCC_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
733 else \
734 true ; \
735 fi
4d714963 736
c4fb14b7 737install-gcc: force
06a07944 738 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 739 rootme=`pwd` ; export rootme ; \
f4e414f1 740 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 741 (cd ./gcc; \
f4e414f1 742 $(MAKE) $(GCC_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
743 else \
744 true ; \
745 fi
23e3e7f9 746
4d714963 747### readline
c4fb14b7 748all-readline: force
06a07944 749 @if [ -f ./readline/Makefile ] ; then \
77806c3e 750 rootme=`pwd` ; export rootme ; \
7fcfdcf7 751 (cd ./readline; \
2198e4ba 752 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
753 else \
754 true ; \
755 fi
4d714963 756
4d714963 757install-readline: force
06a07944 758 @if [ -f ./readline/Makefile ] ; then \
77806c3e 759 rootme=`pwd` ; export rootme ; \
7fcfdcf7 760 (cd ./readline; \
2198e4ba 761 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
762 else \
763 true ; \
764 fi
23e3e7f9 765
4d714963 766### glob
c4fb14b7 767all-glob: force
06a07944 768 @if [ -f ./glob/Makefile ] ; then \
77806c3e 769 rootme=`pwd` ; export rootme ; \
7fcfdcf7 770 (cd ./glob; \
2198e4ba 771 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
772 else \
773 true ; \
774 fi
4d714963 775
4d714963 776install-glob: force
06a07944 777 @if [ -f ./glob/Makefile ] ; then \
77806c3e 778 rootme=`pwd` ; export rootme ; \
7fcfdcf7 779 (cd ./glob; \
2198e4ba 780 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
781 else \
782 true ; \
783 fi
23e3e7f9 784
4d714963 785### gas
a904db53 786all-gas: all-libiberty all-opcodes all-bfd
06a07944 787 @if [ -f ./gas/Makefile ] ; then \
77806c3e 788 rootme=`pwd` ; export rootme ; \
7fcfdcf7 789 (cd ./gas; \
2198e4ba 790 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
791 else \
792 true ; \
793 fi
4d714963 794
4d714963 795install-gas: force
06a07944 796 @if [ -f ./gas/Makefile ] ; then \
77806c3e 797 rootme=`pwd` ; export rootme ; \
7fcfdcf7 798 (cd ./gas; \
2198e4ba 799 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
800 else \
801 true ; \
802 fi
23e3e7f9 803
3ad0ef37
SC
804### gas
805all-tgas: all-libiberty all-bfd
806 @if [ -f ./tgas/Makefile ] ; then \
807 rootme=`pwd` ; export rootme ; \
808 (cd ./tgas; \
809 $(MAKE) $(FLAGS_TO_PASS) all) ; \
810 else \
811 true ; \
812 fi
813
814
4d714963 815### ld
6995fe83 816all-ld: all-libiberty all-bfd all-byacc all-flex
06a07944 817 @if [ -f ./ld/Makefile ] ; then \
77806c3e 818 rootme=`pwd` ; export rootme ; \
7fcfdcf7 819 (cd ./ld; \
2198e4ba 820 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
821 else \
822 true ; \
823 fi
a0f47eb7 824
4d714963 825install-ld: force
06a07944 826 @if [ -f ./ld/Makefile ] ; then \
77806c3e 827 rootme=`pwd` ; export rootme ; \
7fcfdcf7 828 (cd ./ld; \
2198e4ba 829 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
830 else \
831 true ; \
832 fi
23e3e7f9 833
4d714963 834### gdb
a904db53 835all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
06a07944 836 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 837 rootme=`pwd` ; export rootme ; \
7fcfdcf7 838 (cd ./gdb; \
2198e4ba 839 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
840 else \
841 true ; \
842 fi
4d714963 843
4d714963 844install-gdb: force
06a07944 845 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 846 rootme=`pwd` ; export rootme ; \
7fcfdcf7 847 (cd ./gdb; \
2198e4ba 848 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
849 else \
850 true ; \
851 fi
23e3e7f9 852
4d714963 853### make
c4fb14b7 854all-make: all-libiberty
06a07944 855 @if [ -f ./make/Makefile ] ; then \
77806c3e 856 rootme=`pwd` ; export rootme ; \
7fcfdcf7 857 (cd ./make; \
2198e4ba 858 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
859 else \
860 true ; \
861 fi
4d714963 862
4d714963 863install-make: force
06a07944 864 @if [ -f ./make/Makefile ] ; then \
77806c3e 865 rootme=`pwd` ; export rootme ; \
7fcfdcf7 866 (cd ./make; \
2198e4ba 867 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
868 else \
869 true ; \
870 fi
23e3e7f9 871
4d714963 872### diff
c4fb14b7 873all-diff: force
06a07944 874 @if [ -f ./diff/Makefile ] ; then \
77806c3e 875 rootme=`pwd` ; export rootme ; \
7fcfdcf7 876 (cd ./diff; \
2198e4ba 877 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
878 else \
879 true ; \
880 fi
4d714963 881
4d714963 882install-diff: force
06a07944 883 @if [ -f ./diff/Makefile ] ; then \
77806c3e 884 rootme=`pwd` ; export rootme ; \
7fcfdcf7 885 (cd ./diff/; \
2198e4ba 886 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
887 else \
888 true ; \
889 fi
23e3e7f9 890
4d714963 891### grep
c4fb14b7 892all-grep: force
06a07944 893 @if [ -f ./grep/Makefile ] ; then \
77806c3e 894 rootme=`pwd` ; export rootme ; \
7fcfdcf7 895 (cd ./grep; \
2198e4ba 896 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
897 else \
898 true ; \
899 fi
4d714963 900
4d714963 901install-grep: force
06a07944 902 @if [ -f ./grep/Makefile ] ; then \
77806c3e 903 rootme=`pwd` ; export rootme ; \
7fcfdcf7 904 (cd ./grep; \
2198e4ba
MT
905 $(MAKE) $(FLAGS_TO_PASS) install) ; \
906 else \
907 true ; \
908 fi
909
910### rcs
911all-rcs: force
06a07944 912 @if [ -f ./rcs/Makefile ] ; then \
2198e4ba
MT
913 rootme=`pwd` ; export rootme ; \
914 (cd ./rcs; \
915 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
916 else \
917 true ; \
918 fi
4d714963 919
c4fb14b7 920install-rcs: force
06a07944 921 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 922 rootme=`pwd` ; export rootme ; \
7fcfdcf7 923 (cd ./rcs; \
2198e4ba 924 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
925 else \
926 true ; \
927 fi
23e3e7f9 928
4d714963 929### cvs
c4fb14b7 930all-cvs: force
06a07944 931 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 932 rootme=`pwd` ; export rootme ; \
7fcfdcf7 933 (cd ./cvs; \
2198e4ba 934 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
935 else \
936 true ; \
937 fi
4d714963 938
c4fb14b7 939install-cvs: force
06a07944 940 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 941 rootme=`pwd` ; export rootme ; \
7fcfdcf7 942 (cd ./cvs; \
2198e4ba 943 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
944 else \
945 true ; \
946 fi
23e3e7f9 947
7c9feeb7 948### patch
c4fb14b7 949all-patch: force
06a07944 950 @if [ -f ./patch/Makefile ] ; then \
77806c3e 951 rootme=`pwd` ; export rootme ; \
7fcfdcf7 952 (cd ./patch; \
2198e4ba 953 $(MAKE) $(FLAGS_TO_PASS) all) ; \
7c9feeb7
RP
954 else \
955 true ; \
956 fi
957
c4fb14b7 958install-patch: force
06a07944 959 @if [ -f ./patch/Makefile ] ; then \
77806c3e 960 rootme=`pwd` ; export rootme ; \
7fcfdcf7 961 (cd ./patch; \
2198e4ba 962 $(MAKE) $(FLAGS_TO_PASS) \
7c9feeb7 963 bindir=$(bindir) \
2198e4ba 964 man1dir=$(man1dir) install) ; \
7c9feeb7
RP
965 else \
966 true ; \
967 fi
968
4d714963 969### emacs
c4fb14b7 970all-emacs: force
06a07944 971 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 972 rootme=`pwd` ; export rootme ; \
7fcfdcf7 973 (cd ./emacs; \
d1bea4c7 974 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
975 else \
976 true ; \
977 fi
4d714963 978
c4fb14b7 979install-emacs: force
06a07944 980 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 981 rootme=`pwd` ; export rootme ; \
7fcfdcf7 982 (cd ./emacs; \
d1bea4c7 983 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
984 else \
985 true ; \
986 fi
23e3e7f9 987
4d714963 988### ispell
c4fb14b7 989all-ispell: all-emacs
06a07944 990 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 991 rootme=`pwd` ; export rootme ; \
7fcfdcf7 992 (cd ./ispell; \
2198e4ba 993 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
994 else \
995 true ; \
996 fi
4d714963 997
c4fb14b7 998install-ispell: force
06a07944 999 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1000 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1001 (cd ./ispell; \
2198e4ba 1002 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079399f6
RP
1003 else \
1004 true ; \
1005 fi
23e3e7f9 1006
079b2abe 1007### send_pr
c4fb14b7 1008all-send_pr: force
06a07944 1009 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1010 rootme=`pwd` ; export rootme ; \
1011 (cd ./send_pr; \
2198e4ba 1012 $(MAKE) $(FLAGS_TO_PASS) all) ; \
079b2abe
RP
1013 else \
1014 true ; \
1015 fi
079b2abe 1016
c4fb14b7 1017install-send_pr: force
06a07944 1018 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1019 rootme=`pwd` ; export rootme ; \
1020 (cd ./send_pr; \
2198e4ba 1021 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079b2abe
RP
1022 else \
1023 true ; \
1024 fi
1025
06a07944
RP
1026### libm
1027all-libm: force
98a33b6d 1028 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1029 rootme=`pwd` ; export rootme ; \
1030 (cd ./libm; \
1b9b5090 1031 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
06a07944
RP
1032 else \
1033 true ; \
1034 fi
1035
06a07944 1036install-libm: force
98a33b6d 1037 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1038 rootme=`pwd` ; export rootme ; \
1039 (cd ./libm; \
1b9b5090 1040 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
06a07944
RP
1041 else \
1042 true ; \
1043 fi
1044
ba8abfce 1045### libg++
9d98d2ac 1046
e85e07cb 1047all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
06a07944 1048 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1049 rootme=`pwd` ; export rootme ; \
51489233 1050 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1051 (cd ./libg++; \
51489233 1052 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
ba8abfce
JG
1053 else \
1054 true ; \
1055 fi
1056
c4fb14b7 1057install-libg++: force
06a07944 1058 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1059 rootme=`pwd` ; export rootme ; \
51489233 1060 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1061 (cd ./libg++; \
51489233 1062 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
ba8abfce
JG
1063 else \
1064 true ; \
1065 fi
ffce44a0
DZ
1066### tcl
1067all-tcl:
1068 @if [ -f ./tcl/Makefile ] ; then \
1069 rootme=`pwd` ; export rootme ; \
1070 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1071 (cd ./tcl; \
1072 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1073 else \
1074 true ; \
1075 fi
1076
ffce44a0
DZ
1077install-tcl: force
1078 @if [ -f ./tcl/Makefile ] ; then \
1079 rootme=`pwd` ; export rootme ; \
1080 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1081 (cd ./tcl; \
1082 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1083 else \
1084 true ; \
1085 fi
1086
1087
1088### tk
1089all-tk: all-tcl
1090 @if [ -f ./tk/Makefile ] ; then \
1091 rootme=`pwd` ; export rootme ; \
1092 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1093 (cd ./tk; \
d1bea4c7 1094 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
ffce44a0
DZ
1095 else \
1096 true ; \
1097 fi
1098
ffce44a0
DZ
1099install-tk: force
1100 @if [ -f ./tk/Makefile ] ; then \
1101 rootme=`pwd` ; export rootme ; \
1102 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1103 (cd ./tk; \
d1bea4c7 1104 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
ffce44a0
DZ
1105 else \
1106 true ; \
1107 fi
1108
d1bea4c7 1109### expect
ffce44a0
DZ
1110all-expect: all-tcl
1111 @if [ -f ./expect/Makefile ] ; then \
1112 rootme=`pwd` ; export rootme ; \
1113 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1114 (cd ./expect; \
1115 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1116 else \
1117 true ; \
1118 fi
1119
ffce44a0
DZ
1120install-expect: force
1121 @if [ -f ./expect/Makefile ] ; then \
1122 rootme=`pwd` ; export rootme ; \
1123 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1124 (cd ./expect; \
1125 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1126 else \
1127 true ; \
1128 fi
1129
d1bea4c7
DZ
1130### z8ksim
1131all-z8ksim: all-bfd
1132 @if [ -f ./z8ksim/Makefile ] ; then \
1133 rootme=`pwd` ; export rootme ; \
1134 (cd ./z8ksim; \
1135 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1136 else \
1137 true ; \
1138 fi
1139
b1cceba2 1140install-z8ksim: force
d1bea4c7
DZ
1141 @if [ -f ./z8ksim/Makefile ] ; then \
1142 rootme=`pwd` ; export rootme ; \
1143 (cd ./z8ksim; \
b1cceba2 1144 $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1145 else \
1146 true ; \
1147 fi
1148
ce1a2ef4
SC
1149### h8300sim:
1150all-h8300sim: all-bfd
5dca5185
SC
1151 @if [ -f ./h8300sim/Makefile ] ; then \
1152 rootme=`pwd` ; export rootme ; \
1153 (cd ./h8300sim; \
1154 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1155 else \
1156 true ; \
1157 fi
1158
1159install-h8300sim: force
1160 @if [ -f ./h8300sim/Makefile ] ; then \
1161 rootme=`pwd` ; export rootme ; \
1162 (cd ./h8300sim; \
1163 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1164 else \
1165 true ; \
1166 fi
1167
1168
b1cceba2
DZ
1169### fileutils
1170all-fileutils: force
1171 @if [ -f ./fileutils/Makefile ] ; then \
1172 rootme=`pwd` ; export rootme ; \
1173 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1174 else \
1175 true ; \
1176 fi
1177
1178install-fileutils: force
1179 @if [ -f ./fileutils/Makefile ] ; then \
d1bea4c7 1180 rootme=`pwd` ; export rootme ; \
b1cceba2
DZ
1181 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1182 else \
1183 true ; \
1184 fi
1185
1186### find
1187all-find: force
1188 @if [ -f ./find/Makefile ] ; then \
1189 rootme=`pwd` ; export rootme ; \
1190 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1191 else \
1192 true ; \
1193 fi
1194
1195install-find: force
1196 @if [ -f ./find/Makefile ] ; then \
1197 rootme=`pwd` ; export rootme ; \
1198 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1199 else \
1200 true ; \
1201 fi
1202
1203### gawk
1204all-gawk: force
1205 @if [ -f ./gawk/Makefile ] ; then \
1206 rootme=`pwd` ; export rootme ; \
1207 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1208 else \
1209 true ; \
1210 fi
1211
1212install-gawk: force
1213 @if [ -f ./gawk/Makefile ] ; then \
1214 rootme=`pwd` ; export rootme ; \
1215 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1216 else \
1217 true ; \
1218 fi
1219
b1cceba2
DZ
1220### m4
1221all-m4: all-libiberty
1222 @if [ -f ./m4/Makefile ] ; then \
1223 rootme=`pwd` ; export rootme ; \
1224 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1225 else \
1226 true ; \
1227 fi
1228
1229install-m4: force
1230 @if [ -f ./m4/Makefile ] ; then \
1231 rootme=`pwd` ; export rootme ; \
1232 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1233 else \
1234 true ; \
1235 fi
1236
1237### sed
1238all-sed: force
1239 @if [ -f ./sed/Makefile ] ; then \
1240 rootme=`pwd` ; export rootme ; \
1241 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1242 else \
1243 true ; \
1244 fi
1245
1246install-sed: force
1247 @if [ -f ./sed/Makefile ] ; then \
1248 rootme=`pwd` ; export rootme ; \
1249 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1250 else \
1251 true ; \
1252 fi
1253
1254### time
1255all-time: force
1256 @if [ -f ./time/Makefile ] ; then \
1257 rootme=`pwd` ; export rootme ; \
1258 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1259 else \
1260 true ; \
1261 fi
1262
1263install-time: force
1264 @if [ -f ./time/Makefile ] ; then \
1265 rootme=`pwd` ; export rootme ; \
1266 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1267 else \
1268 true ; \
1269 fi
1270
1271### wdiff
1272all-wdiff: force
1273 @if [ -f ./wdiff/Makefile ] ; then \
1274 rootme=`pwd` ; export rootme ; \
1275 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1276 else \
1277 true ; \
1278 fi
1279
1280install-wdiff: force
1281 @if [ -f ./wdiff/Makefile ] ; then \
1282 rootme=`pwd` ; export rootme ; \
1283 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1284 else \
1285 true ; \
1286 fi
1287
1288### shellutils
1289all-shellutils: force
1290 @if [ -f ./shellutils/Makefile ] ; then \
1291 rootme=`pwd` ; export rootme ; \
1292 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1293 else \
1294 true ; \
1295 fi
1296
1297install-shellutils: force
1298 @if [ -f ./shellutils/Makefile ] ; then \
1299 rootme=`pwd` ; export rootme ; \
1300 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1301 else \
1302 true ; \
1303 fi
1304
1305### textutils
1306all-textutils: force
1307 @if [ -f ./textutils/Makefile ] ; then \
1308 rootme=`pwd` ; export rootme ; \
1309 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1310 else \
1311 true ; \
1312 fi
1313
1314install-textutils: force
1315 @if [ -f ./textutils/Makefile ] ; then \
1316 rootme=`pwd` ; export rootme ; \
1317 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1318 else \
1319 true ; \
1320 fi
1321
1322
d1bea4c7 1323
4d714963 1324### other supporting targets
a0f47eb7 1325
02a7ba9a 1326subdir_do:
9f73dd6a
DZ
1327### start-sanitize-chill
1328###
1329### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
1330###
1331### if you change the code for libg++ et al, also change the
1332### code for chillrt
1333###
1334### end-sanitize-chill
1dbe4d41 1335 @for i in $(DODIRS); do \
51489233
ILT
1336 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1337 case $$i in \
d405f5be 1338 libg++ | xiberty | newlib) \
51489233
ILT
1339 if (rootme=`pwd` ; export rootme ; \
1340 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1341 cd ./$$i ; \
1342 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1343 else exit 1 ; fi \
1344 ;; \
9f73dd6a 1345 $(start-sanitize-chill) \
d405f5be
DZ
1346 chillrt) \
1347 if (rootme=`pwd` ; export rootme ; \
1348 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1349 cd ./$$i ; \
1350 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1351 else exit 1 ; fi \
1352 ;; \
9f73dd6a 1353 $(end-sanitize-chill) \
f4e414f1
ILT
1354 gcc) \
1355 if (rootme=`pwd` ; export rootme ; \
1356 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1357 cd ./$$i ; \
1358 $(MAKE) $(GCC_FLAGS_TO_PASS) $(DO)) ; then true ; \
1359 else exit 1 ; fi \
1360 ;; \
51489233
ILT
1361 *) \
1362 if (rootme=`pwd` ; export rootme ; \
1363 cd ./$$i ; \
1364 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1365 else exit 1 ; fi \
1366 ;; \
1367 esac ; \
1368 else true ; fi ; \
a01bf1fb 1369 done
eb02fd64 1370
abc52b80
JG
1371# The "else true" stuff is for Ultrix; the shell returns the exit code
1372# of the "if" command, if no commands are run in the "then" or "else" part,
1373# causing Make to quit.
4c27527f
RP
1374
1375MAKEDIRS= \
4d714963 1376 $(prefix) \
7fcfdcf7 1377 $(exec_prefix) \
8b361a95
SEF
1378 $(tooldir)
1379
1380# $(bindir) \
1381# $(libdir) \
1382# $(includedir) \
1383# $(datadir) \
1384# $(docdir) \
1385# $(mandir) \
1386# $(man1dir) \
1387# $(man5dir)
4d714963
RP
1388
1389# $(man2dir) \
1390# $(man3dir) \
1391# $(man4dir) \
1392# $(man6dir) \
1393# $(man7dir) \
1394# $(man8dir)
4c27527f 1395
02a7ba9a 1396install-dirs:
4c27527f 1397 for i in $(MAKEDIRS) ; do \
cd49a4dc 1398 echo Making $$i... ; \
8b361a95
SEF
1399 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1400 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
06a07944
RP
1401 if [ ! -d $$i ] ; then \
1402 if mkdir $$i ; then \
1403 true ; \
1404 else \
1405 exit 1 ; \
1406 fi ; \
1407 else \
1408 true ; \
1409 fi ; \
4c27527f 1410 done
0ec776a5 1411
02a7ba9a 1412install-info-dirs:
9a9e8e7f 1413 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
c5f94070 1414
02a7ba9a 1415dir.info:
8b361a95 1416 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
c466cfab 1417 mv -f dir.info.new dir.info
6b7e5998 1418
b1cceba2
DZ
1419dist:
1420 @echo "Building a full distribution of this tree isn't done"
1421 @echo "via 'make dist'. Check out the etc/ subdirectory"
1422
eb02fd64
RP
1423etags tags: TAGS
1424
02a7ba9a 1425TAGS:
eb02fd64
RP
1426 etags `$(MAKE) ls`
1427
1428ls:
1429 @echo Makefile
1430 @for i in $(SUBDIRS); \
1431 do \
1432 (cd $$i; \
1433 pwd=`pwd`; \
1434 wd=`basename $$pwd`; \
1435 for j in `$(MAKE) ls`; \
1436 do \
1437 echo $$wd/$$j; \
1438 done) \
1439 done
1440
3c81fef5 1441force:
eb02fd64
RP
1442
1443# with the gnu make, this is done automatically.
1444
f1eb48b6 1445Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1446 $(SHELL) ./config.status
eb02fd64 1447
11954bf1
JG
1448#
1449# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1450
d94d255d 1451DEVO_SUPPORT= README Makefile.in configure configure.in \
5cc24596 1452 config.guess config.sub config etc move-if-change \
fca4f908 1453 COPYING.LIB
fb90daeb 1454GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
d94d255d 1455GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
11954bf1 1456
b1cceba2 1457setup-dirs: force
11954bf1
JG
1458 ./configure sun4
1459 make clean
1460 ./configure -rm sun4
905bb120 1461 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
abc52b80 1462
abc52b80
JG
1463gdb.tar.Z: setup-dirs
1464 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1465 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1466
1467make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1468 rm -rf proto-toplev; mkdir proto-toplev
1469 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1470 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1471 ln -s ../$$i . ; \
1472 done)
7c9feeb7
RP
1473 # Put only one copy (four hard links) of COPYING in the tar file.
1474 rm proto-toplev/bfd/COPYING
1475 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1476 rm proto-toplev/include/COPYING
1477 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1478 rm proto-toplev/readline/COPYING
1479 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
a3a063a9
JG
1480 # Take out texinfo from configurable dirs
1481 rm proto-toplev/configure.in
1482 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
4d714963
RP
1483 # Take out glob from buildable dirs
1484 rm proto-toplev/Makefile.in
6995fe83
SG
1485
1486 sed -e '/^SUBDIRS =/s/glob //' \
1487 -e '/^all\.normal: /s/\all-texinfo //' \
1488 -e '/^clean: /s/clean-texinfo //' \
1489 -e '/^install\.all: /s/install-texinfo //' \
1490 <Makefile.in >proto-toplev/Makefile.in
1491
abc52b80
JG
1492 mkdir proto-toplev/texinfo
1493 mkdir proto-toplev/texinfo/fsf
1494 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
905bb120 1495 chmod og=u `find proto-toplev -print`
abc52b80
JG
1496 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1497 echo "==> Making gdb-$$VER.tar.Z"; \
1498 ln -s proto-toplev gdb-$$VER; \
1499 tar cfh - gdb-$$VER \
1500 | compress -v >gdb-$$VER.tar.Z)
1501
0ec776a5 1502
eb02fd64 1503# end of Makefile.in
This page took 0.142596 seconds and 4 git commands to generate.