add dvi target
[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 info install-info dvi clean-info distclean mostlyclean realclean
229 .NOEXPORT:
230
231 info check clean-info dvi distclean mostlyclean realclean:
232 @rootme=`pwd` ; export rootme ; \
233 $(MAKE) $(FLAGS_TO_PASS) DO=info "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
264 clean:
265 @rootme=`pwd` ; export rootme ; \
266 $(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
267 -rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
268
269 uninstall:
270 @echo "the uninstall target is not supported in this tree"
271
272 install: $(INSTALL_TARGET)
273 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
274 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
275 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
276
277 install.all: install-no-fixedincludes
278 @if [ -f ./gcc/Makefile ] ; then \
279 rootme=`pwd` ; export rootme ; \
280 (cd ./gcc; \
281 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
282 else \
283 true ; \
284 fi
285
286 install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
287 install-autoconf \
288 install-bfd \
289 install-binutils \
290 install-opcodes \
291 install-byacc \
292 install-cvs \
293 install-diff \
294 install-deja-gnu \
295 install-emacs \
296 install-etc \
297 install-expect \
298 install-flex \
299 install-gas \
300 install-gdb \
301 install-glob \
302 install-gprof \
303 install-grep \
304 install-ispell \
305 install-ld \
306 install-libg++ \
307 install-libiberty \
308 install-libm \
309 install-make \
310 install-mmalloc \
311 install-newlib \
312 install-patch \
313 install-rcs \
314 install-readline \
315 install-send_pr \
316 install-tcl \
317 install-texinfo \
318 install-tk \
319 install-z8ksim \
320 install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
321 install-textutils install-time install-wdiff
322
323 gcc-no-fixedincludes:
324 @if [ -f ./gcc/Makefile ] ; then \
325 rootme=`pwd` ; export rootme ; \
326 (cd ./gcc; \
327 $(MAKE) $(FLAGS_TO_PASS) install install-man \
328 "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
329 else \
330 true ; \
331 fi
332
333 install.cross: install-dirs install-libiberty install-mmalloc \
334 install-binutils install-opcodes install-byacc install-flex \
335 install-ld install-gas install-readline \
336 install-glob install-gdb install-mmalloc \
337 install-newlib install-gcc install-etc install-deja-gnu
338
339 ### deja-gnu
340 all-deja-gnu: force
341 @if [ -f ./deja-gnu/Makefile ] ; then \
342 rootme=`pwd` ; export rootme ; \
343 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
344 else \
345 true ; \
346 fi
347
348 install-deja-gnu: force
349 @if [ -f ./deja-gnu/Makefile ] ; then \
350 rootme=`pwd` ; export rootme ; \
351 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
352 else \
353 true ; \
354 fi
355
356 ### autoconf
357 all-autoconf: force
358 @if [ -f ./autoconf/Makefile ] ; then \
359 rootme=`pwd` ; export rootme ; \
360 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
361 else \
362 true ; \
363 fi
364
365 install-autoconf: force
366 @if [ -f ./autoconf/Makefile ] ; then \
367 rootme=`pwd` ; export rootme ; \
368 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
369 else \
370 true ; \
371 fi
372
373 ### etc
374 all-etc: force
375 @if [ -f ./etc/Makefile ] ; then \
376 rootme=`pwd` ; export rootme ; \
377 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
378 else \
379 true ; \
380 fi
381
382 install-etc: force
383 @if [ -f ./etc/Makefile ] ; then \
384 rootme=`pwd` ; export rootme ; \
385 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
386 else \
387 true ; \
388 fi
389
390 ### libiberty
391 all-libiberty: force
392 @if [ -f ./libiberty/Makefile ] ; then \
393 rootme=`pwd` ; export rootme ; \
394 (cd ./libiberty; \
395 $(MAKE) $(FLAGS_TO_PASS) all) ; \
396 else \
397 true ; \
398 fi
399
400 install-libiberty: force
401 @if [ -f ./libiberty/Makefile ] ; then \
402 rootme=`pwd` ; export rootme ; \
403 (cd ./libiberty; \
404 $(MAKE) $(FLAGS_TO_PASS) install) ; \
405 else \
406 true ; \
407 fi
408
409 ### xiberty
410 all-xiberty: all-gcc all-newlib
411 @if [ -f ./xiberty/Makefile ] ; then \
412 rootme=`pwd` ; export rootme ; \
413 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
414 (cd ./xiberty; \
415 $(MAKE) $(FLAGS_TO_PASS) all) ; \
416 else \
417 true ; \
418 fi
419
420 install-xiberty: force
421 @if [ -f ./xiberty/Makefile ] ; then \
422 rootme=`pwd` ; export rootme ; \
423 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
424 (cd ./xiberty; \
425 $(MAKE) $(FLAGS_TO_PASS) install) ; \
426 else \
427 true ; \
428 fi
429
430 ### mmalloc
431 all-mmalloc: force
432 @if [ -f ./mmalloc/Makefile ] ; then \
433 rootme=`pwd` ; export rootme ; \
434 (cd ./mmalloc; \
435 $(MAKE) $(FLAGS_TO_PASS) all) ; \
436 else \
437 true ; \
438 fi
439
440 install-mmalloc: force
441 @if [ -f ./mmalloc/Makefile ] ; then \
442 rootme=`pwd` ; export rootme ; \
443 (cd ./mmalloc; \
444 $(MAKE) $(FLAGS_TO_PASS) install) ; \
445 else \
446 true ; \
447 fi
448
449 ### texinfo
450 all-texinfo: all-libiberty
451 @if [ -f ./texinfo/Makefile ] ; then \
452 rootme=`pwd` ; export rootme ; \
453 (cd ./texinfo; \
454 $(MAKE) $(FLAGS_TO_PASS) all) ; \
455 else \
456 true ; \
457 fi
458
459 install-texinfo: force
460 @if [ -f ./texinfo/Makefile ] ; then \
461 rootme=`pwd` ; export rootme ; \
462 (cd ./texinfo; \
463 $(MAKE) $(FLAGS_TO_PASS) install) ; \
464 else \
465 true ; \
466 fi
467
468 ### bfd
469 all-bfd: force
470 @if [ -f ./bfd/Makefile ] ; then \
471 rootme=`pwd` ; export rootme ; \
472 (cd ./bfd; \
473 $(MAKE) $(FLAGS_TO_PASS) all) ; \
474 else \
475 true ; \
476 fi
477
478 install-bfd: force
479 @if [ -f ./bfd/Makefile ] ; then \
480 rootme=`pwd` ; export rootme ; \
481 (cd ./bfd; \
482 $(MAKE) $(FLAGS_TO_PASS) install) ; \
483 else \
484 true ; \
485 fi
486
487
488 ### opcodes
489 all-opcodes: force
490 @if [ -f ./opcodes/Makefile ] ; then \
491 rootme=`pwd` ; export rootme ; \
492 (cd ./opcodes; \
493 $(MAKE) $(FLAGS_TO_PASS) all) ; \
494 else \
495 true ; \
496 fi
497
498 install-opcodes: force
499 @if [ -f ./opcodes/Makefile ] ; then \
500 rootme=`pwd` ; export rootme ; \
501 (cd ./opcodes; \
502 $(MAKE) $(FLAGS_TO_PASS) install) ; \
503 else \
504 true ; \
505 fi
506
507 ### binutils
508 all-binutils: all-opcodes all-libiberty all-bfd all-flex
509 @if [ -f ./binutils/Makefile ] ; then \
510 rootme=`pwd` ; export rootme ; \
511 (cd ./binutils; \
512 $(MAKE) $(FLAGS_TO_PASS) all) ; \
513 else \
514 true ; \
515 fi
516
517 install-binutils: force
518 @if [ -f ./binutils/Makefile ] ; then \
519 rootme=`pwd` ; export rootme ; \
520 (cd ./binutils; \
521 $(MAKE) $(FLAGS_TO_PASS) install) ; \
522 else \
523 true ; \
524 fi
525
526 ### newlib
527 all-newlib: all-binutils all-ld all-gas all-gcc
528 @if [ -f ./newlib/Makefile ] ; then \
529 rootme=`pwd` ; export rootme ; \
530 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
531 (cd ./newlib; \
532 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
533 else \
534 true ; \
535 fi
536
537 install-newlib: force
538 @if [ -f ./newlib/Makefile ] ; then \
539 rootme=`pwd` ; export rootme ; \
540 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
541 (cd ./newlib; \
542 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
543 else \
544 true ; \
545 fi
546
547 ### gprof
548 all-gprof: all-libiberty all-bfd
549 @if [ -f ./gprof/Makefile ] ; then \
550 rootme=`pwd` ; export rootme ; \
551 (cd ./gprof; \
552 $(MAKE) $(FLAGS_TO_PASS) all) ; \
553 else \
554 true ; \
555 fi
556
557 install-gprof: force
558 @if [ -f ./gprof/Makefile ] ; then \
559 rootme=`pwd` ; export rootme ; \
560 (cd ./gprof; \
561 $(MAKE) $(FLAGS_TO_PASS) install) ; \
562 else \
563 true ; \
564 fi
565
566 ### byacc
567 all-byacc: force
568 @if [ -f ./byacc/Makefile ] ; then \
569 rootme=`pwd` ; export rootme ; \
570 (cd ./byacc; \
571 $(MAKE) $(FLAGS_TO_PASS) all) ; \
572 else \
573 true ; \
574 fi
575
576 install-byacc: force
577 @if [ -f ./byacc/Makefile ] ; then \
578 rootme=`pwd` ; export rootme ; \
579 (cd ./byacc; \
580 $(MAKE) $(FLAGS_TO_PASS) install) ; \
581 else \
582 true ; \
583 fi
584
585 ### flex
586 all-flex: all-libiberty
587 @if [ -f ./flex/Makefile ] ; then \
588 rootme=`pwd` ; export rootme ; \
589 (cd ./flex; \
590 $(MAKE) $(FLAGS_TO_PASS) all) ; \
591 else \
592 true ; \
593 fi
594
595 install-flex: force
596 @if [ -f ./flex/Makefile ] ; then \
597 rootme=`pwd` ; export rootme ; \
598 (cd ./flex; \
599 $(MAKE) $(FLAGS_TO_PASS) install) ; \
600 else \
601 true ; \
602 fi
603 ### gcc
604 all-gcc: all-libiberty all-byacc all-binutils
605 @if [ -f ./gcc/Makefile ] ; then \
606 rootme=`pwd` ; export rootme ; \
607 (cd ./gcc; \
608 $(MAKE) $(FLAGS_TO_PASS) all) ; \
609 else \
610 true ; \
611 fi
612
613 install-gcc: force
614 @if [ -f ./gcc/Makefile ] ; then \
615 rootme=`pwd` ; export rootme ; \
616 (cd ./gcc; \
617 $(MAKE) $(FLAGS_TO_PASS) install) ; \
618 else \
619 true ; \
620 fi
621
622 ### readline
623 all-readline: force
624 @if [ -f ./readline/Makefile ] ; then \
625 rootme=`pwd` ; export rootme ; \
626 (cd ./readline; \
627 $(MAKE) $(FLAGS_TO_PASS) all) ; \
628 else \
629 true ; \
630 fi
631
632 install-readline: force
633 @if [ -f ./readline/Makefile ] ; then \
634 rootme=`pwd` ; export rootme ; \
635 (cd ./readline; \
636 $(MAKE) $(FLAGS_TO_PASS) install) ; \
637 else \
638 true ; \
639 fi
640
641 ### glob
642 all-glob: force
643 @if [ -f ./glob/Makefile ] ; then \
644 rootme=`pwd` ; export rootme ; \
645 (cd ./glob; \
646 $(MAKE) $(FLAGS_TO_PASS) all) ; \
647 else \
648 true ; \
649 fi
650
651 install-glob: force
652 @if [ -f ./glob/Makefile ] ; then \
653 rootme=`pwd` ; export rootme ; \
654 (cd ./glob; \
655 $(MAKE) $(FLAGS_TO_PASS) install) ; \
656 else \
657 true ; \
658 fi
659
660 ### gas
661 all-gas: all-libiberty all-opcodes all-bfd
662 @if [ -f ./gas/Makefile ] ; then \
663 rootme=`pwd` ; export rootme ; \
664 (cd ./gas; \
665 $(MAKE) $(FLAGS_TO_PASS) all) ; \
666 else \
667 true ; \
668 fi
669
670 install-gas: force
671 @if [ -f ./gas/Makefile ] ; then \
672 rootme=`pwd` ; export rootme ; \
673 (cd ./gas; \
674 $(MAKE) $(FLAGS_TO_PASS) install) ; \
675 else \
676 true ; \
677 fi
678
679 ### gas
680 all-tgas: all-libiberty all-bfd
681 @if [ -f ./tgas/Makefile ] ; then \
682 rootme=`pwd` ; export rootme ; \
683 (cd ./tgas; \
684 $(MAKE) $(FLAGS_TO_PASS) all) ; \
685 else \
686 true ; \
687 fi
688
689
690 ### ld
691 all-ld: all-libiberty all-bfd all-byacc all-flex
692 @if [ -f ./ld/Makefile ] ; then \
693 rootme=`pwd` ; export rootme ; \
694 (cd ./ld; \
695 $(MAKE) $(FLAGS_TO_PASS) all) ; \
696 else \
697 true ; \
698 fi
699
700 install-ld: force
701 @if [ -f ./ld/Makefile ] ; then \
702 rootme=`pwd` ; export rootme ; \
703 (cd ./ld; \
704 $(MAKE) $(FLAGS_TO_PASS) install) ; \
705 else \
706 true ; \
707 fi
708
709 ### gdb
710 all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
711 @if [ -f ./gdb/Makefile ] ; then \
712 rootme=`pwd` ; export rootme ; \
713 (cd ./gdb; \
714 $(MAKE) $(FLAGS_TO_PASS) all) ; \
715 else \
716 true ; \
717 fi
718
719 install-gdb: force
720 @if [ -f ./gdb/Makefile ] ; then \
721 rootme=`pwd` ; export rootme ; \
722 (cd ./gdb; \
723 $(MAKE) $(FLAGS_TO_PASS) install) ; \
724 else \
725 true ; \
726 fi
727
728 ### make
729 all-make: all-libiberty
730 @if [ -f ./make/Makefile ] ; then \
731 rootme=`pwd` ; export rootme ; \
732 (cd ./make; \
733 $(MAKE) $(FLAGS_TO_PASS) all) ; \
734 else \
735 true ; \
736 fi
737
738 install-make: force
739 @if [ -f ./make/Makefile ] ; then \
740 rootme=`pwd` ; export rootme ; \
741 (cd ./make; \
742 $(MAKE) $(FLAGS_TO_PASS) install) ; \
743 else \
744 true ; \
745 fi
746
747 ### diff
748 all-diff: force
749 @if [ -f ./diff/Makefile ] ; then \
750 rootme=`pwd` ; export rootme ; \
751 (cd ./diff; \
752 $(MAKE) $(FLAGS_TO_PASS) all) ; \
753 else \
754 true ; \
755 fi
756
757 install-diff: force
758 @if [ -f ./diff/Makefile ] ; then \
759 rootme=`pwd` ; export rootme ; \
760 (cd ./diff/; \
761 $(MAKE) $(FLAGS_TO_PASS) install) ; \
762 else \
763 true ; \
764 fi
765
766 ### grep
767 all-grep: force
768 @if [ -f ./grep/Makefile ] ; then \
769 rootme=`pwd` ; export rootme ; \
770 (cd ./grep; \
771 $(MAKE) $(FLAGS_TO_PASS) all) ; \
772 else \
773 true ; \
774 fi
775
776 install-grep: force
777 @if [ -f ./grep/Makefile ] ; then \
778 rootme=`pwd` ; export rootme ; \
779 (cd ./grep; \
780 $(MAKE) $(FLAGS_TO_PASS) install) ; \
781 else \
782 true ; \
783 fi
784
785 ### rcs
786 all-rcs: force
787 @if [ -f ./rcs/Makefile ] ; then \
788 rootme=`pwd` ; export rootme ; \
789 (cd ./rcs; \
790 $(MAKE) $(FLAGS_TO_PASS) all) ; \
791 else \
792 true ; \
793 fi
794
795 install-rcs: force
796 @if [ -f ./rcs/Makefile ] ; then \
797 rootme=`pwd` ; export rootme ; \
798 (cd ./rcs; \
799 $(MAKE) $(FLAGS_TO_PASS) install) ; \
800 else \
801 true ; \
802 fi
803
804 ### cvs
805 all-cvs: force
806 @if [ -f ./cvs/Makefile ] ; then \
807 rootme=`pwd` ; export rootme ; \
808 (cd ./cvs; \
809 $(MAKE) $(FLAGS_TO_PASS) all) ; \
810 else \
811 true ; \
812 fi
813
814 install-cvs: force
815 @if [ -f ./cvs/Makefile ] ; then \
816 rootme=`pwd` ; export rootme ; \
817 (cd ./cvs; \
818 $(MAKE) $(FLAGS_TO_PASS) install) ; \
819 else \
820 true ; \
821 fi
822
823 ### patch
824 all-patch: force
825 @if [ -f ./patch/Makefile ] ; then \
826 rootme=`pwd` ; export rootme ; \
827 (cd ./patch; \
828 $(MAKE) $(FLAGS_TO_PASS) all) ; \
829 else \
830 true ; \
831 fi
832
833 install-patch: force
834 @if [ -f ./patch/Makefile ] ; then \
835 rootme=`pwd` ; export rootme ; \
836 (cd ./patch; \
837 $(MAKE) $(FLAGS_TO_PASS) \
838 bindir=$(bindir) \
839 man1dir=$(man1dir) install) ; \
840 else \
841 true ; \
842 fi
843
844 ### emacs
845 all-emacs: force
846 @if [ -f ./emacs/Makefile ] ; then \
847 rootme=`pwd` ; export rootme ; \
848 (cd ./emacs; \
849 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
850 else \
851 true ; \
852 fi
853
854 install-emacs: force
855 @if [ -f ./emacs/Makefile ] ; then \
856 rootme=`pwd` ; export rootme ; \
857 (cd ./emacs; \
858 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
859 else \
860 true ; \
861 fi
862
863 ### ispell
864 all-ispell: all-emacs
865 @if [ -f ./ispell/Makefile ] ; then \
866 rootme=`pwd` ; export rootme ; \
867 (cd ./ispell; \
868 $(MAKE) $(FLAGS_TO_PASS) all) ; \
869 else \
870 true ; \
871 fi
872
873 install-ispell: force
874 @if [ -f ./ispell/Makefile ] ; then \
875 rootme=`pwd` ; export rootme ; \
876 (cd ./ispell; \
877 $(MAKE) $(FLAGS_TO_PASS) install) ; \
878 else \
879 true ; \
880 fi
881
882 ### send_pr
883 all-send_pr: force
884 @if [ -f ./send_pr/Makefile ] ; then \
885 rootme=`pwd` ; export rootme ; \
886 (cd ./send_pr; \
887 $(MAKE) $(FLAGS_TO_PASS) all) ; \
888 else \
889 true ; \
890 fi
891
892 install-send_pr: force
893 @if [ -f ./send_pr/Makefile ] ; then \
894 rootme=`pwd` ; export rootme ; \
895 (cd ./send_pr; \
896 $(MAKE) $(FLAGS_TO_PASS) install) ; \
897 else \
898 true ; \
899 fi
900
901 ### libm
902 all-libm: force
903 @if [ -f ./libm/Makefile ] ; then \
904 rootme=`pwd` ; export rootme ; \
905 (cd ./libm; \
906 $(MAKE) $(FLAGS_TO_PASS) all) ; \
907 else \
908 true ; \
909 fi
910
911 install-libm: force
912 @if [ -f ./libm/Makefile ] ; then \
913 rootme=`pwd` ; export rootme ; \
914 (cd ./libm; \
915 $(MAKE) $(FLAGS_TO_PASS) install) ; \
916 else \
917 true ; \
918 fi
919
920 ### libg++
921
922 all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
923 @if [ -f ./libg++/Makefile ] ; then \
924 rootme=`pwd` ; export rootme ; \
925 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
926 (cd ./libg++; \
927 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
928 else \
929 true ; \
930 fi
931
932 install-libg++: force
933 @if [ -f ./libg++/Makefile ] ; then \
934 rootme=`pwd` ; export rootme ; \
935 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
936 (cd ./libg++; \
937 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
938 else \
939 true ; \
940 fi
941 ### tcl
942 all-tcl:
943 @if [ -f ./tcl/Makefile ] ; then \
944 rootme=`pwd` ; export rootme ; \
945 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
946 (cd ./tcl; \
947 $(MAKE) $(FLAGS_TO_PASS) all) ; \
948 else \
949 true ; \
950 fi
951
952 install-tcl: force
953 @if [ -f ./tcl/Makefile ] ; then \
954 rootme=`pwd` ; export rootme ; \
955 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
956 (cd ./tcl; \
957 $(MAKE) $(FLAGS_TO_PASS) install) ; \
958 else \
959 true ; \
960 fi
961
962
963 ### tk
964 all-tk: all-tcl
965 @if [ -f ./tk/Makefile ] ; then \
966 rootme=`pwd` ; export rootme ; \
967 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
968 (cd ./tk; \
969 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
970 else \
971 true ; \
972 fi
973
974 install-tk: force
975 @if [ -f ./tk/Makefile ] ; then \
976 rootme=`pwd` ; export rootme ; \
977 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
978 (cd ./tk; \
979 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
980 else \
981 true ; \
982 fi
983
984 ### expect
985 all-expect: all-tcl
986 @if [ -f ./expect/Makefile ] ; then \
987 rootme=`pwd` ; export rootme ; \
988 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
989 (cd ./expect; \
990 $(MAKE) $(FLAGS_TO_PASS) all) ; \
991 else \
992 true ; \
993 fi
994
995 install-expect: force
996 @if [ -f ./expect/Makefile ] ; then \
997 rootme=`pwd` ; export rootme ; \
998 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
999 (cd ./expect; \
1000 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1001 else \
1002 true ; \
1003 fi
1004
1005 ### z8ksim
1006 all-z8ksim: all-bfd
1007 @if [ -f ./z8ksim/Makefile ] ; then \
1008 rootme=`pwd` ; export rootme ; \
1009 (cd ./z8ksim; \
1010 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1011 else \
1012 true ; \
1013 fi
1014
1015 install-z8ksim: force
1016 @if [ -f ./z8ksim/Makefile ] ; then \
1017 rootme=`pwd` ; export rootme ; \
1018 (cd ./z8ksim; \
1019 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1020 else \
1021 true ; \
1022 fi
1023
1024 ### fileutils
1025 all-fileutils: force
1026 @if [ -f ./fileutils/Makefile ] ; then \
1027 rootme=`pwd` ; export rootme ; \
1028 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1029 else \
1030 true ; \
1031 fi
1032
1033 install-fileutils: force
1034 @if [ -f ./fileutils/Makefile ] ; then \
1035 rootme=`pwd` ; export rootme ; \
1036 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1037 else \
1038 true ; \
1039 fi
1040
1041 ### find
1042 all-find: force
1043 @if [ -f ./find/Makefile ] ; then \
1044 rootme=`pwd` ; export rootme ; \
1045 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1046 else \
1047 true ; \
1048 fi
1049
1050 install-find: force
1051 @if [ -f ./find/Makefile ] ; then \
1052 rootme=`pwd` ; export rootme ; \
1053 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1054 else \
1055 true ; \
1056 fi
1057
1058 ### gawk
1059 all-gawk: force
1060 @if [ -f ./gawk/Makefile ] ; then \
1061 rootme=`pwd` ; export rootme ; \
1062 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1063 else \
1064 true ; \
1065 fi
1066
1067 install-gawk: force
1068 @if [ -f ./gawk/Makefile ] ; then \
1069 rootme=`pwd` ; export rootme ; \
1070 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1071 else \
1072 true ; \
1073 fi
1074
1075 ### m4
1076 all-m4: all-libiberty
1077 @if [ -f ./m4/Makefile ] ; then \
1078 rootme=`pwd` ; export rootme ; \
1079 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1080 else \
1081 true ; \
1082 fi
1083
1084 install-m4: force
1085 @if [ -f ./m4/Makefile ] ; then \
1086 rootme=`pwd` ; export rootme ; \
1087 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1088 else \
1089 true ; \
1090 fi
1091
1092 ### sed
1093 all-sed: force
1094 @if [ -f ./sed/Makefile ] ; then \
1095 rootme=`pwd` ; export rootme ; \
1096 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1097 else \
1098 true ; \
1099 fi
1100
1101 install-sed: force
1102 @if [ -f ./sed/Makefile ] ; then \
1103 rootme=`pwd` ; export rootme ; \
1104 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1105 else \
1106 true ; \
1107 fi
1108
1109 ### time
1110 all-time: force
1111 @if [ -f ./time/Makefile ] ; then \
1112 rootme=`pwd` ; export rootme ; \
1113 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1114 else \
1115 true ; \
1116 fi
1117
1118 install-time: force
1119 @if [ -f ./time/Makefile ] ; then \
1120 rootme=`pwd` ; export rootme ; \
1121 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1122 else \
1123 true ; \
1124 fi
1125
1126 ### wdiff
1127 all-wdiff: force
1128 @if [ -f ./wdiff/Makefile ] ; then \
1129 rootme=`pwd` ; export rootme ; \
1130 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1131 else \
1132 true ; \
1133 fi
1134
1135 install-wdiff: force
1136 @if [ -f ./wdiff/Makefile ] ; then \
1137 rootme=`pwd` ; export rootme ; \
1138 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1139 else \
1140 true ; \
1141 fi
1142
1143 ### shellutils
1144 all-shellutils: force
1145 @if [ -f ./shellutils/Makefile ] ; then \
1146 rootme=`pwd` ; export rootme ; \
1147 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1148 else \
1149 true ; \
1150 fi
1151
1152 install-shellutils: force
1153 @if [ -f ./shellutils/Makefile ] ; then \
1154 rootme=`pwd` ; export rootme ; \
1155 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1156 else \
1157 true ; \
1158 fi
1159
1160 ### textutils
1161 all-textutils: force
1162 @if [ -f ./textutils/Makefile ] ; then \
1163 rootme=`pwd` ; export rootme ; \
1164 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1165 else \
1166 true ; \
1167 fi
1168
1169 install-textutils: force
1170 @if [ -f ./textutils/Makefile ] ; then \
1171 rootme=`pwd` ; export rootme ; \
1172 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1173 else \
1174 true ; \
1175 fi
1176
1177
1178
1179 ### other supporting targets
1180
1181 subdir_do:
1182 @for i in $(DODIRS); do \
1183 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
1184 case $$i in \
1185 libg++ | xiberty | newlib) \
1186 if (rootme=`pwd` ; export rootme ; \
1187 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1188 cd ./$$i ; \
1189 $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
1190 else exit 1 ; fi \
1191 ;; \
1192 *) \
1193 if (rootme=`pwd` ; export rootme ; \
1194 cd ./$$i ; \
1195 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
1196 else exit 1 ; fi \
1197 ;; \
1198 esac ; \
1199 else true ; fi ; \
1200 done
1201
1202 # The "else true" stuff is for Ultrix; the shell returns the exit code
1203 # of the "if" command, if no commands are run in the "then" or "else" part,
1204 # causing Make to quit.
1205
1206 MAKEDIRS= \
1207 $(prefix) \
1208 $(exec_prefix) \
1209 $(tooldir)
1210
1211 # $(bindir) \
1212 # $(libdir) \
1213 # $(includedir) \
1214 # $(datadir) \
1215 # $(docdir) \
1216 # $(mandir) \
1217 # $(man1dir) \
1218 # $(man5dir)
1219
1220 # $(man2dir) \
1221 # $(man3dir) \
1222 # $(man4dir) \
1223 # $(man6dir) \
1224 # $(man7dir) \
1225 # $(man8dir)
1226
1227 install-dirs:
1228 for i in $(MAKEDIRS) ; do \
1229 echo Making $$i... ; \
1230 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1231 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1232 if [ ! -d $$i ] ; then \
1233 if mkdir $$i ; then \
1234 true ; \
1235 else \
1236 exit 1 ; \
1237 fi ; \
1238 else \
1239 true ; \
1240 fi ; \
1241 done
1242
1243 install-info-dirs:
1244 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
1245
1246 dir.info:
1247 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
1248 mv -f dir.info.new dir.info
1249
1250 dist:
1251 @echo "Building a full distribution of this tree isn't done"
1252 @echo "via 'make dist'. Check out the etc/ subdirectory"
1253
1254 etags tags: TAGS
1255
1256 TAGS:
1257 etags `$(MAKE) ls`
1258
1259 ls:
1260 @echo Makefile
1261 @for i in $(SUBDIRS); \
1262 do \
1263 (cd $$i; \
1264 pwd=`pwd`; \
1265 wd=`basename $$pwd`; \
1266 for j in `$(MAKE) ls`; \
1267 do \
1268 echo $$wd/$$j; \
1269 done) \
1270 done
1271
1272 force:
1273
1274 # with the gnu make, this is done automatically.
1275
1276 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1277 $(SHELL) ./config.status
1278
1279 #
1280 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1281
1282 DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
1283 config.sub config configure.man configure.texi move-if-change \
1284 COPYING.LIB
1285 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
1286 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
1287
1288 setup-dirs: force
1289 ./configure sun4
1290 make clean
1291 ./configure -rm sun4
1292 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1293
1294 gdb.tar.Z: setup-dirs
1295 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
1296 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1297
1298 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
1299 rm -rf proto-toplev; mkdir proto-toplev
1300 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1301 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1302 ln -s ../$$i . ; \
1303 done)
1304 # Put only one copy (four hard links) of COPYING in the tar file.
1305 rm proto-toplev/bfd/COPYING
1306 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1307 rm proto-toplev/include/COPYING
1308 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1309 rm proto-toplev/readline/COPYING
1310 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
1311 # Take out texinfo from configurable dirs
1312 rm proto-toplev/configure.in
1313 sed '/^configdirs=/s/texinfo //' <configure.in >proto-toplev/configure.in
1314 # Take out glob from buildable dirs
1315 rm proto-toplev/Makefile.in
1316
1317 sed -e '/^SUBDIRS =/s/glob //' \
1318 -e '/^all\.normal: /s/\all-texinfo //' \
1319 -e '/^clean: /s/clean-texinfo //' \
1320 -e '/^install\.all: /s/install-texinfo //' \
1321 <Makefile.in >proto-toplev/Makefile.in
1322
1323 mkdir proto-toplev/texinfo
1324 mkdir proto-toplev/texinfo/fsf
1325 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
1326 chmod og=u `find proto-toplev -print`
1327 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1328 echo "==> Making gdb-$$VER.tar.Z"; \
1329 ln -s proto-toplev gdb-$$VER; \
1330 tar cfh - gdb-$$VER \
1331 | compress -v >gdb-$$VER.tar.Z)
1332
1333
1334 # end of Makefile.in