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