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