c51df4960841a4e8a5693629691ed59a78ea446c
[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 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-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-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 ### ld
624 all-ld: all-libiberty all-bfd all-byacc all-flex
625 @if [ -f ./ld/Makefile ] ; then \
626 rootme=`pwd` ; export rootme ; \
627 (cd ./ld; \
628 $(MAKE) $(FLAGS_TO_PASS) all) ; \
629 else \
630 true ; \
631 fi
632
633 clean-ld: force
634 @if [ -f ./ld/Makefile ] ; then \
635 rootme=`pwd` ; export rootme ; \
636 (cd ./ld; \
637 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
638 else \
639 true ; \
640 fi
641
642 install-ld: force
643 @if [ -f ./ld/Makefile ] ; then \
644 rootme=`pwd` ; export rootme ; \
645 (cd ./ld; \
646 $(MAKE) $(FLAGS_TO_PASS) install) ; \
647 else \
648 true ; \
649 fi
650
651 ### libgcc (and libgcc1)
652 all-libgcc1: all-gas all-binutils
653 @if [ -f ./libgcc/Makefile ] ; then \
654 rootme=`pwd` ; export rootme ; \
655 (cd ./libgcc; \
656 $(MAKE) $(FLAGS_TO_PASS) libgcc1.a) ; \
657 else \
658 true ; \
659 fi
660
661 clean-libgcc1: force
662 @if [ -f ./libgcc/Makefile ] ; then \
663 rootme=`pwd` ; export rootme ; \
664 (cd ./libgcc; \
665 $(MAKE) $(FLAGS_TO_PASS) clean-libgcc1) ; \
666 else \
667 true ; \
668 fi
669
670 install-libgcc1: force
671 echo libgcc1 is a component, not an installable target
672
673 all-libgcc: all-gas all-gcc all-binutils
674 true
675 @if [ -f ./libgcc/Makefile ] ; then \
676 rootme=`pwd` ; export rootme ; \
677 (cd ./libgcc; \
678 $(MAKE) $(FLAGS_TO_PASS) all) ; \
679 else \
680 true ; \
681 fi
682
683 clean-libgcc: force
684 @if [ -f ./libgcc/Makefile ] ; then \
685 rootme=`pwd` ; export rootme ; \
686 (cd ./libgcc; \
687 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
688 else \
689 true ; \
690 fi
691
692 install-libgcc: force
693 @if [ -f ./libgcc/Makefile ] ; then \
694 rootme=`pwd` ; export rootme ; \
695 (cd ./libgcc; \
696 $(MAKE) $(FLAGS_TO_PASS) install) ; \
697 else \
698 true ; \
699 fi
700
701 ### gdb
702 all-gdb: all-bfd all-libiberty all-mmalloc all-readline all-glob all-byacc
703 @if [ -f ./gdb/Makefile ] ; then \
704 rootme=`pwd` ; export rootme ; \
705 (cd ./gdb; \
706 $(MAKE) $(FLAGS_TO_PASS) all) ; \
707 else \
708 true ; \
709 fi
710
711 clean-gdb: force
712 @if [ -f ./gdb/Makefile ] ; then \
713 rootme=`pwd` ; export rootme ; \
714 (cd ./gdb; \
715 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
716 else \
717 true ; \
718 fi
719
720 install-gdb: force
721 @if [ -f ./gdb/Makefile ] ; then \
722 rootme=`pwd` ; export rootme ; \
723 (cd ./gdb; \
724 $(MAKE) $(FLAGS_TO_PASS) install) ; \
725 else \
726 true ; \
727 fi
728
729 ### make
730 all-make: all-libiberty
731 @if [ -f ./make/Makefile ] ; then \
732 rootme=`pwd` ; export rootme ; \
733 (cd ./make; \
734 $(MAKE) $(FLAGS_TO_PASS) all) ; \
735 else \
736 true ; \
737 fi
738
739 clean-make: force
740 @if [ -f ./make/Makefile ] ; then \
741 rootme=`pwd` ; export rootme ; \
742 (cd ./make; \
743 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
744 else \
745 true ; \
746 fi
747
748 install-make: force
749 @if [ -f ./make/Makefile ] ; then \
750 rootme=`pwd` ; export rootme ; \
751 (cd ./make; \
752 $(MAKE) $(FLAGS_TO_PASS) install) ; \
753 else \
754 true ; \
755 fi
756
757 ### diff
758 all-diff: force
759 @if [ -f ./diff/Makefile ] ; then \
760 rootme=`pwd` ; export rootme ; \
761 (cd ./diff; \
762 $(MAKE) $(FLAGS_TO_PASS) all) ; \
763 else \
764 true ; \
765 fi
766
767 clean-diff: force
768 @if [ -f ./diff/Makefile ] ; then \
769 rootme=`pwd` ; export rootme ; \
770 (cd ./diff; \
771 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
772 else \
773 true ; \
774 fi
775
776 install-diff: force
777 @if [ -f ./diff/Makefile ] ; then \
778 rootme=`pwd` ; export rootme ; \
779 (cd ./diff/; \
780 $(MAKE) $(FLAGS_TO_PASS) install) ; \
781 else \
782 true ; \
783 fi
784
785 ### grep
786 all-grep: force
787 @if [ -f ./grep/Makefile ] ; then \
788 rootme=`pwd` ; export rootme ; \
789 (cd ./grep; \
790 $(MAKE) $(FLAGS_TO_PASS) all) ; \
791 else \
792 true ; \
793 fi
794
795 clean-grep: force
796 @if [ -f ./grep/Makefile ] ; then \
797 rootme=`pwd` ; export rootme ; \
798 (cd ./grep; \
799 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
800 else \
801 true ; \
802 fi
803
804 install-grep: force
805 @if [ -f ./grep/Makefile ] ; then \
806 rootme=`pwd` ; export rootme ; \
807 (cd ./grep; \
808 $(MAKE) $(FLAGS_TO_PASS) install) ; \
809 else \
810 true ; \
811 fi
812
813 ### rcs
814 all-rcs: force
815 @if [ -f ./rcs/Makefile ] ; then \
816 rootme=`pwd` ; export rootme ; \
817 (cd ./rcs; \
818 $(MAKE) $(FLAGS_TO_PASS) all) ; \
819 else \
820 true ; \
821 fi
822
823 clean-rcs: force
824 @if [ -f ./rcs/Makefile ] ; then \
825 rootme=`pwd` ; export rootme ; \
826 (cd ./rcs; \
827 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
828 else \
829 true ; \
830 fi
831
832 install-rcs: force
833 @if [ -f ./rcs/Makefile ] ; then \
834 rootme=`pwd` ; export rootme ; \
835 (cd ./rcs; \
836 $(MAKE) $(FLAGS_TO_PASS) install) ; \
837 else \
838 true ; \
839 fi
840
841 ### cvs
842 all-cvs: force
843 @if [ -f ./cvs/Makefile ] ; then \
844 rootme=`pwd` ; export rootme ; \
845 (cd ./cvs; \
846 $(MAKE) $(FLAGS_TO_PASS) all) ; \
847 else \
848 true ; \
849 fi
850
851 clean-cvs: force
852 @if [ -f ./cvs/Makefile ] ; then \
853 rootme=`pwd` ; export rootme ; \
854 (cd ./cvs; \
855 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
856 else \
857 true ; \
858 fi
859
860 install-cvs: force
861 @if [ -f ./cvs/Makefile ] ; then \
862 rootme=`pwd` ; export rootme ; \
863 (cd ./cvs; \
864 $(MAKE) $(FLAGS_TO_PASS) install) ; \
865 else \
866 true ; \
867 fi
868
869 ### patch
870 all-patch: force
871 @if [ -f ./patch/Makefile ] ; then \
872 rootme=`pwd` ; export rootme ; \
873 (cd ./patch; \
874 $(MAKE) $(FLAGS_TO_PASS) all) ; \
875 else \
876 true ; \
877 fi
878
879 clean-patch: force
880 @if [ -f ./patch/Makefile ] ; then \
881 rootme=`pwd` ; export rootme ; \
882 (cd ./patch; \
883 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
884 else \
885 true ; \
886 fi
887
888 install-patch: force
889 @if [ -f ./patch/Makefile ] ; then \
890 rootme=`pwd` ; export rootme ; \
891 (cd ./patch; \
892 $(MAKE) $(FLAGS_TO_PASS) \
893 bindir=$(bindir) \
894 man1dir=$(man1dir) install) ; \
895 else \
896 true ; \
897 fi
898
899 ### emacs
900 all-emacs: force
901 @if [ -f ./emacs/Makefile ] ; then \
902 rootme=`pwd` ; export rootme ; \
903 (cd ./emacs; \
904 $(MAKE) $(FLAGS_TO_PASS) all) ; \
905 else \
906 true ; \
907 fi
908
909 clean-emacs: force
910 @if [ -f ./emacs/Makefile ] ; then \
911 rootme=`pwd` ; export rootme ; \
912 (cd ./emacs; \
913 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
914 else \
915 true ; \
916 fi
917
918 install-emacs: force
919 @if [ -f ./emacs/Makefile ] ; then \
920 rootme=`pwd` ; export rootme ; \
921 (cd ./emacs; \
922 $(MAKE) $(FLAGS_TO_PASS) install) ; \
923 else \
924 true ; \
925 fi
926
927 ### ispell
928 all-ispell: all-emacs
929 @if [ -f ./ispell/Makefile ] ; then \
930 rootme=`pwd` ; export rootme ; \
931 (cd ./ispell; \
932 $(MAKE) $(FLAGS_TO_PASS) all) ; \
933 else \
934 true ; \
935 fi
936
937 clean-ispell: force
938 @if [ -f ./ispell/Makefile ] ; then \
939 rootme=`pwd` ; export rootme ; \
940 (cd ./ispell; \
941 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
942 else \
943 true ; \
944 fi
945
946 install-ispell: force
947 @if [ -f ./ispell/Makefile ] ; then \
948 rootme=`pwd` ; export rootme ; \
949 (cd ./ispell; \
950 $(MAKE) $(FLAGS_TO_PASS) install) ; \
951 else \
952 true ; \
953 fi
954
955 ### send_pr
956 all-send_pr: force
957 @if [ -f ./send_pr/Makefile ] ; then \
958 rootme=`pwd` ; export rootme ; \
959 (cd ./send_pr; \
960 $(MAKE) $(FLAGS_TO_PASS) all) ; \
961 else \
962 true ; \
963 fi
964
965 clean-send_pr: force
966 @if [ -f ./send_pr/Makefile ] ; then \
967 rootme=`pwd` ; export rootme ; \
968 (cd ./send_pr; \
969 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
970 else \
971 true ; \
972 fi
973
974 install-send_pr: force
975 @if [ -f ./send_pr/Makefile ] ; then \
976 rootme=`pwd` ; export rootme ; \
977 (cd ./send_pr; \
978 $(MAKE) $(FLAGS_TO_PASS) install) ; \
979 else \
980 true ; \
981 fi
982
983 ### libm
984 all-libm: force
985 @if [ -d ./libm ] ; then \
986 rootme=`pwd` ; export rootme ; \
987 (cd ./libm; \
988 $(MAKE) $(FLAGS_TO_PASS) all) ; \
989 else \
990 true ; \
991 fi
992
993 clean-libm: force
994 @if [ -d ./libm ] ; then \
995 rootme=`pwd` ; export rootme ; \
996 (cd ./libm; \
997 $(MAKE) $(FLAGS_TO_PASS) clean) ; \
998 else \
999 true ; \
1000 fi
1001
1002 install-libm: force
1003 @if [ -d ./libm ] ; then \
1004 rootme=`pwd` ; export rootme ; \
1005 (cd ./libm; \
1006 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1007 else \
1008 true ; \
1009 fi
1010
1011 ### libg++
1012
1013 all-libg++: all-gas all-ld all-gcc
1014 @if [ -f ./libg++/Makefile ] ; then \
1015 rootme=`pwd` ; export rootme ; \
1016 (cd ./libg++; \
1017 $(MAKE) $(FLAGS_TO_PASS) "CC=${GXX}" all) ; \
1018 else \
1019 true ; \
1020 fi
1021
1022 clean-libg++: force
1023 @if [ -f ./libg++/Makefile ] ; then \
1024 rootme=`pwd` ; export rootme ; \
1025 (cd ./libg++; \
1026 $(MAKE) $(FLAGS_TO_PASS) "CC=${GXX}" clean) ; \
1027 else \
1028 true ; \
1029 fi
1030
1031 install-libg++: force
1032 @if [ -f ./libg++/Makefile ] ; then \
1033 rootme=`pwd` ; export rootme ; \
1034 (cd ./libg++; \
1035 $(MAKE) $(FLAGS_TO_PASS) "CC=${GXX}" install) ; \
1036 else \
1037 true ; \
1038 fi
1039
1040 ### other supporting targets
1041 # this is a bad hack.
1042 all.xclib: all.normal
1043 if [ -d clib ] ; then \
1044 (cd clib ; $(MAKE) $(FLAGS_TO_PASS)) ; \
1045 fi
1046
1047 subdir_do:
1048 @for i in $(DODIRS); do \
1049 if [ -f ./$$i/localenv ] ; then \
1050 if (rootme=`pwd` ; export rootme ; cd ./$$i; \
1051 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1052 else exit 1 ; fi ; \
1053 else if [ -f ./$$i/Makefile ] ; then \
1054 if (rootme=`pwd` ; export rootme ; cd ./$$i; \
1055 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1056 else exit 1 ; fi ; \
1057 else true ; fi ; \
1058 fi ; \
1059 done
1060
1061 # The "else true" stuff is for Ultrix; the shell returns the exit code
1062 # of the "if" command, if no commands are run in the "then" or "else" part,
1063 # causing Make to quit.
1064
1065 MAKEDIRS= \
1066 $(prefix) \
1067 $(exec_prefix) \
1068 $(bindir) \
1069 $(libdir) \
1070 $(tooldir) \
1071 $(includedir) \
1072 $(datadir) \
1073 $(docdir) \
1074 $(mandir) \
1075 $(man1dir) \
1076 $(man5dir)
1077
1078 # $(man2dir) \
1079 # $(man3dir) \
1080 # $(man4dir) \
1081 # $(man6dir) \
1082 # $(man7dir) \
1083 # $(man8dir)
1084
1085 install-dirs:
1086 for i in $(MAKEDIRS) ; do \
1087 echo Making $$i... ; \
1088 if [ ! -d $$i ] ; then \
1089 if mkdir $$i ; then \
1090 true ; \
1091 else \
1092 exit 1 ; \
1093 fi ; \
1094 else \
1095 true ; \
1096 fi ; \
1097 done
1098
1099 MAKEINFODIRS= \
1100 $(prefix) \
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) > 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.064623 seconds and 4 git commands to generate.