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