a8224466992121d406200130ffb3fbf8b875d0b9
[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 $(start-sanitize-chill)
58 CHILLFLAGS = $(CFLAGS)
59 CHILL_LIB = -lchill
60 $(end-sanitize-chill)
61 CXX = gcc
62 CXXFLAGS = -g -O
63 RANLIB = ranlib
64 NM = nm
65 GZIP = gzip
66
67 BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
68 then echo $${rootme}/byacc/byacc ; \
69 else echo byacc ; \
70 fi`
71
72 LEX = `if [ -f $${rootme}/flex/flex ] ; \
73 then echo $${rootme}/flex/flex ; \
74 else echo flex ; fi`
75
76 MAKEINFO = `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
77 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
78 else echo makeinfo ; fi`
79
80
81 # libraries that may need to be augmented on a system-by-system basis
82 X11_LIB = -lX11
83
84 # compilers to use to create programs which must be run in the build
85 # environment.
86 CC_FOR_BUILD = $(CC)
87 CXX_FOR_BUILD = $(CXX)
88
89 SUBDIRS = "this is set via configure, don't edit this"
90 OTHERS =
91
92 ALL = all.normal
93 INSTALL_TARGET = install.all
94
95 ### for debugging
96 #GCCVERBOSE=-v
97
98 CC_FOR_TARGET = ` \
99 if [ -f $${rootme}/gcc/Makefile ] ; then \
100 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
101 else \
102 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
103 echo $(CC); \
104 else \
105 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
106 fi; \
107 fi`
108
109 GCC_FOR_TARGET = ` \
110 if [ -f $${rootme}/gcc/Makefile ] ; then \
111 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
112 else \
113 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
114 echo $(CC); \
115 else \
116 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
117 fi; \
118 fi`
119
120 $(start-sanitize-chill)
121 CHILL_FOR_TARGET = ` \
122 if [ -f $${rootme}/gcc/Makefile ] ; then \
123 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
124 else \
125 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
126 echo $(CC); \
127 else \
128 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
129 fi; \
130 fi`
131 $(end-sanitize-chill)
132
133 CXX_FOR_TARGET = ` \
134 if [ -f $${rootme}/gcc/Makefile ] ; then \
135 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
136 else \
137 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
138 echo $(CXX); \
139 else \
140 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
141 fi; \
142 fi`
143
144 AS_FOR_TARGET = ` \
145 if [ -f $${rootme}/gas/Makefile ] ; then \
146 echo $${rootme}/gas/as.new ; \
147 else \
148 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
149 echo $(AS); \
150 else \
151 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
152 fi; \
153 fi`
154
155 AR_FOR_TARGET = ` \
156 if [ -f $${rootme}/binutils/Makefile ] ; then \
157 echo $${rootme}/binutils/ar ; \
158 else \
159 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
160 echo $(AR); \
161 else \
162 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
163 fi; \
164 fi`
165
166 RANLIB_FOR_TARGET = ` \
167 if [ -f $${rootme}/binutils/Makefile ] ; then \
168 echo $${rootme}/binutils/ranlib ; \
169 else \
170 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
171 echo $(RANLIB); \
172 else \
173 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
174 fi; \
175 fi`
176
177 NM_FOR_TARGET = ` \
178 if [ -f $${rootme}/binutils/Makefile ] ; then \
179 echo $${rootme}/binutils/nm ; \
180 else \
181 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
182 echo $(NM); \
183 else \
184 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
185 fi; \
186 fi`
187
188 # FIXME: This is badly named.
189 XTRAFLAGS = ` \
190 if [ -f $${rootme}/gcc/Makefile ] ; then \
191 if [ -f $${rootme}/newlib/Makefile ] ; then \
192 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
193 else \
194 echo -I$${rootme}/gcc/include ; \
195 fi ; \
196 else \
197 echo ; \
198 fi`
199
200 GNATS = all-gnats
201
202 #### host and target specific makefile fragments come in here.
203 ###
204
205 # Flags to pass down to all sub-makes.
206 # Please keep these in alphabetical order.
207 BASE_FLAGS_TO_PASS = \
208 "AR_FLAGS=$(AR_FLAGS)" \
209 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
210 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
211 "BISON=$(BISON)" \
212 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
213 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
214 "CFLAGS=$(CFLAGS)" \
215 $(start-sanitize-chill)\
216 "CHILLFLAGS=$(CHILLFLAGS)" \
217 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
218 "CHILL_LIB=$(CHILL_LIB)" \
219 $(end-sanitize-chill)\
220 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
221 "CXXFLAGS=$(CXXFLAGS)" \
222 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
223 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
224 "INSTALL=$(INSTALL)" \
225 "INSTALL_DATA=$(INSTALL_DATA)" \
226 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
227 "LDFLAGS=$(LDFLAGS)" \
228 "LEX=$(LEX)" \
229 "LOADLIBES=$(LOADLIBES)" \
230 "MAKEINFO=$(MAKEINFO)" \
231 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
232 "GNATS=$(GNATS)" \
233 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
234 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
235 "exec_prefix=$(exec_prefix)" \
236 "prefix=$(prefix)" \
237 "tooldir=$(tooldir)"
238
239 # Flags to pass down to most sub-makes, in which we're building with
240 # the host environment.
241 # If any variables are added here, they must be added to do-*, below.
242 EXTRA_HOST_FLAGS = \
243 'AR=$(AR)' \
244 'AS=$(AS)' \
245 'CC=$(CC)' \
246 'CXX=$(CXX)' \
247 'NM=$(NM)' \
248 'RANLIB=$(RANLIB)' \
249 'XTRAFLAGS='
250
251 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
252
253 # Flags that are concerned with the location of the X11 include files
254 # and library files
255 X11_FLAGS_TO_PASS = \
256 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
257 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
258 "X11_LIB=$(X11_LIB)"
259
260 # Shell case of subdirectories which are built with the target environment.
261 TARGET_LIBS=libg++ | xiberty | newlib
262 $(start-sanitize-chill)
263 TARGET_LIBS=libg++ | xiberty | newlib | chillrt
264 $(end-sanitize-chill)
265
266 # Flags to pass down to makes which are built with the target environment.
267 # The double $ decreases the length of the command line; the variables
268 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
269 # If any variables are added here, they must be added to do-*, below.
270 EXTRA_TARGET_FLAGS = \
271 'AR=$$(AR_FOR_TARGET)' \
272 'AS=$$(AS_FOR_TARGET)' \
273 'CC=$$(CC_FOR_TARGET)' \
274 'CXX=$$(CXX_FOR_TARGET)' \
275 'NM=$$(NM_FOR_TARGET)' \
276 'RANLIB=$$(RANLIB_FOR_TARGET)' \
277 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
278
279 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
280
281 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
282 # unfortunately needs the native compiler and the target ar and
283 # ranlib.
284 # If any variables are added here, they must be added to do-*, below.
285 EXTRA_GCC_FLAGS = \
286 'AR=$$(AR_FOR_TARGET)' \
287 'AS=$(AS)' \
288 'CC=$(CC)' \
289 'CXX=$(CXX)' \
290 'NM=$(NM)' \
291 'RANLIB=$$(RANLIB_FOR_TARGET)' \
292 'XTRAFLAGS='
293
294 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
295
296 # The first rule in the file had better be this one. Don't put any above it.
297 all: $(ALL)
298
299 .PHONY: all check dvi info install-info install-info-dirs
300 .PHONY: do-info do-check do-dvi do-install-info
301 .PHONY: do-clean do-mostlyclean do-distclean do-realclean
302 .NOEXPORT:
303
304 # Do a target for all the subdirectories. A ``make do-X'' will do a
305 # ``make X'' in all subdirectories (because, in general, X depends on
306 # fdo-X, a ``make X'' will also do this, but it may do additional work
307 # as well).
308 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
309 # because it is so large that it can easily overflow the command line
310 # length limit on some systems.
311 do-info do-check do-dvi do-install-info do-clean do-mostlyclean do-distclean do-realclean:
312 @target=`echo $@ | sed -e 's/^do-//'`; \
313 rootme=`pwd`; export rootme; \
314 srcroot=`cd $(srcdir); pwd`; export srcroot; \
315 for i in $(SUBDIRS); do \
316 if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ]; then \
317 case $$i in \
318 $(TARGET_LIBS) ) \
319 for flag in $(EXTRA_TARGET_FLAGS); do \
320 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
321 done; \
322 ;; \
323 gcc) \
324 for flag in $(EXTRA_GCC_FLAGS); do \
325 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
326 done; \
327 ;; \
328 *) \
329 for flag in $(EXTRA_HOST_FLAGS); do \
330 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
331 done; \
332 ;; \
333 esac ; \
334 export AR AS CC CXX NM RANLIB XTRAFLAGS; \
335 if (cd ./$$i; \
336 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
337 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
338 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
339 $${target}); \
340 then true; else exit 1; fi; \
341 else true; fi; \
342 done
343
344 info: do-info
345 check: do-check
346 dvi: do-dvi
347
348 install-info: install-info-dirs do-install-info dir.info
349 $(INSTALL_DATA) dir.info $(infodir)/dir.info
350
351 do-install-info: install-info-dirs
352
353 all.normal: all-m4 all-autoconf all-libiberty all-mmalloc all-texinfo \
354 all-byacc all-flex all-opcodes all-bfd all-ld all-gas all-tgas \
355 all-gcc all-binutils all-libg++ all-readline all-sim all-gdb \
356 all-make all-rcs all-cvs all-diff all-grep \
357 all-patch all-emacs all-ispell all-etc \
358 all-tcl all-tk all-expect \
359 all-newlib \
360 $(start-sanitize-chill) \
361 all-chillrt \
362 $(end-sanitize-chill) \
363 all-gprof all-gnats all-send-pr all-libm all-deja-gnu \
364 all-fileutils all-find all-gawk all-sed all-shellutils \
365 all-textutils all-time all-wdiff all-uudecode \
366 all-hello all-tar all-gzip all-indent all-recode
367
368
369 all.cross: all-libiberty all-mmalloc all-gas all-byacc all-flex all-ld \
370 all-opcodes all-bfd all-readline all-sim \
371 all-gdb all-binutils all-gcc all-newlib \
372 $(start-sanitize-chill) \
373 all-chillrt \
374 $(end-sanitize-chill) \
375 all-deja-gnu
376
377 .PHONY: clean distclean mostlyclean realclean local-clean local-distclean
378
379 local-clean:
380 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
381
382 local-distclean:
383 -rm -f Makefile config.status
384
385 clean: do-clean local-clean
386 mostlyclean: do-mostlyclean local-clean
387 distclean: do-distclean local-clean local-distclean
388 realclean: do-realclean local-clean local-distclean
389
390 uninstall:
391 @echo "the uninstall target is not supported in this tree"
392
393 install: $(INSTALL_TARGET)
394 -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
395 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
396 -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
397
398 install.all: install-no-fixedincludes
399 @if [ -f ./gcc/Makefile ] ; then \
400 rootme=`pwd` ; export rootme ; \
401 (cd ./gcc; \
402 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
403 else \
404 true ; \
405 fi
406
407 install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
408 install-autoconf \
409 install-bfd \
410 install-binutils \
411 install-byacc \
412 $(start-sanitize-chill) \
413 install-chillrt \
414 $(end-sanitize-chill) \
415 install-cvs \
416 install-deja-gnu \
417 install-diff \
418 install-emacs \
419 install-etc \
420 install-expect \
421 install-fileutils \
422 install-find \
423 install-flex \
424 install-gas \
425 install-gawk \
426 install-gdb \
427 install-glob \
428 install-gprof \
429 install-grep \
430 install-gzip \
431 install-hello \
432 install-indent \
433 install-ispell \
434 install-ld \
435 install-libg++ \
436 install-libiberty \
437 install-libm \
438 install-m4 \
439 install-make \
440 install-mmalloc \
441 install-newlib \
442 install-opcodes \
443 install-patch \
444 install-gnats \
445 install-rcs \
446 install-readline \
447 install-recode \
448 install-sed \
449 install-send-pr \
450 install-shellutils \
451 install-sim \
452 install-tar \
453 install-tcl \
454 install-texinfo \
455 install-textutils \
456 install-time \
457 install-tk \
458 install-uudecode \
459 install-wdiff
460
461 #
462 # Install the gcc headers files, but not the fixed include files,
463 # which we are not allowed to distribute. This rule is very dependent
464 # on the workings of the gcc Makefile.in.
465 #
466 gcc-no-fixedincludes:
467 @if [ -f ./gcc/Makefile ]; then \
468 rm -rf gcc/tmp-include; \
469 mv gcc/include gcc/tmp-include 2>/dev/null; \
470 mkdir gcc/include; \
471 touch gcc/stmp-fixincludes; \
472 rm -f gcc/stmp-headers; \
473 rootme=`pwd`; export rootme; \
474 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
475 (cd ./gcc; \
476 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
477 rm -rf gcc/include; \
478 mv gcc/tmp-include gcc/include 2>/dev/null; \
479 else true; fi
480
481 install.cross: install-dirs install-libiberty install-mmalloc \
482 install-binutils install-opcodes install-byacc install-flex \
483 install-ld install-gas install-readline \
484 install-glob install-gdb install-mmalloc \
485 install-newlib \
486 $(start-sanitize-chill) \
487 install-chillrt \
488 $(end-sanitize-chill) \
489 install-gcc install-etc install-deja-gnu
490
491 ### gzip
492 all-gzip: all-libiberty
493 @if [ -f ./gzip/Makefile ] ; then \
494 rootme=`pwd` ; export rootme ; \
495 (cd ./gzip; $(MAKE) $(FLAGS_TO_PASS) all) ; \
496 else \
497 true ; \
498 fi
499
500 install-gzip: force
501 @if [ -f ./gzip/Makefile ] ; then \
502 rootme=`pwd` ; export rootme ; \
503 (cd ./gzip; $(MAKE) $(FLAGS_TO_PASS) install) ; \
504 else \
505 true ; \
506 fi
507
508 ### hello
509 all-hello: all-libiberty
510 @if [ -f ./hello/Makefile ] ; then \
511 rootme=`pwd` ; export rootme ; \
512 (cd ./hello; $(MAKE) $(FLAGS_TO_PASS) all) ; \
513 else \
514 true ; \
515 fi
516
517 install-hello: force
518 @if [ -f ./hello/Makefile ] ; then \
519 rootme=`pwd` ; export rootme ; \
520 (cd ./hello; $(MAKE) $(FLAGS_TO_PASS) install) ; \
521 else \
522 true ; \
523 fi
524
525 ### recode
526 all-recode: all-libiberty
527 @if [ -f ./recode/Makefile ] ; then \
528 rootme=`pwd` ; export rootme ; \
529 (cd ./recode; $(MAKE) $(FLAGS_TO_PASS) all) ; \
530 else \
531 true ; \
532 fi
533
534 install-recode: force
535 @if [ -f ./recode/Makefile ] ; then \
536 rootme=`pwd` ; export rootme ; \
537 (cd ./recode; $(MAKE) $(FLAGS_TO_PASS) install) ; \
538 else \
539 true ; \
540 fi
541
542 ### indent
543 all-indent: force
544 @if [ -f ./indent/Makefile ] ; then \
545 rootme=`pwd` ; export rootme ; \
546 (cd ./indent; $(MAKE) $(FLAGS_TO_PASS) all) ; \
547 else \
548 true ; \
549 fi
550
551 install-indent: force
552 @if [ -f ./indent/Makefile ] ; then \
553 rootme=`pwd` ; export rootme ; \
554 (cd ./indent; $(MAKE) $(FLAGS_TO_PASS) install) ; \
555 else \
556 true ; \
557 fi
558
559 ### tar
560 all-tar: all-libiberty
561 @if [ -f ./tar/Makefile ] ; then \
562 rootme=`pwd` ; export rootme ; \
563 (cd ./tar; $(MAKE) $(FLAGS_TO_PASS) all) ; \
564 else \
565 true ; \
566 fi
567
568 install-tar: force
569 @if [ -f ./tar/Makefile ] ; then \
570 rootme=`pwd` ; export rootme ; \
571 (cd ./tar; $(MAKE) $(FLAGS_TO_PASS) install) ; \
572 else \
573 true ; \
574 fi
575
576
577 ### deja-gnu
578 all-deja-gnu: force
579 @if [ -f ./deja-gnu/Makefile ] ; then \
580 rootme=`pwd` ; export rootme ; \
581 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) all) ; \
582 else \
583 true ; \
584 fi
585
586 install-deja-gnu: force
587 @if [ -f ./deja-gnu/Makefile ] ; then \
588 rootme=`pwd` ; export rootme ; \
589 (cd ./deja-gnu; $(MAKE) $(FLAGS_TO_PASS) install) ; \
590 else \
591 true ; \
592 fi
593
594 ### autoconf
595 all-autoconf: force
596 @if [ -f ./autoconf/Makefile ] ; then \
597 rootme=`pwd` ; export rootme ; \
598 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) all) ; \
599 else \
600 true ; \
601 fi
602
603 install-autoconf: force
604 @if [ -f ./autoconf/Makefile ] ; then \
605 rootme=`pwd` ; export rootme ; \
606 (cd ./autoconf; $(MAKE) $(FLAGS_TO_PASS) install) ; \
607 else \
608 true ; \
609 fi
610
611 ### etc
612 all-etc: force
613 @if [ -f ./etc/Makefile ] ; then \
614 rootme=`pwd` ; export rootme ; \
615 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) all) ; \
616 else \
617 true ; \
618 fi
619
620 install-etc: force
621 @if [ -f ./etc/Makefile ] ; then \
622 rootme=`pwd` ; export rootme ; \
623 (cd ./etc; $(MAKE) $(FLAGS_TO_PASS) install) ; \
624 else \
625 true ; \
626 fi
627
628 ### libiberty
629 all-libiberty: force
630 @if [ -f ./libiberty/Makefile ] ; then \
631 rootme=`pwd` ; export rootme ; \
632 (cd ./libiberty; \
633 $(MAKE) $(FLAGS_TO_PASS) all) ; \
634 else \
635 true ; \
636 fi
637
638 install-libiberty: force
639 @if [ -f ./libiberty/Makefile ] ; then \
640 rootme=`pwd` ; export rootme ; \
641 (cd ./libiberty; \
642 $(MAKE) $(FLAGS_TO_PASS) install) ; \
643 else \
644 true ; \
645 fi
646
647 ### xiberty
648 all-xiberty: all-gcc all-newlib
649 @if [ -f ./xiberty/Makefile ] ; then \
650 rootme=`pwd` ; export rootme ; \
651 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
652 (cd ./xiberty; \
653 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
654 else \
655 true ; \
656 fi
657
658 install-xiberty: force
659 @if [ -f ./xiberty/Makefile ] ; then \
660 rootme=`pwd` ; export rootme ; \
661 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
662 (cd ./xiberty; \
663 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
664 else \
665 true ; \
666 fi
667
668 ### mmalloc
669 all-mmalloc: force
670 @if [ -f ./mmalloc/Makefile ] ; then \
671 rootme=`pwd` ; export rootme ; \
672 (cd ./mmalloc; \
673 $(MAKE) $(FLAGS_TO_PASS) all) ; \
674 else \
675 true ; \
676 fi
677
678 install-mmalloc: force
679 @if [ -f ./mmalloc/Makefile ] ; then \
680 rootme=`pwd` ; export rootme ; \
681 (cd ./mmalloc; \
682 $(MAKE) $(FLAGS_TO_PASS) install) ; \
683 else \
684 true ; \
685 fi
686
687 ### texinfo
688 all-texinfo: all-libiberty
689 @if [ -f ./texinfo/Makefile ] ; then \
690 rootme=`pwd` ; export rootme ; \
691 (cd ./texinfo; \
692 $(MAKE) $(FLAGS_TO_PASS) all) ; \
693 else \
694 true ; \
695 fi
696
697 install-texinfo: force
698 @if [ -f ./texinfo/Makefile ] ; then \
699 rootme=`pwd` ; export rootme ; \
700 (cd ./texinfo; \
701 $(MAKE) $(FLAGS_TO_PASS) install) ; \
702 else \
703 true ; \
704 fi
705
706 ### bfd
707 all-bfd: force
708 @if [ -f ./bfd/Makefile ] ; then \
709 rootme=`pwd` ; export rootme ; \
710 (cd ./bfd; \
711 $(MAKE) $(FLAGS_TO_PASS) all) ; \
712 else \
713 true ; \
714 fi
715
716 install-bfd: force
717 @if [ -f ./bfd/Makefile ] ; then \
718 rootme=`pwd` ; export rootme ; \
719 (cd ./bfd; \
720 $(MAKE) $(FLAGS_TO_PASS) install) ; \
721 else \
722 true ; \
723 fi
724
725
726 ### opcodes
727 all-opcodes: force
728 @if [ -f ./opcodes/Makefile ] ; then \
729 rootme=`pwd` ; export rootme ; \
730 (cd ./opcodes; \
731 $(MAKE) $(FLAGS_TO_PASS) all) ; \
732 else \
733 true ; \
734 fi
735
736 install-opcodes: force
737 @if [ -f ./opcodes/Makefile ] ; then \
738 rootme=`pwd` ; export rootme ; \
739 (cd ./opcodes; \
740 $(MAKE) $(FLAGS_TO_PASS) install) ; \
741 else \
742 true ; \
743 fi
744
745 ### binutils
746 all-binutils: all-opcodes all-libiberty all-bfd all-flex
747 @if [ -f ./binutils/Makefile ] ; then \
748 rootme=`pwd` ; export rootme ; \
749 (cd ./binutils; \
750 $(MAKE) $(FLAGS_TO_PASS) all) ; \
751 else \
752 true ; \
753 fi
754
755 install-binutils: force
756 @if [ -f ./binutils/Makefile ] ; then \
757 rootme=`pwd` ; export rootme ; \
758 (cd ./binutils; \
759 $(MAKE) $(FLAGS_TO_PASS) install) ; \
760 else \
761 true ; \
762 fi
763
764 ### newlib
765 all-newlib: all-binutils all-ld all-gas all-gcc
766 @if [ -f ./newlib/Makefile ] ; then \
767 rootme=`pwd` ; export rootme ; \
768 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
769 (cd ./newlib; \
770 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
771 else \
772 true ; \
773 fi
774
775 install-newlib: force
776 @if [ -f ./newlib/Makefile ] ; then \
777 rootme=`pwd` ; export rootme ; \
778 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
779 (cd ./newlib; \
780 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
781 else \
782 true ; \
783 fi
784
785 ### start-sanitize-chill
786 ### chillrt
787 all-chillrt: all-binutils all-ld all-gas all-gcc all-newlib
788 @if [ -f ./chillrt/Makefile ] ; then \
789 rootme=`pwd` ; export rootme ; \
790 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
791 (cd ./chillrt; \
792 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
793 else \
794 true ; \
795 fi
796
797 install-chillrt: force
798 @if [ -f ./chillrt/Makefile ] ; then \
799 rootme=`pwd` ; export rootme ; \
800 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
801 (cd ./chillrt; \
802 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
803 else \
804 true ; \
805 fi
806 ### end-sanitize-chill
807
808 ### gprof
809 all-gprof: all-libiberty all-bfd
810 @if [ -f ./gprof/Makefile ] ; then \
811 rootme=`pwd` ; export rootme ; \
812 (cd ./gprof; \
813 $(MAKE) $(FLAGS_TO_PASS) all) ; \
814 else \
815 true ; \
816 fi
817
818 install-gprof: force
819 @if [ -f ./gprof/Makefile ] ; then \
820 rootme=`pwd` ; export rootme ; \
821 (cd ./gprof; \
822 $(MAKE) $(FLAGS_TO_PASS) install) ; \
823 else \
824 true ; \
825 fi
826
827 ### byacc
828 all-byacc: force
829 @if [ -f ./byacc/Makefile ] ; then \
830 rootme=`pwd` ; export rootme ; \
831 (cd ./byacc; \
832 $(MAKE) $(FLAGS_TO_PASS) all) ; \
833 else \
834 true ; \
835 fi
836
837 install-byacc: force
838 @if [ -f ./byacc/Makefile ] ; then \
839 rootme=`pwd` ; export rootme ; \
840 (cd ./byacc; \
841 $(MAKE) $(FLAGS_TO_PASS) install) ; \
842 else \
843 true ; \
844 fi
845
846 ### flex
847 all-flex: all-libiberty
848 @if [ -f ./flex/Makefile ] ; then \
849 rootme=`pwd` ; export rootme ; \
850 (cd ./flex; \
851 $(MAKE) $(FLAGS_TO_PASS) all) ; \
852 else \
853 true ; \
854 fi
855
856 install-flex: force
857 @if [ -f ./flex/Makefile ] ; then \
858 rootme=`pwd` ; export rootme ; \
859 (cd ./flex; \
860 $(MAKE) $(FLAGS_TO_PASS) install) ; \
861 else \
862 true ; \
863 fi
864 ### gcc
865 all-gcc: all-libiberty all-byacc all-binutils all-gas
866 @if [ -f ./gcc/Makefile ] ; then \
867 rootme=`pwd` ; export rootme ; \
868 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
869 (cd ./gcc; \
870 $(MAKE) $(GCC_FLAGS_TO_PASS) all) ; \
871 else \
872 true ; \
873 fi
874
875 install-gcc: force
876 @if [ -f ./gcc/Makefile ] ; then \
877 rootme=`pwd` ; export rootme ; \
878 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
879 (cd ./gcc; \
880 $(MAKE) $(GCC_FLAGS_TO_PASS) install) ; \
881 else \
882 true ; \
883 fi
884
885 ### readline
886 all-readline: force
887 @if [ -f ./readline/Makefile ] ; then \
888 rootme=`pwd` ; export rootme ; \
889 (cd ./readline; \
890 $(MAKE) $(FLAGS_TO_PASS) all) ; \
891 else \
892 true ; \
893 fi
894
895 install-readline: force
896 @if [ -f ./readline/Makefile ] ; then \
897 rootme=`pwd` ; export rootme ; \
898 (cd ./readline; \
899 $(MAKE) $(FLAGS_TO_PASS) install) ; \
900 else \
901 true ; \
902 fi
903
904 ### glob
905 all-glob: force
906 @if [ -f ./glob/Makefile ] ; then \
907 rootme=`pwd` ; export rootme ; \
908 (cd ./glob; \
909 $(MAKE) $(FLAGS_TO_PASS) all) ; \
910 else \
911 true ; \
912 fi
913
914 install-glob: force
915 @if [ -f ./glob/Makefile ] ; then \
916 rootme=`pwd` ; export rootme ; \
917 (cd ./glob; \
918 $(MAKE) $(FLAGS_TO_PASS) install) ; \
919 else \
920 true ; \
921 fi
922
923 ### gas
924 all-gas: all-libiberty all-opcodes all-bfd
925 @if [ -f ./gas/Makefile ] ; then \
926 rootme=`pwd` ; export rootme ; \
927 (cd ./gas; \
928 $(MAKE) $(FLAGS_TO_PASS) all) ; \
929 else \
930 true ; \
931 fi
932
933 install-gas: force
934 @if [ -f ./gas/Makefile ] ; then \
935 rootme=`pwd` ; export rootme ; \
936 (cd ./gas; \
937 $(MAKE) $(FLAGS_TO_PASS) install) ; \
938 else \
939 true ; \
940 fi
941
942 ### gas
943 all-tgas: all-libiberty all-bfd
944 @if [ -f ./tgas/Makefile ] ; then \
945 rootme=`pwd` ; export rootme ; \
946 (cd ./tgas; \
947 $(MAKE) $(FLAGS_TO_PASS) all) ; \
948 else \
949 true ; \
950 fi
951
952
953 ### ld
954 all-ld: all-libiberty all-bfd all-byacc all-flex
955 @if [ -f ./ld/Makefile ] ; then \
956 rootme=`pwd` ; export rootme ; \
957 (cd ./ld; \
958 $(MAKE) $(FLAGS_TO_PASS) all) ; \
959 else \
960 true ; \
961 fi
962
963 install-ld: force
964 @if [ -f ./ld/Makefile ] ; then \
965 rootme=`pwd` ; export rootme ; \
966 (cd ./ld; \
967 $(MAKE) $(FLAGS_TO_PASS) install) ; \
968 else \
969 true ; \
970 fi
971
972 ### gdb
973 all-gdb: all-bfd all-opcodes all-libiberty all-mmalloc all-readline all-glob all-byacc
974 @if [ -f ./gdb/Makefile ] ; then \
975 rootme=`pwd` ; export rootme ; \
976 (cd ./gdb; \
977 $(MAKE) $(FLAGS_TO_PASS) all) ; \
978 else \
979 true ; \
980 fi
981
982 install-gdb: force
983 @if [ -f ./gdb/Makefile ] ; then \
984 rootme=`pwd` ; export rootme ; \
985 (cd ./gdb; \
986 $(MAKE) $(FLAGS_TO_PASS) install) ; \
987 else \
988 true ; \
989 fi
990
991 ### make
992 all-make: all-libiberty
993 @if [ -f ./make/Makefile ] ; then \
994 rootme=`pwd` ; export rootme ; \
995 (cd ./make; \
996 $(MAKE) $(FLAGS_TO_PASS) all) ; \
997 else \
998 true ; \
999 fi
1000
1001 install-make: force
1002 @if [ -f ./make/Makefile ] ; then \
1003 rootme=`pwd` ; export rootme ; \
1004 (cd ./make; \
1005 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1006 else \
1007 true ; \
1008 fi
1009
1010 ### diff
1011 all-diff: all-libiberty
1012 @if [ -f ./diff/Makefile ] ; then \
1013 rootme=`pwd` ; export rootme ; \
1014 (cd ./diff; \
1015 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1016 else \
1017 true ; \
1018 fi
1019
1020 install-diff: force
1021 @if [ -f ./diff/Makefile ] ; then \
1022 rootme=`pwd` ; export rootme ; \
1023 (cd ./diff/; \
1024 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1025 else \
1026 true ; \
1027 fi
1028
1029 ### grep
1030 all-grep: force
1031 @if [ -f ./grep/Makefile ] ; then \
1032 rootme=`pwd` ; export rootme ; \
1033 (cd ./grep; \
1034 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1035 else \
1036 true ; \
1037 fi
1038
1039 install-grep: force
1040 @if [ -f ./grep/Makefile ] ; then \
1041 rootme=`pwd` ; export rootme ; \
1042 (cd ./grep; \
1043 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1044 else \
1045 true ; \
1046 fi
1047
1048 ### rcs
1049 all-rcs: force
1050 @if [ -f ./rcs/Makefile ] ; then \
1051 rootme=`pwd` ; export rootme ; \
1052 (cd ./rcs; \
1053 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1054 else \
1055 true ; \
1056 fi
1057
1058 install-rcs: force
1059 @if [ -f ./rcs/Makefile ] ; then \
1060 rootme=`pwd` ; export rootme ; \
1061 (cd ./rcs; \
1062 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1063 else \
1064 true ; \
1065 fi
1066
1067 ### cvs
1068 all-cvs: force
1069 @if [ -f ./cvs/Makefile ] ; then \
1070 rootme=`pwd` ; export rootme ; \
1071 (cd ./cvs; \
1072 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1073 else \
1074 true ; \
1075 fi
1076
1077 install-cvs: force
1078 @if [ -f ./cvs/Makefile ] ; then \
1079 rootme=`pwd` ; export rootme ; \
1080 (cd ./cvs; \
1081 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1082 else \
1083 true ; \
1084 fi
1085
1086 ### patch
1087 all-patch: force
1088 @if [ -f ./patch/Makefile ] ; then \
1089 rootme=`pwd` ; export rootme ; \
1090 (cd ./patch; \
1091 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1092 else \
1093 true ; \
1094 fi
1095
1096 install-patch: force
1097 @if [ -f ./patch/Makefile ] ; then \
1098 rootme=`pwd` ; export rootme ; \
1099 (cd ./patch; \
1100 $(MAKE) $(FLAGS_TO_PASS) \
1101 bindir=$(bindir) \
1102 man1dir=$(man1dir) install) ; \
1103 else \
1104 true ; \
1105 fi
1106
1107 ### emacs
1108 all-emacs: force
1109 @if [ -f ./emacs/Makefile ] ; then \
1110 rootme=`pwd` ; export rootme ; \
1111 (cd ./emacs; \
1112 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
1113 else \
1114 true ; \
1115 fi
1116
1117 install-emacs: force
1118 @if [ -f ./emacs/Makefile ] ; then \
1119 rootme=`pwd` ; export rootme ; \
1120 (cd ./emacs; \
1121 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
1122 else \
1123 true ; \
1124 fi
1125
1126 ### ispell
1127 all-ispell: all-emacs
1128 @if [ -f ./ispell/Makefile ] ; then \
1129 rootme=`pwd` ; export rootme ; \
1130 (cd ./ispell; \
1131 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1132 else \
1133 true ; \
1134 fi
1135
1136 install-ispell: force
1137 @if [ -f ./ispell/Makefile ] ; then \
1138 rootme=`pwd` ; export rootme ; \
1139 (cd ./ispell; \
1140 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1141 else \
1142 true ; \
1143 fi
1144
1145 ### gnats
1146 all-gnats: force
1147 @if [ -f ./gnats/Makefile ] ; then \
1148 rootme=`pwd` ; export rootme ; \
1149 (cd ./gnats; \
1150 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1151 else \
1152 true ; \
1153 fi
1154
1155 install-gnats: force
1156 @if [ -f ./gnats/Makefile ] ; then \
1157 rootme=`pwd` ; export rootme ; \
1158 (cd ./gnats; \
1159 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1160 else \
1161 true ; \
1162 fi
1163
1164 ### send-pr
1165 all-send-pr: force
1166 @if [ -f ./send-pr/Makefile ] ; then \
1167 rootme=`pwd` ; export rootme ; \
1168 (cd ./send-pr; \
1169 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1170 else \
1171 true ; \
1172 fi
1173
1174 install-send-pr: force
1175 @if [ -f ./send-pr/Makefile ] ; then \
1176 rootme=`pwd` ; export rootme ; \
1177 (cd ./send-pr; \
1178 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1179 else \
1180 true ; \
1181 fi
1182
1183 ### libm
1184 all-libm: force
1185 @if [ -f ./libm/Makefile ] ; then \
1186 rootme=`pwd` ; export rootme ; \
1187 (cd ./libm; \
1188 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
1189 else \
1190 true ; \
1191 fi
1192
1193 install-libm: force
1194 @if [ -f ./libm/Makefile ] ; then \
1195 rootme=`pwd` ; export rootme ; \
1196 (cd ./libm; \
1197 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
1198 else \
1199 true ; \
1200 fi
1201
1202 ### libg++
1203
1204 all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
1205 @if [ -f ./libg++/Makefile ] ; then \
1206 rootme=`pwd` ; export rootme ; \
1207 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1208 (cd ./libg++; \
1209 $(MAKE) $(TARGET_FLAGS_TO_PASS) all) ; \
1210 else \
1211 true ; \
1212 fi
1213
1214 install-libg++: force
1215 @if [ -f ./libg++/Makefile ] ; then \
1216 rootme=`pwd` ; export rootme ; \
1217 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
1218 (cd ./libg++; \
1219 $(MAKE) $(TARGET_FLAGS_TO_PASS) install) ; \
1220 else \
1221 true ; \
1222 fi
1223 ### tcl
1224 all-tcl:
1225 @if [ -f ./tcl/Makefile ] ; then \
1226 rootme=`pwd` ; export rootme ; \
1227 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1228 (cd ./tcl; \
1229 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1230 else \
1231 true ; \
1232 fi
1233
1234 install-tcl: force
1235 @if [ -f ./tcl/Makefile ] ; then \
1236 rootme=`pwd` ; export rootme ; \
1237 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1238 (cd ./tcl; \
1239 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1240 else \
1241 true ; \
1242 fi
1243
1244
1245 ### tk
1246 all-tk: all-tcl
1247 @if [ -f ./tk/Makefile ] ; then \
1248 rootme=`pwd` ; export rootme ; \
1249 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1250 (cd ./tk; \
1251 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) ; \
1252 else \
1253 true ; \
1254 fi
1255
1256 install-tk: force
1257 @if [ -f ./tk/Makefile ] ; then \
1258 rootme=`pwd` ; export rootme ; \
1259 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1260 (cd ./tk; \
1261 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) ; \
1262 else \
1263 true ; \
1264 fi
1265
1266 ### expect
1267 all-expect: all-tcl
1268 @if [ -f ./expect/Makefile ] ; then \
1269 rootme=`pwd` ; export rootme ; \
1270 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1271 (cd ./expect; \
1272 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1273 else \
1274 true ; \
1275 fi
1276
1277 install-expect: force
1278 @if [ -f ./expect/Makefile ] ; then \
1279 rootme=`pwd` ; export rootme ; \
1280 srcroot=`cd $(srcdir); pwd`; export srcroot ; \
1281 (cd ./expect; \
1282 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1283 else \
1284 true ; \
1285 fi
1286
1287 ### sim
1288 all-sim: all-bfd
1289 @if [ -f ./sim/Makefile ] ; then \
1290 rootme=`pwd` ; export rootme ; \
1291 (cd ./sim; \
1292 $(MAKE) $(FLAGS_TO_PASS) all) ; \
1293 else \
1294 true ; \
1295 fi
1296
1297 install-sim: force
1298 @if [ -f ./sim/Makefile ] ; then \
1299 rootme=`pwd` ; export rootme ; \
1300 (cd ./sim; \
1301 $(MAKE) $(FLAGS_TO_PASS) install) ; \
1302 else \
1303 true ; \
1304 fi
1305
1306 ### fileutils
1307 all-fileutils: force
1308 @if [ -f ./fileutils/Makefile ] ; then \
1309 rootme=`pwd` ; export rootme ; \
1310 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1311 else \
1312 true ; \
1313 fi
1314
1315 install-fileutils: force
1316 @if [ -f ./fileutils/Makefile ] ; then \
1317 rootme=`pwd` ; export rootme ; \
1318 (cd ./fileutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1319 else \
1320 true ; \
1321 fi
1322
1323 ### find
1324 all-find: force
1325 @if [ -f ./find/Makefile ] ; then \
1326 rootme=`pwd` ; export rootme ; \
1327 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1328 else \
1329 true ; \
1330 fi
1331
1332 install-find: force
1333 @if [ -f ./find/Makefile ] ; then \
1334 rootme=`pwd` ; export rootme ; \
1335 (cd ./find; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1336 else \
1337 true ; \
1338 fi
1339
1340 ### gawk
1341 all-gawk: force
1342 @if [ -f ./gawk/Makefile ] ; then \
1343 rootme=`pwd` ; export rootme ; \
1344 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1345 else \
1346 true ; \
1347 fi
1348
1349 install-gawk: force
1350 @if [ -f ./gawk/Makefile ] ; then \
1351 rootme=`pwd` ; export rootme ; \
1352 (cd ./gawk; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1353 else \
1354 true ; \
1355 fi
1356
1357 ### m4
1358 all-m4: all-libiberty
1359 @if [ -f ./m4/Makefile ] ; then \
1360 rootme=`pwd` ; export rootme ; \
1361 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1362 else \
1363 true ; \
1364 fi
1365
1366 install-m4: force
1367 @if [ -f ./m4/Makefile ] ; then \
1368 rootme=`pwd` ; export rootme ; \
1369 (cd ./m4; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1370 else \
1371 true ; \
1372 fi
1373
1374 ### sed
1375 all-sed: force
1376 @if [ -f ./sed/Makefile ] ; then \
1377 rootme=`pwd` ; export rootme ; \
1378 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1379 else \
1380 true ; \
1381 fi
1382
1383 install-sed: force
1384 @if [ -f ./sed/Makefile ] ; then \
1385 rootme=`pwd` ; export rootme ; \
1386 (cd ./sed; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1387 else \
1388 true ; \
1389 fi
1390
1391 ### time
1392 all-time: force
1393 @if [ -f ./time/Makefile ] ; then \
1394 rootme=`pwd` ; export rootme ; \
1395 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1396 else \
1397 true ; \
1398 fi
1399
1400 install-time: force
1401 @if [ -f ./time/Makefile ] ; then \
1402 rootme=`pwd` ; export rootme ; \
1403 (cd ./time; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1404 else \
1405 true ; \
1406 fi
1407
1408 ### wdiff
1409 all-wdiff: force
1410 @if [ -f ./wdiff/Makefile ] ; then \
1411 rootme=`pwd` ; export rootme ; \
1412 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1413 else \
1414 true ; \
1415 fi
1416
1417 install-wdiff: force
1418 @if [ -f ./wdiff/Makefile ] ; then \
1419 rootme=`pwd` ; export rootme ; \
1420 (cd ./wdiff; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1421 else \
1422 true ; \
1423 fi
1424
1425 ### uudecode
1426 all-uudecode: all-libiberty
1427 @if [ -f ./uudecode/Makefile ] ; then \
1428 rootme=`pwd` ; export rootme ; \
1429 (cd ./uudecode; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1430 else \
1431 true ; \
1432 fi
1433
1434 install-uudecode: force
1435 @if [ -f ./uudecode/Makefile ] ; then \
1436 rootme=`pwd` ; export rootme ; \
1437 (cd ./uudecode; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1438 else \
1439 true ; \
1440 fi
1441
1442 ### shellutils
1443 all-shellutils: force
1444 @if [ -f ./shellutils/Makefile ] ; then \
1445 rootme=`pwd` ; export rootme ; \
1446 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1447 else \
1448 true ; \
1449 fi
1450
1451 install-shellutils: force
1452 @if [ -f ./shellutils/Makefile ] ; then \
1453 rootme=`pwd` ; export rootme ; \
1454 (cd ./shellutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1455 else \
1456 true ; \
1457 fi
1458
1459 ### textutils
1460 all-textutils: force
1461 @if [ -f ./textutils/Makefile ] ; then \
1462 rootme=`pwd` ; export rootme ; \
1463 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) all) ; \
1464 else \
1465 true ; \
1466 fi
1467
1468 install-textutils: force
1469 @if [ -f ./textutils/Makefile ] ; then \
1470 rootme=`pwd` ; export rootme ; \
1471 (cd ./textutils; $(MAKE) $(FLAGS_TO_PASS) install) ; \
1472 else \
1473 true ; \
1474 fi
1475
1476
1477
1478 ### other supporting targets
1479
1480 MAKEDIRS= \
1481 $(prefix) \
1482 $(exec_prefix) \
1483 $(tooldir)
1484
1485 # $(bindir) \
1486 # $(libdir) \
1487 # $(includedir) \
1488 # $(datadir) \
1489 # $(docdir) \
1490 # $(mandir) \
1491 # $(man1dir) \
1492 # $(man5dir)
1493
1494 # $(man2dir) \
1495 # $(man3dir) \
1496 # $(man4dir) \
1497 # $(man6dir) \
1498 # $(man7dir) \
1499 # $(man8dir)
1500
1501 install-dirs:
1502 for i in $(MAKEDIRS) ; do \
1503 echo Making $$i... ; \
1504 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
1505 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1506 if [ ! -d $$i ] ; then \
1507 if mkdir $$i ; then \
1508 true ; \
1509 else \
1510 exit 1 ; \
1511 fi ; \
1512 else \
1513 true ; \
1514 fi ; \
1515 done
1516
1517 install-info-dirs:
1518 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
1519 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
1520 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
1521 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
1522
1523 dir.info: do-install-info
1524 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new
1525 mv -f dir.info.new dir.info
1526
1527 dist:
1528 @echo "Building a full distribution of this tree isn't done"
1529 @echo "via 'make dist'. Check out the etc/ subdirectory"
1530
1531 etags tags: TAGS
1532
1533 TAGS:
1534 etags `$(MAKE) ls`
1535
1536 ls:
1537 @echo Makefile
1538 @for i in $(SUBDIRS); \
1539 do \
1540 (cd $$i; \
1541 pwd=`pwd`; \
1542 wd=`basename $$pwd`; \
1543 for j in `$(MAKE) ls`; \
1544 do \
1545 echo $$wd/$$j; \
1546 done) \
1547 done
1548
1549 force:
1550
1551 # with the gnu make, this is done automatically.
1552
1553 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
1554 $(SHELL) ./config.status
1555
1556 #
1557 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
1558
1559 DEVO_SUPPORT= README Makefile.in configure configure.in \
1560 config.guess config.sub config move-if-change
1561 ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
1562 configure.texi
1563 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
1564 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
1565
1566 setup-dirs: force
1567 ./configure sun4
1568 make clean
1569 ./configure -rm sun4
1570 chmod og=u `find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
1571
1572 gdb.tar.Z: setup-dirs
1573 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir BISON="byacc")
1574 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
1575
1576 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex
1577 rm -rf proto-toplev; mkdir proto-toplev
1578 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
1579 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
1580 ln -s ../$$i . ; \
1581 done)
1582 mkdir proto-toplev/etc
1583 (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \
1584 ln -s ../../etc/$$i . ; \
1585 done)
1586 # Put only one copy (four hard links) of COPYING in the tar file.
1587 rm proto-toplev/bfd/COPYING
1588 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
1589 rm proto-toplev/include/COPYING
1590 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
1591 rm proto-toplev/readline/COPYING
1592 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
1593
1594 # Take out texinfo and glob from configurable dirs
1595 rm proto-toplev/configure.in
1596 sed -e '/^host_tools=/s/texinfo //' \
1597 -e '/^host_libs=/s/glob //' \
1598 <configure.in >proto-toplev/configure.in
1599
1600 # Take out texinfo from a few places; make simple BISON=bison line.
1601 rm proto-toplev/Makefile.in
1602 sed -e '/^all\.normal: /s/\all-texinfo //' \
1603 -e '/^ install-texinfo /d' \
1604 -e '\/^BISON =/,\/^$$/c\
1605 BISON = bison -y' \
1606 <Makefile.in >proto-toplev/Makefile.in
1607
1608 mkdir proto-toplev/texinfo
1609 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1610 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
1611 chmod og=u `find proto-toplev -print`
1612 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1613 echo "==> Making gdb-$$VER.tar.Z"; \
1614 ln -s proto-toplev gdb-$$VER; \
1615 tar cfh - gdb-$$VER \
1616 | compress -v >gdb-$$VER.tar.Z)
1617 $(GZIP) -d <gdb-$$VER.tar.Z | $(GZIP) -9 -v >gdb-$$VER.tar.z
1618
1619 # end of Makefile.in