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