* Makefile.in: added variables CHILL_FOR_TARGET, CHILLFLAGS,
[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)" \
213$(start-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
06a07944
RP
409gcc-no-fixedincludes:
410 @if [ -f ./gcc/Makefile ] ; then \
411 rootme=`pwd` ; export rootme ; \
412 (cd ./gcc; \
413 $(MAKE) $(FLAGS_TO_PASS) install install-man \
414 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
415 else \
416 true ; \
417 fi
dcbfc14d
DZ
418
419install.cross: install-dirs install-libiberty install-mmalloc \
aa06ff7e 420 install-binutils install-opcodes install-byacc install-flex \
dfa891fc
DZ
421 install-ld install-gas install-readline \
422 install-glob install-gdb install-mmalloc \
d405f5be
DZ
423 install-newlib \
424 $(start-sanitize-chill) \
425 install-chillrt \
426 $(end-sanitize-chill) \
427 install-gcc install-etc install-deja-gnu
fca4f908
MW
428
429### deja-gnu
430all-deja-gnu: force
431 @if [ -f ./deja-gnu/Makefile ] ; then \
432 rootme=`pwd` ; export rootme ; \
433 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
434 else \
435 true ; \
436 fi
437
fca4f908
MW
438install-deja-gnu: force
439 @if [ -f ./deja-gnu/Makefile ] ; then \
440 rootme=`pwd` ; export rootme ; \
441 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
442 else \
443 true ; \
444 fi
23e3e7f9 445
618f57a9
RP
446### autoconf
447all-autoconf: force
a5cdd8af 448 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 449 rootme=`pwd` ; export rootme ; \
a5cdd8af 450 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
618f57a9
RP
451 else \
452 true ; \
453 fi
454
618f57a9 455install-autoconf: force
06a07944 456 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 457 rootme=`pwd` ; export rootme ; \
98a33b6d
DZ
458 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
459 else \
460 true ; \
461 fi
462
463### etc
464all-etc: force
465 @if [ -f ./etc/Makefile ] ; then \
466 rootme=`pwd` ; export rootme ; \
467 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
468 else \
469 true ; \
470 fi
471
98a33b6d
DZ
472install-etc: force
473 @if [ -f ./etc/Makefile ] ; then \
474 rootme=`pwd` ; export rootme ; \
475 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
618f57a9
RP
476 else \
477 true ; \
478 fi
479
4d714963 480### libiberty
c4fb14b7 481all-libiberty: force
06a07944 482 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 483 rootme=`pwd` ; export rootme ; \
7fcfdcf7 484 (cd ./libiberty; \
2198e4ba 485 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
486 else \
487 true ; \
488 fi
4d714963 489
4d714963 490install-libiberty: force
06a07944 491 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 492 rootme=`pwd` ; export rootme ; \
7fcfdcf7 493 (cd ./libiberty; \
2198e4ba 494 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
495 else \
496 true ; \
497 fi
23e3e7f9 498
fb90daeb
ME
499### xiberty
500all-xiberty: all-gcc all-newlib
501 @if [ -f ./xiberty/Makefile ] ; then \
502 rootme=`pwd` ; export rootme ; \
503 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
504 (cd ./xiberty; \
1b9b5090 505 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
fb90daeb
ME
506 else \
507 true ; \
508 fi
509
fb90daeb
ME
510install-xiberty: force
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) install) ; \
fb90daeb
ME
516 else \
517 true ; \
518 fi
519
66cfe047 520### mmalloc
c4fb14b7 521all-mmalloc: force
06a07944 522 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
523 rootme=`pwd` ; export rootme ; \
524 (cd ./mmalloc; \
2198e4ba 525 $(MAKE) $(FLAGS_TO_PASS) all) ; \
66cfe047
SG
526 else \
527 true ; \
528 fi
66cfe047 529
66cfe047 530install-mmalloc: force
06a07944 531 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
532 rootme=`pwd` ; export rootme ; \
533 (cd ./mmalloc; \
2198e4ba 534 $(MAKE) $(FLAGS_TO_PASS) install) ; \
66cfe047
SG
535 else \
536 true ; \
537 fi
538
4d714963 539### texinfo
c4fb14b7 540all-texinfo: all-libiberty
06a07944 541 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 542 rootme=`pwd` ; export rootme ; \
7fcfdcf7 543 (cd ./texinfo; \
2198e4ba 544 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
545 else \
546 true ; \
547 fi
4d714963 548
4d714963 549install-texinfo: force
06a07944 550 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 551 rootme=`pwd` ; export rootme ; \
7fcfdcf7 552 (cd ./texinfo; \
2198e4ba 553 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
554 else \
555 true ; \
556 fi
23e3e7f9 557
4d714963 558### bfd
c4fb14b7 559all-bfd: force
06a07944 560 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 561 rootme=`pwd` ; export rootme ; \
7fcfdcf7 562 (cd ./bfd; \
2198e4ba 563 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
564 else \
565 true ; \
566 fi
4d714963 567
4d714963 568install-bfd: force
06a07944 569 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 570 rootme=`pwd` ; export rootme ; \
7fcfdcf7 571 (cd ./bfd; \
2198e4ba 572 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
573 else \
574 true ; \
575 fi
23e3e7f9 576
aa06ff7e
SC
577
578### opcodes
579all-opcodes: force
580 @if [ -f ./opcodes/Makefile ] ; then \
581 rootme=`pwd` ; export rootme ; \
a904db53 582 (cd ./opcodes; \
aa06ff7e
SC
583 $(MAKE) $(FLAGS_TO_PASS) all) ; \
584 else \
585 true ; \
586 fi
587
aa06ff7e
SC
588install-opcodes: force
589 @if [ -f ./opcodes/Makefile ] ; then \
590 rootme=`pwd` ; export rootme ; \
a904db53 591 (cd ./opcodes; \
aa06ff7e
SC
592 $(MAKE) $(FLAGS_TO_PASS) install) ; \
593 else \
594 true ; \
595 fi
596
4d714963 597### binutils
aa06ff7e 598all-binutils: all-opcodes all-libiberty all-bfd all-flex
06a07944 599 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 600 rootme=`pwd` ; export rootme ; \
7fcfdcf7 601 (cd ./binutils; \
2198e4ba 602 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
603 else \
604 true ; \
605 fi
4d714963 606
4d714963 607install-binutils: force
06a07944 608 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 609 rootme=`pwd` ; export rootme ; \
7fcfdcf7 610 (cd ./binutils; \
2198e4ba 611 $(MAKE) $(FLAGS_TO_PASS) install) ; \
7fcfdcf7
SC
612 else \
613 true ; \
614 fi
615
616### newlib
51489233 617all-newlib: all-binutils all-ld all-gas all-gcc
06a07944 618 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 619 rootme=`pwd` ; export rootme ; \
51489233 620 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 621 (cd ./newlib; \
51489233 622 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
7fcfdcf7
SC
623 else \
624 true ; \
625 fi
7fcfdcf7 626
7fcfdcf7 627install-newlib: force
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) install) ; \
b26ff9d8
RP
633 else \
634 true ; \
635 fi
23e3e7f9 636
bc2a2c17
FF
637### start-sanitize-chill
638### chillrt
9f73dd6a 639all-chillrt: all-binutils all-ld all-gas all-gcc all-newlib
bc2a2c17
FF
640 @if [ -f ./chillrt/Makefile ] ; then \
641 rootme=`pwd` ; export rootme ; \
642 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
643 (cd ./chillrt; \
644 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
645 else \
646 true ; \
647 fi
648
649install-chillrt: force
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) install) ; \
655 else \
656 true ; \
657 fi
658### end-sanitize-chill
659
9a14a29d 660### gprof
c4fb14b7 661all-gprof: all-libiberty all-bfd
06a07944 662 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
663 rootme=`pwd` ; export rootme ; \
664 (cd ./gprof; \
665 $(MAKE) $(FLAGS_TO_PASS) all) ; \
9a14a29d
SEF
666 else \
667 true ; \
668 fi
9a14a29d 669
9a14a29d 670install-gprof: force
06a07944 671 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
672 rootme=`pwd` ; export rootme ; \
673 (cd ./gprof; \
674 $(MAKE) $(FLAGS_TO_PASS) install) ; \
9a14a29d
SEF
675 else \
676 true ; \
677 fi
678
4d714963 679### byacc
c4fb14b7 680all-byacc: force
06a07944 681 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 682 rootme=`pwd` ; export rootme ; \
7fcfdcf7 683 (cd ./byacc; \
2198e4ba 684 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
685 else \
686 true ; \
687 fi
4d714963 688
4d714963 689install-byacc: force
06a07944 690 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 691 rootme=`pwd` ; export rootme ; \
7fcfdcf7 692 (cd ./byacc; \
2198e4ba 693 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
694 else \
695 true ; \
696 fi
23e3e7f9 697
dcbfc14d 698### flex
2198e4ba 699all-flex: all-libiberty
06a07944 700 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
701 rootme=`pwd` ; export rootme ; \
702 (cd ./flex; \
2198e4ba 703 $(MAKE) $(FLAGS_TO_PASS) all) ; \
dcbfc14d
DZ
704 else \
705 true ; \
706 fi
707
dcbfc14d 708install-flex: force
06a07944 709 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
710 rootme=`pwd` ; export rootme ; \
711 (cd ./flex; \
2198e4ba 712 $(MAKE) $(FLAGS_TO_PASS) install) ; \
dcbfc14d
DZ
713 else \
714 true ; \
715 fi
4d714963 716### gcc
378fd382 717all-gcc: all-libiberty all-byacc all-binutils
06a07944 718 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 719 rootme=`pwd` ; export rootme ; \
f4e414f1 720 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 721 (cd ./gcc; \
f4e414f1 722 $(MAKE) $(GCC_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
723 else \
724 true ; \
725 fi
4d714963 726
c4fb14b7 727install-gcc: force
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) install) ; \
b26ff9d8
RP
733 else \
734 true ; \
735 fi
23e3e7f9 736
4d714963 737### readline
c4fb14b7 738all-readline: force
06a07944 739 @if [ -f ./readline/Makefile ] ; then \
77806c3e 740 rootme=`pwd` ; export rootme ; \
7fcfdcf7 741 (cd ./readline; \
2198e4ba 742 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
743 else \
744 true ; \
745 fi
4d714963 746
4d714963 747install-readline: force
06a07944 748 @if [ -f ./readline/Makefile ] ; then \
77806c3e 749 rootme=`pwd` ; export rootme ; \
7fcfdcf7 750 (cd ./readline; \
2198e4ba 751 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
752 else \
753 true ; \
754 fi
23e3e7f9 755
4d714963 756### glob
c4fb14b7 757all-glob: force
06a07944 758 @if [ -f ./glob/Makefile ] ; then \
77806c3e 759 rootme=`pwd` ; export rootme ; \
7fcfdcf7 760 (cd ./glob; \
2198e4ba 761 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
762 else \
763 true ; \
764 fi
4d714963 765
4d714963 766install-glob: force
06a07944 767 @if [ -f ./glob/Makefile ] ; then \
77806c3e 768 rootme=`pwd` ; export rootme ; \
7fcfdcf7 769 (cd ./glob; \
2198e4ba 770 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
771 else \
772 true ; \
773 fi
23e3e7f9 774
4d714963 775### gas
a904db53 776all-gas: all-libiberty all-opcodes all-bfd
06a07944 777 @if [ -f ./gas/Makefile ] ; then \
77806c3e 778 rootme=`pwd` ; export rootme ; \
7fcfdcf7 779 (cd ./gas; \
2198e4ba 780 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
781 else \
782 true ; \
783 fi
4d714963 784
4d714963 785install-gas: force
06a07944 786 @if [ -f ./gas/Makefile ] ; then \
77806c3e 787 rootme=`pwd` ; export rootme ; \
7fcfdcf7 788 (cd ./gas; \
2198e4ba 789 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
790 else \
791 true ; \
792 fi
23e3e7f9 793
3ad0ef37
SC
794### gas
795all-tgas: all-libiberty all-bfd
796 @if [ -f ./tgas/Makefile ] ; then \
797 rootme=`pwd` ; export rootme ; \
798 (cd ./tgas; \
799 $(MAKE) $(FLAGS_TO_PASS) all) ; \
800 else \
801 true ; \
802 fi
803
804
4d714963 805### ld
6995fe83 806all-ld: all-libiberty all-bfd all-byacc all-flex
06a07944 807 @if [ -f ./ld/Makefile ] ; then \
77806c3e 808 rootme=`pwd` ; export rootme ; \
7fcfdcf7 809 (cd ./ld; \
2198e4ba 810 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
811 else \
812 true ; \
813 fi
a0f47eb7 814
4d714963 815install-ld: force
06a07944 816 @if [ -f ./ld/Makefile ] ; then \
77806c3e 817 rootme=`pwd` ; export rootme ; \
7fcfdcf7 818 (cd ./ld; \
2198e4ba 819 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
820 else \
821 true ; \
822 fi
23e3e7f9 823
4d714963 824### gdb
a904db53 825all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
06a07944 826 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 827 rootme=`pwd` ; export rootme ; \
7fcfdcf7 828 (cd ./gdb; \
2198e4ba 829 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
830 else \
831 true ; \
832 fi
4d714963 833
4d714963 834install-gdb: force
06a07944 835 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 836 rootme=`pwd` ; export rootme ; \
7fcfdcf7 837 (cd ./gdb; \
2198e4ba 838 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
839 else \
840 true ; \
841 fi
23e3e7f9 842
4d714963 843### make
c4fb14b7 844all-make: all-libiberty
06a07944 845 @if [ -f ./make/Makefile ] ; then \
77806c3e 846 rootme=`pwd` ; export rootme ; \
7fcfdcf7 847 (cd ./make; \
2198e4ba 848 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
849 else \
850 true ; \
851 fi
4d714963 852
4d714963 853install-make: force
06a07944 854 @if [ -f ./make/Makefile ] ; then \
77806c3e 855 rootme=`pwd` ; export rootme ; \
7fcfdcf7 856 (cd ./make; \
2198e4ba 857 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
858 else \
859 true ; \
860 fi
23e3e7f9 861
4d714963 862### diff
c4fb14b7 863all-diff: force
06a07944 864 @if [ -f ./diff/Makefile ] ; then \
77806c3e 865 rootme=`pwd` ; export rootme ; \
7fcfdcf7 866 (cd ./diff; \
2198e4ba 867 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
868 else \
869 true ; \
870 fi
4d714963 871
4d714963 872install-diff: force
06a07944 873 @if [ -f ./diff/Makefile ] ; then \
77806c3e 874 rootme=`pwd` ; export rootme ; \
7fcfdcf7 875 (cd ./diff/; \
2198e4ba 876 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
877 else \
878 true ; \
879 fi
23e3e7f9 880
4d714963 881### grep
c4fb14b7 882all-grep: force
06a07944 883 @if [ -f ./grep/Makefile ] ; then \
77806c3e 884 rootme=`pwd` ; export rootme ; \
7fcfdcf7 885 (cd ./grep; \
2198e4ba 886 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
887 else \
888 true ; \
889 fi
4d714963 890
4d714963 891install-grep: force
06a07944 892 @if [ -f ./grep/Makefile ] ; then \
77806c3e 893 rootme=`pwd` ; export rootme ; \
7fcfdcf7 894 (cd ./grep; \
2198e4ba
MT
895 $(MAKE) $(FLAGS_TO_PASS) install) ; \
896 else \
897 true ; \
898 fi
899
900### rcs
901all-rcs: force
06a07944 902 @if [ -f ./rcs/Makefile ] ; then \
2198e4ba
MT
903 rootme=`pwd` ; export rootme ; \
904 (cd ./rcs; \
905 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
906 else \
907 true ; \
908 fi
4d714963 909
c4fb14b7 910install-rcs: force
06a07944 911 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 912 rootme=`pwd` ; export rootme ; \
7fcfdcf7 913 (cd ./rcs; \
2198e4ba 914 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
915 else \
916 true ; \
917 fi
23e3e7f9 918
4d714963 919### cvs
c4fb14b7 920all-cvs: force
06a07944 921 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 922 rootme=`pwd` ; export rootme ; \
7fcfdcf7 923 (cd ./cvs; \
2198e4ba 924 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
925 else \
926 true ; \
927 fi
4d714963 928
c4fb14b7 929install-cvs: force
06a07944 930 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 931 rootme=`pwd` ; export rootme ; \
7fcfdcf7 932 (cd ./cvs; \
2198e4ba 933 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
934 else \
935 true ; \
936 fi
23e3e7f9 937
7c9feeb7 938### patch
c4fb14b7 939all-patch: force
06a07944 940 @if [ -f ./patch/Makefile ] ; then \
77806c3e 941 rootme=`pwd` ; export rootme ; \
7fcfdcf7 942 (cd ./patch; \
2198e4ba 943 $(MAKE) $(FLAGS_TO_PASS) all) ; \
7c9feeb7
RP
944 else \
945 true ; \
946 fi
947
c4fb14b7 948install-patch: force
06a07944 949 @if [ -f ./patch/Makefile ] ; then \
77806c3e 950 rootme=`pwd` ; export rootme ; \
7fcfdcf7 951 (cd ./patch; \
2198e4ba 952 $(MAKE) $(FLAGS_TO_PASS) \
7c9feeb7 953 bindir=$(bindir) \
2198e4ba 954 man1dir=$(man1dir) install) ; \
7c9feeb7
RP
955 else \
956 true ; \
957 fi
958
4d714963 959### emacs
c4fb14b7 960all-emacs: force
06a07944 961 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 962 rootme=`pwd` ; export rootme ; \
7fcfdcf7 963 (cd ./emacs; \
d1bea4c7 964 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
965 else \
966 true ; \
967 fi
4d714963 968
c4fb14b7 969install-emacs: force
06a07944 970 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 971 rootme=`pwd` ; export rootme ; \
7fcfdcf7 972 (cd ./emacs; \
d1bea4c7 973 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
974 else \
975 true ; \
976 fi
23e3e7f9 977
4d714963 978### ispell
c4fb14b7 979all-ispell: all-emacs
06a07944 980 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 981 rootme=`pwd` ; export rootme ; \
7fcfdcf7 982 (cd ./ispell; \
2198e4ba 983 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
984 else \
985 true ; \
986 fi
4d714963 987
c4fb14b7 988install-ispell: force
06a07944 989 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 990 rootme=`pwd` ; export rootme ; \
7fcfdcf7 991 (cd ./ispell; \
2198e4ba 992 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079399f6
RP
993 else \
994 true ; \
995 fi
23e3e7f9 996
079b2abe 997### send_pr
c4fb14b7 998all-send_pr: force
06a07944 999 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1000 rootme=`pwd` ; export rootme ; \
1001 (cd ./send_pr; \
2198e4ba 1002 $(MAKE) $(FLAGS_TO_PASS) all) ; \
079b2abe
RP
1003 else \
1004 true ; \
1005 fi
079b2abe 1006
c4fb14b7 1007install-send_pr: force
06a07944 1008 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1009 rootme=`pwd` ; export rootme ; \
1010 (cd ./send_pr; \
2198e4ba 1011 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079b2abe
RP
1012 else \
1013 true ; \
1014 fi
1015
06a07944
RP
1016### libm
1017all-libm: force
98a33b6d 1018 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1019 rootme=`pwd` ; export rootme ; \
1020 (cd ./libm; \
1b9b5090 1021 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
06a07944
RP
1022 else \
1023 true ; \
1024 fi
1025
06a07944 1026install-libm: force
98a33b6d 1027 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1028 rootme=`pwd` ; export rootme ; \
1029 (cd ./libm; \
1b9b5090 1030 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
06a07944
RP
1031 else \
1032 true ; \
1033 fi
1034
ba8abfce 1035### libg++
9d98d2ac 1036
e85e07cb 1037all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
06a07944 1038 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1039 rootme=`pwd` ; export rootme ; \
51489233 1040 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1041 (cd ./libg++; \
51489233 1042 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
ba8abfce
JG
1043 else \
1044 true ; \
1045 fi
1046
c4fb14b7 1047install-libg++: force
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) install) ; \
ba8abfce
JG
1053 else \
1054 true ; \
1055 fi
ffce44a0
DZ
1056### tcl
1057all-tcl:
1058 @if [ -f ./tcl/Makefile ] ; then \
1059 rootme=`pwd` ; export rootme ; \
1060 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1061 (cd ./tcl; \
1062 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1063 else \
1064 true ; \
1065 fi
1066
ffce44a0
DZ
1067install-tcl: force
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) install) ; \
1073 else \
1074 true ; \
1075 fi
1076
1077
1078### tk
1079all-tk: all-tcl
1080 @if [ -f ./tk/Makefile ] ; then \
1081 rootme=`pwd` ; export rootme ; \
1082 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1083 (cd ./tk; \
d1bea4c7 1084 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
ffce44a0
DZ
1085 else \
1086 true ; \
1087 fi
1088
ffce44a0
DZ
1089install-tk: force
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) install) ; \
ffce44a0
DZ
1095 else \
1096 true ; \
1097 fi
1098
d1bea4c7 1099### expect
ffce44a0
DZ
1100all-expect: all-tcl
1101 @if [ -f ./expect/Makefile ] ; then \
1102 rootme=`pwd` ; export rootme ; \
1103 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1104 (cd ./expect; \
1105 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1106 else \
1107 true ; \
1108 fi
1109
ffce44a0
DZ
1110install-expect: force
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) install) ; \
1116 else \
1117 true ; \
1118 fi
1119
d1bea4c7
DZ
1120### z8ksim
1121all-z8ksim: all-bfd
1122 @if [ -f ./z8ksim/Makefile ] ; then \
1123 rootme=`pwd` ; export rootme ; \
1124 (cd ./z8ksim; \
1125 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1126 else \
1127 true ; \
1128 fi
1129
b1cceba2 1130install-z8ksim: force
d1bea4c7
DZ
1131 @if [ -f ./z8ksim/Makefile ] ; then \
1132 rootme=`pwd` ; export rootme ; \
1133 (cd ./z8ksim; \
b1cceba2 1134 $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1135 else \
1136 true ; \
1137 fi
1138
ce1a2ef4
SC
1139### h8300sim:
1140all-h8300sim: all-bfd
5dca5185
SC
1141 @if [ -f ./h8300sim/Makefile ] ; then \
1142 rootme=`pwd` ; export rootme ; \
1143 (cd ./h8300sim; \
1144 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1145 else \
1146 true ; \
1147 fi
1148
1149install-h8300sim: force
1150 @if [ -f ./h8300sim/Makefile ] ; then \
1151 rootme=`pwd` ; export rootme ; \
1152 (cd ./h8300sim; \
1153 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1154 else \
1155 true ; \
1156 fi
1157
1158
b1cceba2
DZ
1159### fileutils
1160all-fileutils: force
1161 @if [ -f ./fileutils/Makefile ] ; then \
1162 rootme=`pwd` ; export rootme ; \
1163 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1164 else \
1165 true ; \
1166 fi
1167
1168install-fileutils: force
1169 @if [ -f ./fileutils/Makefile ] ; then \
d1bea4c7 1170 rootme=`pwd` ; export rootme ; \
b1cceba2
DZ
1171 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1172 else \
1173 true ; \
1174 fi
1175
1176### find
1177all-find: force
1178 @if [ -f ./find/Makefile ] ; then \
1179 rootme=`pwd` ; export rootme ; \
1180 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1181 else \
1182 true ; \
1183 fi
1184
1185install-find: force
1186 @if [ -f ./find/Makefile ] ; then \
1187 rootme=`pwd` ; export rootme ; \
1188 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1189 else \
1190 true ; \
1191 fi
1192
1193### gawk
1194all-gawk: force
1195 @if [ -f ./gawk/Makefile ] ; then \
1196 rootme=`pwd` ; export rootme ; \
1197 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1198 else \
1199 true ; \
1200 fi
1201
1202install-gawk: force
1203 @if [ -f ./gawk/Makefile ] ; then \
1204 rootme=`pwd` ; export rootme ; \
1205 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) install) ; \
d1bea4c7
DZ
1206 else \
1207 true ; \
1208 fi
1209
b1cceba2
DZ
1210### m4
1211all-m4: all-libiberty
1212 @if [ -f ./m4/Makefile ] ; then \
1213 rootme=`pwd` ; export rootme ; \
1214 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1215 else \
1216 true ; \
1217 fi
1218
1219install-m4: force
1220 @if [ -f ./m4/Makefile ] ; then \
1221 rootme=`pwd` ; export rootme ; \
1222 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1223 else \
1224 true ; \
1225 fi
1226
1227### sed
1228all-sed: force
1229 @if [ -f ./sed/Makefile ] ; then \
1230 rootme=`pwd` ; export rootme ; \
1231 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1232 else \
1233 true ; \
1234 fi
1235
1236install-sed: force
1237 @if [ -f ./sed/Makefile ] ; then \
1238 rootme=`pwd` ; export rootme ; \
1239 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1240 else \
1241 true ; \
1242 fi
1243
1244### time
1245all-time: force
1246 @if [ -f ./time/Makefile ] ; then \
1247 rootme=`pwd` ; export rootme ; \
1248 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1249 else \
1250 true ; \
1251 fi
1252
1253install-time: force
1254 @if [ -f ./time/Makefile ] ; then \
1255 rootme=`pwd` ; export rootme ; \
1256 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1257 else \
1258 true ; \
1259 fi
1260
1261### wdiff
1262all-wdiff: force
1263 @if [ -f ./wdiff/Makefile ] ; then \
1264 rootme=`pwd` ; export rootme ; \
1265 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1266 else \
1267 true ; \
1268 fi
1269
1270install-wdiff: force
1271 @if [ -f ./wdiff/Makefile ] ; then \
1272 rootme=`pwd` ; export rootme ; \
1273 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1274 else \
1275 true ; \
1276 fi
1277
1278### shellutils
1279all-shellutils: force
1280 @if [ -f ./shellutils/Makefile ] ; then \
1281 rootme=`pwd` ; export rootme ; \
1282 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1283 else \
1284 true ; \
1285 fi
1286
1287install-shellutils: force
1288 @if [ -f ./shellutils/Makefile ] ; then \
1289 rootme=`pwd` ; export rootme ; \
1290 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1291 else \
1292 true ; \
1293 fi
1294
1295### textutils
1296all-textutils: force
1297 @if [ -f ./textutils/Makefile ] ; then \
1298 rootme=`pwd` ; export rootme ; \
1299 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1300 else \
1301 true ; \
1302 fi
1303
1304install-textutils: force
1305 @if [ -f ./textutils/Makefile ] ; then \
1306 rootme=`pwd` ; export rootme ; \
1307 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1308 else \
1309 true ; \
1310 fi
1311
1312
d1bea4c7 1313
4d714963 1314### other supporting targets
a0f47eb7 1315
02a7ba9a 1316subdir_do:
9f73dd6a
DZ
1317### start-sanitize-chill
1318###
1319### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
1320###
1321### if you change the code for libg++ et al, also change the
1322### code for chillrt
1323###
1324### end-sanitize-chill
1dbe4d41 1325 @for i in $(DODIRS); do \
51489233
ILT
1326 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1327 case $$i in \
d405f5be 1328 libg++ | xiberty | newlib) \
51489233
ILT
1329 if (rootme=`pwd` ; export rootme ; \
1330 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1331 cd ./$$i ; \
1332 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1333 else exit 1 ; fi \
1334 ;; \
9f73dd6a 1335 $(start-sanitize-chill) \
d405f5be
DZ
1336 chillrt) \
1337 if (rootme=`pwd` ; export rootme ; \
1338 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1339 cd ./$$i ; \
1340 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1341 else exit 1 ; fi \
1342 ;; \
9f73dd6a 1343 $(end-sanitize-chill) \
f4e414f1
ILT
1344 gcc) \
1345 if (rootme=`pwd` ; export rootme ; \
1346 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1347 cd ./$$i ; \
1348 $(MAKE) $(GCC_FLAGS_TO_PASS) $(DO)) ; then true ; \
1349 else exit 1 ; fi \
1350 ;; \
51489233
ILT
1351 *) \
1352 if (rootme=`pwd` ; export rootme ; \
1353 cd ./$$i ; \
1354 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1355 else exit 1 ; fi \
1356 ;; \
1357 esac ; \
1358 else true ; fi ; \
a01bf1fb 1359 done
eb02fd64 1360
abc52b80
JG
1361# The "else true" stuff is for Ultrix; the shell returns the exit code
1362# of the "if" command, if no commands are run in the "then" or "else" part,
1363# causing Make to quit.
4c27527f
RP
1364
1365MAKEDIRS= \
4d714963 1366 $(prefix) \
7fcfdcf7 1367 $(exec_prefix) \
8b361a95
SEF
1368 $(tooldir)
1369
1370# $(bindir) \
1371# $(libdir) \
1372# $(includedir) \
1373# $(datadir) \
1374# $(docdir) \
1375# $(mandir) \
1376# $(man1dir) \
1377# $(man5dir)
4d714963
RP
1378
1379# $(man2dir) \
1380# $(man3dir) \
1381# $(man4dir) \
1382# $(man6dir) \
1383# $(man7dir) \
1384# $(man8dir)
4c27527f 1385
02a7ba9a 1386install-dirs:
4c27527f 1387 for i in $(MAKEDIRS) ; do \
cd49a4dc 1388 echo Making $$i... ; \
8b361a95
SEF
1389 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1390 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
06a07944
RP
1391 if [ ! -d $$i ] ; then \
1392 if mkdir $$i ; then \
1393 true ; \
1394 else \
1395 exit 1 ; \
1396 fi ; \
1397 else \
1398 true ; \
1399 fi ; \
4c27527f 1400 done
0ec776a5 1401
02a7ba9a 1402install-info-dirs:
9a9e8e7f 1403 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
c5f94070 1404
02a7ba9a 1405dir.info:
8b361a95 1406 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
c466cfab 1407 mv -f dir.info.new dir.info
6b7e5998 1408
b1cceba2
DZ
1409dist:
1410 @echo "Building a full distribution of this tree isn't done"
1411 @echo "via 'make dist'. Check out the etc/ subdirectory"
1412
eb02fd64
RP
1413etags tags: TAGS
1414
02a7ba9a 1415TAGS:
eb02fd64
RP
1416 etags `$(MAKE) ls`
1417
1418ls:
1419 @echo Makefile
1420 @for i in $(SUBDIRS); \
1421 do \
1422 (cd $$i; \
1423 pwd=`pwd`; \
1424 wd=`basename $$pwd`; \
1425 for j in `$(MAKE) ls`; \
1426 do \
1427 echo $$wd/$$j; \
1428 done) \
1429 done
1430
3c81fef5 1431force:
eb02fd64
RP
1432
1433# with the gnu make, this is done automatically.
1434
f1eb48b6 1435Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1436 $(SHELL) ./config.status
eb02fd64 1437
11954bf1
JG
1438#
1439# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1440
23e3e7f9 1441DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
fca4f908
MW
1442 config.sub config configure.man configure.texi move-if-change \
1443 COPYING.LIB
fb90daeb 1444GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
abc52b80 1445GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
11954bf1 1446
b1cceba2 1447setup-dirs: force
11954bf1
JG
1448 ./configure sun4
1449 make clean
1450 ./configure -rm sun4
905bb120 1451 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
abc52b80 1452
abc52b80
JG
1453gdb.tar.Z: setup-dirs
1454 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1455 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1456
1457make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1458 rm -rf proto-toplev; mkdir proto-toplev
1459 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1460 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1461 ln -s ../$$i . ; \
1462 done)
7c9feeb7
RP
1463 # Put only one copy (four hard links) of COPYING in the tar file.
1464 rm proto-toplev/bfd/COPYING
1465 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1466 rm proto-toplev/include/COPYING
1467 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1468 rm proto-toplev/readline/COPYING
1469 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
a3a063a9
JG
1470 # Take out texinfo from configurable dirs
1471 rm proto-toplev/configure.in
1472 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
4d714963
RP
1473 # Take out glob from buildable dirs
1474 rm proto-toplev/Makefile.in
6995fe83
SG
1475
1476 sed -e '/^SUBDIRS =/s/glob //' \
1477 -e '/^all\.normal: /s/\all-texinfo //' \
1478 -e '/^clean: /s/clean-texinfo //' \
1479 -e '/^install\.all: /s/install-texinfo //' \
1480 <Makefile.in >proto-toplev/Makefile.in
1481
abc52b80
JG
1482 mkdir proto-toplev/texinfo
1483 mkdir proto-toplev/texinfo/fsf
1484 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
905bb120 1485 chmod og=u `find proto-toplev -print`
abc52b80
JG
1486 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1487 echo "==> Making gdb-$$VER.tar.Z"; \
1488 ln -s proto-toplev gdb-$$VER; \
1489 tar cfh - gdb-$$VER \
1490 | compress -v >gdb-$$VER.tar.Z)
1491
0ec776a5 1492
eb02fd64 1493# end of Makefile.in
This page took 0.14779 seconds and 4 git commands to generate.