* language.c, language.h: Move saved_language out to global
[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 \
fb90daeb 145 echo -I$${rootme}/gcc/include -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -nostdinc ; \
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
fb90daeb 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 \
fb90daeb 242 clean-libg++ clean-gprof clean-send_pr clean-libm clean-xiberty
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
fb90daeb
ME
386### xiberty
387all-xiberty: all-gcc all-newlib
388 @if [ -f ./xiberty/Makefile ] ; then \
389 rootme=`pwd` ; export rootme ; \
390 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
391 (cd ./xiberty; \
392 $(MAKE) $(FLAGS_TO_PASS) all) ; \
393 else \
394 true ; \
395 fi
396
397clean-xiberty: force
398 @if [ -f ./xiberty/Makefile ] ; then \
399 rootme=`pwd` ; export rootme ; \
400 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
401 (cd ./xiberty; \
402 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
403 else \
404 true ; \
405 fi
406
407install-xiberty: force
408 @if [ -f ./xiberty/Makefile ] ; then \
409 rootme=`pwd` ; export rootme ; \
410 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
411 (cd ./xiberty; \
412 $(MAKE) $(FLAGS_TO_PASS) install) ; \
413 else \
414 true ; \
415 fi
416
66cfe047 417### mmalloc
c4fb14b7 418all-mmalloc: force
06a07944 419 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
420 rootme=`pwd` ; export rootme ; \
421 (cd ./mmalloc; \
2198e4ba 422 $(MAKE) $(FLAGS_TO_PASS) all) ; \
66cfe047
SG
423 else \
424 true ; \
425 fi
66cfe047
SG
426
427clean-mmalloc: force
06a07944 428 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
429 rootme=`pwd` ; export rootme ; \
430 (cd ./mmalloc; \
2198e4ba 431 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
66cfe047
SG
432 else \
433 true ; \
434 fi
435
436install-mmalloc: force
06a07944 437 @if [ -f ./mmalloc/Makefile ] ; then \
66cfe047
SG
438 rootme=`pwd` ; export rootme ; \
439 (cd ./mmalloc; \
2198e4ba 440 $(MAKE) $(FLAGS_TO_PASS) install) ; \
66cfe047
SG
441 else \
442 true ; \
443 fi
444
4d714963 445### texinfo
c4fb14b7 446all-texinfo: all-libiberty
06a07944 447 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 448 rootme=`pwd` ; export rootme ; \
7fcfdcf7 449 (cd ./texinfo; \
2198e4ba 450 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
451 else \
452 true ; \
453 fi
4d714963
RP
454
455clean-texinfo: force
06a07944 456 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 457 rootme=`pwd` ; export rootme ; \
7fcfdcf7 458 (cd ./texinfo; \
2198e4ba 459 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
460 else \
461 true ; \
462 fi
4d714963
RP
463
464install-texinfo: force
06a07944 465 @if [ -f ./texinfo/Makefile ] ; then \
77806c3e 466 rootme=`pwd` ; export rootme ; \
7fcfdcf7 467 (cd ./texinfo; \
2198e4ba 468 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
469 else \
470 true ; \
471 fi
23e3e7f9 472
4d714963 473### bfd
c4fb14b7 474all-bfd: force
06a07944 475 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 476 rootme=`pwd` ; export rootme ; \
7fcfdcf7 477 (cd ./bfd; \
2198e4ba 478 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
479 else \
480 true ; \
481 fi
4d714963
RP
482
483clean-bfd: force
06a07944 484 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 485 rootme=`pwd` ; export rootme ; \
7fcfdcf7 486 (cd ./bfd; \
2198e4ba 487 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
488 else \
489 true ; \
490 fi
4d714963
RP
491
492install-bfd: force
06a07944 493 @if [ -f ./bfd/Makefile ] ; then \
77806c3e 494 rootme=`pwd` ; export rootme ; \
7fcfdcf7 495 (cd ./bfd; \
2198e4ba 496 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
497 else \
498 true ; \
499 fi
23e3e7f9 500
aa06ff7e
SC
501
502### opcodes
503all-opcodes: force
504 @if [ -f ./opcodes/Makefile ] ; then \
505 rootme=`pwd` ; export rootme ; \
a904db53 506 (cd ./opcodes; \
aa06ff7e
SC
507 $(MAKE) $(FLAGS_TO_PASS) all) ; \
508 else \
509 true ; \
510 fi
511
512clean-opcodes: force
513 @if [ -f ./opcodes/Makefile ] ; then \
514 rootme=`pwd` ; export rootme ; \
a904db53 515 (cd ./opcodes; \
aa06ff7e
SC
516 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
517 else \
518 true ; \
519 fi
520
521install-opcodes: force
522 @if [ -f ./opcodes/Makefile ] ; then \
523 rootme=`pwd` ; export rootme ; \
a904db53 524 (cd ./opcodes; \
aa06ff7e
SC
525 $(MAKE) $(FLAGS_TO_PASS) install) ; \
526 else \
527 true ; \
528 fi
529
4d714963 530### binutils
aa06ff7e 531all-binutils: all-opcodes all-libiberty all-bfd all-flex
06a07944 532 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 533 rootme=`pwd` ; export rootme ; \
7fcfdcf7 534 (cd ./binutils; \
2198e4ba 535 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
536 else \
537 true ; \
538 fi
4d714963
RP
539
540clean-binutils: force
06a07944 541 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 542 rootme=`pwd` ; export rootme ; \
7fcfdcf7 543 (cd ./binutils; \
2198e4ba 544 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
545 else \
546 true ; \
547 fi
4d714963
RP
548
549install-binutils: force
06a07944 550 @if [ -f ./binutils/Makefile ] ; then \
77806c3e 551 rootme=`pwd` ; export rootme ; \
7fcfdcf7 552 (cd ./binutils; \
2198e4ba 553 $(MAKE) $(FLAGS_TO_PASS) install) ; \
7fcfdcf7
SC
554 else \
555 true ; \
556 fi
557
558### newlib
51489233 559all-newlib: all-binutils all-ld all-gas all-gcc
06a07944 560 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 561 rootme=`pwd` ; export rootme ; \
51489233 562 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 563 (cd ./newlib; \
51489233 564 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
7fcfdcf7
SC
565 else \
566 true ; \
567 fi
7fcfdcf7
SC
568
569clean-newlib: force
06a07944 570 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 571 rootme=`pwd` ; export rootme ; \
51489233 572 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 573 (cd ./newlib; \
51489233 574 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
7fcfdcf7
SC
575 else \
576 true ; \
577 fi
578
579install-newlib: force
06a07944 580 @if [ -f ./newlib/Makefile ] ; then \
7fcfdcf7 581 rootme=`pwd` ; export rootme ; \
51489233 582 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 583 (cd ./newlib; \
51489233 584 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
585 else \
586 true ; \
587 fi
23e3e7f9 588
9a14a29d 589### gprof
c4fb14b7 590all-gprof: all-libiberty all-bfd
06a07944 591 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
592 rootme=`pwd` ; export rootme ; \
593 (cd ./gprof; \
594 $(MAKE) $(FLAGS_TO_PASS) all) ; \
9a14a29d
SEF
595 else \
596 true ; \
597 fi
9a14a29d
SEF
598
599clean-gprof: force
06a07944 600 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
601 rootme=`pwd` ; export rootme ; \
602 (cd ./gprof; \
603 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
9a14a29d
SEF
604 else \
605 true ; \
606 fi
607
608install-gprof: force
06a07944 609 @if [ -f ./gprof/Makefile ] ; then \
51489233
ILT
610 rootme=`pwd` ; export rootme ; \
611 (cd ./gprof; \
612 $(MAKE) $(FLAGS_TO_PASS) install) ; \
9a14a29d
SEF
613 else \
614 true ; \
615 fi
616
4d714963 617### byacc
c4fb14b7 618all-byacc: force
06a07944 619 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 620 rootme=`pwd` ; export rootme ; \
7fcfdcf7 621 (cd ./byacc; \
2198e4ba 622 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
623 else \
624 true ; \
625 fi
4d714963
RP
626
627clean-byacc: force
06a07944 628 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 629 rootme=`pwd` ; export rootme ; \
7fcfdcf7 630 (cd ./byacc; \
2198e4ba 631 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
632 else \
633 true ; \
634 fi
4d714963
RP
635
636install-byacc: force
06a07944 637 @if [ -f ./byacc/Makefile ] ; then \
77806c3e 638 rootme=`pwd` ; export rootme ; \
7fcfdcf7 639 (cd ./byacc; \
2198e4ba 640 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
641 else \
642 true ; \
643 fi
23e3e7f9 644
dcbfc14d 645### flex
2198e4ba 646all-flex: all-libiberty
06a07944 647 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
648 rootme=`pwd` ; export rootme ; \
649 (cd ./flex; \
2198e4ba 650 $(MAKE) $(FLAGS_TO_PASS) all) ; \
dcbfc14d
DZ
651 else \
652 true ; \
653 fi
654
655clean-flex: force
06a07944 656 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
657 rootme=`pwd` ; export rootme ; \
658 (cd ./flex; \
2198e4ba 659 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
dcbfc14d
DZ
660 else \
661 true ; \
662 fi
663
664install-flex: force
06a07944 665 @if [ -f ./flex/Makefile ] ; then \
dcbfc14d
DZ
666 rootme=`pwd` ; export rootme ; \
667 (cd ./flex; \
2198e4ba 668 $(MAKE) $(FLAGS_TO_PASS) install) ; \
dcbfc14d
DZ
669 else \
670 true ; \
671 fi
4d714963 672### gcc
6995fe83 673all-gcc: all-libiberty all-byacc
06a07944 674 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 675 rootme=`pwd` ; export rootme ; \
7fcfdcf7 676 (cd ./gcc; \
2198e4ba 677 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
678 else \
679 true ; \
680 fi
4d714963
RP
681
682clean-gcc: force
06a07944 683 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 684 rootme=`pwd` ; export rootme ; \
7fcfdcf7 685 (cd ./gcc; \
2198e4ba 686 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
687 else \
688 true ; \
689 fi
4d714963 690
c4fb14b7 691install-gcc: force
06a07944 692 @if [ -f ./gcc/Makefile ] ; then \
77806c3e 693 rootme=`pwd` ; export rootme ; \
7fcfdcf7 694 (cd ./gcc; \
2198e4ba 695 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
696 else \
697 true ; \
698 fi
23e3e7f9 699
4d714963 700### readline
c4fb14b7 701all-readline: force
06a07944 702 @if [ -f ./readline/Makefile ] ; then \
77806c3e 703 rootme=`pwd` ; export rootme ; \
7fcfdcf7 704 (cd ./readline; \
2198e4ba 705 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
706 else \
707 true ; \
708 fi
4d714963
RP
709
710clean-readline: force
06a07944 711 @if [ -f ./readline/Makefile ] ; then \
77806c3e 712 rootme=`pwd` ; export rootme ; \
7fcfdcf7 713 (cd ./readline; \
2198e4ba 714 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
715 else \
716 true ; \
717 fi
4d714963
RP
718
719install-readline: force
06a07944 720 @if [ -f ./readline/Makefile ] ; then \
77806c3e 721 rootme=`pwd` ; export rootme ; \
7fcfdcf7 722 (cd ./readline; \
2198e4ba 723 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
724 else \
725 true ; \
726 fi
23e3e7f9 727
4d714963 728### glob
c4fb14b7 729all-glob: force
06a07944 730 @if [ -f ./glob/Makefile ] ; then \
77806c3e 731 rootme=`pwd` ; export rootme ; \
7fcfdcf7 732 (cd ./glob; \
2198e4ba 733 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
734 else \
735 true ; \
736 fi
4d714963
RP
737
738clean-glob: force
06a07944 739 @if [ -f ./glob/Makefile ] ; then \
77806c3e 740 rootme=`pwd` ; export rootme ; \
7fcfdcf7 741 (cd ./glob; \
2198e4ba 742 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
743 else \
744 true ; \
745 fi
4d714963
RP
746
747install-glob: force
06a07944 748 @if [ -f ./glob/Makefile ] ; then \
77806c3e 749 rootme=`pwd` ; export rootme ; \
7fcfdcf7 750 (cd ./glob; \
2198e4ba 751 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
752 else \
753 true ; \
754 fi
23e3e7f9 755
4d714963 756### gas
a904db53 757all-gas: all-libiberty all-opcodes all-bfd
06a07944 758 @if [ -f ./gas/Makefile ] ; then \
77806c3e 759 rootme=`pwd` ; export rootme ; \
7fcfdcf7 760 (cd ./gas; \
2198e4ba 761 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
762 else \
763 true ; \
764 fi
4d714963
RP
765
766clean-gas: force
06a07944 767 @if [ -f ./gas/Makefile ] ; then \
77806c3e 768 rootme=`pwd` ; export rootme ; \
7fcfdcf7 769 (cd ./gas; \
2198e4ba 770 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
771 else \
772 true ; \
773 fi
4d714963
RP
774
775install-gas: force
06a07944 776 @if [ -f ./gas/Makefile ] ; then \
77806c3e 777 rootme=`pwd` ; export rootme ; \
7fcfdcf7 778 (cd ./gas; \
2198e4ba 779 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
780 else \
781 true ; \
782 fi
23e3e7f9 783
3ad0ef37
SC
784### gas
785all-tgas: all-libiberty all-bfd
786 @if [ -f ./tgas/Makefile ] ; then \
787 rootme=`pwd` ; export rootme ; \
788 (cd ./tgas; \
789 $(MAKE) $(FLAGS_TO_PASS) all) ; \
790 else \
791 true ; \
792 fi
793
794
4d714963 795### ld
6995fe83 796all-ld: all-libiberty all-bfd all-byacc all-flex
06a07944 797 @if [ -f ./ld/Makefile ] ; then \
77806c3e 798 rootme=`pwd` ; export rootme ; \
7fcfdcf7 799 (cd ./ld; \
2198e4ba 800 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
801 else \
802 true ; \
803 fi
a0f47eb7 804
4d714963 805clean-ld: force
06a07944 806 @if [ -f ./ld/Makefile ] ; then \
77806c3e 807 rootme=`pwd` ; export rootme ; \
7fcfdcf7 808 (cd ./ld; \
2198e4ba 809 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
810 else \
811 true ; \
812 fi
6a3958b2 813
4d714963 814install-ld: force
06a07944 815 @if [ -f ./ld/Makefile ] ; then \
77806c3e 816 rootme=`pwd` ; export rootme ; \
7fcfdcf7 817 (cd ./ld; \
2198e4ba 818 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
819 else \
820 true ; \
821 fi
23e3e7f9 822
4d714963 823### gdb
a904db53 824all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
06a07944 825 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 826 rootme=`pwd` ; export rootme ; \
7fcfdcf7 827 (cd ./gdb; \
2198e4ba 828 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
829 else \
830 true ; \
831 fi
4d714963
RP
832
833clean-gdb: force
06a07944 834 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 835 rootme=`pwd` ; export rootme ; \
7fcfdcf7 836 (cd ./gdb; \
2198e4ba 837 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
838 else \
839 true ; \
840 fi
4d714963
RP
841
842install-gdb: force
06a07944 843 @if [ -f ./gdb/Makefile ] ; then \
77806c3e 844 rootme=`pwd` ; export rootme ; \
7fcfdcf7 845 (cd ./gdb; \
2198e4ba 846 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
847 else \
848 true ; \
849 fi
23e3e7f9 850
4d714963 851### make
c4fb14b7 852all-make: all-libiberty
06a07944 853 @if [ -f ./make/Makefile ] ; then \
77806c3e 854 rootme=`pwd` ; export rootme ; \
7fcfdcf7 855 (cd ./make; \
2198e4ba 856 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
857 else \
858 true ; \
859 fi
4d714963
RP
860
861clean-make: force
06a07944 862 @if [ -f ./make/Makefile ] ; then \
77806c3e 863 rootme=`pwd` ; export rootme ; \
7fcfdcf7 864 (cd ./make; \
2198e4ba 865 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
866 else \
867 true ; \
868 fi
4d714963
RP
869
870install-make: force
06a07944 871 @if [ -f ./make/Makefile ] ; then \
77806c3e 872 rootme=`pwd` ; export rootme ; \
7fcfdcf7 873 (cd ./make; \
2198e4ba 874 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
875 else \
876 true ; \
877 fi
23e3e7f9 878
4d714963 879### diff
c4fb14b7 880all-diff: force
06a07944 881 @if [ -f ./diff/Makefile ] ; then \
77806c3e 882 rootme=`pwd` ; export rootme ; \
7fcfdcf7 883 (cd ./diff; \
2198e4ba 884 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
885 else \
886 true ; \
887 fi
4d714963
RP
888
889clean-diff: force
06a07944 890 @if [ -f ./diff/Makefile ] ; then \
77806c3e 891 rootme=`pwd` ; export rootme ; \
7fcfdcf7 892 (cd ./diff; \
2198e4ba 893 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
894 else \
895 true ; \
896 fi
4d714963
RP
897
898install-diff: force
06a07944 899 @if [ -f ./diff/Makefile ] ; then \
77806c3e 900 rootme=`pwd` ; export rootme ; \
7fcfdcf7 901 (cd ./diff/; \
2198e4ba 902 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
903 else \
904 true ; \
905 fi
23e3e7f9 906
4d714963 907### grep
c4fb14b7 908all-grep: force
06a07944 909 @if [ -f ./grep/Makefile ] ; then \
77806c3e 910 rootme=`pwd` ; export rootme ; \
7fcfdcf7 911 (cd ./grep; \
2198e4ba 912 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
913 else \
914 true ; \
915 fi
4d714963
RP
916
917clean-grep: force
06a07944 918 @if [ -f ./grep/Makefile ] ; then \
77806c3e 919 rootme=`pwd` ; export rootme ; \
7fcfdcf7 920 (cd ./grep; \
2198e4ba 921 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
922 else \
923 true ; \
924 fi
4d714963
RP
925
926install-grep: force
06a07944 927 @if [ -f ./grep/Makefile ] ; then \
77806c3e 928 rootme=`pwd` ; export rootme ; \
7fcfdcf7 929 (cd ./grep; \
2198e4ba
MT
930 $(MAKE) $(FLAGS_TO_PASS) install) ; \
931 else \
932 true ; \
933 fi
934
935### rcs
936all-rcs: force
06a07944 937 @if [ -f ./rcs/Makefile ] ; then \
2198e4ba
MT
938 rootme=`pwd` ; export rootme ; \
939 (cd ./rcs; \
940 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
941 else \
942 true ; \
943 fi
4d714963
RP
944
945clean-rcs: force
06a07944 946 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 947 rootme=`pwd` ; export rootme ; \
7fcfdcf7 948 (cd ./rcs; \
2198e4ba 949 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
950 else \
951 true ; \
952 fi
4d714963 953
c4fb14b7 954install-rcs: force
06a07944 955 @if [ -f ./rcs/Makefile ] ; then \
77806c3e 956 rootme=`pwd` ; export rootme ; \
7fcfdcf7 957 (cd ./rcs; \
2198e4ba 958 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
959 else \
960 true ; \
961 fi
23e3e7f9 962
4d714963 963### cvs
c4fb14b7 964all-cvs: force
06a07944 965 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 966 rootme=`pwd` ; export rootme ; \
7fcfdcf7 967 (cd ./cvs; \
2198e4ba 968 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
969 else \
970 true ; \
971 fi
4d714963 972
c4fb14b7 973clean-cvs: force
06a07944 974 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 975 rootme=`pwd` ; export rootme ; \
7fcfdcf7 976 (cd ./cvs; \
2198e4ba 977 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
978 else \
979 true ; \
980 fi
4d714963 981
c4fb14b7 982install-cvs: force
06a07944 983 @if [ -f ./cvs/Makefile ] ; then \
77806c3e 984 rootme=`pwd` ; export rootme ; \
7fcfdcf7 985 (cd ./cvs; \
2198e4ba 986 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
987 else \
988 true ; \
989 fi
23e3e7f9 990
7c9feeb7 991### patch
c4fb14b7 992all-patch: force
06a07944 993 @if [ -f ./patch/Makefile ] ; then \
77806c3e 994 rootme=`pwd` ; export rootme ; \
7fcfdcf7 995 (cd ./patch; \
2198e4ba 996 $(MAKE) $(FLAGS_TO_PASS) all) ; \
7c9feeb7
RP
997 else \
998 true ; \
999 fi
1000
c4fb14b7 1001clean-patch: force
06a07944 1002 @if [ -f ./patch/Makefile ] ; then \
77806c3e 1003 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1004 (cd ./patch; \
2198e4ba 1005 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
7c9feeb7
RP
1006 else \
1007 true ; \
1008 fi
1009
c4fb14b7 1010install-patch: force
06a07944 1011 @if [ -f ./patch/Makefile ] ; then \
77806c3e 1012 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1013 (cd ./patch; \
2198e4ba 1014 $(MAKE) $(FLAGS_TO_PASS) \
7c9feeb7 1015 bindir=$(bindir) \
2198e4ba 1016 man1dir=$(man1dir) install) ; \
7c9feeb7
RP
1017 else \
1018 true ; \
1019 fi
1020
4d714963 1021### emacs
c4fb14b7 1022all-emacs: force
06a07944 1023 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 1024 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1025 (cd ./emacs; \
2198e4ba 1026 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1027 else \
1028 true ; \
1029 fi
4d714963 1030
c4fb14b7 1031clean-emacs: force
06a07944 1032 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 1033 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1034 (cd ./emacs; \
2198e4ba 1035 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
1036 else \
1037 true ; \
1038 fi
4d714963 1039
c4fb14b7 1040install-emacs: force
06a07944 1041 @if [ -f ./emacs/Makefile ] ; then \
77806c3e 1042 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1043 (cd ./emacs; \
2198e4ba 1044 $(MAKE) $(FLAGS_TO_PASS) install) ; \
b26ff9d8
RP
1045 else \
1046 true ; \
1047 fi
23e3e7f9 1048
4d714963 1049### ispell
c4fb14b7 1050all-ispell: all-emacs
06a07944 1051 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1052 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1053 (cd ./ispell; \
2198e4ba 1054 $(MAKE) $(FLAGS_TO_PASS) all) ; \
b26ff9d8
RP
1055 else \
1056 true ; \
1057 fi
4d714963 1058
c4fb14b7 1059clean-ispell: force
06a07944 1060 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1061 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1062 (cd ./ispell; \
2198e4ba 1063 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
b26ff9d8
RP
1064 else \
1065 true ; \
1066 fi
4d714963 1067
c4fb14b7 1068install-ispell: force
06a07944 1069 @if [ -f ./ispell/Makefile ] ; then \
77806c3e 1070 rootme=`pwd` ; export rootme ; \
7fcfdcf7 1071 (cd ./ispell; \
2198e4ba 1072 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079399f6
RP
1073 else \
1074 true ; \
1075 fi
23e3e7f9 1076
079b2abe 1077### send_pr
c4fb14b7 1078all-send_pr: force
06a07944 1079 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1080 rootme=`pwd` ; export rootme ; \
1081 (cd ./send_pr; \
2198e4ba 1082 $(MAKE) $(FLAGS_TO_PASS) all) ; \
079b2abe
RP
1083 else \
1084 true ; \
1085 fi
079b2abe 1086
c4fb14b7 1087clean-send_pr: force
06a07944 1088 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1089 rootme=`pwd` ; export rootme ; \
1090 (cd ./send_pr; \
2198e4ba 1091 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
079b2abe
RP
1092 else \
1093 true ; \
1094 fi
1095
c4fb14b7 1096install-send_pr: force
06a07944 1097 @if [ -f ./send_pr/Makefile ] ; then \
079b2abe
RP
1098 rootme=`pwd` ; export rootme ; \
1099 (cd ./send_pr; \
2198e4ba 1100 $(MAKE) $(FLAGS_TO_PASS) install) ; \
079b2abe
RP
1101 else \
1102 true ; \
1103 fi
1104
06a07944
RP
1105### libm
1106all-libm: force
98a33b6d 1107 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1108 rootme=`pwd` ; export rootme ; \
1109 (cd ./libm; \
1110 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1111 else \
1112 true ; \
1113 fi
1114
1115clean-libm: force
98a33b6d 1116 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1117 rootme=`pwd` ; export rootme ; \
1118 (cd ./libm; \
1119 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
1120 else \
1121 true ; \
1122 fi
1123
1124install-libm: force
98a33b6d 1125 @if [ -f ./libm/Makefile ] ; then \
06a07944
RP
1126 rootme=`pwd` ; export rootme ; \
1127 (cd ./libm; \
1128 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1129 else \
1130 true ; \
1131 fi
1132
ba8abfce 1133### libg++
9d98d2ac 1134
c4fb14b7 1135all-libg++: all-gas all-ld all-gcc
06a07944 1136 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1137 rootme=`pwd` ; export rootme ; \
51489233 1138 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1139 (cd ./libg++; \
51489233 1140 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
ba8abfce
JG
1141 else \
1142 true ; \
1143 fi
1144
c4fb14b7 1145clean-libg++: force
06a07944 1146 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1147 rootme=`pwd` ; export rootme ; \
51489233 1148 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1149 (cd ./libg++; \
51489233 1150 $(MAKE) $(TARGET_FLAGS_TO_PASS) clean) ; \
ba8abfce
JG
1151 else \
1152 true ; \
1153 fi
1154
c4fb14b7 1155install-libg++: force
06a07944 1156 @if [ -f ./libg++/Makefile ] ; then \
77806c3e 1157 rootme=`pwd` ; export rootme ; \
51489233 1158 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
7fcfdcf7 1159 (cd ./libg++; \
51489233 1160 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
ba8abfce
JG
1161 else \
1162 true ; \
1163 fi
23e3e7f9 1164
4d714963 1165### other supporting targets
a0f47eb7
SC
1166# this is a bad hack.
1167all.xclib: all.normal
98a33b6d 1168 if [ -f clib/Makefile ] ; then \
2198e4ba 1169 (cd clib ; $(MAKE) $(FLAGS_TO_PASS)) ; \
a0f47eb7
SC
1170 fi
1171
02a7ba9a 1172subdir_do:
1dbe4d41 1173 @for i in $(DODIRS); do \
51489233
ILT
1174 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1175 case $$i in \
1176 libg++ | xiberty | newlib) \
1177 if (rootme=`pwd` ; export rootme ; \
1178 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1179 cd ./$$i ; \
1180 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1181 else exit 1 ; fi \
1182 ;; \
1183 *) \
1184 if (rootme=`pwd` ; export rootme ; \
1185 cd ./$$i ; \
1186 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1187 else exit 1 ; fi \
1188 ;; \
1189 esac ; \
1190 else true ; fi ; \
a01bf1fb 1191 done
eb02fd64 1192
abc52b80
JG
1193# The "else true" stuff is for Ultrix; the shell returns the exit code
1194# of the "if" command, if no commands are run in the "then" or "else" part,
1195# causing Make to quit.
4c27527f
RP
1196
1197MAKEDIRS= \
4d714963 1198 $(prefix) \
7fcfdcf7 1199 $(exec_prefix) \
8b361a95
SEF
1200 $(tooldir)
1201
1202# $(bindir) \
1203# $(libdir) \
1204# $(includedir) \
1205# $(datadir) \
1206# $(docdir) \
1207# $(mandir) \
1208# $(man1dir) \
1209# $(man5dir)
4d714963
RP
1210
1211# $(man2dir) \
1212# $(man3dir) \
1213# $(man4dir) \
1214# $(man6dir) \
1215# $(man7dir) \
1216# $(man8dir)
4c27527f 1217
02a7ba9a 1218install-dirs:
4c27527f 1219 for i in $(MAKEDIRS) ; do \
cd49a4dc 1220 echo Making $$i... ; \
8b361a95
SEF
1221 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1222 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
06a07944
RP
1223 if [ ! -d $$i ] ; then \
1224 if mkdir $$i ; then \
1225 true ; \
1226 else \
1227 exit 1 ; \
1228 fi ; \
1229 else \
1230 true ; \
1231 fi ; \
4c27527f 1232 done
0ec776a5 1233
c5f94070 1234MAKEINFODIRS= \
8b361a95
SEF
1235 $(prefix)
1236
1237# $(infodir)
c5f94070 1238
02a7ba9a 1239install-info-dirs:
9a9e8e7f 1240 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
8b361a95
SEF
1241# if [ -d $(datadir) ] ; then true ; else mkdir $(datadir) ; fi
1242# if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
c5f94070 1243
02a7ba9a 1244dir.info:
8b361a95 1245 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
c466cfab 1246 mv -f dir.info.new dir.info
6b7e5998 1247
eb02fd64
RP
1248etags tags: TAGS
1249
02a7ba9a 1250TAGS:
eb02fd64
RP
1251 etags `$(MAKE) ls`
1252
1253ls:
1254 @echo Makefile
1255 @for i in $(SUBDIRS); \
1256 do \
1257 (cd $$i; \
1258 pwd=`pwd`; \
1259 wd=`basename $$pwd`; \
1260 for j in `$(MAKE) ls`; \
1261 do \
1262 echo $$wd/$$j; \
1263 done) \
1264 done
1265
3c81fef5 1266force:
eb02fd64
RP
1267
1268# with the gnu make, this is done automatically.
1269
f1eb48b6 1270Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1271 $(SHELL) ./config.status
eb02fd64 1272
11954bf1
JG
1273#
1274# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1275
23e3e7f9 1276DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
fb90daeb
ME
1277 config.sub config configure.man configure.texi move-if-change
1278GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
abc52b80 1279GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
11954bf1 1280
abc52b80 1281setup-dirs: force_update
11954bf1
JG
1282 ./configure sun4
1283 make clean
1284 ./configure -rm sun4
905bb120 1285 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
abc52b80 1286
abc52b80
JG
1287gdb.tar.Z: setup-dirs
1288 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1289 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1290
1291make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1292 rm -rf proto-toplev; mkdir proto-toplev
1293 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1294 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1295 ln -s ../$$i . ; \
1296 done)
7c9feeb7
RP
1297 # Put only one copy (four hard links) of COPYING in the tar file.
1298 rm proto-toplev/bfd/COPYING
1299 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1300 rm proto-toplev/include/COPYING
1301 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1302 rm proto-toplev/readline/COPYING
1303 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
a3a063a9
JG
1304 # Take out texinfo from configurable dirs
1305 rm proto-toplev/configure.in
1306 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
4d714963
RP
1307 # Take out glob from buildable dirs
1308 rm proto-toplev/Makefile.in
6995fe83
SG
1309
1310 sed -e '/^SUBDIRS =/s/glob //' \
1311 -e '/^all\.normal: /s/\all-texinfo //' \
1312 -e '/^clean: /s/clean-texinfo //' \
1313 -e '/^install\.all: /s/install-texinfo //' \
1314 <Makefile.in >proto-toplev/Makefile.in
1315
abc52b80
JG
1316 mkdir proto-toplev/texinfo
1317 mkdir proto-toplev/texinfo/fsf
1318 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
905bb120 1319 chmod og=u `find proto-toplev -print`
abc52b80
JG
1320 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1321 echo "==> Making gdb-$$VER.tar.Z"; \
1322 ln -s proto-toplev gdb-$$VER; \
1323 tar cfh - gdb-$$VER \
1324 | compress -v >gdb-$$VER.tar.Z)
1325
11954bf1
JG
1326force_update:
1327
0ec776a5
SC
1328nothing:
1329
eb02fd64 1330# end of Makefile.in
This page took 0.158938 seconds and 4 git commands to generate.