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