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