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