06d6de26428d25734285b41e81a493a2d928d016
[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)/share
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 GDB_NLM_DEPS =
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 LIBCFLAGS = $(CFLAGS)
70 CFLAGS_FOR_TARGET = $(CFLAGS)
71 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
72 PICFLAG =
73 PICFLAG_FOR_TARGET =
74
75 # start-sanitize-chill
76 CHILLFLAGS = $(CFLAGS)
77 CHILL_LIB = -lchill
78 # end-sanitize-chill
79 CXX = gcc
80
81 # Use -O2 to stress test the compiler.
82 CXXFLAGS = -g -O2
83 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
84 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
85 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
86
87 RANLIB = ranlib
88
89 DLLTOOL = dlltool
90
91 NM = nm
92 # Not plain GZIP, since gzip looks there for extra command-line options.
93 GZIPPROG = gzip
94
95 # These values are substituted by configure.
96 DEFAULT_YACC = yacc
97 DEFAULT_LEX = lex
98
99 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
100 BISON = `if [ -f $$r/byacc/byacc ] ; \
101 then echo $$r/byacc/byacc ; \
102 else echo ${DEFAULT_YACC} ; \
103 fi`
104
105 LEX = `if [ -f $$r/flex/flex ] ; \
106 then echo $$r/flex/flex ; \
107 else echo ${DEFAULT_LEX} ; fi`
108
109 M4 = `if [ -f $$r/m4/m4 ] ; \
110 then echo $$r/m4/m4 ; \
111 else echo m4 ; fi`
112
113 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
114 then echo $$r/texinfo/makeinfo/makeinfo ; \
115 else echo makeinfo ; fi`
116
117 # This just becomes part of the MAKEINFO definition passed down to
118 # sub-makes. It lets flags be given on the command line while still
119 # using the makeinfo from the object tree.
120 MAKEINFOFLAGS =
121
122 EXPECT = `if [ -f $$r/expect/expect ] ; \
123 then echo $$r/expect/expect ; \
124 else echo expect ; fi`
125
126 RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
127 then echo $${srcroot}/dejagnu/runtest ; \
128 else echo runtest ; fi`
129
130
131 # compilers to use to create programs which must be run in the build
132 # environment.
133 CC_FOR_BUILD = $(CC)
134 CXX_FOR_BUILD = $(CXX)
135
136 SUBDIRS = "this is set via configure, don't edit this"
137 OTHERS =
138
139 # This is set by the configure script to the list of directories which
140 # should be built using the target tools.
141 TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
142
143 # Target libraries are put under this directory:
144 # Changed by configure to $(target_alias) if cross.
145 TARGET_SUBDIR = .
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-apache \
414 all-autoconf \
415 all-bash \
416 all-bfd \
417 all-binutils \
418 all-byacc \
419 all-cvs \
420 all-dejagnu \
421 all-diff \
422 all-dosutils \
423 all-etc \
424 all-fileutils \
425 all-find \
426 all-flex \
427 all-gas \
428 all-gawk \
429 all-gprof \
430 all-grep \
431 all-grez \
432 all-gzip \
433 all-hello \
434 all-indent \
435 all-inet \
436 all-ispell \
437 all-ld \
438 all-libiberty \
439 all-m4 \
440 all-make \
441 all-mmalloc \
442 all-opcodes \
443 all-patch \
444 all-perl \
445 all-prms \
446 all-rcs \
447 all-readline \
448 all-release \
449 all-recode \
450 all-sed \
451 all-send-pr \
452 all-shellutils \
453 all-sim \
454 all-tar \
455 all-tcl \
456 all-texinfo \
457 all-textutils \
458 all-tgas \
459 all-time \
460 all-uudecode \
461 all-wdiff
462
463 # This is a list of the check targets for all of the modules which are
464 # compiled using $(FLAGS_TO_PASS).
465 #
466 # The list is in two parts. The first lists those tools which
467 # are tested as part of the host's native tool-chain, and not
468 # tested in a cross configuration.
469 NATIVE_CHECK_MODULES = \
470 check-byacc \
471 check-flex
472
473 CROSS_CHECK_MODULES = \
474 check-apache \
475 check-autoconf \
476 check-bash \
477 check-bfd \
478 check-binutils \
479 check-cvs \
480 check-dejagnu \
481 check-diff \
482 check-etc \
483 check-fileutils \
484 check-find \
485 check-gas \
486 check-gawk \
487 check-gprof \
488 check-grep \
489 check-gzip \
490 check-hello \
491 check-indent \
492 check-inet \
493 check-ispell \
494 check-ld \
495 check-libiberty \
496 check-m4 \
497 check-make \
498 check-mmcheckoc \
499 check-opcodes \
500 check-patch \
501 check-perl \
502 check-prms \
503 check-rcs \
504 check-readline \
505 check-recode \
506 check-sed \
507 check-send-pr \
508 check-shellutils \
509 check-sim \
510 check-tar \
511 check-tcl \
512 check-texinfo \
513 check-textutils \
514 check-tgas \
515 check-time \
516 check-uudecode \
517 check-wdiff
518
519 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
520
521 # This is a list of the install targets for all of the modules which are
522 # compiled using $(FLAGS_TO_PASS).
523 INSTALL_MODULES = \
524 install-apache \
525 install-autoconf \
526 install-bash \
527 install-bfd \
528 install-binutils \
529 install-byacc \
530 install-cvs \
531 install-dejagnu \
532 install-diff \
533 install-dosutils \
534 install-etc \
535 install-fileutils \
536 install-find \
537 install-flex \
538 install-gas \
539 install-gawk \
540 install-gprof \
541 install-grep \
542 install-grez \
543 install-gzip \
544 install-hello \
545 install-indent \
546 install-inet \
547 install-ispell \
548 install-ld \
549 install-libiberty \
550 install-m4 \
551 install-make \
552 install-mmalloc \
553 install-opcodes \
554 install-patch \
555 install-perl \
556 install-prms \
557 install-rcs \
558 install-readline \
559 install-recode \
560 install-sed \
561 install-send-pr \
562 install-shellutils \
563 install-sim \
564 install-tar \
565 install-tcl \
566 install-texinfo \
567 install-textutils \
568 install-tgas \
569 install-time \
570 install-uudecode \
571 install-wdiff
572
573 # This is a list of the targets for all of the modules which are compiled
574 # using $(X11_FLAGS_TO_PASS).
575 ALL_X11_MODULES = \
576 all-emacs \
577 all-emacs19 \
578 all-gdb \
579 all-expect \
580 all-gash \
581 all-guile \
582 all-tclX \
583 all-tk
584
585 # This is a list of the check targets for all of the modules which are
586 # compiled using $(X11_FLAGS_TO_PASS).
587 CHECK_X11_MODULES = \
588 check-emacs \
589 check-gdb \
590 check-guile \
591 check-expect \
592 check-gash \
593 check-tclX \
594 check-tk
595
596 # This is a list of the install targets for all the modules which are
597 # compiled using $(X11_FLAGS_TO_PASS).
598 INSTALL_X11_MODULES = \
599 install-emacs \
600 install-emacs19 \
601 install-gdb \
602 install-guile \
603 install-expect \
604 install-gash \
605 install-tclX \
606 install-tk
607
608 # This is a list of the targets for all of the modules which are compiled
609 # using $(TARGET_FLAGS_TO_PASS).
610 ALL_TARGET_MODULES = \
611 all-target-libio \
612 all-target-libstdc++ \
613 all-target-librx \
614 all-target-libg++ \
615 all-target-newlib \
616 all-target-winsup \
617 all-target-libgloss \
618 all-target-libiberty \
619 all-target-examples
620
621 # This is a list of the configure targets for all of the modules which
622 # are compiled using the target tools.
623 CONFIGURE_TARGET_MODULES = \
624 configure-target-libio \
625 configure-target-libstdc++ \
626 configure-target-librx \
627 configure-target-libg++ \
628 configure-target-newlib \
629 configure-target-winsup \
630 configure-target-libgloss \
631 configure-target-libiberty \
632 configure-target-examples
633
634 # This is a list of the check targets for all of the modules which are
635 # compiled using $(TARGET_FLAGS_TO_PASS).
636 CHECK_TARGET_MODULES = \
637 check-target-libio \
638 check-target-libstdc++ \
639 check-target-libg++ \
640 check-target-newlib \
641 check-target-winsup \
642 check-target-libiberty
643
644 # This is a list of the install targets for all of the modules which are
645 # compiled using $(TARGET_FLAGS_TO_PASS).
646 INSTALL_TARGET_MODULES = \
647 install-target-libio \
648 install-target-libstdc++ \
649 install-target-libg++ \
650 install-target-newlib \
651 install-target-winsup \
652 install-target-libgloss \
653 install-target-libiberty
654
655 # This is a list of the targets for which we can do a clean-{target}.
656 CLEAN_MODULES = \
657 clean-apache \
658 clean-autoconf \
659 clean-bash \
660 clean-bfd \
661 clean-binutils \
662 clean-byacc \
663 clean-cvs \
664 clean-dejagnu \
665 clean-diff \
666 clean-dosutils \
667 clean-etc \
668 clean-fileutils \
669 clean-find \
670 clean-flex \
671 clean-gas \
672 clean-gawk \
673 clean-gprof \
674 clean-grep \
675 clean-grez \
676 clean-gzip \
677 clean-hello \
678 clean-indent \
679 clean-inet \
680 clean-ispell \
681 clean-ld \
682 clean-libiberty \
683 clean-m4 \
684 clean-make \
685 clean-mmalloc \
686 clean-opcodes \
687 clean-patch \
688 clean-perl \
689 clean-prms \
690 clean-rcs \
691 clean-readline \
692 clean-release \
693 clean-recode \
694 clean-sed \
695 clean-send-pr \
696 clean-shellutils \
697 clean-sim \
698 clean-tar \
699 clean-tcl \
700 clean-texinfo \
701 clean-textutils \
702 clean-tgas \
703 clean-time \
704 clean-uudecode \
705 clean-wdiff
706
707 # All of the target modules that can be cleaned
708 CLEAN_TARGET_MODULES = \
709 clean-target-libio \
710 clean-target-libstdc++ \
711 clean-target-librx \
712 clean-target-libg++ \
713 clean-target-newlib \
714 clean-target-winsup \
715 clean-target-libgloss \
716 clean-target-libiberty \
717 clean-target-examples
718
719 # All of the x11 modules that can be cleaned
720 CLEAN_X11_MODULES = \
721 clean-emacs \
722 clean-emacs19 \
723 clean-gdb \
724 clean-expect \
725 clean-gash \
726 clean-guile \
727 clean-tclX \
728 clean-tk
729
730 # The first rule in the file had better be this one. Don't put any above it.
731 all: all.normal
732 .PHONY: all
733
734 # The target built for a native build.
735 .PHONY: all.normal
736 all.normal: \
737 $(ALL_MODULES) \
738 $(ALL_TARGET_MODULES) \
739 $(ALL_X11_MODULES) \
740 all-gcc
741
742 # Do a target for all the subdirectories. A ``make do-X'' will do a
743 # ``make X'' in all subdirectories (because, in general, there is a
744 # dependency (below) of X upon do-X, a ``make X'' will also do this,
745 # but it may do additional work as well).
746 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
747 # because it is so large that it can easily overflow the command line
748 # length limit on some systems.
749 DO_X = \
750 do-clean \
751 do-distclean \
752 do-dvi \
753 do-info \
754 do-install-info \
755 do-installcheck \
756 do-mostlyclean \
757 do-maintainer-clean \
758 do-TAGS
759 .PHONY: $(DO_X)
760 $(DO_X):
761 @target=`echo $@ | sed -e 's/^do-//'`; \
762 r=`pwd`; export r; \
763 srcroot=`cd $(srcdir); pwd`; export srcroot; \
764 $(SET_LIB_PATH) \
765 for i in $(SUBDIRS) -dummy-; do \
766 if [ -f ./$$i/Makefile ]; then \
767 case $$i in \
768 gcc) \
769 for flag in $(EXTRA_GCC_FLAGS); do \
770 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
771 done; \
772 ;; \
773 *) \
774 for flag in $(EXTRA_HOST_FLAGS); do \
775 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
776 done; \
777 ;; \
778 esac ; \
779 export AR AS CC CXX NM RANLIB DLLTOOL; \
780 if (cd ./$$i; \
781 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
782 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
783 "RANLIB=$${RANLIB}" \
784 "DLLTOOL=$${DLLTOOL}" \
785 $${target}); \
786 then true; else exit 1; fi; \
787 else true; fi; \
788 done
789 @target=`echo $@ | sed -e 's/^do-//'`; \
790 r=`pwd`; export r; \
791 srcroot=`cd $(srcdir); pwd`; export srcroot; \
792 $(SET_LIB_PATH) \
793 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
794 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
795 for flag in $(EXTRA_TARGET_FLAGS); do \
796 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
797 done; \
798 export AR AS CC CXX NM RANLIB DLLTOOL; \
799 if (cd $(TARGET_SUBDIR)/$$i; \
800 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
801 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
802 "RANLIB=$${RANLIB}" \
803 "DLLTOOL=$${DLLTOOL}" \
804 $${target}); \
805 then true; else exit 1; fi; \
806 else true; fi; \
807 done
808
809 # Here are the targets which correspond to the do-X targets.
810
811 .PHONY: info installcheck dvi install-info
812 .PHONY: clean distclean mostlyclean maintainer-clean realclean
813 .PHONY: local-clean local-distclean local-maintainer-clean
814 info: do-info
815 installcheck: do-installcheck
816 dvi: do-dvi
817
818 install-info: do-install-info dir.info
819 srcroot=`cd $(srcdir); pwd`; export srcroot; \
820 if [ -f dir.info ] ; then \
821 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
822 else true ; fi
823
824 local-clean:
825 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
826
827 local-distclean:
828 -rm -f Makefile config.status
829 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
830 rm -rf $(TARGET_SUBDIR); \
831 else true; fi
832
833 local-maintainer-clean:
834 @echo "This command is intended for maintainers to use;"
835 @echo "it deletes files that may require special tools to rebuild."
836
837 clean: do-clean local-clean
838 mostlyclean: do-mostlyclean local-clean
839 distclean: do-distclean local-clean local-distclean
840 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
841 maintainer-clean: local-distclean
842 realclean: maintainer-clean
843
844 # This rule is used to clean specific modules.
845 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
846 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
847 @dir=`echo $@ | sed -e 's/clean-//'`; \
848 if [ -f ./$${dir}/Makefile ] ; then \
849 r=`pwd`; export r; \
850 srcroot=`cd $(srcdir); pwd`; export srcroot; \
851 $(SET_LIB_PATH) \
852 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
853 else \
854 true; \
855 fi
856
857 .PHONY: $(CLEAN_TARGET_MODULES)
858 $(CLEAN_TARGET_MODULES):
859 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
860 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
861 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
862 r=`pwd`; export r; \
863 srcroot=`cd $(srcdir); pwd`; export srcroot; \
864 $(SET_LIB_PATH) \
865 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
866 else \
867 true; \
868 fi
869
870 clean-target: $(CLEAN_TARGET_MODULES)
871
872 # Check target.
873
874 .PHONY: check
875 check: $(CHECK_MODULES) \
876 $(CHECK_TARGET_MODULES) \
877 $(CHECK_X11_MODULES) \
878 check-gcc
879
880 # Installation targets.
881
882 .PHONY: install uninstall source-vault binary-vault vault-install
883 install: $(INSTALL_TARGET)
884
885 uninstall:
886 @echo "the uninstall target is not supported in this tree"
887
888 source-vault:
889 $(MAKE) -f ./release/Build-A-Release \
890 host=$(host_alias) source-vault
891
892 binary-vault:
893 $(MAKE) -f ./release/Build-A-Release \
894 host=$(host_alias) target=$(target_alias)
895
896 vault-install:
897 @if [ -f ./release/vault-install ] ; then \
898 ./release/vault-install $(host_alias) $(target_alias) ; \
899 else \
900 true ; \
901 fi
902
903 .PHONY: install.all
904 install.all: install-no-fixedincludes
905 @if [ -f ./gcc/Makefile ] ; then \
906 r=`pwd` ; export r ; \
907 $(SET_LIB_PATH) \
908 (cd ./gcc; \
909 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
910 else \
911 true ; \
912 fi
913
914 # inet-install is used because the I*Net wants DejaGNU installed but
915 # not built. Similarly, gzip is built but not installed.
916 inet-install:
917 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
918
919 # install-no-fixedincludes is used because Cygnus can not distribute
920 # the fixed header files.
921 .PHONY: install-no-fixedincludes
922 install-no-fixedincludes: \
923 install-dirs \
924 $(INSTALL_MODULES) \
925 $(INSTALL_TARGET_MODULES) \
926 $(INSTALL_X11_MODULES) \
927 gcc-no-fixedincludes
928
929 # Install the gcc headers files, but not the fixed include files,
930 # which Cygnus is not allowed to distribute. This rule is very
931 # dependent on the workings of the gcc Makefile.in.
932 .PHONY: gcc-no-fixedincludes
933 gcc-no-fixedincludes:
934 @if [ -f ./gcc/Makefile ]; then \
935 rm -rf gcc/tmp-include; \
936 mv gcc/include gcc/tmp-include 2>/dev/null; \
937 mkdir gcc/include; \
938 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
939 touch gcc/stmp-fixinc gcc/include/fixed; \
940 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
941 r=`pwd`; export r; \
942 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
943 $(SET_LIB_PATH) \
944 (cd ./gcc; \
945 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
946 rm -rf gcc/include; \
947 mv gcc/tmp-include gcc/include 2>/dev/null; \
948 else true; fi
949
950 # This rule is used to build the modules which use FLAGS_TO_PASS. To
951 # build a target all-X means to cd to X and make all.
952 #
953 # all-gui, and all-libproc are handled specially because
954 # they are still experimental, and if they fail to build, that
955 # shouldn't stop "make all".
956 .PHONY: $(ALL_MODULES) all-gui all-libproc
957 $(ALL_MODULES) all-gui all-libproc:
958 @dir=`echo $@ | sed -e 's/all-//'`; \
959 if [ -f ./$${dir}/Makefile ] ; then \
960 r=`pwd`; export r; \
961 srcroot=`cd $(srcdir); pwd`; export srcroot; \
962 $(SET_LIB_PATH) \
963 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
964 else \
965 true; \
966 fi
967
968 # These rules are used to check the modules which use FLAGS_TO_PASS.
969 # To build a target check-X means to cd to X and make check. Some
970 # modules are only tested in a native toolchain.
971
972 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
973 $(NATIVE_CHECK_MODULES):
974 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
975 dir=`echo $@ | sed -e 's/check-//'`; \
976 if [ -f ./$${dir}/Makefile ] ; then \
977 r=`pwd`; export r; \
978 srcroot=`cd $(srcdir); pwd`; export srcroot; \
979 $(SET_LIB_PATH) \
980 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
981 else \
982 true; \
983 fi; \
984 fi
985
986 $(CROSS_CHECK_MODULES):
987 @dir=`echo $@ | sed -e 's/check-//'`; \
988 if [ -f ./$${dir}/Makefile ] ; then \
989 r=`pwd`; export r; \
990 srcroot=`cd $(srcdir); pwd`; export srcroot; \
991 $(SET_LIB_PATH) \
992 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
993 else \
994 true; \
995 fi
996
997 # This rule is used to install the modules which use FLAGS_TO_PASS.
998 # To build a target install-X means to cd to X and make install.
999 .PHONY: $(INSTALL_MODULES)
1000 $(INSTALL_MODULES): install-dirs
1001 @dir=`echo $@ | sed -e 's/install-//'`; \
1002 if [ -f ./$${dir}/Makefile ] ; then \
1003 r=`pwd`; export r; \
1004 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1005 $(SET_LIB_PATH) \
1006 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1007 else \
1008 true; \
1009 fi
1010
1011 # This rule is used to configure the modules which are built with the
1012 # target tools.
1013 .PHONY: $(CONFIGURE_TARGET_MODULES)
1014 $(CONFIGURE_TARGET_MODULES):
1015 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1016 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1017 r=`pwd`; export r; \
1018 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1019 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1020 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1021 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1022 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1023 else \
1024 echo "Multilibs changed for $${dir}, reconfiguring"; \
1025 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1026 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1027 fi; \
1028 else \
1029 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1030 fi; \
1031 fi; \
1032 fi; exit 0 # break command into two pieces
1033 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1034 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1035 true; \
1036 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1037 if [ -d $(srcdir)/$${dir} ]; then \
1038 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1039 r=`pwd`; export r; \
1040 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1041 $(SET_LIB_PATH) \
1042 AR="$(AR_FOR_TARGET)"; export AR; \
1043 AS="$(AS_FOR_TARGET)"; export AS; \
1044 CC="$(CC_FOR_TARGET)"; export CC; \
1045 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1046 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1047 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1048 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1049 LD="$(LD_FOR_TARGET)"; export LD; \
1050 NM="$(NM_FOR_TARGET)"; export NM; \
1051 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1052 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1053 cd $(TARGET_SUBDIR)/$${dir}; \
1054 case $(srcdir) in \
1055 /*) \
1056 topdir=$(srcdir) ;; \
1057 *) \
1058 case "$(TARGET_SUBDIR)" in \
1059 .) topdir="../$(srcdir)" ;; \
1060 *) topdir="../../$(srcdir)" ;; \
1061 esac ;; \
1062 esac; \
1063 if [ "$(srcdir)" = "." ] ; then \
1064 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1065 if $(SHELL) $${srcroot}/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1066 if [ -f Makefile ]; then \
1067 if $(MAKE) distclean; then \
1068 true; \
1069 else \
1070 exit 1; \
1071 fi; \
1072 else \
1073 true; \
1074 fi; \
1075 else \
1076 exit 1; \
1077 fi; \
1078 else \
1079 true; \
1080 fi; \
1081 srcdiroption="--srcdir=."; \
1082 libsrcdir="."; \
1083 else \
1084 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1085 libsrcdir="$${srcroot}/$${dir}"; \
1086 fi; \
1087 if [ -f $${libsrcdir}/configure ] ; then \
1088 $(SHELL) $${libsrcdir}/configure \
1089 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1090 --with-target-subdir="$(TARGET_SUBDIR)"; \
1091 else \
1092 $(SHELL) $${srcroot}/configure \
1093 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1094 --with-target-subdir="$(TARGET_SUBDIR)"; \
1095 fi; \
1096 else \
1097 true; \
1098 fi; \
1099 else \
1100 true; \
1101 fi
1102
1103 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1104 # To build a target all-X means to cd to X and make all.
1105 .PHONY: $(ALL_TARGET_MODULES)
1106 $(ALL_TARGET_MODULES):
1107 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1108 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1109 r=`pwd`; export r; \
1110 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1111 $(SET_LIB_PATH) \
1112 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1113 else \
1114 true; \
1115 fi
1116
1117 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1118 # To build a target install-X means to cd to X and make install.
1119 .PHONY: $(CHECK_TARGET_MODULES)
1120 $(CHECK_TARGET_MODULES):
1121 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1122 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1123 r=`pwd`; export r; \
1124 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1125 $(SET_LIB_PATH) \
1126 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1127 else \
1128 true; \
1129 fi
1130
1131 # This rule is used to install the modules which use
1132 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1133 # and make install.
1134 .PHONY: $(INSTALL_TARGET_MODULES)
1135 $(INSTALL_TARGET_MODULES): install-dirs
1136 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1137 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1138 r=`pwd`; export r; \
1139 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1140 $(SET_LIB_PATH) \
1141 (cd $(TARGET_SUBDIR)/$${dir}; \
1142 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1143 else \
1144 true; \
1145 fi
1146
1147 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1148 # To build a target all-X means to cd to X and make all.
1149 .PHONY: $(ALL_X11_MODULES)
1150 $(ALL_X11_MODULES):
1151 @dir=`echo $@ | sed -e 's/all-//'`; \
1152 if [ -f ./$${dir}/Makefile ] ; then \
1153 r=`pwd`; export r; \
1154 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1155 $(SET_LIB_PATH) \
1156 (cd $${dir}; \
1157 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1158 else \
1159 true; \
1160 fi
1161
1162 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1163 # To build a target check-X means to cd to X and make all.
1164 .PHONY: $(CHECK_X11_MODULES)
1165 $(CHECK_X11_MODULES):
1166 @dir=`echo $@ | sed -e 's/check-//'`; \
1167 if [ -f ./$${dir}/Makefile ] ; then \
1168 r=`pwd`; export r; \
1169 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1170 $(SET_LIB_PATH) \
1171 (cd $${dir}; \
1172 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1173 else \
1174 true; \
1175 fi
1176
1177 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1178 # To build a target install-X means to cd to X and make install.
1179 .PHONY: $(INSTALL_X11_MODULES)
1180 $(INSTALL_X11_MODULES):
1181 @dir=`echo $@ | sed -e 's/install-//'`; \
1182 if [ -f ./$${dir}/Makefile ] ; then \
1183 r=`pwd`; export r; \
1184 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1185 $(SET_LIB_PATH) \
1186 (cd $${dir}; \
1187 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1188 else \
1189 true; \
1190 fi
1191
1192 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1193 .PHONY: all-gcc
1194 all-gcc:
1195 @if [ -f ./gcc/Makefile ] ; then \
1196 r=`pwd`; export r; \
1197 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1198 $(SET_LIB_PATH) \
1199 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1200 else \
1201 true; \
1202 fi
1203
1204 .PHONY: all-bootstrap
1205 all-bootstrap:
1206 @if [ -f ./gcc/Makefile ] ; then \
1207 r=`pwd`; export r; \
1208 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1209 $(SET_LIB_PATH) \
1210 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1211 else \
1212 true; \
1213 fi
1214
1215 .PHONY: check-gcc
1216 check-gcc:
1217 @if [ -f ./gcc/Makefile ] ; then \
1218 r=`pwd`; export r; \
1219 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1220 $(SET_LIB_PATH) \
1221 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1222 else \
1223 true; \
1224 fi
1225
1226 .PHONY: install-gcc
1227 install-gcc:
1228 @if [ -f ./gcc/Makefile ] ; then \
1229 r=`pwd`; export r; \
1230 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1231 $(SET_LIB_PATH) \
1232 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1233 else \
1234 true; \
1235 fi
1236
1237
1238 # EXPERIMENTAL STUFF
1239 # This rule is used to install the modules which use FLAGS_TO_PASS.
1240 # To build a target install-X means to cd to X and make install.
1241 .PHONY: install-dosrel
1242 install-dosrel: install-dirs info
1243 @dir=`echo $@ | sed -e 's/install-//'`; \
1244 if [ -f ./$${dir}/Makefile ] ; then \
1245 r=`pwd`; export r; \
1246 srcroot=`cd $(srcdir); pwd`; export srcroot; \
1247 $(SET_LIB_PATH) \
1248 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1249 else \
1250 true; \
1251 fi
1252
1253 install-dosrel-fake:
1254
1255
1256 # This is a list of inter-dependencies among modules.
1257 all-apache:
1258 all-autoconf: all-m4
1259 all-bash:
1260 all-bfd:
1261 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
1262 all-byacc:
1263 all-cvs:
1264 all-dejagnu: all-tcl all-expect all-tk
1265 all-diff: all-libiberty
1266 all-emacs:
1267 all-emacs19: all-byacc
1268 all-etc:
1269 configure-target-examples: $(ALL_GCC)
1270 all-target-examples: configure-target-examples
1271 all-expect: all-tcl all-tk
1272 all-fileutils: all-libiberty
1273 all-find:
1274 all-flex: all-libiberty all-byacc
1275 all-gas: all-libiberty all-opcodes all-bfd
1276 all-gash: all-tcl
1277 all-gawk:
1278 ALL_GCC = all-gcc
1279 all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld
1280 all-bootstrap: all-libiberty all-byacc all-binutils all-gas all-ld
1281 GDB_TK = all-tk all-tcl
1282 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1283 all-gprof: all-libiberty all-bfd all-opcodes
1284 all-grep: all-libiberty
1285 all-grez: all-libiberty all-bfd all-opcodes
1286 all-gui: all-gdb all-libproc all-target-librx
1287 all-guile:
1288 all-gzip: all-libiberty
1289 all-hello: all-libiberty
1290 all-indent:
1291 all-inet: all-tcl all-send-pr all-perl
1292 all-ispell: all-emacs19
1293 all-ld: all-libiberty all-bfd all-opcodes all-byacc all-flex
1294 configure-target-libg++: $(ALL_GCC) configure-target-librx
1295 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++
1296 configure-target-libgloss: $(ALL_GCC)
1297 all-target-libgloss: configure-target-libgloss configure-target-newlib
1298 configure-target-libio: $(ALL_GCC)
1299 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1300 all-libiberty:
1301 configure-target-librx: $(ALL_GCC) configure-target-newlib
1302 all-target-librx: configure-target-librx
1303 configure-target-libstdc++: $(ALL_GCC)
1304 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1305 all-m4: all-libiberty
1306 all-make: all-libiberty
1307 all-mmalloc:
1308 configure-target-newlib: $(ALL_GCC)
1309 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1310 all-opcodes: all-bfd all-libiberty
1311 all-patch: all-libiberty
1312 all-perl:
1313 all-prms: all-libiberty
1314 all-rcs:
1315 all-readline:
1316 all-recode: all-libiberty
1317 all-sed: all-libiberty
1318 all-send-pr: all-prms
1319 all-shellutils:
1320 all-sim: all-libiberty all-bfd all-opcodes
1321 all-tar: all-libiberty
1322 all-tcl:
1323 all-tclX: all-tcl all-tk
1324 all-tk: all-tcl
1325 all-texinfo: all-libiberty
1326 all-textutils:
1327 all-tgas: all-libiberty all-bfd all-opcodes
1328 all-time:
1329 all-wdiff:
1330 all-target-winsup: all-target-newlib all-target-libiberty configure-target-winsup
1331 configure-target-winsup: configure-target-newlib
1332 all-uudecode: all-libiberty
1333 configure-target-libiberty: $(ALL_GCC)
1334 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1335 all-target: $(ALL_TARGET_MODULES)
1336 install-target: $(INSTALL_TARGET_MODULES)
1337
1338 ### other supporting targets
1339
1340 MAKEDIRS= \
1341 $(prefix) \
1342 $(exec_prefix)
1343 .PHONY: install-dirs
1344 install-dirs:
1345 @for i in $(MAKEDIRS) ; do \
1346 echo Making $$i... ; \
1347 parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
1348 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1349 if [ ! -d $$i ] ; then \
1350 if mkdir $$i ; then \
1351 true ; \
1352 else \
1353 exit 1 ; \
1354 fi ; \
1355 else \
1356 true ; \
1357 fi ; \
1358 done
1359
1360
1361 dir.info: do-install-info
1362 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1363 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1364 mv -f dir.info.new dir.info ; \
1365 else true ; \
1366 fi
1367
1368 dist:
1369 @echo "Building a full distribution of this tree isn't done"
1370 @echo "via 'make dist'. Check out the etc/ subdirectory"
1371
1372 etags tags: TAGS
1373
1374 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1375 # ability to use several tags files at once, so there is probably no need
1376 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1377 # (if we felt like it) have this Makefile write a piece of elisp which
1378 # the user could load to tell emacs19 where all the TAGS files we just
1379 # built are.
1380 TAGS: do-TAGS
1381
1382 # with the gnu make, this is done automatically.
1383
1384 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1385 $(SHELL) ./config.status
1386
1387 #
1388 # Support for building net releases
1389
1390 # Files in devo used in any net release.
1391 # ChangeLog omitted because it may refer to files which are not in this
1392 # distribution (perhaps it would be better to include it anyway).
1393 DEVO_SUPPORT= README Makefile.in configure configure.in \
1394 config.guess config.sub config move-if-change \
1395 mpw-README mpw-build.in mpw-config.in mpw-configure \
1396 COPYING COPYING.LIB install.sh config-ml.in symlink-tree
1397
1398 # Files in devo/etc used in any net release.
1399 # ChangeLog omitted because it may refer to files which are not in this
1400 # distribution (perhaps it would be better to include it anyway).
1401 ETC_SUPPORT= Makefile.in cfg-paper.texi configure configure.in configure.man \
1402 configure.texi standards.texi make-stds.texi \
1403 configure.info* standards.info* cfg-paper.info*
1404
1405 # When you use `make setup-dirs' or `make taz' you should always redefine
1406 # this macro.
1407 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1408 # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1409 DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in
1410
1411 .PHONY: taz
1412
1413 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1414 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1415 # Make sure "diststuff" files get built properly.
1416 for f in $(DISTBISONFILES) ; do \
1417 if [ -r $$f ]; then \
1418 sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \
1419 mv -f tmp $$f ; \
1420 else true; fi ; \
1421 done
1422 # Take out texinfo from a few places; make simple BISON=bison line.
1423 sed -e '/^all\.normal: /s/\all-texinfo //' \
1424 -e '/^ install-texinfo /d' \
1425 -e '/^BISON = /,/^$$/d' \
1426 -e '/^# BISON:/s/.*/BISON = bison -y/' \
1427 <Makefile.in >tmp
1428 mv -f tmp Makefile.in
1429 #
1430 $(start-sanitize-Sanitize)
1431 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1432 $(end-sanitize-Sanitize)
1433 ./configure sun4
1434 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1435 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1436 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1437 # Make links, and run "make diststuff" or "make info" when needed.
1438 rm -rf proto-toplev ; mkdir proto-toplev
1439 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1440 for d in $$dirs ; do \
1441 if [ -d $$d ]; then \
1442 if [ ! -f $$d/Makefile ] ; then true ; \
1443 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1444 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1445 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1446 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1447 fi ; \
1448 if [ -d $$d/proto-$$d.dir ]; then \
1449 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1450 else \
1451 ln -s ../$$d proto-toplev/$$d ; \
1452 fi ; \
1453 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1454 done
1455 cd etc ; $(MAKE) info
1456 $(MAKE) distclean
1457 #
1458 mkdir proto-toplev/etc
1459 (cd proto-toplev/etc; \
1460 for i in $(ETC_SUPPORT); do \
1461 ln -s ../../etc/$$i . ; \
1462 done)
1463 #
1464 # Take out texinfo from configurable dirs
1465 rm proto-toplev/configure.in
1466 sed -e '/^host_tools=/s/texinfo //' \
1467 <configure.in >proto-toplev/configure.in
1468 #
1469 mkdir proto-toplev/texinfo
1470 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1471 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1472 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1473 if test -r texinfo/util/tex3patch ; then \
1474 mkdir proto-toplev/texinfo/util && \
1475 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1476 else true; fi
1477 chmod og=u `find . -print`
1478 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) \
1479 VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1480
1481 do-tar-gz:
1482 echo "==> Making $(TOOL)-$(VER).tar.gz"
1483 -rm -f $(TOOL)-$(VER)
1484 ln -s proto-toplev $(TOOL)-$(VER)
1485 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1486 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1487
1488 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1489 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1490
1491 .PHONY: gas.tar.gz
1492 GAS_SUPPORT_DIRS= bfd include libiberty opcodes make-all.com setup.com
1493 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1494 $(MAKE) -f Makefile.in taz TOOL=gas \
1495 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1496
1497 # The FSF "binutils" release includes gprof and ld.
1498 .PHONY: binutils.tar.gz
1499 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof make-all.com setup.com
1500 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1501 $(MAKE) -f Makefile.in taz TOOL=binutils \
1502 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1503
1504 .PHONY: gas+binutils.tar.gz
1505 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1506 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1507 $(MAKE) -f Makefile.in taz TOOL=gas \
1508 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1509
1510 .PHONY: libg++.tar.gz
1511 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1512 libg++.tar.gz: $(DIST_SUPPORT) libg++
1513 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1514 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1515
1516 GNATS_SUPPORT_DIRS=include libiberty send-pr
1517 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1518 $(MAKE) -f Makefile.in taz TOOL=gnats \
1519 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1520
1521 .PHONY: gdb.tar.gz
1522 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1523 GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1524 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1525 $(MAKE) -f Makefile.in taz TOOL=gdb \
1526 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1527
1528 .PHONY: newlib.tar.gz
1529 NEWLIB_SUPPORT_DIRS=libgloss
1530 # taz configures for the sun4 target which won't configure newlib.
1531 # We need newlib configured so that the .info files are made.
1532 # Unfortunately, it is not enough to just configure newlib separately:
1533 # taz will build the .info files but since SUBDIRS won't contain newlib,
1534 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1535 # used in building the .info files, eg: *.def, *.ref).
1536 # The problem isn't solvable however without a lot of extra work because
1537 # target libraries are built in subdir $(target_alias) which gets nuked during
1538 # the make distclean. For now punt on the issue of shipping newlib info files
1539 # with newlib net releases and wait for a day when some native target (sun4?)
1540 # supports newlib (if only minimally).
1541 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1542 $(MAKE) -f Makefile.in taz TOOL=newlib \
1543 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1544 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1545
1546 .NOEXPORT:
1547 MAKEOVERRIDES=
1548
1549 # start-sanitize-chill
1550 ## This is ugly, but I don't want GNU make to put these variables in
1551 ## the environment. Older makes will see this as a set of targets
1552 ## with no dependencies and no actions.
1553 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1554 # end-sanitize-chill
1555
1556 # end of Makefile.in
This page took 0.063319 seconds and 4 git commands to generate.