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