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