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