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