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