* main.c (gdb_readline): Avoid printf_filtered, which sets char
[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
48INSTALL = install -c
49INSTALL_PROGRAM = $(INSTALL)
50INSTALL_DATA = $(INSTALL)
3c8735af 51
440868a0 52AS = as
ec342d7d 53AR = ar
ba8abfce 54AR_FLAGS = qc
f8a6ad66 55CFLAGS = -g
4d714963 56RANLIB = ranlib
51489233 57NM = nm
eb02fd64 58
98a33b6d 59BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
06a07944
RP
60 then echo $${rootme}/byacc/byacc ; \
61 else echo bison -y ; \
06a07944 62 fi`
2645fb0c 63
98a33b6d 64LEX = `if [ -f $${rootme}/flex/flex ] ; \
8b361a95 65 then echo $${rootme}/flex/flex ; \
2198e4ba
MT
66 else echo flex ; fi`
67
98a33b6d 68MAKEINFO = `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
77806c3e
RP
69 then echo $${rootme}/texinfo/C/makeinfo ; \
70 else echo makeinfo ; fi`
b772d75e 71
440868a0
ILT
72# C compiler to use to create programs which must be run in the build
73# environment.
74CC_FOR_BUILD = $(CC)
75
51489233 76SUBDIRS = libiberty mmalloc glob readline opcodes bfd gdb binutils ld gas tgas gcc libg++ newlib
6a3958b2
RP
77OTHERS =
78
a0f47eb7 79ALL = all.normal
b26ff9d8 80INSTALL_TARGET = install.all
fb660409
RP
81
82### for debugging
83#GCCVERBOSE=-v
84
51489233
ILT
85CC_FOR_TARGET = ` \
86 if [ -f $${rootme}/gcc/Makefile ] ; then \
87 echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
88 else \
89 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
90 echo $(CC); \
91 else \
92 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
93 fi; \
94 fi`
95
440868a0
ILT
96AS_FOR_TARGET = ` \
97 if [ -f $${rootme}/gas/Makefile ] ; then \
98 echo $${rootme}/gas/as.new ; \
99 else \
100 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
101 echo $(AS); \
102 else \
103 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
104 fi \
105 fi`
106
51489233
ILT
107AR_FOR_TARGET = ` \
108 if [ -f $${rootme}/binutils/Makefile ] ; then \
109 echo $${rootme}/binutils/ar ; \
110 else \
111 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
112 echo $(AR); \
113 else \
114 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
115 fi \
116 fi`
117
118RANLIB_FOR_TARGET = ` \
119 if [ -f $${rootme}/binutils/Makefile ] ; then \
120 echo $${rootme}/binutils/ranlib ; \
121 else \
122 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
123 echo $(RANLIB); \
124 else \
125 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
126 fi \
127 fi`
128
129NM_FOR_TARGET = ` \
130 if [ -f $${rootme}/binutils/Makefile ] ; then \
131 echo $${rootme}/binutils/nm ; \
132 else \
133 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
134 echo $(NM); \
135 else \
136 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
137 fi \
138 fi`
139
140XTRAFLAGS = ` \
141 if [ -f $${rootme}/gcc/Makefile ] ; then \
142 if [ "$(host_cpu)-$(host_vendor)-$(host_os)" = "$(target_cpu)-$(target_vendor)-$(target_os)" ] ; then \
143 echo -I$${rootme}/gcc/include ; \
144 else \
0012a471 145 echo -I$${rootme}/gcc/include -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include ; \
51489233
ILT
146 fi ; \
147 else \
148 echo ; \
149 fi`
23e3e7f9 150
eb02fd64 151#### host and target specific makefile fragments come in here.
ec342d7d 152###
eb02fd64 153
51489233 154# Flags to pass down to sub-makes
2198e4ba
MT
155FLAGS_TO_PASS = \
156 "prefix=$(prefix)" \
157 "exec_prefix=$(exec_prefix)" \
158 "tooldir=$(tooldir)" \
159 "AR=$(AR)" \
160 "AR_FLAGS=$(AR_FLAGS)" \
161 "CC=$(CC)" \
162 "CFLAGS=$(CFLAGS)" \
163 "RANLIB=$(RANLIB)" \
164 "LOADLIBES=$(LOADLIBES)" \
165 "LDFLAGS=$(LDFLAGS)" \
166 "BISON=$(BISON)" \
167 "LEX=$(LEX)" \
168 "MAKEINFO=$(MAKEINFO)" \
169 "INSTALL=$(INSTALL)" \
170 "INSTALL_DATA=$(INSTALL_DATA)" \
440868a0
ILT
171 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
172 "CC_FOR_BUILD=$(CC_FOR_BUILD)"
2198e4ba 173
51489233
ILT
174# Flags to pass down to makes which are built with the target
175# environment (e.g. libg++, xiberty, newlib).
176TARGET_FLAGS_TO_PASS = \
177 "prefix=$(prefix)" \
178 "exec_prefix=$(exec_prefix)" \
179 "tooldir=$(tooldir)" \
180 "AR_FLAGS=$(AR_FLAGS)" \
181 "CFLAGS=$(CFLAGS)" \
182 "LOADLIBES=$(LOADLIBES)" \
183 "LDFLAGS=$(LDFLAGS)" \
184 "BISON=$(BISON)" \
185 "LEX=$(LEX)" \
186 "MAKEINFO=$(MAKEINFO)" \
187 "INSTALL=$(INSTALL)" \
188 "INSTALL_DATA=$(INSTALL_DATA)" \
189 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
440868a0 190 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
51489233 191 "CC=$(CC_FOR_TARGET)" \
440868a0 192 "AS=$(AS_FOR_TARGET)" \
51489233
ILT
193 "AR=$(AR_FOR_TARGET)" \
194 "RANLIB=$(RANLIB_FOR_TARGET)" \
195 "NM=$(NM_FOR_TARGET)" \
196 "XTRAFLAGS=$(XTRAFLAGS)"
197
4d714963 198.PHONY: all info install-info clean-info
f8a6ad66 199.NOEXPORT:
4d714963 200
a0f47eb7 201all: $(ALL)
4d714963 202
98a33b6d
DZ
203info:
204 @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) subdir_do DO=info "DODIRS=$(SUBDIRS)"
c5f94070 205
2198e4ba 206check:
51489233 207 @rootme=`pwd` ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=check "DODIRS=$(SUBDIRS)" subdir_do
7fcfdcf7 208
25113b46 209clean-info:
51489233 210 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=clean-info "DODIRS=$(SUBDIRS)" subdir_do
98a33b6d 211
9a9e8e7f 212install-info: install-info-dirs force
8b361a95
SEF
213 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
214 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
215 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
51489233
ILT
216 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) DO=install-info "DODIRS=$(SUBDIRS)" subdir_do
217 @rootme='pwd' ; export rootme ; $(MAKE) $(FLAGS_TO_PASS) dir.info install-dir.info
9a9e8e7f
RP
218
219install-dir.info:
8b361a95
SEF
220 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
221 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
222 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
9a9e8e7f 223 $(INSTALL_DATA) dir.info $(infodir)/dir.info
4d714963 224
618f57a9 225all.normal: all-autoconf all-libiberty all-mmalloc all-texinfo \
868ebe79
MW
226 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
227 all-gcc all-binutils all-libg++ all-readline all-gdb \
c4fb14b7 228 all-make all-rcs all-cvs all-diff all-grep \
98a33b6d 229 all-patch all-emacs all-ispell all-etc \
06a07944 230 all-newlib all-gprof all-send_pr all-libm
dcbfc14d 231
dfa891fc 232all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
868ebe79 233 all-opcodes all-bfd all-readline all-gdb all-binutils all-gcc \
aa06ff7e 234 all-newlib
4d714963 235
618f57a9
RP
236clean: clean-autoconf clean-libiberty clean-mmalloc clean-texinfo \
237 clean-bfd clean-newlib clean-binutils clean-flex \
aa06ff7e 238 clean-byacc clean-ld clean-gas clean-etc clean-opcodes \
dfa891fc 239 clean-gcc clean-readline clean-glob clean-gdb \
c4fb14b7 240 clean-make clean-diff clean-grep clean-rcs \
2198e4ba 241 clean-cvs clean-patch clean-emacs clean-ispell \
06a07944 242 clean-libg++ clean-gprof clean-send_pr clean-libm
7fcfdcf7
SC
243 -rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
244
245clean-stamps:
c4fb14b7 246 -rm -f all-*
4d714963 247
98a33b6d 248install: $(INSTALL_TARGET)
8b361a95
SEF
249 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
250 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
251 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
b26ff9d8 252
06a07944
RP
253install.all: install-no-fixedincludes
254 @if [ -f ./gcc/Makefile ] ; then \
255 rootme=`pwd` ; export rootme ; \
256 (cd ./gcc; \
257 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
258 else \
259 true ; \
260 fi
261
dfa891fc
DZ
262install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
263 install-autoconf \
264 install-bfd \
265 install-binutils \
aa06ff7e 266 install-opcodes \
dfa891fc
DZ
267 install-byacc \
268 install-cvs \
269 install-diff \
270 install-emacs \
98a33b6d 271 install-etc \
dfa891fc
DZ
272 install-flex \
273 install-gas \
274 install-gdb \
275 install-glob \
276 install-gprof \
277 install-grep \
278 install-ispell \
279 install-ld \
280 install-libg++ \
281 install-libiberty \
282 install-libm \
283 install-make \
284 install-mmalloc \
285 install-newlib \
286 install-patch \
287 install-rcs \
288 install-readline \
289 install-send_pr \
290 install-texinfo
291
06a07944
RP
292gcc-no-fixedincludes:
293 @if [ -f ./gcc/Makefile ] ; then \
294 rootme=`pwd` ; export rootme ; \
295 (cd ./gcc; \
296 $(MAKE) $(FLAGS_TO_PASS) install install-man \
297 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
298 else \
299 true ; \
300 fi
dcbfc14d
DZ
301
302install.cross: install-dirs install-libiberty install-mmalloc \
aa06ff7e 303 install-binutils install-opcodes install-byacc install-flex \
dfa891fc
DZ
304 install-ld install-gas install-readline \
305 install-glob install-gdb install-mmalloc \
98a33b6d 306 install-newlib install-gcc install-etc
23e3e7f9 307
618f57a9
RP
308### autoconf
309all-autoconf: force
a5cdd8af 310 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 311 rootme=`pwd` ; export rootme ; \
a5cdd8af 312 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
618f57a9
RP
313 else \
314 true ; \
315 fi
316
317clean-autoconf: force
06a07944 318 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 319 rootme=`pwd` ; export rootme ; \
98a33b6d 320 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
618f57a9
RP
321 else \
322 true ; \
323 fi
324
325install-autoconf: force
06a07944 326 @if [ -f ./autoconf/Makefile ] ; then \
618f57a9 327 rootme=`pwd` ; export rootme ; \
98a33b6d
DZ
328 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
329 else \
330 true ; \
331 fi
332
333### etc
334all-etc: force
335 @if [ -f ./etc/Makefile ] ; then \
336 rootme=`pwd` ; export rootme ; \
337 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
338 else \
339 true ; \
340 fi
341
342clean-etc: force
343 @if [ -f ./etc/Makefile ] ; then \
344 rootme=`pwd` ; export rootme ; \
345 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) clean) ; \
346 else \
347 true ; \
348 fi
349
350install-etc: force
351 @if [ -f ./etc/Makefile ] ; then \
352 rootme=`pwd` ; export rootme ; \
353 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
618f57a9
RP
354 else \
355 true ; \
356 fi
357
4d714963 358### libiberty
c4fb14b7 359all-libiberty: force
06a07944 360 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 361 rootme=`pwd` ; export rootme ; \
7fcfdcf7 362 (cd ./libiberty; \
2198e4ba 363 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
364 else \
365 true ; \
366 fi
4d714963
RP
367
368clean-libiberty: force
06a07944 369 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 370 rootme=`pwd` ; export rootme ; \
7fcfdcf7 371 (cd ./libiberty; \
2198e4ba 372 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
373 else \
374 true ; \
375 fi
4d714963
RP
376
377install-libiberty: force
06a07944 378 @if [ -f ./libiberty/Makefile ] ; then \
77806c3e 379 rootme=`pwd` ; export rootme ; \
7fcfdcf7 380 (cd ./libiberty; \
2198e4ba 381 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
382 else \
383 true ; \
384 fi
23e3e7f9 385
66cfe047 386### mmalloc
c4fb14b7 387all-mmalloc: force
06a07944 388 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
389 rootme=`pwd` ; export rootme ; \
390 (cd ./mmalloc; \
2198e4ba 391 $(MAKE) $(FLAGS_TO_PASS) all) ; \
66cfe047
SG
392 else \
393 true ; \
394 fi
66cfe047
SG
395
396clean-mmalloc: force
06a07944 397 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
398 rootme=`pwd` ; export rootme ; \
399 (cd ./mmalloc; \
2198e4ba 400 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
66cfe047
SG
401 else \
402 true ; \
403 fi
404
405install-mmalloc: force
06a07944 406 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
407 rootme=`pwd` ; export rootme ; \
408 (cd ./mmalloc; \
2198e4ba 409 $(MAKE) $(FLAGS_TO_PASS) install) ; \
66cfe047
SG
410 else \
411 true ; \
412 fi
413
4d714963 414### texinfo
c4fb14b7 415all-texinfo: all-libiberty
06a07944 416 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 417 rootme=`pwd` ; export rootme ; \
7fcfdcf7 418 (cd ./texinfo; \
2198e4ba 419 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
420 else \
421 true ; \
422 fi
4d714963
RP
423
424clean-texinfo: force
06a07944 425 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 426 rootme=`pwd` ; export rootme ; \
7fcfdcf7 427 (cd ./texinfo; \
2198e4ba 428 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
429 else \
430 true ; \
431 fi
4d714963
RP
432
433install-texinfo: force
06a07944 434 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 435 rootme=`pwd` ; export rootme ; \
7fcfdcf7 436 (cd ./texinfo; \
2198e4ba 437 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
438 else \
439 true ; \
440 fi
23e3e7f9 441
4d714963 442### bfd
c4fb14b7 443all-bfd: force
06a07944 444 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 445 rootme=`pwd` ; export rootme ; \
7fcfdcf7 446 (cd ./bfd; \
2198e4ba 447 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
448 else \
449 true ; \
450 fi
4d714963
RP
451
452clean-bfd: force
06a07944 453 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 454 rootme=`pwd` ; export rootme ; \
7fcfdcf7 455 (cd ./bfd; \
2198e4ba 456 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
457 else \
458 true ; \
459 fi
4d714963
RP
460
461install-bfd: force
06a07944 462 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 463 rootme=`pwd` ; export rootme ; \
7fcfdcf7 464 (cd ./bfd; \
2198e4ba 465 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
466 else \
467 true ; \
468 fi
23e3e7f9 469
aa06ff7e
SC
470
471### opcodes
472all-opcodes: force
473 @if [ -f ./opcodes/Makefile ] ; then \
474 rootme=`pwd` ; export rootme ; \
a904db53 475 (cd ./opcodes; \
aa06ff7e
SC
476 $(MAKE) $(FLAGS_TO_PASS) all) ; \
477 else \
478 true ; \
479 fi
480
481clean-opcodes: force
482 @if [ -f ./opcodes/Makefile ] ; then \
483 rootme=`pwd` ; export rootme ; \
a904db53 484 (cd ./opcodes; \
aa06ff7e
SC
485 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
486 else \
487 true ; \
488 fi
489
490install-opcodes: force
491 @if [ -f ./opcodes/Makefile ] ; then \
492 rootme=`pwd` ; export rootme ; \
a904db53 493 (cd ./opcodes; \
aa06ff7e
SC
494 $(MAKE) $(FLAGS_TO_PASS) install) ; \
495 else \
496 true ; \
497 fi
498
4d714963 499### binutils
aa06ff7e 500all-binutils: all-opcodes all-libiberty all-bfd all-flex
06a07944 501 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 502 rootme=`pwd` ; export rootme ; \
7fcfdcf7 503 (cd ./binutils; \
2198e4ba 504 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
505 else \
506 true ; \
507 fi
4d714963
RP
508
509clean-binutils: force
06a07944 510 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 511 rootme=`pwd` ; export rootme ; \
7fcfdcf7 512 (cd ./binutils; \
2198e4ba 513 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
514 else \
515 true ; \
516 fi
4d714963
RP
517
518install-binutils: force
06a07944 519 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 520 rootme=`pwd` ; export rootme ; \
7fcfdcf7 521 (cd ./binutils; \
2198e4ba 522 $(MAKE) $(FLAGS_TO_PASS) install) ; \
7fcfdcf7
SC
523 else \
524 true ; \
525 fi
526
527### newlib
51489233 528all-newlib: all-binutils all-ld all-gas all-gcc
06a07944 529 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 530 rootme=`pwd` ; export rootme ; \
51489233 531 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 532 (cd ./newlib; \
51489233 533 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
7fcfdcf7
SC
534 else \
535 true ; \
536 fi
7fcfdcf7
SC
537
538clean-newlib: force
06a07944 539 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 540 rootme=`pwd` ; export rootme ; \
51489233 541 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 542 (cd ./newlib; \
51489233 543 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
7fcfdcf7
SC
544 else \
545 true ; \
546 fi
547
548install-newlib: force
06a07944 549 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 550 rootme=`pwd` ; export rootme ; \
51489233 551 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 552 (cd ./newlib; \
51489233 553 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
554 else \
555 true ; \
556 fi
23e3e7f9 557
9a14a29d 558### gprof
c4fb14b7 559all-gprof: all-libiberty all-bfd
06a07944 560 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
561 rootme=`pwd` ; export rootme ; \
562 (cd ./gprof; \
563 $(MAKE) $(FLAGS_TO_PASS) all) ; \
9a14a29d
SEF
564 else \
565 true ; \
566 fi
9a14a29d
SEF
567
568clean-gprof: force
06a07944 569 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
570 rootme=`pwd` ; export rootme ; \
571 (cd ./gprof; \
572 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
9a14a29d
SEF
573 else \
574 true ; \
575 fi
576
577install-gprof: force
06a07944 578 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
579 rootme=`pwd` ; export rootme ; \
580 (cd ./gprof; \
581 $(MAKE) $(FLAGS_TO_PASS) install) ; \
9a14a29d
SEF
582 else \
583 true ; \
584 fi
585
4d714963 586### byacc
c4fb14b7 587all-byacc: force
06a07944 588 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 589 rootme=`pwd` ; export rootme ; \
7fcfdcf7 590 (cd ./byacc; \
2198e4ba 591 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
592 else \
593 true ; \
594 fi
4d714963
RP
595
596clean-byacc: force
06a07944 597 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 598 rootme=`pwd` ; export rootme ; \
7fcfdcf7 599 (cd ./byacc; \
2198e4ba 600 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
601 else \
602 true ; \
603 fi
4d714963
RP
604
605install-byacc: force
06a07944 606 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 607 rootme=`pwd` ; export rootme ; \
7fcfdcf7 608 (cd ./byacc; \
2198e4ba 609 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
610 else \
611 true ; \
612 fi
23e3e7f9 613
dcbfc14d 614### flex
2198e4ba 615all-flex: all-libiberty
06a07944 616 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
617 rootme=`pwd` ; export rootme ; \
618 (cd ./flex; \
2198e4ba 619 $(MAKE) $(FLAGS_TO_PASS) all) ; \
dcbfc14d
DZ
620 else \
621 true ; \
622 fi
623
624clean-flex: force
06a07944 625 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
626 rootme=`pwd` ; export rootme ; \
627 (cd ./flex; \
2198e4ba 628 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
dcbfc14d
DZ
629 else \
630 true ; \
631 fi
632
633install-flex: force
06a07944 634 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
635 rootme=`pwd` ; export rootme ; \
636 (cd ./flex; \
2198e4ba 637 $(MAKE) $(FLAGS_TO_PASS) install) ; \
dcbfc14d
DZ
638 else \
639 true ; \
640 fi
4d714963 641### gcc
6995fe83 642all-gcc: all-libiberty all-byacc
06a07944 643 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 644 rootme=`pwd` ; export rootme ; \
7fcfdcf7 645 (cd ./gcc; \
2198e4ba 646 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
647 else \
648 true ; \
649 fi
4d714963
RP
650
651clean-gcc: force
06a07944 652 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 653 rootme=`pwd` ; export rootme ; \
7fcfdcf7 654 (cd ./gcc; \
2198e4ba 655 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
656 else \
657 true ; \
658 fi
4d714963 659
c4fb14b7 660install-gcc: force
06a07944 661 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 662 rootme=`pwd` ; export rootme ; \
7fcfdcf7 663 (cd ./gcc; \
2198e4ba 664 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
665 else \
666 true ; \
667 fi
23e3e7f9 668
4d714963 669### readline
c4fb14b7 670all-readline: force
06a07944 671 @if [ -f ./readline/Makefile ] ; then \
77806c3e 672 rootme=`pwd` ; export rootme ; \
7fcfdcf7 673 (cd ./readline; \
2198e4ba 674 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
675 else \
676 true ; \
677 fi
4d714963
RP
678
679clean-readline: force
06a07944 680 @if [ -f ./readline/Makefile ] ; then \
77806c3e 681 rootme=`pwd` ; export rootme ; \
7fcfdcf7 682 (cd ./readline; \
2198e4ba 683 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
684 else \
685 true ; \
686 fi
4d714963
RP
687
688install-readline: force
06a07944 689 @if [ -f ./readline/Makefile ] ; then \
77806c3e 690 rootme=`pwd` ; export rootme ; \
7fcfdcf7 691 (cd ./readline; \
2198e4ba 692 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
693 else \
694 true ; \
695 fi
23e3e7f9 696
4d714963 697### glob
c4fb14b7 698all-glob: force
06a07944 699 @if [ -f ./glob/Makefile ] ; then \
77806c3e 700 rootme=`pwd` ; export rootme ; \
7fcfdcf7 701 (cd ./glob; \
2198e4ba 702 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
703 else \
704 true ; \
705 fi
4d714963
RP
706
707clean-glob: force
06a07944 708 @if [ -f ./glob/Makefile ] ; then \
77806c3e 709 rootme=`pwd` ; export rootme ; \
7fcfdcf7 710 (cd ./glob; \
2198e4ba 711 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
712 else \
713 true ; \
714 fi
4d714963
RP
715
716install-glob: force
06a07944 717 @if [ -f ./glob/Makefile ] ; then \
77806c3e 718 rootme=`pwd` ; export rootme ; \
7fcfdcf7 719 (cd ./glob; \
2198e4ba 720 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
721 else \
722 true ; \
723 fi
23e3e7f9 724
4d714963 725### gas
a904db53 726all-gas: all-libiberty all-opcodes all-bfd
06a07944 727 @if [ -f ./gas/Makefile ] ; then \
77806c3e 728 rootme=`pwd` ; export rootme ; \
7fcfdcf7 729 (cd ./gas; \
2198e4ba 730 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
731 else \
732 true ; \
733 fi
4d714963
RP
734
735clean-gas: force
06a07944 736 @if [ -f ./gas/Makefile ] ; then \
77806c3e 737 rootme=`pwd` ; export rootme ; \
7fcfdcf7 738 (cd ./gas; \
2198e4ba 739 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
740 else \
741 true ; \
742 fi
4d714963
RP
743
744install-gas: force
06a07944 745 @if [ -f ./gas/Makefile ] ; then \
77806c3e 746 rootme=`pwd` ; export rootme ; \
7fcfdcf7 747 (cd ./gas; \
2198e4ba 748 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
749 else \
750 true ; \
751 fi
23e3e7f9 752
3ad0ef37
SC
753### gas
754all-tgas: all-libiberty all-bfd
755 @if [ -f ./tgas/Makefile ] ; then \
756 rootme=`pwd` ; export rootme ; \
757 (cd ./tgas; \
758 $(MAKE) $(FLAGS_TO_PASS) all) ; \
759 else \
760 true ; \
761 fi
762
763
4d714963 764### ld
6995fe83 765all-ld: all-libiberty all-bfd all-byacc all-flex
06a07944 766 @if [ -f ./ld/Makefile ] ; then \
77806c3e 767 rootme=`pwd` ; export rootme ; \
7fcfdcf7 768 (cd ./ld; \
2198e4ba 769 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
770 else \
771 true ; \
772 fi
a0f47eb7 773
4d714963 774clean-ld: force
06a07944 775 @if [ -f ./ld/Makefile ] ; then \
77806c3e 776 rootme=`pwd` ; export rootme ; \
7fcfdcf7 777 (cd ./ld; \
2198e4ba 778 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
779 else \
780 true ; \
781 fi
6a3958b2 782
4d714963 783install-ld: force
06a07944 784 @if [ -f ./ld/Makefile ] ; then \
77806c3e 785 rootme=`pwd` ; export rootme ; \
7fcfdcf7 786 (cd ./ld; \
2198e4ba 787 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
788 else \
789 true ; \
790 fi
23e3e7f9 791
4d714963 792### gdb
a904db53 793all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
06a07944 794 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 795 rootme=`pwd` ; export rootme ; \
7fcfdcf7 796 (cd ./gdb; \
2198e4ba 797 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
798 else \
799 true ; \
800 fi
4d714963
RP
801
802clean-gdb: force
06a07944 803 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 804 rootme=`pwd` ; export rootme ; \
7fcfdcf7 805 (cd ./gdb; \
2198e4ba 806 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
807 else \
808 true ; \
809 fi
4d714963
RP
810
811install-gdb: force
06a07944 812 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 813 rootme=`pwd` ; export rootme ; \
7fcfdcf7 814 (cd ./gdb; \
2198e4ba 815 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
816 else \
817 true ; \
818 fi
23e3e7f9 819
4d714963 820### make
c4fb14b7 821all-make: all-libiberty
06a07944 822 @if [ -f ./make/Makefile ] ; then \
77806c3e 823 rootme=`pwd` ; export rootme ; \
7fcfdcf7 824 (cd ./make; \
2198e4ba 825 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
826 else \
827 true ; \
828 fi
4d714963
RP
829
830clean-make: force
06a07944 831 @if [ -f ./make/Makefile ] ; then \
77806c3e 832 rootme=`pwd` ; export rootme ; \
7fcfdcf7 833 (cd ./make; \
2198e4ba 834 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
835 else \
836 true ; \
837 fi
4d714963
RP
838
839install-make: force
06a07944 840 @if [ -f ./make/Makefile ] ; then \
77806c3e 841 rootme=`pwd` ; export rootme ; \
7fcfdcf7 842 (cd ./make; \
2198e4ba 843 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
844 else \
845 true ; \
846 fi
23e3e7f9 847
4d714963 848### diff
c4fb14b7 849all-diff: force
06a07944 850 @if [ -f ./diff/Makefile ] ; then \
77806c3e 851 rootme=`pwd` ; export rootme ; \
7fcfdcf7 852 (cd ./diff; \
2198e4ba 853 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
854 else \
855 true ; \
856 fi
4d714963
RP
857
858clean-diff: force
06a07944 859 @if [ -f ./diff/Makefile ] ; then \
77806c3e 860 rootme=`pwd` ; export rootme ; \
7fcfdcf7 861 (cd ./diff; \
2198e4ba 862 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
863 else \
864 true ; \
865 fi
4d714963
RP
866
867install-diff: force
06a07944 868 @if [ -f ./diff/Makefile ] ; then \
77806c3e 869 rootme=`pwd` ; export rootme ; \
7fcfdcf7 870 (cd ./diff/; \
2198e4ba 871 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
872 else \
873 true ; \
874 fi
23e3e7f9 875
4d714963 876### grep
c4fb14b7 877all-grep: force
06a07944 878 @if [ -f ./grep/Makefile ] ; then \
77806c3e 879 rootme=`pwd` ; export rootme ; \
7fcfdcf7 880 (cd ./grep; \
2198e4ba 881 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
882 else \
883 true ; \
884 fi
4d714963
RP
885
886clean-grep: force
06a07944 887 @if [ -f ./grep/Makefile ] ; then \
77806c3e 888 rootme=`pwd` ; export rootme ; \
7fcfdcf7 889 (cd ./grep; \
2198e4ba 890 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
891 else \
892 true ; \
893 fi
4d714963
RP
894
895install-grep: force
06a07944 896 @if [ -f ./grep/Makefile ] ; then \
77806c3e 897 rootme=`pwd` ; export rootme ; \
7fcfdcf7 898 (cd ./grep; \
2198e4ba
MT
899 $(MAKE) $(FLAGS_TO_PASS) install) ; \
900 else \
901 true ; \
902 fi
903
904### rcs
905all-rcs: force
06a07944 906 @if [ -f ./rcs/Makefile ] ; then \
2198e4ba
MT
907 rootme=`pwd` ; export rootme ; \
908 (cd ./rcs; \
909 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
910 else \
911 true ; \
912 fi
4d714963
RP
913
914clean-rcs: force
06a07944 915 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 916 rootme=`pwd` ; export rootme ; \
7fcfdcf7 917 (cd ./rcs; \
2198e4ba 918 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
919 else \
920 true ; \
921 fi
4d714963 922
c4fb14b7 923install-rcs: force
06a07944 924 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 925 rootme=`pwd` ; export rootme ; \
7fcfdcf7 926 (cd ./rcs; \
2198e4ba 927 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
928 else \
929 true ; \
930 fi
23e3e7f9 931
4d714963 932### cvs
c4fb14b7 933all-cvs: force
06a07944 934 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 935 rootme=`pwd` ; export rootme ; \
7fcfdcf7 936 (cd ./cvs; \
2198e4ba 937 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
938 else \
939 true ; \
940 fi
4d714963 941
c4fb14b7 942clean-cvs: force
06a07944 943 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 944 rootme=`pwd` ; export rootme ; \
7fcfdcf7 945 (cd ./cvs; \
2198e4ba 946 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
947 else \
948 true ; \
949 fi
4d714963 950
c4fb14b7 951install-cvs: force
06a07944 952 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 953 rootme=`pwd` ; export rootme ; \
7fcfdcf7 954 (cd ./cvs; \
2198e4ba 955 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
956 else \
957 true ; \
958 fi
23e3e7f9 959
7c9feeb7 960### patch
c4fb14b7 961all-patch: force
06a07944 962 @if [ -f ./patch/Makefile ] ; then \
77806c3e 963 rootme=`pwd` ; export rootme ; \
7fcfdcf7 964 (cd ./patch; \
2198e4ba 965 $(MAKE) $(FLAGS_TO_PASS) all) ; \
7c9feeb7
RP
966 else \
967 true ; \
968 fi
969
c4fb14b7 970clean-patch: force
06a07944 971 @if [ -f ./patch/Makefile ] ; then \
77806c3e 972 rootme=`pwd` ; export rootme ; \
7fcfdcf7 973 (cd ./patch; \
2198e4ba 974 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
7c9feeb7
RP
975 else \
976 true ; \
977 fi
978
c4fb14b7 979install-patch: force
06a07944 980 @if [ -f ./patch/Makefile ] ; then \
77806c3e 981 rootme=`pwd` ; export rootme ; \
7fcfdcf7 982 (cd ./patch; \
2198e4ba 983 $(MAKE) $(FLAGS_TO_PASS) \
7c9feeb7 984 bindir=$(bindir) \
2198e4ba 985 man1dir=$(man1dir) install) ; \
7c9feeb7
RP
986 else \
987 true ; \
988 fi
989
4d714963 990### emacs
c4fb14b7 991all-emacs: force
06a07944 992 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 993 rootme=`pwd` ; export rootme ; \
7fcfdcf7 994 (cd ./emacs; \
2198e4ba 995 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
996 else \
997 true ; \
998 fi
4d714963 999
c4fb14b7 1000clean-emacs: force
06a07944 1001 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 1002 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1003 (cd ./emacs; \
2198e4ba 1004 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
1005 else \
1006 true ; \
1007 fi
4d714963 1008
c4fb14b7 1009install-emacs: force
06a07944 1010 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 1011 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1012 (cd ./emacs; \
2198e4ba 1013 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
1014 else \
1015 true ; \
1016 fi
23e3e7f9 1017
4d714963 1018### ispell
c4fb14b7 1019all-ispell: all-emacs
06a07944 1020 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1021 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1022 (cd ./ispell; \
2198e4ba 1023 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1024 else \
1025 true ; \
1026 fi
4d714963 1027
c4fb14b7 1028clean-ispell: force
06a07944 1029 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1030 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1031 (cd ./ispell; \
2198e4ba 1032 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
1033 else \
1034 true ; \
1035 fi
4d714963 1036
c4fb14b7 1037install-ispell: force
06a07944 1038 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1039 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1040 (cd ./ispell; \
2198e4ba 1041 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079399f6
RP
1042 else \
1043 true ; \
1044 fi
23e3e7f9 1045
079b2abe 1046### send_pr
c4fb14b7 1047all-send_pr: force
06a07944 1048 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1049 rootme=`pwd` ; export rootme ; \
1050 (cd ./send_pr; \
2198e4ba 1051 $(MAKE) $(FLAGS_TO_PASS) all) ; \
079b2abe
RP
1052 else \
1053 true ; \
1054 fi
079b2abe 1055
c4fb14b7 1056clean-send_pr: force
06a07944 1057 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1058 rootme=`pwd` ; export rootme ; \
1059 (cd ./send_pr; \
2198e4ba 1060 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
079b2abe
RP
1061 else \
1062 true ; \
1063 fi
1064
c4fb14b7 1065install-send_pr: force
06a07944 1066 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1067 rootme=`pwd` ; export rootme ; \
1068 (cd ./send_pr; \
2198e4ba 1069 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079b2abe
RP
1070 else \
1071 true ; \
1072 fi
1073
06a07944
RP
1074### libm
1075all-libm: force
98a33b6d 1076 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1077 rootme=`pwd` ; export rootme ; \
1078 (cd ./libm; \
1079 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1080 else \
1081 true ; \
1082 fi
1083
1084clean-libm: force
98a33b6d 1085 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1086 rootme=`pwd` ; export rootme ; \
1087 (cd ./libm; \
1088 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1089 else \
1090 true ; \
1091 fi
1092
1093install-libm: force
98a33b6d 1094 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1095 rootme=`pwd` ; export rootme ; \
1096 (cd ./libm; \
1097 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1098 else \
1099 true ; \
1100 fi
1101
ba8abfce 1102### libg++
9d98d2ac 1103
c4fb14b7 1104all-libg++: all-gas all-ld all-gcc
06a07944 1105 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1106 rootme=`pwd` ; export rootme ; \
51489233 1107 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1108 (cd ./libg++; \
51489233 1109 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
ba8abfce
JG
1110 else \
1111 true ; \
1112 fi
1113
c4fb14b7 1114clean-libg++: force
06a07944 1115 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1116 rootme=`pwd` ; export rootme ; \
51489233 1117 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1118 (cd ./libg++; \
51489233 1119 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
ba8abfce
JG
1120 else \
1121 true ; \
1122 fi
1123
c4fb14b7 1124install-libg++: force
06a07944 1125 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1126 rootme=`pwd` ; export rootme ; \
51489233 1127 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1128 (cd ./libg++; \
51489233 1129 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
ba8abfce
JG
1130 else \
1131 true ; \
1132 fi
23e3e7f9 1133
4d714963 1134### other supporting targets
a0f47eb7
SC
1135# this is a bad hack.
1136all.xclib: all.normal
98a33b6d 1137 if [ -f clib/Makefile ] ; then \
2198e4ba 1138 (cd clib ; $(MAKE) $(FLAGS_TO_PASS)) ; \
a0f47eb7
SC
1139 fi
1140
02a7ba9a 1141subdir_do:
1dbe4d41 1142 @for i in $(DODIRS); do \
51489233
ILT
1143 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1144 case $$i in \
1145 libg++ | xiberty | newlib) \
1146 if (rootme=`pwd` ; export rootme ; \
1147 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1148 cd ./$$i ; \
1149 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1150 else exit 1 ; fi \
1151 ;; \
1152 *) \
1153 if (rootme=`pwd` ; export rootme ; \
1154 cd ./$$i ; \
1155 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1156 else exit 1 ; fi \
1157 ;; \
1158 esac ; \
1159 else true ; fi ; \
a01bf1fb 1160 done
eb02fd64 1161
abc52b80
JG
1162# The "else true" stuff is for Ultrix; the shell returns the exit code
1163# of the "if" command, if no commands are run in the "then" or "else" part,
1164# causing Make to quit.
4c27527f
RP
1165
1166MAKEDIRS= \
4d714963 1167 $(prefix) \
7fcfdcf7 1168 $(exec_prefix) \
8b361a95
SEF
1169 $(tooldir)
1170
1171# $(bindir) \
1172# $(libdir) \
1173# $(includedir) \
1174# $(datadir) \
1175# $(docdir) \
1176# $(mandir) \
1177# $(man1dir) \
1178# $(man5dir)
4d714963
RP
1179
1180# $(man2dir) \
1181# $(man3dir) \
1182# $(man4dir) \
1183# $(man6dir) \
1184# $(man7dir) \
1185# $(man8dir)
4c27527f 1186
02a7ba9a 1187install-dirs:
4c27527f 1188 for i in $(MAKEDIRS) ; do \
cd49a4dc 1189 echo Making $$i... ; \
8b361a95
SEF
1190 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1191 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
06a07944
RP
1192 if [ ! -d $$i ] ; then \
1193 if mkdir $$i ; then \
1194 true ; \
1195 else \
1196 exit 1 ; \
1197 fi ; \
1198 else \
1199 true ; \
1200 fi ; \
4c27527f 1201 done
0ec776a5 1202
c5f94070 1203MAKEINFODIRS= \
8b361a95
SEF
1204 $(prefix)
1205
1206# $(infodir)
c5f94070 1207
02a7ba9a 1208install-info-dirs:
9a9e8e7f 1209 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
8b361a95
SEF
1210# if [ -d $(datadir) ] ; then true ; else mkdir $(datadir) ; fi
1211# if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
c5f94070 1212
02a7ba9a 1213dir.info:
8b361a95 1214 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
c466cfab 1215 mv -f dir.info.new dir.info
6b7e5998 1216
eb02fd64
RP
1217etags tags: TAGS
1218
02a7ba9a 1219TAGS:
eb02fd64
RP
1220 etags `$(MAKE) ls`
1221
1222ls:
1223 @echo Makefile
1224 @for i in $(SUBDIRS); \
1225 do \
1226 (cd $$i; \
1227 pwd=`pwd`; \
1228 wd=`basename $$pwd`; \
1229 for j in `$(MAKE) ls`; \
1230 do \
1231 echo $$wd/$$j; \
1232 done) \
1233 done
1234
3c81fef5 1235force:
eb02fd64
RP
1236
1237# with the gnu make, this is done automatically.
1238
f1eb48b6 1239Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1240 $(SHELL) ./config.status
eb02fd64 1241
11954bf1
JG
1242#
1243# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1244
23e3e7f9 1245DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
be2becc7 1246 config.sub config configure.man move-if-change
66cfe047 1247GDB_SUPPORT_DIRS= bfd include libiberty mmalloc readline glob
abc52b80 1248GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
11954bf1 1249
abc52b80 1250setup-dirs: force_update
11954bf1
JG
1251 ./configure sun4
1252 make clean
1253 ./configure -rm sun4
905bb120 1254 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
abc52b80
JG
1255
1256bfd.ilrt.tar.Z: setup-dirs
11954bf1 1257 rm -f bfd.ilrt.tar.Z
abc52b80 1258 tar cf - $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) \
11954bf1
JG
1259 | compress -v >bfd.ilrt.tar.Z
1260
abc52b80
JG
1261gdb.tar.Z: setup-dirs
1262 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1263 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1264
1265make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1266 rm -rf proto-toplev; mkdir proto-toplev
1267 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1268 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1269 ln -s ../$$i . ; \
1270 done)
7c9feeb7
RP
1271 # Put only one copy (four hard links) of COPYING in the tar file.
1272 rm proto-toplev/bfd/COPYING
1273 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1274 rm proto-toplev/include/COPYING
1275 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1276 rm proto-toplev/readline/COPYING
1277 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
a3a063a9
JG
1278 # Take out texinfo from configurable dirs
1279 rm proto-toplev/configure.in
1280 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
4d714963
RP
1281 # Take out glob from buildable dirs
1282 rm proto-toplev/Makefile.in
6995fe83
SG
1283
1284 sed -e '/^SUBDIRS =/s/glob //' \
1285 -e '/^all\.normal: /s/\all-texinfo //' \
1286 -e '/^clean: /s/clean-texinfo //' \
1287 -e '/^install\.all: /s/install-texinfo //' \
1288 <Makefile.in >proto-toplev/Makefile.in
1289
abc52b80
JG
1290 mkdir proto-toplev/texinfo
1291 mkdir proto-toplev/texinfo/fsf
1292 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
905bb120 1293 chmod og=u `find proto-toplev -print`
abc52b80
JG
1294 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1295 echo "==> Making gdb-$$VER.tar.Z"; \
1296 ln -s proto-toplev gdb-$$VER; \
1297 tar cfh - gdb-$$VER \
1298 | compress -v >gdb-$$VER.tar.Z)
1299
11954bf1
JG
1300force_update:
1301
0ec776a5
SC
1302nothing:
1303
eb02fd64 1304# end of Makefile.in
This page took 0.123159 seconds and 4 git commands to generate.