* configure.in (hppa*-*-bsd): Change to hppa*-*-bsd*
[deliverable/binutils-gdb.git] / Makefile.in
1 #
2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992, 1993 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 COMPRESS = compress
67
68 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
69 BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
70 then echo $${rootme}/byacc/byacc ; \
71 else echo byacc ; \
72 fi`
73
74 LEX = `if [ -f $${rootme}/flex/flex ] ; \
75 then echo $${rootme}/flex/flex ; \
76 else echo flex ; fi`
77
78 MAKEINFO = `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
79 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
80 else echo makeinfo ; fi`
81
82 RUNTEST = `if [ -f $${rootme}/dejagnu/runtest ] ; \
83 then echo EXPECT=$${rootme}/expect/expect $${rootme}/dejagnu/runtest ; \
84 else echo runtest ; fi`
85
86
87 # libraries that may need to be augmented on a system-by-system basis
88 X11_LIB = -lX11
89
90 # compilers to use to create programs which must be run in the build
91 # environment.
92 CC_FOR_BUILD = $(CC)
93 CXX_FOR_BUILD = $(CXX)
94
95 SUBDIRS = "this is set via configure, don't edit this"
96 OTHERS =
97
98 ALL = all.normal
99 INSTALL_TARGET = install.all
100
101 CC_FOR_TARGET = ` \
102 if [ -f $${rootme}/gcc/Makefile ] ; then \
103 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
104 else \
105 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
106 echo $(CC); \
107 else \
108 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
109 fi; \
110 fi`
111
112 # start-sanitize-chill
113 CHILL_FOR_TARGET = ` \
114 if [ -f $${rootme}/gcc/Makefile ] ; then \
115 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
116 else \
117 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
118 echo $(CC); \
119 else \
120 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
121 fi; \
122 fi`
123
124 # end-sanitize-chill
125
126 CXX_FOR_TARGET = ` \
127 if [ -f $${rootme}/gcc/Makefile ] ; then \
128 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
129 else \
130 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
131 echo $(CXX); \
132 else \
133 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
134 fi; \
135 fi`
136
137 AS_FOR_TARGET = ` \
138 if [ -f $${rootme}/gas/Makefile ] ; then \
139 echo $${rootme}/gas/as.new ; \
140 else \
141 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
142 echo $(AS); \
143 else \
144 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
145 fi; \
146 fi`
147
148 AR_FOR_TARGET = ` \
149 if [ -f $${rootme}/binutils/Makefile ] ; then \
150 echo $${rootme}/binutils/ar ; \
151 else \
152 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
153 echo $(AR); \
154 else \
155 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
156 fi; \
157 fi`
158
159 RANLIB_FOR_TARGET = ` \
160 if [ -f $${rootme}/binutils/Makefile ] ; then \
161 echo $${rootme}/binutils/ranlib ; \
162 else \
163 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
164 echo $(RANLIB); \
165 else \
166 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
167 fi; \
168 fi`
169
170 NM_FOR_TARGET = ` \
171 if [ -f $${rootme}/binutils/Makefile ] ; then \
172 echo $${rootme}/binutils/nm ; \
173 else \
174 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
175 echo $(NM); \
176 else \
177 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
178 fi; \
179 fi`
180
181 # FIXME: This is badly named.
182 XTRAFLAGS = ` \
183 if [ -f $${rootme}/gcc/Makefile ] ; then \
184 if [ -f $${rootme}/newlib/Makefile ] ; then \
185 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
186 else \
187 echo -I$${rootme}/gcc/include ; \
188 fi ; \
189 else \
190 echo ; \
191 fi`
192
193 PRMS = all-prms
194
195 #### host and target specific makefile fragments come in here.
196 ###
197
198 # Flags to pass down to all sub-makes.
199 # Please keep these in alphabetical order.
200 BASE_FLAGS_TO_PASS = \
201 "AR_FLAGS=$(AR_FLAGS)" \
202 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
203 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
204 "BISON=$(BISON)" \
205 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
206 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
207 "CFLAGS=$(CFLAGS)" \
208 $(start-sanitize-chill)\
209 "CHILLFLAGS=$(CHILLFLAGS)" \
210 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
211 "CHILL_LIB=$(CHILL_LIB)" \
212 $(end-sanitize-chill)\
213 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
214 "CXXFLAGS=$(CXXFLAGS)" \
215 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
216 'GCC_FOR_TARGET=$$(CC_FOR_TARGET)' \
217 "INSTALL=$(INSTALL)" \
218 "INSTALL_DATA=$(INSTALL_DATA)" \
219 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
220 "LDFLAGS=$(LDFLAGS)" \
221 "LEX=$(LEX)" \
222 "LOADLIBES=$(LOADLIBES)" \
223 "MAKEINFO=$(MAKEINFO)" \
224 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
225 "PRMS=$(PRMS)" \
226 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
227 "RUNTEST=$(RUNTEST)" \
228 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
229 "exec_prefix=$(exec_prefix)" \
230 "prefix=$(prefix)" \
231 "tooldir=$(tooldir)"
232
233 # Flags to pass down to most sub-makes, in which we're building with
234 # the host environment.
235 # If any variables are added here, they must be added to do-*, below.
236 EXTRA_HOST_FLAGS = \
237 'AR=$(AR)' \
238 'AS=$(AS)' \
239 'CC=$(CC)' \
240 'CXX=$(CXX)' \
241 'NM=$(NM)' \
242 'RANLIB=$(RANLIB)' \
243 'XTRAFLAGS='
244
245 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
246
247 # Flags that are concerned with the location of the X11 include files
248 # and library files
249 X11_FLAGS_TO_PASS = \
250 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
251 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
252 "X11_LIB=$(X11_LIB)"
253
254 # Flags to pass down to makes which are built with the target environment.
255 # The double $ decreases the length of the command line; the variables
256 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
257 # If any variables are added here, they must be added to do-*, below.
258 EXTRA_TARGET_FLAGS = \
259 'AR=$$(AR_FOR_TARGET)' \
260 'AS=$$(AS_FOR_TARGET)' \
261 'CC=$$(CC_FOR_TARGET)' \
262 'CXX=$$(CXX_FOR_TARGET)' \
263 'NM=$$(NM_FOR_TARGET)' \
264 'RANLIB=$$(RANLIB_FOR_TARGET)' \
265 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
266
267 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
268
269 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
270 # unfortunately needs the native compiler and the target ar and
271 # ranlib.
272 # If any variables are added here, they must be added to do-*, below.
273 EXTRA_GCC_FLAGS = \
274 'AR=$$(AR_FOR_TARGET)' \
275 'AS=$(AS)' \
276 'CC=$(CC)' \
277 'CXX=$(CXX)' \
278 'NM=$(NM)' \
279 'RANLIB=$$(RANLIB_FOR_TARGET)' \
280 'XTRAFLAGS='
281
282 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
283
284 # This is a list of the targets for all of the modules which are compiled
285 # using $(FLAGS_TO_PASS).
286 ALL_MODULES = \
287 all-autoconf \
288 all-bfd \
289 all-binutils \
290 all-byacc \
291 all-cvs \
292 all-dejagnu \
293 all-diff \
294 all-etc \
295 all-fileutils \
296 all-find \
297 all-flex \
298 all-gas \
299 all-gawk \
300 all-gdb \
301 all-gprof \
302 all-grep \
303 all-gzip \
304 all-hello \
305 all-indent \
306 all-ispell \
307 all-ld \
308 all-libiberty \
309 all-m4 \
310 all-make \
311 all-mmalloc \
312 all-opcodes \
313 all-patch \
314 all-prms \
315 all-rcs \
316 all-readline \
317 all-recode \
318 all-sed \
319 all-send-pr \
320 all-shellutils \
321 all-sim \
322 all-tar \
323 all-tcl \
324 all-texinfo \
325 all-textutils \
326 all-tgas \
327 all-time \
328 all-uudecode \
329 all-wdiff
330
331 # This is a list of the check targets for all of the modules which are
332 # compiled using $(FLAGS_TO_PASS).
333 CHECK_MODULES = \
334 check-autoconf \
335 check-bfd \
336 check-binutils \
337 check-byacc \
338 check-cvs \
339 check-dejagnu \
340 check-diff \
341 check-etc \
342 check-fileutils \
343 check-find \
344 check-flex \
345 check-gas \
346 check-gawk \
347 check-gdb \
348 check-gprof \
349 check-grep \
350 check-gzip \
351 check-hello \
352 check-indent \
353 check-ispell \
354 check-ld \
355 check-libiberty \
356 check-m4 \
357 check-make \
358 check-mmcheckoc \
359 check-opcodes \
360 check-patch \
361 check-prms \
362 check-rcs \
363 check-readline \
364 check-recode \
365 check-sed \
366 check-send-pr \
367 check-shellutils \
368 check-sim \
369 check-tar \
370 check-tcl \
371 check-texinfo \
372 check-textutils \
373 check-tgas \
374 check-time \
375 check-uudecode \
376 check-wdiff
377
378 # This is a list of the install targets for all of the modules which are
379 # compiled using $(FLAGS_TO_PASS).
380 INSTALL_MODULES = \
381 install-autoconf \
382 install-bfd \
383 install-binutils \
384 install-byacc \
385 install-cvs \
386 install-dejagnu \
387 install-diff \
388 install-etc \
389 install-fileutils \
390 install-find \
391 install-flex \
392 install-gas \
393 install-gawk \
394 install-gdb \
395 install-glob \
396 install-gprof \
397 install-grep \
398 install-gzip \
399 install-hello \
400 install-indent \
401 install-ispell \
402 install-ld \
403 install-libiberty \
404 install-m4 \
405 install-make \
406 install-mmalloc \
407 install-opcodes \
408 install-patch \
409 install-prms \
410 install-rcs \
411 install-readline \
412 install-recode \
413 install-sed \
414 install-send-pr \
415 install-shellutils \
416 install-sim \
417 install-tar \
418 install-tcl \
419 install-texinfo \
420 install-textutils \
421 install-tgas \
422 install-time \
423 install-uudecode \
424 install-wdiff
425
426 # This is a list of the targets for all of the modules which are compiled
427 # using $(X11_FLAGS_TO_PASS).
428 ALL_X11_MODULES = \
429 all-emacs \
430 all-expect \
431 all-tclX \
432 all-tk
433
434 # This is a list of the check targets for all of the modules which are
435 # compiled using $(X11_FLAGS_TO_PASS).
436 CHECK_X11_MODULES = \
437 check-emacs \
438 check-expect \
439 check-tclX \
440 check-tk
441
442 # This is a list of the install targets for all the modules which are
443 # compiled using $(X11_FLAGS_TO_PASS).
444 INSTALL_X11_MODULES = \
445 install-emacs \
446 install-expect \
447 install-tclX \
448 install-tk
449
450 # This is a list of the targets for all of the modules which are compiled
451 # using $(TARGET_FLAGS_TO_PASS).
452 ALL_TARGET_MODULES = \
453 $(start-sanitize-chill) \
454 all-chillrt \
455 $(end-sanitize-chill) \
456 all-libg++ \
457 all-newlib \
458 all-xiberty
459
460 # This is a list of the check targets for all of the modules which are
461 # compiled using $(TARGET_FLAGS_TO_PASS).
462 CHECK_TARGET_MODULES = \
463 $(start-sanitize-chill) \
464 check-chillrt \
465 $(end-sanitize-chill) \
466 check-libg++ \
467 check-newlib \
468 check-xiberty
469
470 # This is a list of the install targets for all of the modules which are
471 # compiled using $(TARGET_FLAGS_TO_PASS).
472 INSTALL_TARGET_MODULES = \
473 $(start-sanitize-chill) \
474 install-chillrt \
475 $(end-sanitize-chill) \
476 install-libg++ \
477 install-newlib \
478 install-xiberty
479
480 # This is a shell case of all modules which are compiled using
481 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
482 TARGET_LIBS = libg++ | newlib | xiberty
483 # start-sanitize-chill
484 TARGET_LIBS = chillrt | libg++ | newlib | xiberty
485 # end-sanitize-chill
486
487 # The first rule in the file had better be this one. Don't put any above it.
488 all: $(ALL)
489 .PHONY: all
490
491 # The target built for a native build.
492 .PHONY: all.normal
493 all.normal: \
494 $(ALL_MODULES) \
495 $(ALL_TARGET_MODULES) \
496 $(ALL_X11_MODULES) \
497 all-gcc
498
499 # The target built for a cross build.
500 .PHONY: all.cross
501 all.cross: \
502 all-bfd \
503 all-binutils \
504 all-byacc \
505 all-dejagnu \
506 all-flex \
507 all-gas \
508 all-gcc \
509 all-gdb \
510 all-ld \
511 all-libiberty \
512 all-mmalloc \
513 all-opcodes \
514 all-readline \
515 all-sim \
516 $(ALL_TARGET_MODULES)
517
518 # Do a target for all the subdirectories. A ``make do-X'' will do a
519 # ``make X'' in all subdirectories (because, in general, there is a
520 # dependency (below) of X upon do-X, a ``make X'' will also do this,
521 # but it may do additional work as well).
522 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
523 # because it is so large that it can easily overflow the command line
524 # length limit on some systems.
525 DO_X = \
526 do-clean \
527 do-distclean \
528 do-dvi \
529 do-info \
530 do-install-info \
531 do-installcheck \
532 do-mostlyclean \
533 do-realclean
534 .PHONY: $(DO_X)
535 $(DO_X):
536 @target=`echo $@ | sed -e 's/^do-//'`; \
537 rootme=`pwd`; export rootme; \
538 srcroot=`cd $(srcdir); pwd`; export srcroot; \
539 for i in $(SUBDIRS); do \
540 if [ -f ./$$i/Makefile ]; then \
541 case $$i in \
542 $(TARGET_LIBS) ) \
543 for flag in $(EXTRA_TARGET_FLAGS); do \
544 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
545 done; \
546 ;; \
547 gcc) \
548 for flag in $(EXTRA_GCC_FLAGS); do \
549 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
550 done; \
551 ;; \
552 *) \
553 for flag in $(EXTRA_HOST_FLAGS); do \
554 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
555 done; \
556 ;; \
557 esac ; \
558 export AR AS CC CXX NM RANLIB XTRAFLAGS; \
559 if (cd ./$$i; \
560 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
561 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
562 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
563 $${target}); \
564 then true; else exit 1; fi; \
565 else true; fi; \
566 done
567
568 # Here are the targets which correspond to the do-X targets.
569
570 .PHONY: info installcheck dvi install-info
571 .PHONY: clean distclean mostlyclean realclean local-clean local-distclean
572 info: do-info
573 installcheck: do-installcheck
574 dvi: do-dvi
575
576 install-info: install-info-dirs do-install-info dir.info
577 if [ -f dir.info ] ; then \
578 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
579 else true ; fi
580
581 do-install-info: install-info-dirs
582
583 local-clean:
584 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
585
586 local-distclean:
587 -rm -f Makefile config.status
588
589 clean: do-clean local-clean
590 mostlyclean: do-mostlyclean local-clean
591 distclean: do-distclean local-clean local-distclean
592 realclean: do-realclean local-clean local-distclean
593
594 # Check target.
595
596 .PHONY: check
597 check: $(CHECK_MODULES) \
598 $(CHECK_TARGET_MODULES) \
599 $(CHECK_X11_MODULES) \
600 check-gcc
601
602 # Installation targets.
603
604 .PHONY: install uninstall
605 install: $(INSTALL_TARGET)
606
607 uninstall:
608 @echo "the uninstall target is not supported in this tree"
609
610 .PHONY: install.all
611 install.all: install-no-fixedincludes
612 @if [ -f ./gcc/Makefile ] ; then \
613 rootme=`pwd` ; export rootme ; \
614 (cd ./gcc; \
615 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
616 else \
617 true ; \
618 fi
619
620 # install-no-fixedincludes is used because Cygnus can not distributed
621 # the fixed header files.
622 .PHONY: install-no-fixedincludes
623 install-no-fixedincludes: \
624 install-dirs \
625 gcc-no-fixedincludes \
626 $(INSTALL_MODULES) \
627 $(INSTALL_TARGET_MODULES) \
628 $(INSTALL_X11_MODULES)
629
630 # Install the gcc headers files, but not the fixed include files,
631 # which Cygnus is not allowed to distribute. This rule is very
632 # dependent on the workings of the gcc Makefile.in.
633 .PHONY: gcc-no-fixedincludes
634 gcc-no-fixedincludes:
635 @if [ -f ./gcc/Makefile ]; then \
636 rm -rf gcc/tmp-include; \
637 mv gcc/include gcc/tmp-include 2>/dev/null; \
638 mkdir gcc/include; \
639 touch gcc/stmp-fixincludes; \
640 rm -f gcc/stmp-headers; \
641 rootme=`pwd`; export rootme; \
642 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
643 (cd ./gcc; \
644 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
645 rm -rf gcc/include; \
646 mv gcc/tmp-include gcc/include 2>/dev/null; \
647 else true; fi
648
649 .PHONY: install.cross
650 install.cross: \
651 install-dirs \
652 install-binutils \
653 install-byacc \
654 install-dejagnu \
655 install-etc \
656 install-flex \
657 install-gas \
658 install-gcc \
659 install-gdb \
660 install-glob \
661 install-ld \
662 install-libiberty \
663 install-mmalloc \
664 install-opcodes \
665 install-readline \
666 $(INSTALL_TARGET_MODULES)
667
668 # This rule is used to build the modules which use FLAGS_TO_PASS. To
669 # build a target all-X means to cd to X and make all.
670 # all-glob is handled specially because it doesn't actually build.
671 .PHONY: $(ALL_MODULES) all-glob
672 $(ALL_MODULES) all-glob:
673 @dir=`echo $@ | sed -e 's/all-//'`; \
674 if [ -f ./$${dir}/Makefile ] ; then \
675 rootme=`pwd`; export rootme; \
676 srcroot=`cd $(srcdir); pwd`; export srcroot; \
677 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
678 else \
679 true; \
680 fi
681
682 # This rule is used to check the modules which use FLAGS_TO_PASS. To
683 # build a target check-X means to cd to X and make all.
684 .PHONY: $(CHECK_MODULES)
685 $(CHECK_MODULES):
686 @dir=`echo $@ | sed -e 's/check-//'`; \
687 if [ -f ./$${dir}/Makefile ] ; then \
688 rootme=`pwd`; export rootme; \
689 srcroot=`cd $(srcdir); pwd`; export srcroot; \
690 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
691 else \
692 true; \
693 fi
694
695 # This rule is used to install the modules which use FLAGS_TO_PASS.
696 # To build a target install-X means to cd to X and make install.
697 .PHONY: $(INSTALL_MODULES)
698 $(INSTALL_MODULES): install-dirs
699 @dir=`echo $@ | sed -e 's/install-//'`; \
700 if [ -f ./$${dir}/Makefile ] ; then \
701 rootme=`pwd`; export rootme; \
702 srcroot=`cd $(srcdir); pwd`; export srcroot; \
703 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
704 else \
705 true; \
706 fi
707
708 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
709 # To build a target all-X means to cd to X and make all.
710 .PHONY: $(ALL_TARGET_MODULES)
711 $(ALL_TARGET_MODULES):
712 @dir=`echo $@ | sed -e 's/all-//'`; \
713 if [ -f ./$${dir}/Makefile ] ; then \
714 rootme=`pwd`; export rootme; \
715 srcroot=`cd $(srcdir); pwd`; export srcroot; \
716 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
717 else \
718 true; \
719 fi
720
721 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
722 # To build a target install-X means to cd to X and make install.
723 .PHONY: $(CHECK_TARGET_MODULES)
724 $(CHECK_TARGET_MODULES):
725 @dir=`echo $@ | sed -e 's/check-//'`; \
726 if [ -f ./$${dir}/Makefile ] ; then \
727 rootme=`pwd`; export rootme; \
728 srcroot=`cd $(srcdir); pwd`; export srcroot; \
729 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \
730 else \
731 true; \
732 fi
733
734 # This rule is used to install the modules which use
735 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
736 # and make install.
737 .PHONY: $(INSTALL_TARGET_MODULES)
738 $(INSTALL_TARGET_MODULES): install-dirs
739 @dir=`echo $@ | sed -e 's/install-//'`; \
740 if [ -f ./$${dir}/Makefile ] ; then \
741 rootme=`pwd`; export rootme; \
742 srcroot=`cd $(srcdir); pwd`; export srcroot; \
743 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
744 else \
745 true; \
746 fi
747
748 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
749 # To build a target all-X means to cd to X and make all.
750 .PHONY: $(ALL_X11_MODULES)
751 $(ALL_X11_MODULES):
752 @dir=`echo $@ | sed -e 's/all-//'`; \
753 if [ -f ./$${dir}/Makefile ] ; then \
754 rootme=`pwd`; export rootme; \
755 srcroot=`cd $(srcdir); pwd`; export srcroot; \
756 (cd $${dir}; \
757 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
758 else \
759 true; \
760 fi
761
762 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
763 # To build a target check-X means to cd to X and make all.
764 .PHONY: $(CHECK_X11_MODULES)
765 $(CHECK_X11_MODULES):
766 @dir=`echo $@ | sed -e 's/check-//'`; \
767 if [ -f ./$${dir}/Makefile ] ; then \
768 rootme=`pwd`; export rootme; \
769 srcroot=`cd $(srcdir); pwd`; export srcroot; \
770 (cd $${dir}; \
771 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
772 else \
773 true; \
774 fi
775
776 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
777 # To build a target install-X means to cd to X and make install.
778 .PHONY: $(INSTALL_X11_MODULES)
779 $(INSTALL_X11_MODULES):
780 @dir=`echo $@ | sed -e 's/install-//'`; \
781 if [ -f ./$${dir}/Makefile ] ; then \
782 rootme=`pwd`; export rootme; \
783 srcroot=`cd $(srcdir); pwd`; export srcroot; \
784 (cd $${dir}; \
785 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
786 else \
787 true; \
788 fi
789
790 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
791 .PHONY: all-gcc
792 all-gcc:
793 @if [ -f ./gcc/Makefile ] ; then \
794 rootme=`pwd`; export rootme; \
795 srcroot=`cd $(srcdir); pwd`; export srcroot; \
796 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
797 else \
798 true; \
799 fi
800
801 .PHONY: check-gcc
802 check-gcc:
803 @if [ -f ./gcc/Makefile ] ; then \
804 rootme=`pwd`; export rootme; \
805 srcroot=`cd $(srcdir); pwd`; export srcroot; \
806 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
807 else \
808 true; \
809 fi
810
811 .PHONY: install-gcc
812 install-gcc:
813 @if [ -f ./gcc/Makefile ] ; then \
814 rootme=`pwd`; export rootme; \
815 srcroot=`cd $(srcdir); pwd`; export srcroot; \
816 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
817 else \
818 true; \
819 fi
820
821 # This is a list of inter-dependencies among modules.
822 all-autoconf:
823 all-bfd:
824 all-binutils: all-libiberty all-opcodes all-bfd all-flex
825 all-byacc:
826 # start-sanitize-chill
827 all-chillrt: all-binutils all-gas all-gcc all-newlib
828 # end-sanitize-chill
829 all-cvs:
830 all-dejagnu:
831 all-diff: all-libiberty
832 all-emacs:
833 all-etc:
834 all-expect: all-tcl
835 all-fileutils:
836 all-find:
837 all-flex: all-libiberty all-byacc
838 all-gas: all-libiberty all-opcodes all-bfd
839 all-gawk:
840 all-gcc: all-libiberty all-byacc all-binutils all-gas
841 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc
842 all-glob:
843 all-gprof: all-libiberty all-bfd
844 all-grep:
845 all-gzip: all-libiberty
846 all-hello: all-libiberty
847 all-indent:
848 all-ispell: all-emacs
849 all-ld: all-libiberty all-bfd all-byacc all-flex
850 all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
851 all-libiberty:
852 all-m4: all-libiberty
853 all-make: all-libiberty
854 all-mmalloc:
855 all-newlib: all-binutils all-gas all-gcc
856 all-opcodes:
857 all-patch:
858 all-prms:
859 all-rcs:
860 all-readline:
861 all-recode: all-libiberty
862 all-sed:
863 all-send-pr:
864 all-shellutils:
865 all-sim: all-libiberty all-bfd
866 all-tar: all-libiberty
867 all-tcl:
868 all-tclX: all-tcl all-tk
869 all-tk: all-tcl
870 all-texinfo: all-libiberty
871 all-textutils:
872 all-tgas: all-libiberty all-bfd
873 all-time:
874 all-wdiff:
875 all-uudecode: all-libiberty
876 all-xiberty: all-gcc all-newlib
877
878 ### other supporting targets
879
880 MAKEDIRS= \
881 $(prefix) \
882 $(exec_prefix) \
883 $(tooldir)
884
885 .PHONY: install-dirs
886 install-dirs:
887 @for i in $(MAKEDIRS) ; do \
888 echo Making $$i... ; \
889 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
890 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
891 if [ ! -d $$i ] ; then \
892 if mkdir $$i ; then \
893 true ; \
894 else \
895 exit 1 ; \
896 fi ; \
897 else \
898 true ; \
899 fi ; \
900 done
901
902 .PHONY: install-info-dirs
903 install-info-dirs:
904 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
905 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
906 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
907 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
908
909 dir.info: do-install-info
910 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
911 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
912 mv -f dir.info.new dir.info ; \
913 else true ; \
914 fi
915
916 dist:
917 @echo "Building a full distribution of this tree isn't done"
918 @echo "via 'make dist'. Check out the etc/ subdirectory"
919
920 etags tags: TAGS
921
922 TAGS:
923 etags `$(MAKE) ls`
924
925 ls:
926 @echo Makefile
927 @for i in $(SUBDIRS); \
928 do \
929 (cd $$i; \
930 pwd=`pwd`; \
931 wd=`basename $$pwd`; \
932 for j in `$(MAKE) ls`; \
933 do \
934 echo $$wd/$$j; \
935 done) \
936 done
937
938 # with the gnu make, this is done automatically.
939
940 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
941 $(SHELL) ./config.status
942
943 #
944 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
945
946 DEVO_SUPPORT= README Makefile.in configure configure.in \
947 config.guess config.sub config move-if-change
948 ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
949 configure.texi
950 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob sim
951 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
952
953 .PHONY: setup-dirs-gdb gdb.tar.Z make-gdb.tar.Z
954 setup-dirs-gdb:
955 ./configure sun4
956 $(MAKE) clean
957 ./configure -rm sun4
958 chmod og=u `find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
959
960 gdb.tar.Z: setup-dirs-gdb
961 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir BISON="byacc")
962 (cd gdb; $(MAKE) -f Makefile.in make-proto-testsuite.dir)
963 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
964
965 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex
966 rm -rf proto-toplev; mkdir proto-toplev
967 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
968 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
969 ln -s ../$$i . ; \
970 done)
971 mkdir proto-toplev/etc
972 (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \
973 ln -s ../../etc/$$i . ; \
974 done)
975 # Put only one copy (four hard links) of COPYING in the tar file.
976 rm proto-toplev/bfd/COPYING
977 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
978 rm proto-toplev/include/COPYING
979 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
980 rm proto-toplev/readline/COPYING
981 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
982
983 # Take out texinfo and glob from configurable dirs
984 rm proto-toplev/configure.in
985 sed -e '/^host_tools=/s/texinfo //' \
986 -e '/^host_libs=/s/glob //' \
987 <configure.in >proto-toplev/configure.in
988
989 # Take out texinfo from a few places; make simple BISON=bison line.
990 rm proto-toplev/Makefile.in
991 sed -e '/^all\.normal: /s/\all-texinfo //' \
992 -e '/^ install-texinfo /d' \
993 -e '/^BISON = /,/^$$/d' \
994 -e '/^# BISON:/s/.*/BISON = bison -y/' \
995 <Makefile.in >proto-toplev/Makefile.in
996
997 mkdir proto-toplev/texinfo
998 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
999 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
1000 chmod og=u `find proto-toplev -print`
1001 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1002 ln -s proto-toplev gdb-$$VER; \
1003 echo "==> Making gdb-$$VER.tar.Z"; \
1004 tar cfh - gdb-$$VER | $(COMPRESS) -v >gdb-$$VER.tar.Z; \
1005 echo "==> Making gdb-$$VER.tar.z"; \
1006 tar cfh - gdb-$$VER | $(GZIP) -v -9 >gdb-$$VER.tar.z)
1007
1008 # Make the testsuite archive separately.
1009 ln -s ../../gdb/proto-testsuite.dir/testsuite proto-toplev/gdb/testsuite
1010 # Put a copy of COPYING in the tar file.
1011 ln proto-toplev/gdb/COPYING proto-toplev/gdb/testsuite/COPYING
1012 chmod og=u `find proto-toplev/gdb/testsuite -print`
1013 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1014 echo "==> Making gdb-$$VER-testsuite.tar.Z"; \
1015 tar cfh - gdb-$$VER/gdb/testsuite | \
1016 $(COMPRESS) -v >gdb-$$VER-testsuite.tar.Z; \
1017 echo "==> Making gdb-$$VER-testsuite.tar.z"; \
1018 tar cfh - gdb-$$VER/gdb/testsuite | \
1019 $(GZIP) -v -9 >gdb-$$VER-testsuite.tar.z)
1020
1021 # When you use `make setup-dirs' or `make taz' you should always redefine
1022 # this macro.
1023 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1024 # Directories that might want `make proto-dir' run.
1025 PROTODIRS= gdb
1026
1027 .PHONY: setup-dirs taz
1028 setup-dirs:
1029 ./configure sun4
1030 $(MAKE) clean
1031 ./configure -rm sun4
1032 chmod og=u `find etc $(DEVO_SUPPORT) $(SUPPORT_FILES) -print`
1033 for d in .. $(PROTODIRS) ; do \
1034 if [ $$d != ".." ] && [ -d $$d ]; then \
1035 (cd $$d ; $(MAKE) -f Makefile.in proto-dir) ; \
1036 else true ; fi ; \
1037 done
1038
1039 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1040 rm -rf proto-toplev; mkdir proto-toplev
1041 for d in .. $(PROTODIRS) ; do \
1042 if [ $$d != .. ]; then \
1043 if [ -d $$d ]; then \
1044 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1045 else true ; fi ; \
1046 else true ; fi ; \
1047 done
1048 (cd proto-toplev; for i in $(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES); do \
1049 if [ ! -d $$i ]; then ln -s ../$$i . ; else true ; fi ; \
1050 done)
1051 mkdir proto-toplev/etc
1052 (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \
1053 ln -s ../../etc/$$i . ; \
1054 done)
1055 # Put only one copy (four hard links) of COPYING in the tar file.
1056 ## FIX ME LATER
1057
1058 # Take out texinfo and glob from configurable dirs
1059 rm proto-toplev/configure.in
1060 sed -e '/^host_tools=/s/texinfo //' \
1061 -e '/^host_libs=/s/glob //' \
1062 <configure.in >proto-toplev/configure.in
1063
1064 # Take out texinfo from a few places; make simple BISON=bison line.
1065 rm proto-toplev/Makefile.in
1066 sed -e '/^all\.normal: /s/\all-texinfo //' \
1067 -e '/^ install-texinfo /d' \
1068 -e '/^BISON = /,/^$$/d' \
1069 -e '/^# BISON:/s/.*/BISON = bison -y/' \
1070 <Makefile.in >proto-toplev/Makefile.in
1071
1072 mkdir proto-toplev/texinfo
1073 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1074 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
1075 chmod og=u `find proto-toplev -print`
1076 (VER=`sed <$(TOOL)/Makefile.in -n 's/VERSION *= *//p'`; \
1077 echo "==> Making $(TOOL)-$$VER.tar.z"; \
1078 ln -s proto-toplev $(TOOL)-$$VER; \
1079 tar cfh - $(TOOL)-$$VER \
1080 | $(GZIP) -v >$(TOOL)-$$VER.tar.z)
1081
1082 GAS_SUPPORT_DIRS= bfd include libiberty opcodes
1083
1084 .PHONY: gas.tar.z
1085 gas.tar.z: $(DEVO_SUPPORT) $(GAS_SUPPORT_DIRS) gas texinfo/texinfo.tex
1086 $(MAKE) -f Makefile.in setup-dirs SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1087 $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" TOOL=gas
1088
1089 .PHONY: gas+binutils.tar.z
1090 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld
1091 gas+binutils.tar.z: $(DEVO_SUPPORT) $(GASB_SUPPORT_DIRS) gas texinfo/texinfo.tex
1092 $(MAKE) -f Makefile.in setup-dirs SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
1093 $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" TOOL=gas
1094
1095 .NOEXPORT:
1096 MAKEOVERRIDES=
1097
1098 # start-sanitize-chill
1099 ## This is ugly, but I don't want GNU make to put these variables in
1100 ## the environment. Older makes will see this as a set of targets
1101 ## with no dependencies and no actions.
1102 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1103 # end-sanitize-chill
1104
1105 # end of Makefile.in
This page took 0.053969 seconds and 4 git commands to generate.