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