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