* config/tc-h8300.c (do_a_fix_imm): Don't cut off high bits
[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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 GDB_NLM_DEPS =
46
47 SHELL = /bin/sh
48
49 INSTALL = $${srcroot}/install.sh -c
50 INSTALL_PROGRAM = $(INSTALL)
51 INSTALL_DATA = $(INSTALL) -m 644
52 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
53
54 INSTALL_DOSREL = install-dosrel-fake
55
56 AS = as
57 AR = ar
58 AR_FLAGS = rc
59 CC = cc
60
61 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
62 # here so that they can be overridden by Makefile fragments.
63 HOST_CC = $(CC_FOR_BUILD)
64 HOST_PREFIX =
65 HOST_PREFIX_1 = loser-
66
67 # We don't specify -g -O because many compilers don't support -g -O,
68 # and/or -O is broken in and of itself.
69 CFLAGS = -g
70 LIBCFLAGS = $(CFLAGS)
71 CFLAGS_FOR_TARGET = $(CFLAGS)
72 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
73 PICFLAG =
74 PICFLAG_FOR_TARGET =
75
76 # start-sanitize-chill
77 CHILLFLAGS = $(CFLAGS)
78 CHILL_LIB = -lchill
79 # end-sanitize-chill
80 CXX = gcc
81
82 # Use -O2 to stress test the compiler.
83 CXXFLAGS = -g -O2
84 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
85 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
86 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
87
88 RANLIB = ranlib
89
90 DLLTOOL = dlltool
91
92 NM = nm
93 # Not plain GZIP, since gzip looks there for extra command-line options.
94 GZIPPROG = gzip
95
96 # These values are substituted by configure.
97 DEFAULT_YACC = yacc
98 DEFAULT_LEX = lex
99
100 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
101 BISON = `if [ -f $$r/byacc/byacc ] ; \
102 then echo $$r/byacc/byacc ; \
103 else echo ${DEFAULT_YACC} ; \
104 fi`
105
106 LEX = `if [ -f $$r/flex/flex ] ; \
107 then echo $$r/flex/flex ; \
108 else echo ${DEFAULT_LEX} ; fi`
109
110 M4 = `if [ -f $$r/m4/m4 ] ; \
111 then echo $$r/m4/m4 ; \
112 else echo m4 ; fi`
113
114 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
115 then echo $$r/texinfo/makeinfo/makeinfo ; \
116 else echo makeinfo ; fi`
117
118 # This just becomes part of the MAKEINFO definition passed down to
119 # sub-makes. It lets flags be given on the command line while still
120 # using the makeinfo from the object tree.
121 MAKEINFOFLAGS =
122
123 EXPECT = `if [ -f $$r/expect/expect ] ; \
124 then echo $$r/expect/expect ; \
125 else echo expect ; fi`
126
127 RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
128 then echo $${srcroot}/dejagnu/runtest ; \
129 else echo runtest ; fi`
130
131
132 # compilers to use to create programs which must be run in the build
133 # environment.
134 CC_FOR_BUILD = $(CC)
135 CXX_FOR_BUILD = $(CXX)
136
137 SUBDIRS = "this is set via configure, don't edit this"
138 OTHERS =
139
140 # This is set by the configure script to the list of directories which
141 # should be built using the target tools.
142 TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
143
144 # Target libraries are put under this directory:
145 TARGET_SUBDIR = . # Changed by configure to $(target_alias) if cross.
146
147 # This is set by the configure script to the arguments passed to configure.
148 CONFIG_ARGUMENTS =
149
150 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
151 # was used.
152 SET_LIB_PATH =
153
154 # This is the name of the environment variable used for the path to
155 # the libraries. This may be changed by configure.in.
156 RPATH_ENVVAR = LD_LIBRARY_PATH
157
158 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
159 REALLY_SET_LIB_PATH = \
160 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
161 export $(RPATH_ENVVAR);
162
163 ALL = all.normal
164 INSTALL_TARGET = install-dirs \
165 $(INSTALL_MODULES) \
166 $(INSTALL_TARGET_MODULES) \
167 $(INSTALL_X11_MODULES) \
168 install-gcc \
169 $(INSTALL_DOSREL)
170
171
172 CC_FOR_TARGET = ` \
173 if [ -f $$r/gcc/Makefile ] ; then \
174 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
175 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
176 else \
177 echo $$r/gcc/xgcc -B$$r/gcc/; \
178 fi; \
179 else \
180 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
181 echo $(CC); \
182 else \
183 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
184 fi; \
185 fi`
186
187 # start-sanitize-chill
188 CHILL_FOR_TARGET = ` \
189 if [ -f $$r/gcc/Makefile ] ; then \
190 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
191 else \
192 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
193 echo $(CC); \
194 else \
195 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
196 fi; \
197 fi`
198
199 # end-sanitize-chill
200
201 CXX_FOR_TARGET = ` \
202 if [ -f $$r/gcc/Makefile ] ; then \
203 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
204 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
205 else \
206 echo $$r/gcc/xgcc -B$$r/gcc/; \
207 fi; \
208 else \
209 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
210 echo $(CXX); \
211 else \
212 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
213 fi; \
214 fi`
215
216 AS_FOR_TARGET = ` \
217 if [ -f $$r/gas/as.new ] ; then \
218 echo $$r/gas/as.new ; \
219 else \
220 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
221 echo $(AS); \
222 else \
223 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
224 fi; \
225 fi`
226
227 LD_FOR_TARGET = ` \
228 if [ -f $$r/ld/ld.new ] ; then \
229 echo $$r/ld/ld.new ; \
230 else \
231 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
232 echo $(LD); \
233 else \
234 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
235 fi; \
236 fi`
237
238 DLLTOOL_FOR_TARGET = ` \
239 if [ -f $$r/binutils/dlltool ] ; then \
240 echo $$r/binutils/dlltool ; \
241 else \
242 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
243 echo $(DLLTOOL); \
244 else \
245 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
246 fi; \
247 fi`
248
249 AR_FOR_TARGET = ` \
250 if [ -f $$r/binutils/ar ] ; then \
251 echo $$r/binutils/ar ; \
252 else \
253 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
254 echo $(AR); \
255 else \
256 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
257 fi; \
258 fi`
259
260 RANLIB_FOR_TARGET = ` \
261 if [ -f $$r/binutils/ranlib ] ; then \
262 echo $$r/binutils/ranlib ; \
263 else \
264 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
265 echo $(RANLIB); \
266 else \
267 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
268 fi; \
269 fi`
270
271 NM_FOR_TARGET = ` \
272 if [ -f $$r/binutils/nm.new ] ; then \
273 echo $$r/binutils/nm.new ; \
274 else \
275 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
276 echo $(NM); \
277 else \
278 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
279 fi; \
280 fi`
281
282 #### host and target specific makefile fragments come in here.
283 ###
284
285 # Flags to pass down to all sub-makes.
286 # Please keep these in alphabetical order.
287 BASE_FLAGS_TO_PASS = \
288 "AR_FLAGS=$(AR_FLAGS)" \
289 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
290 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
291 "BISON=$(BISON)" \
292 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
293 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
294 "CFLAGS=$(CFLAGS)" \
295 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
296 $(start-sanitize-chill)\
297 "CHILLFLAGS=$(CHILLFLAGS)" \
298 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
299 "CHILL_LIB=$(CHILL_LIB)" \
300 $(end-sanitize-chill)\
301 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
302 "CXXFLAGS=$(CXXFLAGS)" \
303 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
304 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
305 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
306 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
307 "INSTALL=$(INSTALL)" \
308 "INSTALL_DATA=$(INSTALL_DATA)" \
309 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
310 "INSTALL_XFORM=$(INSTALL_XFORM)" \
311 "LDFLAGS=$(LDFLAGS)" \
312 "LEX=$(LEX)" \
313 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
314 "LIBCFLAGS=$(LIBCFLAGS)" \
315 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
316 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
317 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
318 "M4=$(M4)" \
319 "MAKE=$(MAKE)" \
320 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
321 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
322 "PICFLAG=$(PICFLAG)" \
323 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
324 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
325 "SHELL=$(SHELL)" \
326 "EXPECT=$(EXPECT)" \
327 "RUNTEST=$(RUNTEST)" \
328 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
329 "YACC=$(BISON)" \
330 "exec_prefix=$(exec_prefix)" \
331 "prefix=$(prefix)" \
332 "tooldir=$(tooldir)"
333
334 # Flags to pass down to most sub-makes, in which we're building with
335 # the host environment.
336 # If any variables are added here, they must be added to do-*, below.
337 EXTRA_HOST_FLAGS = \
338 'AR=$(AR)' \
339 'AS=$(AS)' \
340 'CC=$(CC)' \
341 'CXX=$(CXX)' \
342 'DLLTOOL=$(DLLTOOL)' \
343 'NM=$(NM)' \
344 'RANLIB=$(RANLIB)'
345
346
347 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
348
349 # Flags that are concerned with the location of the X11 include files
350 # and library files
351 #
352 # NOTE: until the top-level is getting the values via autoconf, it only
353 # causes problems to have this top-level Makefile overriding the autoconf-set
354 # values in child directories. Only variables that don't conflict with
355 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
356 #
357 X11_FLAGS_TO_PASS = \
358 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
359 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
360
361 # Flags to pass down to makes which are built with the target environment.
362 # The double $ decreases the length of the command line; the variables
363 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
364 # If any variables are added here, they must be added to do-*, below.
365 EXTRA_TARGET_FLAGS = \
366 'AR=$$(AR_FOR_TARGET)' \
367 'AS=$$(AS_FOR_TARGET)' \
368 'CC=$$(CC_FOR_TARGET)' \
369 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
370 'CXX=$$(CXX_FOR_TARGET)' \
371 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
372 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
373 'LD=$$(LD_FOR_TARGET)' \
374 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
375 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
376 'NM=$$(NM_FOR_TARGET)' \
377 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
378 'RANLIB=$$(RANLIB_FOR_TARGET)'
379
380 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
381
382 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
383 # unfortunately needs the native compiler and the target ar and
384 # ranlib.
385 # If any variables are added here, they must be added to do-*, below.
386 # The HOST_* variables are a special case, which are used for the gcc
387 # cross-building scheme.
388 EXTRA_GCC_FLAGS = \
389 'AR=$$(AR_FOR_TARGET)' \
390 'AS=$(AS)' \
391 'CC=$(CC)' \
392 'CXX=$(CXX)' \
393 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
394 'HOST_CC=$(CC_FOR_BUILD)' \
395 'HOST_PREFIX=$(HOST_PREFIX)' \
396 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
397 'NM=$(NM)' \
398 'RANLIB=$$(RANLIB_FOR_TARGET)' \
399 `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
400 `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
401 `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
402 `if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
403 `if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
404 `if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
405 `if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
406 `if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; fi`
407
408 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
409
410 # This is a list of the targets for all of the modules which are compiled
411 # using $(FLAGS_TO_PASS).
412 ALL_MODULES = \
413 all-autoconf \
414 all-bfd \
415 all-binutils \
416 all-byacc \
417 all-cvs \
418 all-dejagnu \
419 all-diff \
420 all-dosutils \
421 all-etc \
422 all-fileutils \
423 all-find \
424 all-flex \
425 all-gas \
426 all-gawk \
427 all-gprof \
428 all-grep \
429 all-grez \
430 all-gzip \
431 all-hello \
432 all-indent \
433 all-ispell \
434 all-ld \
435 all-libiberty \
436 all-m4 \
437 all-make \
438 all-mmalloc \
439 all-opcodes \
440 all-patch \
441 all-perl \
442 all-prms \
443 all-rcs \
444 all-readline \
445 all-release \
446 all-recode \
447 all-sed \
448 all-send-pr \
449 all-shellutils \
450 all-sim \
451 all-tar \
452 all-tcl \
453 all-texinfo \
454 all-textutils \
455 all-tgas \
456 all-time \
457 all-uudecode \
458 all-wdiff
459
460 # This is a list of the check targets for all of the modules which are
461 # compiled using $(FLAGS_TO_PASS).
462 # This is a list of the check targets for all of the modules which are
463 # compiled using $(FLAGS_TO_PASS).
464 #
465 # The list is in two parts. The first lists those tools which
466 # are tested as part of the host's native tool-chain, and not
467 # tested in a cross configuration.
468 NATIVE_CHECK_MODULES = \
469 check-byacc \
470 check-flex
471
472 CROSS_CHECK_MODULES = \
473 check-autoconf \
474 check-bfd \
475 check-binutils \
476 check-cvs \
477 check-dejagnu \
478 check-diff \
479 check-etc \
480 check-fileutils \
481 check-find \
482 check-gas \
483 check-gawk \
484 check-gprof \
485 check-grep \
486 check-gzip \
487 check-hello \
488 check-indent \
489 check-ispell \
490 check-ld \
491 check-libiberty \
492 check-m4 \
493 check-make \
494 check-mmcheckoc \
495 check-opcodes \
496 check-patch \
497 check-perl \
498 check-prms \
499 check-rcs \
500 check-readline \
501 check-recode \
502 check-sed \
503 check-send-pr \
504 check-shellutils \
505 check-sim \
506 check-tar \
507 check-tcl \
508 check-texinfo \
509 check-textutils \
510 check-tgas \
511 check-time \
512 check-uudecode \
513 check-wdiff
514
515 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
516
517 # This is a list of the install targets for all of the modules which are
518 # compiled using $(FLAGS_TO_PASS).
519 INSTALL_MODULES = \
520 install-autoconf \
521 install-bfd \
522 install-binutils \
523 install-byacc \
524 install-cvs \
525 install-dejagnu \
526 install-diff \
527 install-dosutils \
528 install-etc \
529 install-fileutils \
530 install-find \
531 install-flex \
532 install-gas \
533 install-gawk \
534 install-gprof \
535 install-grep \
536 install-grez \
537 install-gzip \
538 install-hello \
539 install-indent \
540 install-ispell \
541 install-ld \
542 install-libiberty \
543 install-m4 \
544 install-make \
545 install-mmalloc \
546 install-opcodes \
547 install-patch \
548 install-perl \
549 install-prms \
550 install-rcs \
551 install-readline \
552 install-recode \
553 install-sed \
554 install-send-pr \
555 install-shellutils \
556 install-sim \
557 install-tar \
558 install-tcl \
559 install-texinfo \
560 install-textutils \
561 install-tgas \
562 install-time \
563 install-uudecode \
564 install-wdiff
565
566 # This is a list of the targets for all of the modules which are compiled
567 # using $(X11_FLAGS_TO_PASS).
568 ALL_X11_MODULES = \
569 all-emacs \
570 all-emacs19 \
571 all-gdb \
572 all-expect \
573 all-gash \
574 all-guile \
575 all-tclX \
576 all-tk
577
578 # This is a list of the check targets for all of the modules which are
579 # compiled using $(X11_FLAGS_TO_PASS).
580 CHECK_X11_MODULES = \
581 check-emacs \
582 check-gdb \
583 check-guile \
584 check-expect \
585 check-gash \
586 check-tclX \
587 check-tk
588
589 # This is a list of the install targets for all the modules which are
590 # compiled using $(X11_FLAGS_TO_PASS).
591 INSTALL_X11_MODULES = \
592 install-emacs \
593 install-emacs19 \
594 install-gdb \
595 install-guile \
596 install-expect \
597 install-gash \
598 install-tclX \
599 install-tk
600
601 # This is a list of the targets for all of the modules which are compiled
602 # using $(TARGET_FLAGS_TO_PASS).
603 ALL_TARGET_MODULES = \
604 all-target-libio \
605 all-target-libstdc++ \
606 all-target-librx \
607 all-target-libg++ \
608 all-target-newlib \
609 all-target-winsup \
610 all-target-libgloss \
611 all-target-libiberty \
612 all-target-examples
613
614 # This is a list of the configure targets for all of the modules which
615 # are compiled using the target tools.
616 CONFIGURE_TARGET_MODULES = \
617 configure-target-libio \
618 configure-target-libstdc++ \
619 configure-target-librx \
620 configure-target-libg++ \
621 configure-target-newlib \
622 configure-target-winsup \
623 configure-target-libgloss \
624 configure-target-libiberty \
625 configure-target-examples
626
627 # This is a list of the check targets for all of the modules which are
628 # compiled using $(TARGET_FLAGS_TO_PASS).
629 CHECK_TARGET_MODULES = \
630 check-target-libio \
631 check-target-libstdc++ \
632 check-target-libg++ \
633 check-target-newlib \
634 check-target-winsup \
635 check-target-libiberty
636
637 # This is a list of the install targets for all of the modules which are
638 # compiled using $(TARGET_FLAGS_TO_PASS).
639 INSTALL_TARGET_MODULES = \
640 install-target-libio \
641 install-target-libstdc++ \
642 install-target-libg++ \
643 install-target-newlib \
644 install-target-winsup \
645 install-target-libgloss \
646 install-target-libiberty
647
648 # The first rule in the file had better be this one. Don't put any above it.
649 all: all.normal
650 .PHONY: all
651
652 # The target built for a native build.
653 .PHONY: all.normal
654 all.normal: \
655 $(ALL_MODULES) \
656 $(ALL_TARGET_MODULES) \
657 $(ALL_X11_MODULES) \
658 all-gcc
659
660 # Do a target for all the subdirectories. A ``make do-X'' will do a
661 # ``make X'' in all subdirectories (because, in general, there is a
662 # dependency (below) of X upon do-X, a ``make X'' will also do this,
663 # but it may do additional work as well).
664 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
665 # because it is so large that it can easily overflow the command line
666 # length limit on some systems.
667 DO_X = \
668 do-clean \
669 do-distclean \
670 do-dvi \
671 do-info \
672 do-install-info \
673 do-installcheck \
674 do-mostlyclean \
675 do-maintainer-clean \
676 do-TAGS
677 .PHONY: $(DO_X)
678 $(DO_X):
679 @target=`echo $@ | sed -e 's/^do-//'`; \
680 r=`pwd`; export r; \
681 srcroot=`cd $(srcdir); pwd`; export srcroot; \
682 $(SET_LIB_PATH) \
683 for i in $(SUBDIRS) -dummy-; do \
684 if [ -f ./$$i/Makefile ]; then \
685 case $$i in \
686 gcc) \
687 for flag in $(EXTRA_GCC_FLAGS); do \
688 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
689 done; \
690 ;; \
691 *) \
692 for flag in $(EXTRA_HOST_FLAGS); do \
693 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
694 done; \
695 ;; \
696 esac ; \
697 export AR AS CC CXX NM RANLIB DLLTOOL; \
698 if (cd ./$$i; \
699 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
700 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
701 "RANLIB=$${RANLIB}" \
702 "DLLTOOL=$${DLLTOOL}" \
703 $${target}); \
704 then true; else exit 1; fi; \
705 else true; fi; \
706 done
707 @target=`echo $@ | sed -e 's/^do-//'`; \
708 r=`pwd`; export r; \
709 srcroot=`cd $(srcdir); pwd`; export srcroot; \
710 $(SET_LIB_PATH) \
711 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
712 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
713 for flag in $(EXTRA_TARGET_FLAGS); do \
714 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
715 done; \
716 export AR AS CC CXX NM RANLIB DLLTOOL; \
717 if (cd $(TARGET_SUBDIR)/$$i; \
718 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
719 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
720 "RANLIB=$${RANLIB}" \
721 "DLLTOOL=$${DLLTOOL}" \
722 $${target}); \
723 then true; else exit 1; fi; \
724 else true; fi; \
725 done
726
727 # Here are the targets which correspond to the do-X targets.
728
729 .PHONY: info installcheck dvi install-info
730 .PHONY: clean distclean mostlyclean maintainer-clean realclean
731 .PHONY: local-clean local-distclean local-maintainer-clean
732 info: do-info
733 installcheck: do-installcheck
734 dvi: do-dvi
735
736 install-info: do-install-info dir.info
737 srcroot=`cd $(srcdir); pwd`; export srcroot; \
738 if [ -f dir.info ] ; then \
739 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
740 else true ; fi
741
742 local-clean:
743 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
744
745 local-distclean:
746 -rm -f Makefile config.status
747 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
748 rm -rf $(TARGET_SUBDIR); \
749 else true; fi
750
751 local-maintainer-clean:
752 @echo "This command is intended for maintainers to use;"
753 @echo "it deletes files that may require special tools to rebuild."
754
755 clean: do-clean local-clean
756 mostlyclean: do-mostlyclean local-clean
757 distclean: do-distclean local-clean local-distclean
758 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
759 maintainer-clean: local-distclean
760 realclean: maintainer-clean
761
762 # Check target.
763
764 .PHONY: check
765 check: $(CHECK_MODULES) \
766 $(CHECK_TARGET_MODULES) \
767 $(CHECK_X11_MODULES) \
768 check-gcc
769
770 # Installation targets.
771
772 .PHONY: install uninstall source-vault binary-vault vault-install
773 install: $(INSTALL_TARGET)
774
775 uninstall:
776 @echo "the uninstall target is not supported in this tree"
777
778 source-vault:
779 $(MAKE) -f ./release/Build-A-Release \
780 host=$(host_alias) source-vault
781
782 binary-vault:
783 $(MAKE) -f ./release/Build-A-Release \
784 host=$(host_alias) target=$(target_alias)
785
786 vault-install:
787 @if [ -f ./release/vault-install ] ; then \
788 ./release/vault-install $(host_alias) $(target_alias) ; \
789 else \
790 true ; \
791 fi
792
793 .PHONY: install.all
794 install.all: install-no-fixedincludes
795 @if [ -f ./gcc/Makefile ] ; then \
796 r=`pwd` ; export r ; \
797 $(SET_LIB_PATH) \
798 (cd ./gcc; \
799 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
800 else \
801 true ; \
802 fi
803
804 # install-no-fixedincludes is used because Cygnus can not distribute
805 # the fixed header files.
806 .PHONY: install-no-fixedincludes
807 install-no-fixedincludes: \
808 install-dirs \
809 $(INSTALL_MODULES) \
810 $(INSTALL_TARGET_MODULES) \
811 $(INSTALL_X11_MODULES) \
812 gcc-no-fixedincludes
813
814 # Install the gcc headers files, but not the fixed include files,
815 # which Cygnus is not allowed to distribute. This rule is very
816 # dependent on the workings of the gcc Makefile.in.
817 .PHONY: gcc-no-fixedincludes
818 gcc-no-fixedincludes:
819 @if [ -f ./gcc/Makefile ]; then \
820 rm -rf gcc/tmp-include; \
821 mv gcc/include gcc/tmp-include 2>/dev/null; \
822 mkdir gcc/include; \
823 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
824 touch gcc/stmp-fixinc gcc/include/fixed; \
825 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
826 r=`pwd`; export r; \
827 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
828 $(SET_LIB_PATH) \
829 (cd ./gcc; \
830 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
831 rm -rf gcc/include; \
832 mv gcc/tmp-include gcc/include 2>/dev/null; \
833 else true; fi
834
835 # This rule is used to build the modules which use FLAGS_TO_PASS. To
836 # build a target all-X means to cd to X and make all.
837 #
838 # all-gui, and all-libproc are handled specially because
839 # they are still experimental, and if they fail to build, that
840 # shouldn't stop "make all".
841 .PHONY: $(ALL_MODULES) all-gui all-libproc
842 $(ALL_MODULES) all-gui all-libproc:
843 @dir=`echo $@ | sed -e 's/all-//'`; \
844 if [ -f ./$${dir}/Makefile ] ; then \
845 r=`pwd`; export r; \
846 srcroot=`cd $(srcdir); pwd`; export srcroot; \
847 $(SET_LIB_PATH) \
848 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
849 else \
850 true; \
851 fi
852
853 # These rules are used to check the modules which use FLAGS_TO_PASS.
854 # To build a target check-X means to cd to X and make check. Some
855 # modules are only tested in a native toolchain.
856
857 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
858 $(NATIVE_CHECK_MODULES):
859 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
860 dir=`echo $@ | sed -e 's/check-//'`; \
861 if [ -f ./$${dir}/Makefile ] ; then \
862 r=`pwd`; export r; \
863 srcroot=`cd $(srcdir); pwd`; export srcroot; \
864 $(SET_LIB_PATH) \
865 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
866 else \
867 true; \
868 fi; \
869 fi
870
871 $(CROSS_CHECK_MODULES):
872 @dir=`echo $@ | sed -e 's/check-//'`; \
873 if [ -f ./$${dir}/Makefile ] ; then \
874 r=`pwd`; export r; \
875 srcroot=`cd $(srcdir); pwd`; export srcroot; \
876 $(SET_LIB_PATH) \
877 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
878 else \
879 true; \
880 fi
881
882 # This rule is used to install the modules which use FLAGS_TO_PASS.
883 # To build a target install-X means to cd to X and make install.
884 .PHONY: $(INSTALL_MODULES)
885 $(INSTALL_MODULES): install-dirs
886 @dir=`echo $@ | sed -e 's/install-//'`; \
887 if [ -f ./$${dir}/Makefile ] ; then \
888 r=`pwd`; export r; \
889 srcroot=`cd $(srcdir); pwd`; export srcroot; \
890 $(SET_LIB_PATH) \
891 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
892 else \
893 true; \
894 fi
895
896 # This rule is used to configure the modules which are built with the
897 # target tools.
898 .PHONY: $(CONFIGURE_TARGET_MODULES)
899 $(CONFIGURE_TARGET_MODULES):
900 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
901 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
902 true; \
903 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
904 if [ -d $(srcdir)/$${dir} ]; then \
905 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
906 r=`pwd`; export r; \
907 srcroot=`cd $(srcdir); pwd`; export srcroot; \
908 $(SET_LIB_PATH) \
909 AR="$(AR_FOR_TARGET)"; export AR; \
910 AS="$(AS_FOR_TARGET)"; export AS; \
911 CC="$(CC_FOR_TARGET)"; export CC; \
912 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
913 CXX="$(CXX_FOR_TARGET)"; export CXX; \
914 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
915 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
916 LD="$(LD_FOR_TARGET)"; export LD; \
917 NM="$(NM_FOR_TARGET)"; export NM; \
918 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
919 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
920 cd $(TARGET_SUBDIR)/$${dir}; \
921 case $(srcdir) in \
922 /*) \
923 topdir=$(srcdir) ;; \
924 *) \
925 case "$(TARGET_SUBDIR)" in \
926 .) topdir="../$(srcdir)" ;; \
927 *) topdir="../../$(srcdir)" ;; \
928 esac ;; \
929 esac; \
930 if [ "$(srcdir)" = "." ] ; then \
931 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
932 if $(SHELL) $${srcroot}/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
933 if [ -f Makefile ]; then \
934 if $(MAKE) distclean; then \
935 true; \
936 else \
937 exit 1; \
938 fi; \
939 else \
940 true; \
941 fi; \
942 else \
943 exit 1; \
944 fi; \
945 else \
946 true; \
947 fi; \
948 srcdiroption="--srcdir=."; \
949 libsrcdir="."; \
950 else \
951 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
952 libsrcdir="$${srcroot}/$${dir}"; \
953 fi; \
954 if [ -f $${libsrcdir}/configure ] ; then \
955 $(SHELL) $${libsrcdir}/configure \
956 $(CONFIG_ARGUMENTS) $${srcdiroption} \
957 --with-target-subdir="$(TARGET_SUBDIR)"; \
958 else \
959 $(SHELL) $${srcroot}/configure \
960 $(CONFIG_ARGUMENTS) $${srcdiroption} \
961 --with-target-subdir="$(TARGET_SUBDIR)"; \
962 fi; \
963 else \
964 true; \
965 fi; \
966 else \
967 true; \
968 fi
969
970 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
971 # To build a target all-X means to cd to X and make all.
972 .PHONY: $(ALL_TARGET_MODULES)
973 $(ALL_TARGET_MODULES):
974 @dir=`echo $@ | sed -e 's/all-target-//'`; \
975 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
976 r=`pwd`; export r; \
977 srcroot=`cd $(srcdir); pwd`; export srcroot; \
978 $(SET_LIB_PATH) \
979 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
980 else \
981 true; \
982 fi
983
984 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
985 # To build a target install-X means to cd to X and make install.
986 .PHONY: $(CHECK_TARGET_MODULES)
987 $(CHECK_TARGET_MODULES):
988 @dir=`echo $@ | sed -e 's/check-target-//'`; \
989 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
990 r=`pwd`; export r; \
991 srcroot=`cd $(srcdir); pwd`; export srcroot; \
992 $(SET_LIB_PATH) \
993 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
994 else \
995 true; \
996 fi
997
998 # This rule is used to install the modules which use
999 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1000 # and make install.
1001 .PHONY: $(INSTALL_TARGET_MODULES)
1002 $(INSTALL_TARGET_MODULES): install-dirs
1003 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1004 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1005 r=`pwd`; export r; \
1006 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1007 $(SET_LIB_PATH) \
1008 (cd $(TARGET_SUBDIR)/$${dir}; \
1009 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1010 else \
1011 true; \
1012 fi
1013
1014 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1015 # To build a target all-X means to cd to X and make all.
1016 .PHONY: $(ALL_X11_MODULES)
1017 $(ALL_X11_MODULES):
1018 @dir=`echo $@ | sed -e 's/all-//'`; \
1019 if [ -f ./$${dir}/Makefile ] ; then \
1020 r=`pwd`; export r; \
1021 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1022 $(SET_LIB_PATH) \
1023 (cd $${dir}; \
1024 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1025 else \
1026 true; \
1027 fi
1028
1029 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1030 # To build a target check-X means to cd to X and make all.
1031 .PHONY: $(CHECK_X11_MODULES)
1032 $(CHECK_X11_MODULES):
1033 @dir=`echo $@ | sed -e 's/check-//'`; \
1034 if [ -f ./$${dir}/Makefile ] ; then \
1035 r=`pwd`; export r; \
1036 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1037 $(SET_LIB_PATH) \
1038 (cd $${dir}; \
1039 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1040 else \
1041 true; \
1042 fi
1043
1044 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1045 # To build a target install-X means to cd to X and make install.
1046 .PHONY: $(INSTALL_X11_MODULES)
1047 $(INSTALL_X11_MODULES):
1048 @dir=`echo $@ | sed -e 's/install-//'`; \
1049 if [ -f ./$${dir}/Makefile ] ; then \
1050 r=`pwd`; export r; \
1051 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1052 $(SET_LIB_PATH) \
1053 (cd $${dir}; \
1054 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1055 else \
1056 true; \
1057 fi
1058
1059 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1060 .PHONY: all-gcc
1061 all-gcc:
1062 @if [ -f ./gcc/Makefile ] ; then \
1063 r=`pwd`; export r; \
1064 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1065 $(SET_LIB_PATH) \
1066 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1067 else \
1068 true; \
1069 fi
1070
1071 .PHONY: all-bootstrap
1072 all-bootstrap:
1073 @if [ -f ./gcc/Makefile ] ; then \
1074 r=`pwd`; export r; \
1075 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1076 $(SET_LIB_PATH) \
1077 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1078 else \
1079 true; \
1080 fi
1081
1082 .PHONY: check-gcc
1083 check-gcc:
1084 @if [ -f ./gcc/Makefile ] ; then \
1085 r=`pwd`; export r; \
1086 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1087 $(SET_LIB_PATH) \
1088 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1089 else \
1090 true; \
1091 fi
1092
1093 .PHONY: install-gcc
1094 install-gcc:
1095 @if [ -f ./gcc/Makefile ] ; then \
1096 r=`pwd`; export r; \
1097 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1098 $(SET_LIB_PATH) \
1099 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1100 else \
1101 true; \
1102 fi
1103
1104
1105 # EXPERIMENTAL STUFF
1106 # This rule is used to install the modules which use FLAGS_TO_PASS.
1107 # To build a target install-X means to cd to X and make install.
1108 .PHONY: install-dosrel
1109 install-dosrel: install-dirs info
1110 @dir=`echo $@ | sed -e 's/install-//'`; \
1111 if [ -f ./$${dir}/Makefile ] ; then \
1112 r=`pwd`; export r; \
1113 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1114 $(SET_LIB_PATH) \
1115 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1116 else \
1117 true; \
1118 fi
1119
1120 install-dosrel-fake:
1121
1122
1123 # This is a list of inter-dependencies among modules.
1124 all-autoconf: all-m4
1125 all-bfd:
1126 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
1127 all-byacc:
1128 all-cvs:
1129 all-dejagnu: all-tcl all-expect all-tk
1130 all-diff: all-libiberty
1131 all-emacs:
1132 all-emacs19: all-byacc
1133 all-etc:
1134 configure-target-examples: $(ALL_GCC)
1135 all-target-examples: configure-target-examples
1136 all-expect: all-tcl all-tk
1137 all-fileutils: all-libiberty
1138 all-find:
1139 all-flex: all-libiberty all-byacc
1140 all-gas: all-libiberty all-opcodes all-bfd
1141 all-gash: all-tcl
1142 all-gawk:
1143 ALL_GCC = all-gcc
1144 all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld
1145 all-bootstrap: all-libiberty all-byacc all-binutils all-gas all-ld
1146 GDB_TK = all-tk all-tcl
1147 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1148 all-gprof: all-libiberty all-bfd all-opcodes
1149 all-grep: all-libiberty
1150 all-grez: all-libiberty all-bfd all-opcodes
1151 all-gui: all-gdb all-libproc all-target-librx
1152 all-guile:
1153 all-gzip: all-libiberty
1154 all-hello: all-libiberty
1155 all-indent:
1156 all-ispell: all-emacs19
1157 all-ld: all-libiberty all-bfd all-opcodes all-byacc all-flex
1158 configure-target-libg++: $(ALL_GCC) configure-target-librx
1159 all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
1160 configure-target-libgloss: $(ALL_GCC)
1161 all-target-libgloss: configure-target-libgloss configure-target-newlib
1162 configure-target-libio: $(ALL_GCC)
1163 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1164 all-libiberty:
1165 configure-target-librx: $(ALL_GCC) configure-target-newlib
1166 all-target-librx: configure-target-librx
1167 configure-target-libstdc++: $(ALL_GCC)
1168 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1169 all-m4: all-libiberty
1170 all-make: all-libiberty
1171 all-mmalloc:
1172 configure-target-newlib: $(ALL_GCC)
1173 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1174 all-opcodes: all-bfd all-libiberty
1175 all-patch: all-libiberty
1176 all-perl:
1177 all-prms: all-libiberty
1178 all-rcs:
1179 all-readline:
1180 all-recode: all-libiberty
1181 all-sed: all-libiberty
1182 all-send-pr: all-prms
1183 all-shellutils:
1184 all-sim: all-libiberty all-bfd all-opcodes
1185 all-tar: all-libiberty
1186 all-tcl:
1187 all-tclX: all-tcl all-tk
1188 all-tk: all-tcl
1189 all-texinfo: all-libiberty
1190 all-textutils:
1191 all-tgas: all-libiberty all-bfd all-opcodes
1192 all-time:
1193 all-wdiff:
1194 all-target-winsup: all-target-newlib all-target-libiberty configure-target-winsup
1195 configure-target-winsup: configure-target-newlib
1196 all-uudecode: all-libiberty
1197 configure-target-libiberty: $(ALL_GCC)
1198 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1199 all-target: $(ALL_TARGET_MODULES)
1200 install-target: $(INSTALL_TARGET_MODULES)
1201
1202 ### other supporting targets
1203
1204 MAKEDIRS= \
1205 $(prefix) \
1206 $(exec_prefix) \
1207 $(tooldir)
1208
1209 .PHONY: install-dirs
1210 install-dirs:
1211 @for i in $(MAKEDIRS) ; do \
1212 echo Making $$i... ; \
1213 parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
1214 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1215 if [ ! -d $$i ] ; then \
1216 if mkdir $$i ; then \
1217 true ; \
1218 else \
1219 exit 1 ; \
1220 fi ; \
1221 else \
1222 true ; \
1223 fi ; \
1224 done
1225
1226
1227 dir.info: do-install-info
1228 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1229 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1230 mv -f dir.info.new dir.info ; \
1231 else true ; \
1232 fi
1233
1234 dist:
1235 @echo "Building a full distribution of this tree isn't done"
1236 @echo "via 'make dist'. Check out the etc/ subdirectory"
1237
1238 etags tags: TAGS
1239
1240 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1241 # ability to use several tags files at once, so there is probably no need
1242 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1243 # (if we felt like it) have this Makefile write a piece of elisp which
1244 # the user could load to tell emacs19 where all the TAGS files we just
1245 # built are.
1246 TAGS: do-TAGS
1247
1248 # with the gnu make, this is done automatically.
1249
1250 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1251 $(SHELL) ./config.status
1252
1253 #
1254 # Support for building net releases
1255
1256 # Files in devo used in any net release.
1257 # ChangeLog omitted because it may refer to files which are not in this
1258 # distribution (perhaps it would be better to include it anyway).
1259 DEVO_SUPPORT= README Makefile.in configure configure.in \
1260 config.guess config.sub config move-if-change \
1261 mpw-README mpw-build.in mpw-config.in mpw-configure \
1262 COPYING COPYING.LIB install.sh config-ml.in symlink-tree
1263
1264 # Files in devo/etc used in any net release.
1265 # ChangeLog omitted because it may refer to files which are not in this
1266 # distribution (perhaps it would be better to include it anyway).
1267 ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
1268 configure.texi standards.texi make-stds.texi \
1269 configure.info* standards.info* cfg-paper.info*
1270
1271 # When you use `make setup-dirs' or `make taz' you should always redefine
1272 # this macro.
1273 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1274 # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1275 DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in
1276
1277 .PHONY: taz
1278
1279 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1280 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1281 # Make sure "diststuff" files get built properly.
1282 for f in $(DISTBISONFILES) ; do \
1283 if [ -r $$f ]; then \
1284 sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \
1285 mv -f tmp $$f ; \
1286 else true; fi ; \
1287 done
1288 # Take out texinfo from a few places; make simple BISON=bison line.
1289 sed -e '/^all\.normal: /s/\all-texinfo //' \
1290 -e '/^ install-texinfo /d' \
1291 -e '/^BISON = /,/^$$/d' \
1292 -e '/^# BISON:/s/.*/BISON = bison -y/' \
1293 <Makefile.in >tmp
1294 mv -f tmp Makefile.in
1295 #
1296 $(start-sanitize-Sanitize)
1297 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1298 $(end-sanitize-Sanitize)
1299 ./configure sun4
1300 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1301 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1302 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1303 # Make links, and run "make diststuff" or "make info" when needed.
1304 rm -rf proto-toplev ; mkdir proto-toplev
1305 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1306 for d in $$dirs ; do \
1307 if [ -d $$d ]; then \
1308 if [ ! -f $$d/Makefile ] ; then true ; \
1309 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1310 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1311 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1312 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1313 fi ; \
1314 if [ -d $$d/proto-$$d.dir ]; then \
1315 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1316 else \
1317 ln -s ../$$d proto-toplev/$$d ; \
1318 fi ; \
1319 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1320 done
1321 cd etc ; $(MAKE) info
1322 $(MAKE) distclean
1323 #
1324 mkdir proto-toplev/etc
1325 (cd proto-toplev/etc; \
1326 for i in $(ETC_SUPPORT); do \
1327 ln -s ../../etc/$$i . ; \
1328 done)
1329 #
1330 # Take out texinfo from configurable dirs
1331 rm proto-toplev/configure.in
1332 sed -e '/^host_tools=/s/texinfo //' \
1333 <configure.in >proto-toplev/configure.in
1334 #
1335 mkdir proto-toplev/texinfo
1336 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1337 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1338 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1339 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
1340 chmod og=u `find . -print`
1341 (VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1342 echo "==> Making $(TOOL)-$$VER.tar.gz"; \
1343 rm -f $(TOOL)-$$VER; ln -s proto-toplev $(TOOL)-$$VER; \
1344 tar cfh - $(TOOL)-$$VER \
1345 | $(GZIPPROG) -v -9 >$(TOOL)-$$VER.tar.gz )
1346
1347 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1348 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1349
1350 .PHONY: gas.tar.gz
1351 GAS_SUPPORT_DIRS= bfd include libiberty opcodes
1352 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1353 $(MAKE) -f Makefile.in taz TOOL=gas \
1354 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1355
1356 # The FSF "binutils" release includes gprof and ld.
1357 .PHONY: binutils.tar.gz
1358 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof
1359 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1360 $(MAKE) -f Makefile.in taz TOOL=binutils \
1361 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1362
1363 .PHONY: gas+binutils.tar.gz
1364 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1365 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1366 $(MAKE) -f Makefile.in taz TOOL=gas \
1367 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1368
1369 .PHONY: libg++.tar.gz
1370 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1371 libg++.tar.gz: $(DIST_SUPPORT) libg++
1372 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1373 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1374
1375 GNATS_SUPPORT_DIRS=include libiberty send-pr
1376 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1377 $(MAKE) -f Makefile.in taz TOOL=gnats \
1378 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1379
1380 .PHONY: gdb.tar.gz
1381 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1382 GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1383 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1384 $(MAKE) -f Makefile.in taz TOOL=gdb \
1385 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1386
1387 .PHONY: newlib.tar.gz
1388 NEWLIB_SUPPORT_DIRS=libgloss
1389 # taz configures for the sun4 target which won't configure newlib.
1390 # We need newlib configured so that the .info files are made.
1391 # Unfortunately, it is not enough to just configure newlib separately:
1392 # taz will build the .info files but since SUBDIRS won't contain newlib,
1393 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1394 # used in building the .info files, eg: *.def, *.ref).
1395 # The problem isn't solvable however without a lot of extra work because
1396 # target libraries are built in subdir $(target_alias) which gets nuked during
1397 # the make distclean. For now punt on the issue of shipping newlib info files
1398 # with newlib net releases and wait for a day when some native target (sun4?)
1399 # supports newlib (if only minimally).
1400 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1401 $(MAKE) -f Makefile.in taz TOOL=newlib \
1402 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1403 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1404
1405 .NOEXPORT:
1406 MAKEOVERRIDES=
1407
1408 # start-sanitize-chill
1409 ## This is ugly, but I don't want GNU make to put these variables in
1410 ## the environment. Older makes will see this as a set of targets
1411 ## with no dependencies and no actions.
1412 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1413 # end-sanitize-chill
1414
1415 # end of Makefile.in
This page took 0.059913 seconds and 4 git commands to generate.