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