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