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