2002-12-01 Nathanael Nerode <neroden@gcc.gnu.org>
[deliverable/binutils-gdb.git] / Makefile.in
CommitLineData
405ea7a0
NN
1
2# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
252b5132
RH
3#
4# Makefile for directory with subdirs to build.
5cec67bf 5# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
d5de0a84 6# 1999, 2000, 2001, 2002 Free Software Foundation
252b5132
RH
7#
8# This file is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21#
22
80413487 23# Tell GNU make 3.79 not to run the top level in parallel. This
3daeddf6
RH
24# prevents contention for $builddir/$target/config.cache, as well
25# as minimizing scatter in file system caches.
80413487
RH
26NOTPARALLEL = .NOTPARALLEL
27$(NOTPARALLEL):
3daeddf6 28
583d52d7
NN
29VPATH=@srcdir@
30links=@configlinks@
31
32build_alias=@build_alias@
33build_cpu=@build_cpu@
34build_vendor=@build_vendor@
35build_os=@build_os@
36build_canonical=@build_cpu@-@build_vendor@-@build_os@
37host_alias=@host_alias@
38host_cpu=@host_cpu@
39host_vendor=@host_vendor@
40host_os=@host_os@
41host_canonical=@host_cpu@-@host_vendor@-@host_os@
42target_alias=@target_alias@
43target_cpu=@target_cpu@
44target_vendor=@target_vendor@
45target_os=@target_os@
46target_canonical=@target_cpu@-@target_vendor@-@target_os@
47
48enable_shared = @enable_shared@
49enable_threads = @enable_threads@
50enable_version_specific_runtime_libs = @enable_version_specific_runtime_libs@
51# The file containing GCC's version number.
52gcc_version_trigger = @gcc_version_trigger@
53gcc_version = @gcc_version@
54
403d9505
NN
55srcdir = @srcdir@
56
57prefix = @prefix@
58exec_prefix = @exec_prefix@
59
60bindir = @bindir@
61sbindir = @sbindir@
62libexecdir = @libexecdir@
63datadir = @datadir@
64sysconfdir = @sysconfdir@
65sharedstatedir = @sharedstatedir@
66localstatedir = @localstatedir@
67libdir = @libdir@
68includedir = @includedir@
69oldincludedir = @oldincludedir@
70infodir = @infodir@
71mandir = @mandir@
58daee98 72gxx_include_dir=@gxx_include_dir@
252b5132 73
403d9505
NN
74tooldir = @tooldir@
75build_tooldir = @build_tooldir@
252b5132 76
403d9505 77program_transform_name = @program_transform_name@
252b5132
RH
78
79man1dir = $(mandir)/man1
80man2dir = $(mandir)/man2
81man3dir = $(mandir)/man3
82man4dir = $(mandir)/man4
83man5dir = $(mandir)/man5
84man6dir = $(mandir)/man6
85man7dir = $(mandir)/man7
86man8dir = $(mandir)/man8
87man9dir = $(mandir)/man9
252b5132
RH
88# Directory in which the compiler finds executables, libraries, etc.
89libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
90GDB_NLM_DEPS =
91
403d9505 92SHELL = @config_shell@
252b5132 93
d5de0a84
NC
94# pwd command to use. Allow user to override default by setting PWDCMD in
95# the environment to account for automounters. The make variable must not
96# be called PWDCMD, otherwise the value set here is passed to make
97# subprocesses and overrides the setting from the user's environment.
98PWD = $${PWDCMD-pwd}
99
252b5132
RH
100# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
101# cygwin host.
102INSTALL_PROGRAM_ARGS =
103
104INSTALL = $(SHELL) $$s/install-sh -c
105INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
106INSTALL_SCRIPT = $(INSTALL)
107INSTALL_DATA = $(INSTALL) -m 644
108
109INSTALL_DOSREL = install-dosrel-fake
110
852e5f18
NN
111AS = @AS@
112AR = @AR@
252b5132
RH
113AR_FLAGS = rc
114CC = cc
115
116# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
117# here so that they can be overridden by Makefile fragments.
118HOST_CC = $(CC_FOR_BUILD)
852e5f18
NN
119BUILD_PREFIX = @BUILD_PREFIX@
120BUILD_PREFIX_1 = @BUILD_PREFIX_1@
252b5132
RH
121
122# These flag values are normally overridden by the configure script.
123CFLAGS = -g
124CXXFLAGS = -g -O2
125
c363de44 126LDFLAGS =
252b5132 127LIBCFLAGS = $(CFLAGS)
75205f78 128CFLAGS_FOR_BUILD = $(CFLAGS)
6c5e141a
DD
129# During gcc bootstrap, if we use some random cc for stage1 then
130# CFLAGS will be just -g. We want to ensure that TARGET libraries
131# (which we know are built with gcc) are built with optimizations so
132# prepend -O2 when setting CFLAGS_FOR_TARGET.
133CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
252b5132
RH
134LDFLAGS_FOR_TARGET =
135LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
136PICFLAG =
137PICFLAG_FOR_TARGET =
138
252b5132
RH
139CXX = c++
140
141# Use -O2 to stress test the compiler.
ba73c63f 142LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
252b5132 143CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
ba73c63f 144LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
252b5132 145
852e5f18
NN
146DLLTOOL = @DLLTOOL@
147WINDRES = @WINDRES@
252b5132 148
852e5f18 149NM = @NM@
252b5132 150
852e5f18 151LD = @LD@
252b5132 152
252b5132 153# These values are substituted by configure.
403d9505
NN
154DEFAULT_YACC = @DEFAULT_YACC@
155DEFAULT_LEX = @DEFAULT_LEX@
156DEFAULT_M4 = @DEFAULT_M4@
252b5132 157
852e5f18
NN
158BISON=@BISON@
159USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
252b5132
RH
160 echo $$r/bison/bison -L $$s/bison/ ; \
161 else \
162 echo bison ; \
163 fi`
164
852e5f18
NN
165YACC=@YACC@
166USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
252b5132
RH
167 echo $$r/bison/bison -y -L $$s/bison/ ; \
168 elif [ -f $$r/byacc/byacc ] ; then \
169 echo $$r/byacc/byacc ; \
170 else \
171 echo ${DEFAULT_YACC} ; \
172 fi`
173
852e5f18
NN
174LEX=@LEX@
175USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
252b5132
RH
176 then echo $$r/flex/flex ; \
177 else echo ${DEFAULT_LEX} ; fi`
178
179M4 = `if [ -f $$r/m4/m4 ] ; \
180 then echo $$r/m4/m4 ; \
181 else echo ${DEFAULT_M4} ; fi`
182
f08fa01d
HPN
183# For an installed makeinfo, we require it to be from texinfo 4 or
184# higher, else we use the "missing" dummy.
852e5f18
NN
185MAKEINFO=@MAKEINFO@
186USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
252b5132 187 then echo $$r/texinfo/makeinfo/makeinfo ; \
f08fa01d
HPN
188 else if (makeinfo --version \
189 | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \
190 then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
252b5132
RH
191
192# This just becomes part of the MAKEINFO definition passed down to
193# sub-makes. It lets flags be given on the command line while still
194# using the makeinfo from the object tree.
195MAKEINFOFLAGS =
196
197EXPECT = `if [ -f $$r/expect/expect ] ; \
198 then echo $$r/expect/expect ; \
199 else echo expect ; fi`
200
201RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
202 then echo $$s/dejagnu/runtest ; \
203 else echo runtest ; fi`
204
205
206# compilers to use to create programs which must be run in the build
207# environment.
852e5f18 208CC_FOR_BUILD = @CC_FOR_BUILD@
252b5132
RH
209CXX_FOR_BUILD = $(CXX)
210
f03b4789 211SUBDIRS = @configdirs@
252b5132
RH
212
213# This is set by the configure script to the list of directories which
214# should be built using the target tools.
58daee98 215TARGET_CONFIGDIRS = @target_configdirs@
252b5132
RH
216
217# Target libraries are put under this directory:
218# Changed by configure to $(target_alias) if cross.
58daee98 219TARGET_SUBDIR = @target_subdir@
252b5132 220
49b7683b 221BUILD_CONFIGDIRS = libiberty
58daee98 222BUILD_SUBDIR = @build_subdir@
49b7683b
DD
223
224# This is set by the configure script to the arguments to use when configuring
225# directories built for the target.
58daee98 226TARGET_CONFIGARGS = @target_configargs@
49b7683b
DD
227
228# This is set by the configure script to the arguments to use when configuring
229# directories built for the build system.
58daee98 230BUILD_CONFIGARGS = @build_configargs@
252b5132
RH
231
232# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
233# was used.
8607b6c9 234SET_LIB_PATH = @SET_LIB_PATH@
252b5132
RH
235
236# This is the name of the environment variable used for the path to
237# the libraries. This may be changed by configure.in.
8607b6c9 238RPATH_ENVVAR = @RPATH_ENVVAR@
252b5132 239
0da52010
AO
240# This is the list of directories that may be needed in RPATH_ENVVAR
241# so that programs built for the host machine work.
242HOST_LIB_PATH = $$r/bfd:$$r/opcodes
243
244# This is the list of directories that may be needed in RPATH_ENVVAR
245# so that prorgams built for the target machine work.
75205f78 246TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
0da52010 247
252b5132 248# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
0da52010
AO
249# Some platforms don't like blank entries, so we remove duplicate,
250# leading and trailing colons.
252b5132 251REALLY_SET_LIB_PATH = \
0da52010 252 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
252b5132
RH
253
254ALL = all.normal
255INSTALL_TARGET = installdirs \
256 install-gcc \
257 $(INSTALL_MODULES) \
258 $(INSTALL_TARGET_MODULES) \
259 $(INSTALL_X11_MODULES) \
260 $(INSTALL_DOSREL)
261
262INSTALL_TARGET_CROSS = installdirs \
263 install-gcc-cross \
264 $(INSTALL_MODULES) \
265 $(INSTALL_TARGET_MODULES) \
266 $(INSTALL_X11_MODULES) \
267 $(INSTALL_DOSREL)
268
9e449d3e 269# Should be substed by configure.in
58daee98
NN
270FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
271CC_FOR_TARGET = @CC_FOR_TARGET@
272CXX_FOR_TARGET = @CXX_FOR_TARGET@
273CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
274GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
252b5132 275
9e449d3e 276# If GCC_FOR_TARGET is not overriden on the command line, then this
252b5132
RH
277# variable is passed down to the gcc Makefile, where it is used to
278# build libgcc2.a. We define it here so that it can itself be
279# overridden on the command line.
852e5f18
NN
280GCC_FOR_TARGET=@GCC_FOR_TARGET@
281USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
252b5132 282
852e5f18
NN
283AS_FOR_TARGET=@AS_FOR_TARGET@
284USUAL_AS_FOR_TARGET = ` \
252b5132
RH
285 if [ -f $$r/gas/as-new ] ; then \
286 echo $$r/gas/as-new ; \
dc70af01
AO
287 elif [ -f $$r/gcc/xgcc ]; then \
288 $(CC_FOR_TARGET) -print-prog-name=as ; \
252b5132 289 else \
3f152009 290 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
291 echo $(AS); \
292 else \
293 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
294 fi; \
295 fi`
296
852e5f18
NN
297LD_FOR_TARGET=@LD_FOR_TARGET@
298USUAL_LD_FOR_TARGET = ` \
252b5132
RH
299 if [ -f $$r/ld/ld-new ] ; then \
300 echo $$r/ld/ld-new ; \
dc70af01
AO
301 elif [ -f $$r/gcc/xgcc ]; then \
302 $(CC_FOR_TARGET) -print-prog-name=ld ; \
252b5132 303 else \
3f152009 304 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
305 echo $(LD); \
306 else \
307 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
308 fi; \
309 fi`
310
852e5f18
NN
311DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
312USUAL_DLLTOOL_FOR_TARGET = ` \
252b5132
RH
313 if [ -f $$r/binutils/dlltool ] ; then \
314 echo $$r/binutils/dlltool ; \
315 else \
3f152009 316 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
317 echo $(DLLTOOL); \
318 else \
319 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
320 fi; \
321 fi`
322
852e5f18
NN
323WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
324USUAL_WINDRES_FOR_TARGET = ` \
252b5132
RH
325 if [ -f $$r/binutils/windres ] ; then \
326 echo $$r/binutils/windres ; \
327 else \
3f152009 328 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
329 echo $(WINDRES); \
330 else \
331 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
332 fi; \
333 fi`
334
852e5f18
NN
335AR_FOR_TARGET=@AR_FOR_TARGET@
336USUAL_AR_FOR_TARGET = ` \
252b5132
RH
337 if [ -f $$r/binutils/ar ] ; then \
338 echo $$r/binutils/ar ; \
339 else \
3f152009 340 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
341 echo $(AR); \
342 else \
343 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
344 fi; \
345 fi`
346
852e5f18
NN
347RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
348USUAL_RANLIB_FOR_TARGET = ` \
252b5132
RH
349 if [ -f $$r/binutils/ranlib ] ; then \
350 echo $$r/binutils/ranlib ; \
351 else \
3f152009
AO
352 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
353 if [ x'$(RANLIB)' != x ]; then \
354 echo $(RANLIB); \
355 else \
356 echo ranlib; \
357 fi; \
252b5132
RH
358 else \
359 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
360 fi; \
361 fi`
362
852e5f18
NN
363NM_FOR_TARGET=@NM_FOR_TARGET@
364USUAL_NM_FOR_TARGET = ` \
252b5132
RH
365 if [ -f $$r/binutils/nm-new ] ; then \
366 echo $$r/binutils/nm-new ; \
dc70af01
AO
367 elif [ -f $$r/gcc/xgcc ]; then \
368 $(CC_FOR_TARGET) -print-prog-name=nm ; \
252b5132 369 else \
3f152009 370 if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
252b5132
RH
371 echo $(NM); \
372 else \
373 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
374 fi; \
375 fi`
376
377# The first rule in the file had better be this one. Don't put any above it.
378# This lives here to allow makefile fragments to contain dependencies.
379all: all.normal
380.PHONY: all
381
382# These can be overridden by config/mt-*.
383# The _TARGET_ is because they're specified in mt-foo.
384# The _HOST_ is because they're programs that run on the host.
385EXTRA_TARGET_HOST_ALL_MODULES =
386EXTRA_TARGET_HOST_INSTALL_MODULES =
387EXTRA_TARGET_HOST_CHECK_MODULES =
388
389#### host and target specific makefile fragments come in here.
390###
391
392# Flags to pass down to all sub-makes.
393# Please keep these in alphabetical order.
394BASE_FLAGS_TO_PASS = \
395 "AR_FLAGS=$(AR_FLAGS)" \
396 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
397 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
398 "BISON=$(BISON)" \
399 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
400 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
401 "CFLAGS=$(CFLAGS)" \
402 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
75205f78 403 "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
252b5132
RH
404 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
405 "CXXFLAGS=$(CXXFLAGS)" \
406 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
407 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
408 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
409 "INSTALL=$(INSTALL)" \
410 "INSTALL_DATA=$(INSTALL_DATA)" \
411 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
412 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
413 "LDFLAGS=$(LDFLAGS)" \
414 "LEX=$(LEX)" \
415 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
416 "LIBCFLAGS=$(LIBCFLAGS)" \
417 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
418 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
419 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
420 "M4=$(M4)" \
421 "MAKE=$(MAKE)" \
422 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
423 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
424 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
425 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
426 "SHELL=$(SHELL)" \
427 "EXPECT=$(EXPECT)" \
428 "RUNTEST=$(RUNTEST)" \
429 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
430 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
431 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
432 "YACC=$(YACC)" \
433 "bindir=$(bindir)" \
434 "datadir=$(datadir)" \
435 "exec_prefix=$(exec_prefix)" \
436 "includedir=$(includedir)" \
437 "infodir=$(infodir)" \
438 "libdir=$(libdir)" \
439 "libexecdir=$(libexecdir)" \
440 "lispdir=$(lispdir)" \
75205f78
DD
441 "libstdcxx_incdir=$(libstdcxx_incdir)" \
442 "libsubdir=$(libsubdir)" \
252b5132
RH
443 "localstatedir=$(localstatedir)" \
444 "mandir=$(mandir)" \
445 "oldincludedir=$(oldincludedir)" \
446 "prefix=$(prefix)" \
447 "sbindir=$(sbindir)" \
448 "sharedstatedir=$(sharedstatedir)" \
449 "sysconfdir=$(sysconfdir)" \
450 "tooldir=$(tooldir)" \
ba73c63f 451 "build_tooldir=$(build_tooldir)" \
252b5132
RH
452 "gxx_include_dir=$(gxx_include_dir)" \
453 "gcc_version=$(gcc_version)" \
454 "gcc_version_trigger=$(gcc_version_trigger)" \
75205f78 455 "target_alias=$(target_alias)"
252b5132 456
dec0cb0c
AO
457# For any flags above that may contain shell code that varies from one
458# target library to another. When doing recursive invocations of the
459# top-level Makefile, we don't want the outer make to evaluate them,
460# so we pass these variables down unchanged. They must not contain
461# single nor double quotes.
462RECURSE_FLAGS = \
463 CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)'
464
252b5132
RH
465# Flags to pass down to most sub-makes, in which we're building with
466# the host environment.
467# If any variables are added here, they must be added to do-*, below.
468EXTRA_HOST_FLAGS = \
469 'AR=$(AR)' \
470 'AS=$(AS)' \
471 'CC=$(CC)' \
472 'CXX=$(CXX)' \
473 'DLLTOOL=$(DLLTOOL)' \
474 'LD=$(LD)' \
475 'NM=$(NM)' \
75205f78 476 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
477 'WINDRES=$(WINDRES)'
478
479FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
480
481# Flags that are concerned with the location of the X11 include files
482# and library files
483#
484# NOTE: until the top-level is getting the values via autoconf, it only
485# causes problems to have this top-level Makefile overriding the autoconf-set
486# values in child directories. Only variables that don't conflict with
487# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
488#
489X11_FLAGS_TO_PASS = \
490 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
491 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
492
493# Flags to pass down to makes which are built with the target environment.
494# The double $ decreases the length of the command line; the variables
495# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
496# If any variables are added here, they must be added to do-*, below.
497EXTRA_TARGET_FLAGS = \
498 'AR=$$(AR_FOR_TARGET)' \
499 'AS=$$(AS_FOR_TARGET)' \
500 'CC=$$(CC_FOR_TARGET)' \
501 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
502 'CXX=$$(CXX_FOR_TARGET)' \
503 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
504 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
505 'LD=$$(LD_FOR_TARGET)' \
506 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
507 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
508 'NM=$$(NM_FOR_TARGET)' \
509 'RANLIB=$$(RANLIB_FOR_TARGET)' \
510 'WINDRES=$$(WINDRES_FOR_TARGET)'
511
512TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
513
514# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
515# unfortunately needs the native compiler and the target ar and
516# ranlib.
517# If any variables are added here, they must be added to do-*, below.
518# The HOST_* variables are a special case, which are used for the gcc
519# cross-building scheme.
520EXTRA_GCC_FLAGS = \
521 'AR=$(AR)' \
522 'AS=$(AS)' \
523 'CC=$(CC)' \
524 'CXX=$(CXX)' \
525 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
526 'HOST_CC=$(CC_FOR_BUILD)' \
27f15fdd
DD
527 'BUILD_PREFIX=$(BUILD_PREFIX)' \
528 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
252b5132 529 'NM=$(NM)' \
75205f78 530 "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
531 'WINDRES=$$(WINDRES_FOR_TARGET)' \
532 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
75205f78 533 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
252b5132
RH
534 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
535 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
536 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
537 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
538 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
539 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
540 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
75205f78 541 "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
252b5132
RH
542 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
543
544GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
545
49b7683b
DD
546# This is a list of the targets for all of the modules which are compiled
547# using the build machine's native compiler. Configure edits the second
548# macro for build!=host builds.
549ALL_BUILD_MODULES_LIST = \
550 all-build-libiberty
403d9505 551ALL_BUILD_MODULES = @all_build_modules@
49b7683b
DD
552
553# This is a list of the configure targets for all of the modules which
554# are compiled using the native tools.
555CONFIGURE_BUILD_MODULES = \
556 configure-build-libiberty
557
252b5132
RH
558# This is a list of the targets for all of the modules which are compiled
559# using $(FLAGS_TO_PASS).
560ALL_MODULES = \
252b5132
RH
561 all-ash \
562 all-autoconf \
563 all-automake \
564 all-bash \
565 all-bfd \
405ea7a0 566 all-opcodes \
252b5132
RH
567 all-binutils \
568 all-bison \
569 all-byacc \
570 all-bzip2 \
252b5132
RH
571 all-db \
572 all-dejagnu \
573 all-diff \
574 all-dosutils \
575 all-etc \
75205f78 576 all-fastjar \
252b5132
RH
577 all-fileutils \
578 all-findutils \
579 all-find \
580 all-flex \
581 all-gas \
582 all-gawk \
583 all-gettext \
584 all-gnuserv \
585 all-gprof \
586 all-grep \
252b5132
RH
587 all-gzip \
588 all-hello \
589 all-indent \
252b5132 590 all-intl \
405ea7a0 591 all-tcl \
252b5132
RH
592 all-itcl \
593 all-ld \
594 all-libgui \
595 all-libiberty \
596 all-libtool \
597 all-m4 \
598 all-make \
599 all-mmalloc \
252b5132
RH
600 all-patch \
601 all-perl \
602 all-prms \
603 all-rcs \
604 all-readline \
605 all-release \
606 all-recode \
607 all-sed \
608 all-send-pr \
609 all-shellutils \
8817b92e 610 all-sid \
252b5132 611 all-sim \
ba73c63f 612 all-snavigator \
252b5132 613 all-tar \
252b5132
RH
614 all-texinfo \
615 all-textutils \
252b5132
RH
616 all-time \
617 all-uudecode \
618 all-wdiff \
619 all-zip \
5cec67bf 620 all-zlib \
252b5132
RH
621 $(EXTRA_TARGET_HOST_ALL_MODULES)
622
623# This is a list of the check targets for all of the modules which are
624# compiled using $(FLAGS_TO_PASS).
625#
626# The list is in two parts. The first lists those tools which
627# are tested as part of the host's native tool-chain, and not
628# tested in a cross configuration.
629NATIVE_CHECK_MODULES = \
630 check-bison \
631 check-byacc \
75205f78 632 check-fastjar \
252b5132
RH
633 check-flex \
634 check-zip
635
636CROSS_CHECK_MODULES = \
252b5132
RH
637 check-ash \
638 check-autoconf \
639 check-automake \
640 check-bash \
641 check-bfd \
405ea7a0 642 check-opcodes \
252b5132
RH
643 check-binutils \
644 check-bzip2 \
252b5132
RH
645 check-db \
646 check-dejagnu \
647 check-diff \
648 check-etc \
649 check-fileutils \
650 check-findutils \
651 check-find \
652 check-gas \
653 check-gawk \
654 check-gettext \
655 check-gnuserv \
656 check-gprof \
657 check-grep \
658 check-gzip \
659 check-hello \
660 check-indent \
252b5132 661 check-intl \
405ea7a0 662 check-tcl \
252b5132
RH
663 check-itcl \
664 check-ld \
665 check-libgui \
666 check-libiberty \
667 check-libtool \
668 check-m4 \
669 check-make \
252b5132
RH
670 check-patch \
671 check-perl \
672 check-prms \
673 check-rcs \
674 check-readline \
675 check-recode \
676 check-sed \
677 check-send-pr \
678 check-shellutils \
8817b92e 679 check-sid \
252b5132 680 check-sim \
405ea7a0 681 check-snavigator \
252b5132 682 check-tar \
252b5132
RH
683 check-texinfo \
684 check-textutils \
252b5132
RH
685 check-time \
686 check-uudecode \
687 check-wdiff \
688 $(EXTRA_TARGET_HOST_CHECK_MODULES)
689
690CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
691
692# This is a list of the install targets for all of the modules which are
693# compiled using $(FLAGS_TO_PASS).
252b5132 694INSTALL_MODULES = \
252b5132
RH
695 install-ash \
696 install-autoconf \
697 install-automake \
698 install-bash \
699 install-bfd \
252b5132
RH
700 install-opcodes \
701 install-binutils \
702 install-bison \
703 install-byacc \
405ea7a0 704 install-bzip2 \
252b5132
RH
705 install-db \
706 install-dejagnu \
707 install-diff \
708 install-dosutils \
709 install-etc \
75205f78 710 install-fastjar \
252b5132
RH
711 install-fileutils \
712 install-findutils \
713 install-find \
714 install-flex \
715 install-gas \
716 install-gawk \
717 install-gettext \
718 install-gnuserv \
719 install-gprof \
720 install-grep \
252b5132
RH
721 install-gzip \
722 install-hello \
723 install-indent \
252b5132 724 install-intl \
252b5132 725 install-tcl \
252b5132
RH
726 install-itcl \
727 install-ld \
728 install-libgui \
729 install-libiberty \
730 install-libtool \
731 install-m4 \
732 install-make \
733 install-mmalloc \
734 install-patch \
735 install-perl \
736 install-prms \
737 install-rcs \
738 install-readline \
739 install-recode \
740 install-sed \
741 install-send-pr \
742 install-shellutils \
8817b92e 743 install-sid \
252b5132 744 install-sim \
ba73c63f 745 install-snavigator \
252b5132 746 install-tar \
252b5132 747 install-textutils \
252b5132
RH
748 install-time \
749 install-uudecode \
750 install-wdiff \
751 install-zip \
752 $(EXTRA_TARGET_HOST_INSTALL_MODULES)
753
754# This is a list of the targets for all of the modules which are compiled
755# using $(X11_FLAGS_TO_PASS).
756ALL_X11_MODULES = \
252b5132
RH
757 all-gdb \
758 all-expect \
252b5132
RH
759 all-guile \
760 all-tclX \
761 all-tk \
852e5f18 762 all-tix
252b5132
RH
763
764# This is a list of the check targets for all of the modules which are
765# compiled using $(X11_FLAGS_TO_PASS).
766CHECK_X11_MODULES = \
252b5132 767 check-gdb \
252b5132 768 check-expect \
852e5f18 769 check-guile \
252b5132
RH
770 check-tclX \
771 check-tk \
852e5f18 772 check-tix
252b5132
RH
773
774# This is a list of the install targets for all the modules which are
775# compiled using $(X11_FLAGS_TO_PASS).
776INSTALL_X11_MODULES = \
252b5132 777 install-gdb \
252b5132 778 install-expect \
852e5f18 779 install-guile \
252b5132
RH
780 install-tclX \
781 install-tk \
852e5f18 782 install-tix
252b5132
RH
783
784# This is a list of the targets for all of the modules which are compiled
785# using $(TARGET_FLAGS_TO_PASS).
786ALL_TARGET_MODULES = \
ba73c63f 787 all-target-libstdc++-v3 \
252b5132 788 all-target-newlib \
ba73c63f 789 all-target-libf2c \
ba73c63f 790 all-target-libobjc \
252b5132
RH
791 all-target-libtermcap \
792 all-target-winsup \
793 all-target-libgloss \
794 all-target-libiberty \
795 all-target-gperf \
796 all-target-examples \
ba73c63f
JM
797 all-target-libffi \
798 all-target-libjava \
799 all-target-zlib \
800 all-target-boehm-gc \
dd2768ff
KB
801 all-target-qthreads \
802 all-target-rda
252b5132
RH
803
804# This is a list of the configure targets for all of the modules which
805# are compiled using the target tools.
806CONFIGURE_TARGET_MODULES = \
ba73c63f 807 configure-target-libstdc++-v3 \
252b5132 808 configure-target-newlib \
ba73c63f 809 configure-target-libf2c \
ba73c63f 810 configure-target-libobjc \
252b5132
RH
811 configure-target-libtermcap \
812 configure-target-winsup \
813 configure-target-libgloss \
814 configure-target-libiberty \
815 configure-target-gperf \
816 configure-target-examples \
ba73c63f
JM
817 configure-target-libffi \
818 configure-target-libjava \
819 configure-target-zlib \
820 configure-target-boehm-gc \
dd2768ff
KB
821 configure-target-qthreads \
822 configure-target-rda
252b5132
RH
823
824# This is a list of the check targets for all of the modules which are
825# compiled using $(TARGET_FLAGS_TO_PASS).
826CHECK_TARGET_MODULES = \
ba73c63f 827 check-target-libstdc++-v3 \
252b5132 828 check-target-newlib \
ba73c63f 829 check-target-libf2c \
ba73c63f 830 check-target-libobjc \
252b5132
RH
831 check-target-winsup \
832 check-target-libiberty \
907a7241 833 check-target-gperf \
ba73c63f
JM
834 check-target-libffi \
835 check-target-libjava \
836 check-target-zlib \
837 check-target-boehm-gc \
dd2768ff
KB
838 check-target-qthreads \
839 check-target-rda
252b5132
RH
840
841# This is a list of the install targets for all of the modules which are
842# compiled using $(TARGET_FLAGS_TO_PASS).
843INSTALL_TARGET_MODULES = \
ba73c63f 844 install-target-libstdc++-v3 \
252b5132 845 install-target-newlib \
ba73c63f 846 install-target-libf2c \
ba73c63f 847 install-target-libobjc \
252b5132
RH
848 install-target-libtermcap \
849 install-target-winsup \
850 install-target-libgloss \
851 install-target-libiberty \
907a7241 852 install-target-gperf \
ba73c63f
JM
853 install-target-libjava \
854 install-target-zlib \
855 install-target-boehm-gc \
dd2768ff
KB
856 install-target-qthreads \
857 install-target-rda
252b5132
RH
858
859# This is a list of the targets for which we can do a clean-{target}.
860CLEAN_MODULES = \
252b5132
RH
861 clean-ash \
862 clean-autoconf \
863 clean-automake \
864 clean-bash \
865 clean-bfd \
405ea7a0 866 clean-opcodes \
252b5132
RH
867 clean-binutils \
868 clean-bison \
869 clean-byacc \
870 clean-bzip2 \
252b5132
RH
871 clean-db \
872 clean-dejagnu \
873 clean-diff \
874 clean-dosutils \
875 clean-etc \
75205f78 876 clean-fastjar \
252b5132
RH
877 clean-fileutils \
878 clean-findutils \
879 clean-find \
880 clean-flex \
881 clean-gas \
882 clean-gawk \
883 clean-gettext \
884 clean-gnuserv \
885 clean-gprof \
886 clean-grep \
252b5132
RH
887 clean-gzip \
888 clean-hello \
889 clean-indent \
252b5132 890 clean-intl \
405ea7a0 891 clean-tcl \
252b5132
RH
892 clean-itcl \
893 clean-ld \
894 clean-libgui \
895 clean-libiberty \
896 clean-libtool \
897 clean-m4 \
898 clean-make \
899 clean-mmalloc \
252b5132
RH
900 clean-patch \
901 clean-perl \
902 clean-prms \
903 clean-rcs \
904 clean-readline \
905 clean-release \
906 clean-recode \
907 clean-sed \
908 clean-send-pr \
909 clean-shellutils \
8817b92e 910 clean-sid \
252b5132 911 clean-sim \
ba73c63f 912 clean-snavigator \
252b5132 913 clean-tar \
252b5132
RH
914 clean-texinfo \
915 clean-textutils \
252b5132
RH
916 clean-time \
917 clean-uudecode \
918 clean-wdiff \
5cec67bf 919 clean-zip \
405ea7a0 920 clean-zlib
252b5132
RH
921
922# All of the target modules that can be cleaned
923CLEAN_TARGET_MODULES = \
ba73c63f 924 clean-target-libstdc++-v3 \
252b5132 925 clean-target-newlib \
ba73c63f 926 clean-target-libf2c \
ba73c63f 927 clean-target-libobjc \
252b5132
RH
928 clean-target-winsup \
929 clean-target-libgloss \
930 clean-target-libiberty \
931 clean-target-gperf \
932 clean-target-examples \
ba73c63f
JM
933 clean-target-libffi \
934 clean-target-libjava \
935 clean-target-zlib \
936 clean-target-boehm-gc \
dd2768ff
KB
937 clean-target-qthreads \
938 clean-target-rda
252b5132
RH
939
940# All of the x11 modules that can be cleaned
941CLEAN_X11_MODULES = \
252b5132
RH
942 clean-gdb \
943 clean-expect \
252b5132
RH
944 clean-guile \
945 clean-tclX \
946 clean-tk \
852e5f18 947 clean-tix
252b5132
RH
948
949# The target built for a native build.
950.PHONY: all.normal
951all.normal: \
49b7683b 952 $(ALL_BUILD_MODULES) \
252b5132
RH
953 $(ALL_MODULES) \
954 $(ALL_X11_MODULES) \
955 $(ALL_TARGET_MODULES) \
956 all-gcc
957
958# Do a target for all the subdirectories. A ``make do-X'' will do a
959# ``make X'' in all subdirectories (because, in general, there is a
960# dependency (below) of X upon do-X, a ``make X'' will also do this,
961# but it may do additional work as well).
962# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
963# because it is so large that it can easily overflow the command line
964# length limit on some systems.
e393202e
NN
965
966.PHONY: do-clean
967do-clean:
968 @r=`${PWD}`; export r; \
969 s=`cd $(srcdir); ${PWD}`; export s; \
970 $(SET_LIB_PATH) \
971 for i in $(SUBDIRS) -dummy-; do \
972 if [ -f ./$$i/Makefile ]; then \
973 case $$i in \
974 gcc) \
975 for flag in $(EXTRA_GCC_FLAGS); do \
976 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
977 done; \
978 ;; \
979 *) \
980 for flag in $(EXTRA_HOST_FLAGS); do \
981 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
982 done; \
983 ;; \
984 esac ; \
985 if (cd ./$$i; \
986 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
987 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
988 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
989 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
990 clean); \
991 then true; else exit 1; fi; \
992 else true; fi; \
993 done
994 # Break into two pieces
d5de0a84
NC
995 r=`${PWD}`; export r; \
996 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 997 $(SET_LIB_PATH) \
e393202e
NN
998 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
999 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1000 for flag in $(EXTRA_TARGET_FLAGS); do \
1001 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1002 done; \
1003 if (cd $(TARGET_SUBDIR)/$$i; \
1004 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1005 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1006 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1007 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1008 clean); \
1009 then true; else exit 1; fi; \
1010 else true; fi; \
1011 done
1012
1013.PHONY: do-distclean
1014do-distclean:
1015 @r=`${PWD}`; export r; \
1016 s=`cd $(srcdir); ${PWD}`; export s; \
1017 $(SET_LIB_PATH) \
252b5132
RH
1018 for i in $(SUBDIRS) -dummy-; do \
1019 if [ -f ./$$i/Makefile ]; then \
1020 case $$i in \
1021 gcc) \
1022 for flag in $(EXTRA_GCC_FLAGS); do \
3f152009 1023 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
252b5132
RH
1024 done; \
1025 ;; \
1026 *) \
1027 for flag in $(EXTRA_HOST_FLAGS); do \
3f152009 1028 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
252b5132
RH
1029 done; \
1030 ;; \
1031 esac ; \
252b5132
RH
1032 if (cd ./$$i; \
1033 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1034 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
75205f78 1035 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
252b5132 1036 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
e393202e 1037 distclean); \
252b5132
RH
1038 then true; else exit 1; fi; \
1039 else true; fi; \
1040 done
e393202e 1041 # Break into two pieces
d5de0a84
NC
1042 r=`${PWD}`; export r; \
1043 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1044 $(SET_LIB_PATH) \
1045 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1046 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1047 for flag in $(EXTRA_TARGET_FLAGS); do \
3f152009 1048 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
252b5132 1049 done; \
252b5132
RH
1050 if (cd $(TARGET_SUBDIR)/$$i; \
1051 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1052 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
75205f78 1053 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
252b5132 1054 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
e393202e 1055 distclean); \
252b5132
RH
1056 then true; else exit 1; fi; \
1057 else true; fi; \
1058 done
1059
e393202e
NN
1060.PHONY: do-dvi
1061do-dvi:
1062 @r=`${PWD}`; export r; \
1063 s=`cd $(srcdir); ${PWD}`; export s; \
1064 $(SET_LIB_PATH) \
1065 for i in $(SUBDIRS) -dummy-; do \
1066 if [ -f ./$$i/Makefile ]; then \
1067 case $$i in \
1068 gcc) \
1069 for flag in $(EXTRA_GCC_FLAGS); do \
1070 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1071 done; \
1072 ;; \
1073 *) \
1074 for flag in $(EXTRA_HOST_FLAGS); do \
1075 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1076 done; \
1077 ;; \
1078 esac ; \
1079 if (cd ./$$i; \
1080 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1081 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1082 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1083 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1084 dvi); \
1085 then true; else exit 1; fi; \
1086 else true; fi; \
1087 done
1088 # Break into two pieces
1089 r=`${PWD}`; export r; \
1090 s=`cd $(srcdir); ${PWD}`; export s; \
1091 $(SET_LIB_PATH) \
1092 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1093 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1094 for flag in $(EXTRA_TARGET_FLAGS); do \
1095 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1096 done; \
1097 if (cd $(TARGET_SUBDIR)/$$i; \
1098 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1099 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1100 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1101 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1102 dvi); \
1103 then true; else exit 1; fi; \
1104 else true; fi; \
1105 done
252b5132 1106
e393202e
NN
1107.PHONY: do-info
1108do-info:
1109 @r=`${PWD}`; export r; \
1110 s=`cd $(srcdir); ${PWD}`; export s; \
1111 $(SET_LIB_PATH) \
1112 for i in $(SUBDIRS) -dummy-; do \
1113 if [ -f ./$$i/Makefile ]; then \
1114 case $$i in \
1115 gcc) \
1116 for flag in $(EXTRA_GCC_FLAGS); do \
1117 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1118 done; \
1119 ;; \
1120 *) \
1121 for flag in $(EXTRA_HOST_FLAGS); do \
1122 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1123 done; \
1124 ;; \
1125 esac ; \
1126 if (cd ./$$i; \
1127 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1128 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1129 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1130 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1131 info); \
1132 then true; else exit 1; fi; \
1133 else true; fi; \
1134 done
1135 # Break into two pieces
1136 r=`${PWD}`; export r; \
1137 s=`cd $(srcdir); ${PWD}`; export s; \
1138 $(SET_LIB_PATH) \
1139 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1140 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1141 for flag in $(EXTRA_TARGET_FLAGS); do \
1142 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1143 done; \
1144 if (cd $(TARGET_SUBDIR)/$$i; \
1145 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1146 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1147 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1148 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1149 info); \
1150 then true; else exit 1; fi; \
1151 else true; fi; \
1152 done
252b5132 1153
e393202e
NN
1154.PHONY: do-install-info
1155do-install-info:
1156 @r=`${PWD}`; export r; \
1157 s=`cd $(srcdir); ${PWD}`; export s; \
1158 $(SET_LIB_PATH) \
1159 for i in $(SUBDIRS) -dummy-; do \
1160 if [ -f ./$$i/Makefile ]; then \
1161 case $$i in \
1162 gcc) \
1163 for flag in $(EXTRA_GCC_FLAGS); do \
1164 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1165 done; \
1166 ;; \
1167 *) \
1168 for flag in $(EXTRA_HOST_FLAGS); do \
1169 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1170 done; \
1171 ;; \
1172 esac ; \
1173 if (cd ./$$i; \
1174 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1175 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1176 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1177 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1178 install-info); \
1179 then true; else exit 1; fi; \
1180 else true; fi; \
1181 done
1182 # Break into two pieces
1183 r=`${PWD}`; export r; \
1184 s=`cd $(srcdir); ${PWD}`; export s; \
1185 $(SET_LIB_PATH) \
1186 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1187 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1188 for flag in $(EXTRA_TARGET_FLAGS); do \
1189 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1190 done; \
1191 if (cd $(TARGET_SUBDIR)/$$i; \
1192 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1193 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1194 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1195 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1196 install-info); \
1197 then true; else exit 1; fi; \
1198 else true; fi; \
1199 done
252b5132 1200
e393202e
NN
1201.PHONY: do-installcheck
1202do-installcheck:
1203 @r=`${PWD}`; export r; \
d5de0a84 1204 s=`cd $(srcdir); ${PWD}`; export s; \
e393202e
NN
1205 $(SET_LIB_PATH) \
1206 for i in $(SUBDIRS) -dummy-; do \
1207 if [ -f ./$$i/Makefile ]; then \
1208 case $$i in \
1209 gcc) \
1210 for flag in $(EXTRA_GCC_FLAGS); do \
1211 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1212 done; \
1213 ;; \
1214 *) \
1215 for flag in $(EXTRA_HOST_FLAGS); do \
1216 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1217 done; \
1218 ;; \
1219 esac ; \
1220 if (cd ./$$i; \
1221 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1222 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1223 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1224 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1225 installcheck); \
1226 then true; else exit 1; fi; \
1227 else true; fi; \
1228 done
1229 # Break into two pieces
1230 r=`${PWD}`; export r; \
1231 s=`cd $(srcdir); ${PWD}`; export s; \
1232 $(SET_LIB_PATH) \
1233 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1234 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1235 for flag in $(EXTRA_TARGET_FLAGS); do \
1236 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1237 done; \
1238 if (cd $(TARGET_SUBDIR)/$$i; \
1239 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1240 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1241 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1242 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1243 installcheck); \
1244 then true; else exit 1; fi; \
1245 else true; fi; \
1246 done
252b5132 1247
e393202e
NN
1248.PHONY: do-mostlyclean
1249do-mostlyclean:
1250 @r=`${PWD}`; export r; \
1251 s=`cd $(srcdir); ${PWD}`; export s; \
1252 $(SET_LIB_PATH) \
1253 for i in $(SUBDIRS) -dummy-; do \
1254 if [ -f ./$$i/Makefile ]; then \
1255 case $$i in \
1256 gcc) \
1257 for flag in $(EXTRA_GCC_FLAGS); do \
1258 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1259 done; \
1260 ;; \
1261 *) \
1262 for flag in $(EXTRA_HOST_FLAGS); do \
1263 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1264 done; \
1265 ;; \
1266 esac ; \
1267 if (cd ./$$i; \
1268 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1269 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1270 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1271 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1272 mostlyclean); \
1273 then true; else exit 1; fi; \
1274 else true; fi; \
1275 done
1276 # Break into two pieces
1277 r=`${PWD}`; export r; \
1278 s=`cd $(srcdir); ${PWD}`; export s; \
1279 $(SET_LIB_PATH) \
1280 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1281 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1282 for flag in $(EXTRA_TARGET_FLAGS); do \
1283 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1284 done; \
1285 if (cd $(TARGET_SUBDIR)/$$i; \
1286 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1287 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1288 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1289 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1290 mostlyclean); \
1291 then true; else exit 1; fi; \
1292 else true; fi; \
1293 done
252b5132 1294
e393202e
NN
1295.PHONY: do-maintainer-clean
1296do-maintainer-clean:
1297 @r=`${PWD}`; export r; \
1298 s=`cd $(srcdir); ${PWD}`; export s; \
1299 $(SET_LIB_PATH) \
1300 for i in $(SUBDIRS) -dummy-; do \
1301 if [ -f ./$$i/Makefile ]; then \
1302 case $$i in \
1303 gcc) \
1304 for flag in $(EXTRA_GCC_FLAGS); do \
1305 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1306 done; \
1307 ;; \
1308 *) \
1309 for flag in $(EXTRA_HOST_FLAGS); do \
1310 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1311 done; \
1312 ;; \
1313 esac ; \
1314 if (cd ./$$i; \
1315 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1316 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1317 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1318 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1319 maintainer-clean); \
1320 then true; else exit 1; fi; \
1321 else true; fi; \
1322 done
1323 # Break into two pieces
1324 r=`${PWD}`; export r; \
1325 s=`cd $(srcdir); ${PWD}`; export s; \
1326 $(SET_LIB_PATH) \
1327 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1328 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1329 for flag in $(EXTRA_TARGET_FLAGS); do \
1330 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1331 done; \
1332 if (cd $(TARGET_SUBDIR)/$$i; \
1333 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1334 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1335 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1336 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1337 maintainer-clean); \
1338 then true; else exit 1; fi; \
1339 else true; fi; \
1340 done
1341
1342.PHONY: do-TAGS
1343do-TAGS:
1344 @r=`${PWD}`; export r; \
1345 s=`cd $(srcdir); ${PWD}`; export s; \
1346 $(SET_LIB_PATH) \
1347 for i in $(SUBDIRS) -dummy-; do \
1348 if [ -f ./$$i/Makefile ]; then \
1349 case $$i in \
1350 gcc) \
1351 for flag in $(EXTRA_GCC_FLAGS); do \
1352 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1353 done; \
1354 ;; \
1355 *) \
1356 for flag in $(EXTRA_HOST_FLAGS); do \
1357 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1358 done; \
1359 ;; \
1360 esac ; \
1361 if (cd ./$$i; \
1362 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1363 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1364 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1365 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1366 TAGS); \
1367 then true; else exit 1; fi; \
1368 else true; fi; \
1369 done
1370 # Break into two pieces
1371 r=`${PWD}`; export r; \
1372 s=`cd $(srcdir); ${PWD}`; export s; \
1373 $(SET_LIB_PATH) \
1374 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
1375 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1376 for flag in $(EXTRA_TARGET_FLAGS); do \
1377 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1378 done; \
1379 if (cd $(TARGET_SUBDIR)/$$i; \
1380 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1381 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1382 "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
1383 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1384 TAGS); \
1385 then true; else exit 1; fi; \
1386 else true; fi; \
1387 done
1388
1389
1390
1391# Here are the targets which correspond to the do-X targets.
1392
1393.PHONY: info installcheck dvi install-info
1394.PHONY: clean distclean mostlyclean maintainer-clean realclean
1395.PHONY: local-clean local-distclean local-maintainer-clean
1396info: do-info
1397installcheck: do-installcheck
1398dvi: do-dvi
1399
1400# Make sure makeinfo is built before we do a `make info'.
1401do-info: all-texinfo
1402
1403install-info: do-install-info dir.info
1404 s=`cd $(srcdir); ${PWD}`; export s; \
1405 if [ -f dir.info ] ; then \
1406 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1407 else true ; fi
1408
1409local-clean:
1410 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
1411
1412local-distclean:
252b5132
RH
1413 -rm -f Makefile config.status config.cache mh-frag mt-frag
1414 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1415 rm -rf $(TARGET_SUBDIR); \
1416 else true; fi
75205f78
DD
1417 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
1418 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
1419 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
1420 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
1421 -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
252b5132
RH
1422
1423local-maintainer-clean:
1424 @echo "This command is intended for maintainers to use;"
1425 @echo "it deletes files that may require special tools to rebuild."
1426
1427clean: do-clean local-clean
1428mostlyclean: do-mostlyclean local-clean
1429distclean: do-distclean local-clean local-distclean
1430maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1431maintainer-clean: local-distclean
1432realclean: maintainer-clean
1433
1434# This rule is used to clean specific modules.
1435.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1436$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1437 @dir=`echo $@ | sed -e 's/clean-//'`; \
1438 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
1439 r=`${PWD}`; export r; \
1440 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1441 $(SET_LIB_PATH) \
1442 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1443 else \
1444 true; \
1445 fi
1446
1447.PHONY: $(CLEAN_TARGET_MODULES)
1448$(CLEAN_TARGET_MODULES):
1449 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1450 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1451 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
d5de0a84
NC
1452 r=`${PWD}`; export r; \
1453 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
1454 $(SET_LIB_PATH) \
1455 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1456 else \
1457 true; \
1458 fi
1459
5cec67bf
AO
1460clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
1461clean-target-libgcc:
1462 test ! -d gcc/libgcc || \
1463 (cd gcc/libgcc && find . -type d -print) | \
1464 while read d; do rm -f gcc/$$d/libgcc.a || : ; done
1465 -rm -rf gcc/libgcc
252b5132
RH
1466
1467# Check target.
1468
80413487
RH
1469.PHONY: check do-check
1470check:
1471 $(MAKE) do-check NOTPARALLEL=parallel-ok
1472
1473do-check: $(CHECK_MODULES) \
252b5132
RH
1474 $(CHECK_TARGET_MODULES) \
1475 $(CHECK_X11_MODULES) \
1476 check-gcc
1477
1478# Automated reporting of test results.
1479
1480warning.log: build.log
1481 $(srcdir)/contrib/warn_summary build.log > $@
1482
1483mail-report.log:
1484 if test x'$(BOOT_CFLAGS)' != x''; then \
1485 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1486 fi; \
1487 $(srcdir)/contrib/test_summary -t >$@
1488 chmod +x $@
1489 echo If you really want to send e-mail, run ./$@ now
1490
1491mail-report-with-warnings.log: warning.log
1492 if test x'$(BOOT_CFLAGS)' != x''; then \
1493 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1494 fi; \
1495 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1496 chmod +x $@
1497 echo If you really want to send e-mail, run ./$@ now
1498
1499# Installation targets.
1500
1501.PHONY: install install-cross uninstall source-vault binary-vault vault-install
1502install: $(INSTALL_TARGET)
1503install-cross: $(INSTALL_TARGET_CROSS)
1504
1505uninstall:
1506 @echo "the uninstall target is not supported in this tree"
1507
1508source-vault:
1509 $(MAKE) -f ./release/Build-A-Release \
1510 host=$(host_alias) source-vault
1511
1512binary-vault:
1513 $(MAKE) -f ./release/Build-A-Release \
1514 host=$(host_alias) target=$(target_alias)
1515
1516vault-install:
1517 @if [ -f ./release/vault-install ] ; then \
1518 ./release/vault-install $(host_alias) $(target_alias) ; \
1519 else \
e393202e
NN
1520 true ; \
1521 fi
1522
1523.PHONY: install.all
1524install.all: install-no-fixedincludes
1525 @if [ -f ./gcc/Makefile ] ; then \
1526 r=`${PWD}` ; export r ; \
1527 $(SET_LIB_PATH) \
1528 (cd ./gcc; \
1529 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1530 else \
1531 true ; \
1532 fi
1533
1534# install-no-fixedincludes is used because Cygnus can not distribute
1535# the fixed header files.
1536.PHONY: install-no-fixedincludes
1537install-no-fixedincludes: \
1538 installdirs \
1539 $(INSTALL_MODULES) \
1540 $(INSTALL_TARGET_MODULES) \
1541 $(INSTALL_X11_MODULES) \
1542 gcc-no-fixedincludes
1543
1544# Install the gcc headers files, but not the fixed include files,
1545# which Cygnus is not allowed to distribute. This rule is very
1546# dependent on the workings of the gcc Makefile.in.
1547.PHONY: gcc-no-fixedincludes
1548gcc-no-fixedincludes:
1549 @if [ -f ./gcc/Makefile ]; then \
1550 rm -rf gcc/tmp-include; \
1551 mv gcc/include gcc/tmp-include 2>/dev/null; \
1552 mkdir gcc/include; \
1553 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1554 touch gcc/stmp-fixinc gcc/include/fixed; \
1555 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1556 r=`${PWD}`; export r; \
1557 s=`cd $(srcdir); ${PWD}` ; export s; \
1558 $(SET_LIB_PATH) \
1559 (cd ./gcc; \
1560 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1561 rm -rf gcc/include; \
1562 mv gcc/tmp-include gcc/include 2>/dev/null; \
1563 else true; fi
1564
1565# These rules are used to build the modules which are built with the
1566# build machine's native compiler.
1567
1568.PHONY: all-build-libiberty
1569all-build-libiberty:
1570 @if [ -f ./libiberty/Makefile ] ; then \
1571 r=`${PWD}`; export r; \
1572 s=`cd $(srcdir); ${PWD}`; export s; \
1573 (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all); \
1574 else \
1575 true; \
1576 fi
1577
1578.PHONY: configure-build-libiberty
1579configure-build-libiberty:
1580 @if [ ! -d $(BUILD_SUBDIR) ]; then \
1581 true; \
1582 elif [ -f $(BUILD_SUBDIR)/libiberty/Makefile ] ; then \
1583 true; \
1584 elif echo " $(BUILD_CONFIGDIRS) " | grep " libiberty " >/dev/null 2>&1; then \
1585 if [ -d $(srcdir)/libiberty ]; then \
1586 [ -d $(BUILD_SUBDIR)/libiberty ] || mkdir $(BUILD_SUBDIR)/libiberty;\
1587 r=`${PWD}`; export r; \
1588 s=`cd $(srcdir); ${PWD}`; export s; \
1589 AR="$(AR_FOR_BUILD)"; export AR; \
1590 AS="$(AS_FOR_BUILD)"; export AS; \
1591 CC="$(CC_FOR_BUILD)"; export CC; \
1592 CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
1593 CXX="$(CXX_FOR_BUILD)"; export CXX; \
1594 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
1595 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
1596 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
1597 LD="$(LD_FOR_BUILD)"; export LD; \
1598 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
1599 NM="$(NM_FOR_BUILD)"; export NM; \
1600 RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
1601 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
1602 echo Configuring in $(BUILD_SUBDIR)/libiberty; \
1603 cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \
1604 case $(srcdir) in \
1605 /* | [A-Za-z]:[\\/]*) \
1606 topdir=$(srcdir) ;; \
1607 *) \
1608 case "$(BUILD_SUBDIR)" in \
1609 .) topdir="../$(srcdir)" ;; \
1610 *) topdir="../../$(srcdir)" ;; \
1611 esac ;; \
1612 esac; \
1613 if [ "$(srcdir)" = "." ] ; then \
1614 if [ "$(BUILD_SUBDIR)" != "." ] ; then \
1615 if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \
1616 if [ -f Makefile ]; then \
1617 if $(MAKE) distclean; then \
1618 true; \
1619 else \
1620 exit 1; \
1621 fi; \
1622 else \
1623 true; \
1624 fi; \
1625 else \
1626 exit 1; \
1627 fi; \
1628 else \
1629 true; \
1630 fi; \
1631 srcdiroption="--srcdir=."; \
1632 libsrcdir="."; \
1633 else \
1634 srcdiroption="--srcdir=$${topdir}/libiberty"; \
1635 libsrcdir="$$s/libiberty"; \
1636 fi; \
1637 if [ -f $${libsrcdir}/configure ] ; then \
1638 rm -f no-such-file skip-this-dir; \
1639 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1640 $(BUILD_CONFIGARGS) $${srcdiroption} \
1641 --with-build-subdir="$(BUILD_SUBDIR)"; \
1642 else \
1643 rm -f no-such-file skip-this-dir; \
1644 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1645 $(BUILD_CONFIGARGS) $${srcdiroption} \
1646 --with-build-subdir="$(BUILD_SUBDIR)"; \
1647 fi || exit 1; \
1648 if [ -f skip-this-dir ] ; then \
1649 sh skip-this-dir; \
1650 rm -f skip-this-dir; \
1651 cd ..; rmdir libiberty || true; \
1652 else \
1653 true; \
1654 fi; \
1655 else \
1656 true; \
1657 fi; \
1658 else \
1659 true; \
1660 fi
1661
1662
1663# This rule is used to build the modules which use FLAGS_TO_PASS. To
1664# build a target all-X means to cd to X and make all.
1665.PHONY: $(ALL_MODULES)
1666$(ALL_MODULES):
1667 @dir=`echo $@ | sed -e 's/all-//'`; \
1668 if [ -f ./$${dir}/Makefile ] ; then \
1669 r=`${PWD}`; export r; \
1670 s=`cd $(srcdir); ${PWD}`; export s; \
1671 $(SET_LIB_PATH) \
1672 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1673 else \
1674 true; \
1675 fi
1676
1677# These rules are used to check the modules which use FLAGS_TO_PASS.
1678# To build a target check-X means to cd to X and make check. Some
1679# modules are only tested in a native toolchain.
1680
1681.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1682$(NATIVE_CHECK_MODULES):
1683 @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
1684 dir=`echo $@ | sed -e 's/check-//'`; \
1685 if [ -f ./$${dir}/Makefile ] ; then \
1686 r=`${PWD}`; export r; \
1687 s=`cd $(srcdir); ${PWD}`; export s; \
1688 $(SET_LIB_PATH) \
1689 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1690 else \
1691 true; \
1692 fi; \
1693 fi
1694
1695$(CROSS_CHECK_MODULES):
1696 @dir=`echo $@ | sed -e 's/check-//'`; \
1697 if [ -f ./$${dir}/Makefile ] ; then \
1698 r=`${PWD}`; export r; \
1699 s=`cd $(srcdir); ${PWD}`; export s; \
1700 $(SET_LIB_PATH) \
1701 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1702 else \
1703 true; \
1704 fi
1705
1706# This rule is used to install the modules which use FLAGS_TO_PASS.
1707# To build a target install-X means to cd to X and make install.
1708.PHONY: $(INSTALL_MODULES)
1709$(INSTALL_MODULES): installdirs
1710 @dir=`echo $@ | sed -e 's/install-//'`; \
1711 if [ -f ./$${dir}/Makefile ] ; then \
1712 r=`${PWD}`; export r; \
1713 s=`cd $(srcdir); ${PWD}`; export s; \
1714 $(SET_LIB_PATH) \
1715 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1716 else \
1717 true; \
1718 fi
1719
1720# These rules are used to build the modules which are built with the target
1721# tools. To make foo-X means to cd to X and make foo.
1722
1723.PHONY: configure-target-libstdc++-v3
1724configure-target-libstdc++-v3:
1725 @if [ -d $(TARGET_SUBDIR)/libstdc++-v3 ]; then \
1726 r=`${PWD}`; export r; \
1727 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out 2> /dev/null; \
1728 if [ -s $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out ]; then \
1729 if [ -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.out ]; then \
1730 if cmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out > /dev/null; then \
1731 rm -f $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out; \
1732 else \
1733 echo "Multilibs changed for libstdc++-v3, reconfiguring"; \
1734 rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.out $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
1735 mv $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
1736 fi; \
1737 else \
1738 mv $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
1739 fi; \
1740 fi; \
1741 fi; exit 0 # break command into two pieces
1742 @dir=libstdc++-v3 ; \
1743 if [ ! -d $(TARGET_SUBDIR) ]; then \
1744 true; \
1745 elif [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] ; then \
1746 true; \
1747 elif echo " $(TARGET_CONFIGDIRS) " | grep " libstdc++-v3 " >/dev/null 2>&1; then \
1748 if [ -d $(srcdir)/libstdc++-v3 ]; then \
1749 [ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
1750 r=`${PWD}`; export r; \
1751 s=`cd $(srcdir); ${PWD}`; export s; \
1752 $(SET_LIB_PATH) \
1753 AR="$(AR_FOR_TARGET)"; export AR; \
1754 AS="$(AS_FOR_TARGET)"; export AS; \
1755 CC="$(CC_FOR_TARGET)"; export CC; \
1756 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1757 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1758 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1759 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
1760 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1761 LD="$(LD_FOR_TARGET)"; export LD; \
1762 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1763 NM="$(NM_FOR_TARGET)"; export NM; \
1764 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1765 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1766 echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \
1767 cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \
1768 case $(srcdir) in \
1769 /* | [A-Za-z]:[\\/]*) \
1770 topdir=$(srcdir) ;; \
1771 *) \
1772 case "$(TARGET_SUBDIR)" in \
1773 .) topdir="../$(srcdir)" ;; \
1774 *) topdir="../../$(srcdir)" ;; \
1775 esac ;; \
1776 esac; \
1777 if [ "$(srcdir)" = "." ] ; then \
1778 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1779 if $(SHELL) $$s/symlink-tree $${topdir}/libstdc++-v3 "no-such-file" ; then \
1780 if [ -f Makefile ]; then \
1781 if $(MAKE) distclean; then \
1782 true; \
1783 else \
1784 exit 1; \
1785 fi; \
1786 else \
1787 true; \
1788 fi; \
1789 else \
1790 exit 1; \
1791 fi; \
1792 else \
1793 true; \
1794 fi; \
1795 srcdiroption="--srcdir=."; \
1796 libsrcdir="."; \
1797 else \
1798 srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
1799 libsrcdir="$$s/libstdc++-v3"; \
1800 fi; \
1801 if [ -f $${libsrcdir}/configure ] ; then \
1802 rm -f no-such-file skip-this-dir; \
1803 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1804 $(TARGET_CONFIGARGS) $${srcdiroption} \
1805 --with-target-subdir="$(TARGET_SUBDIR)"; \
1806 else \
1807 rm -f no-such-file skip-this-dir; \
1808 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1809 $(TARGET_CONFIGARGS) $${srcdiroption} \
1810 --with-target-subdir="$(TARGET_SUBDIR)"; \
1811 fi || exit 1; \
1812 if [ -f skip-this-dir ] ; then \
1813 sh skip-this-dir; \
1814 rm -f skip-this-dir; \
1815 cd ..; rmdir libstdc++-v3 || true; \
1816 else \
1817 true; \
1818 fi; \
1819 else \
1820 true; \
1821 fi; \
1822 else \
1823 true; \
1824 fi
1825
1826.PHONY: all-target-libstdc++-v3
1827all-target-libstdc++-v3:
1828 @dir=libstdc++-v3 ; \
1829 if [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] ; then \
1830 r=`${PWD}`; export r; \
1831 s=`cd $(srcdir); ${PWD}`; export s; \
1832 $(SET_LIB_PATH) \
1833 (cd $(TARGET_SUBDIR)/libstdc++-v3; \
1834 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1835 else \
1836 true; \
1837 fi
1838
1839.PHONY: check-target-libstdc++-v3
1840check-target-libstdc++-v3:
1841 @dir=libstdc++-v3 ; \
1842 if [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] ; then \
1843 r=`${PWD}`; export r; \
1844 s=`cd $(srcdir); ${PWD}`; export s; \
1845 $(SET_LIB_PATH) \
1846 (cd $(TARGET_SUBDIR)/libstdc++-v3; \
1847 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1848 else \
1849 true; \
1850 fi
1851
1852\
1853.PHONY: install-target-libstdc++-v3
1854install-target-libstdc++-v3: installdirs
1855 @dir=libstdc++-v3 ; \
1856 if [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] ; then \
1857 r=`${PWD}`; export r; \
1858 s=`cd $(srcdir); ${PWD}`; export s; \
1859 $(SET_LIB_PATH) \
1860 (cd $(TARGET_SUBDIR)/libstdc++-v3; \
1861 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1862 else \
1863 true; \
1864 fi
1865
1866
1867.PHONY: configure-target-newlib
1868configure-target-newlib:
1869 @if [ -d $(TARGET_SUBDIR)/newlib ]; then \
1870 r=`${PWD}`; export r; \
1871 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/newlib/tmpmulti.out 2> /dev/null; \
1872 if [ -s $(TARGET_SUBDIR)/newlib/tmpmulti.out ]; then \
1873 if [ -f $(TARGET_SUBDIR)/newlib/multilib.out ]; then \
1874 if cmp $(TARGET_SUBDIR)/newlib/multilib.out $(TARGET_SUBDIR)/newlib/tmpmulti.out > /dev/null; then \
1875 rm -f $(TARGET_SUBDIR)/newlib/tmpmulti.out; \
1876 else \
1877 echo "Multilibs changed for newlib, reconfiguring"; \
1878 rm -f $(TARGET_SUBDIR)/newlib/multilib.out $(TARGET_SUBDIR)/newlib/Makefile; \
1879 mv $(TARGET_SUBDIR)/newlib/tmpmulti.out $(TARGET_SUBDIR)/newlib/multilib.out; \
1880 fi; \
1881 else \
1882 mv $(TARGET_SUBDIR)/newlib/tmpmulti.out $(TARGET_SUBDIR)/newlib/multilib.out; \
1883 fi; \
1884 fi; \
1885 fi; exit 0 # break command into two pieces
1886 @dir=newlib ; \
1887 if [ ! -d $(TARGET_SUBDIR) ]; then \
1888 true; \
1889 elif [ -f $(TARGET_SUBDIR)/newlib/Makefile ] ; then \
1890 true; \
1891 elif echo " $(TARGET_CONFIGDIRS) " | grep " newlib " >/dev/null 2>&1; then \
1892 if [ -d $(srcdir)/newlib ]; then \
1893 [ -d $(TARGET_SUBDIR)/newlib ] || mkdir $(TARGET_SUBDIR)/newlib;\
1894 r=`${PWD}`; export r; \
1895 s=`cd $(srcdir); ${PWD}`; export s; \
1896 $(SET_LIB_PATH) \
1897 AR="$(AR_FOR_TARGET)"; export AR; \
1898 AS="$(AS_FOR_TARGET)"; export AS; \
1899 CC="$(CC_FOR_TARGET)"; export CC; \
1900 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1901 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1902 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1903 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
1904 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1905 LD="$(LD_FOR_TARGET)"; export LD; \
1906 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1907 NM="$(NM_FOR_TARGET)"; export NM; \
1908 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1909 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1910 echo Configuring in $(TARGET_SUBDIR)/newlib; \
1911 cd "$(TARGET_SUBDIR)/newlib" || exit 1; \
1912 case $(srcdir) in \
1913 /* | [A-Za-z]:[\\/]*) \
1914 topdir=$(srcdir) ;; \
1915 *) \
1916 case "$(TARGET_SUBDIR)" in \
1917 .) topdir="../$(srcdir)" ;; \
1918 *) topdir="../../$(srcdir)" ;; \
1919 esac ;; \
1920 esac; \
1921 if [ "$(srcdir)" = "." ] ; then \
1922 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1923 if $(SHELL) $$s/symlink-tree $${topdir}/newlib "no-such-file" ; then \
1924 if [ -f Makefile ]; then \
1925 if $(MAKE) distclean; then \
1926 true; \
1927 else \
1928 exit 1; \
1929 fi; \
1930 else \
1931 true; \
1932 fi; \
1933 else \
1934 exit 1; \
1935 fi; \
1936 else \
1937 true; \
1938 fi; \
1939 srcdiroption="--srcdir=."; \
1940 libsrcdir="."; \
1941 else \
1942 srcdiroption="--srcdir=$${topdir}/newlib"; \
1943 libsrcdir="$$s/newlib"; \
1944 fi; \
1945 if [ -f $${libsrcdir}/configure ] ; then \
1946 rm -f no-such-file skip-this-dir; \
1947 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1948 $(TARGET_CONFIGARGS) $${srcdiroption} \
1949 --with-target-subdir="$(TARGET_SUBDIR)"; \
1950 else \
1951 rm -f no-such-file skip-this-dir; \
1952 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1953 $(TARGET_CONFIGARGS) $${srcdiroption} \
1954 --with-target-subdir="$(TARGET_SUBDIR)"; \
1955 fi || exit 1; \
1956 if [ -f skip-this-dir ] ; then \
1957 sh skip-this-dir; \
1958 rm -f skip-this-dir; \
1959 cd ..; rmdir newlib || true; \
1960 else \
1961 true; \
1962 fi; \
1963 else \
1964 true; \
1965 fi; \
1966 else \
1967 true; \
1968 fi
1969
1970.PHONY: all-target-newlib
1971all-target-newlib:
1972 @dir=newlib ; \
1973 if [ -f $(TARGET_SUBDIR)/newlib/Makefile ] ; then \
1974 r=`${PWD}`; export r; \
1975 s=`cd $(srcdir); ${PWD}`; export s; \
1976 $(SET_LIB_PATH) \
1977 (cd $(TARGET_SUBDIR)/newlib; \
1978 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1979 else \
1980 true; \
1981 fi
1982
1983.PHONY: check-target-newlib
1984check-target-newlib:
1985 @dir=newlib ; \
1986 if [ -f $(TARGET_SUBDIR)/newlib/Makefile ] ; then \
1987 r=`${PWD}`; export r; \
1988 s=`cd $(srcdir); ${PWD}`; export s; \
1989 $(SET_LIB_PATH) \
1990 (cd $(TARGET_SUBDIR)/newlib; \
1991 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1992 else \
1993 true; \
1994 fi
1995
1996\
1997.PHONY: install-target-newlib
1998install-target-newlib: installdirs
1999 @dir=newlib ; \
2000 if [ -f $(TARGET_SUBDIR)/newlib/Makefile ] ; then \
2001 r=`${PWD}`; export r; \
2002 s=`cd $(srcdir); ${PWD}`; export s; \
2003 $(SET_LIB_PATH) \
2004 (cd $(TARGET_SUBDIR)/newlib; \
2005 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
2006 else \
2007 true; \
2008 fi
2009
2010
2011.PHONY: configure-target-libf2c
2012configure-target-libf2c:
2013 @if [ -d $(TARGET_SUBDIR)/libf2c ]; then \
2014 r=`${PWD}`; export r; \
2015 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libf2c/tmpmulti.out 2> /dev/null; \
2016 if [ -s $(TARGET_SUBDIR)/libf2c/tmpmulti.out ]; then \
2017 if [ -f $(TARGET_SUBDIR)/libf2c/multilib.out ]; then \
2018 if cmp $(TARGET_SUBDIR)/libf2c/multilib.out $(TARGET_SUBDIR)/libf2c/tmpmulti.out > /dev/null; then \
2019 rm -f $(TARGET_SUBDIR)/libf2c/tmpmulti.out; \
2020 else \
2021 echo "Multilibs changed for libf2c, reconfiguring"; \
2022 rm -f $(TARGET_SUBDIR)/libf2c/multilib.out $(TARGET_SUBDIR)/libf2c/Makefile; \
2023 mv $(TARGET_SUBDIR)/libf2c/tmpmulti.out $(TARGET_SUBDIR)/libf2c/multilib.out; \
2024 fi; \
2025 else \
2026 mv $(TARGET_SUBDIR)/libf2c/tmpmulti.out $(TARGET_SUBDIR)/libf2c/multilib.out; \
2027 fi; \
2028 fi; \
2029 fi; exit 0 # break command into two pieces
2030 @dir=libf2c ; \
2031 if [ ! -d $(TARGET_SUBDIR) ]; then \
2032 true; \
2033 elif [ -f $(TARGET_SUBDIR)/libf2c/Makefile ] ; then \
2034 true; \
2035 elif echo " $(TARGET_CONFIGDIRS) " | grep " libf2c " >/dev/null 2>&1; then \
2036 if [ -d $(srcdir)/libf2c ]; then \
2037 [ -d $(TARGET_SUBDIR)/libf2c ] || mkdir $(TARGET_SUBDIR)/libf2c;\
2038 r=`${PWD}`; export r; \
2039 s=`cd $(srcdir); ${PWD}`; export s; \
2040 $(SET_LIB_PATH) \
2041 AR="$(AR_FOR_TARGET)"; export AR; \
2042 AS="$(AS_FOR_TARGET)"; export AS; \
2043 CC="$(CC_FOR_TARGET)"; export CC; \
2044 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
2045 CXX="$(CXX_FOR_TARGET)"; export CXX; \
2046 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
2047 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
2048 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
2049 LD="$(LD_FOR_TARGET)"; export LD; \
2050 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
2051 NM="$(NM_FOR_TARGET)"; export NM; \
2052 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
2053 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
2054 echo Configuring in $(TARGET_SUBDIR)/libf2c; \
2055 cd "$(TARGET_SUBDIR)/libf2c" || exit 1; \
2056 case $(srcdir) in \
2057 /* | [A-Za-z]:[\\/]*) \
2058 topdir=$(srcdir) ;; \
2059 *) \
2060 case "$(TARGET_SUBDIR)" in \
2061 .) topdir="../$(srcdir)" ;; \
2062 *) topdir="../../$(srcdir)" ;; \
2063 esac ;; \
2064 esac; \
2065 if [ "$(srcdir)" = "." ] ; then \
2066 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
2067 if $(SHELL) $$s/symlink-tree $${topdir}/libf2c "no-such-file" ; then \
2068 if [ -f Makefile ]; then \
2069 if $(MAKE) distclean; then \
2070 true; \
2071 else \
2072 exit 1; \
2073 fi; \
2074 else \
2075 true; \
2076 fi; \
2077 else \
2078 exit 1; \
2079 fi; \
2080 else \
2081 true; \
2082 fi; \
2083 srcdiroption="--srcdir=."; \
2084 libsrcdir="."; \
2085 else \
2086 srcdiroption="--srcdir=$${topdir}/libf2c"; \
2087 libsrcdir="$$s/libf2c"; \
2088 fi; \
2089 if [ -f $${libsrcdir}/configure ] ; then \
2090 rm -f no-such-file skip-this-dir; \
2091 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
2092 $(TARGET_CONFIGARGS) $${srcdiroption} \
2093 --with-target-subdir="$(TARGET_SUBDIR)"; \
2094 else \
2095 rm -f no-such-file skip-this-dir; \
2096 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
2097 $(TARGET_CONFIGARGS) $${srcdiroption} \
2098 --with-target-subdir="$(TARGET_SUBDIR)"; \
2099 fi || exit 1; \
2100 if [ -f skip-this-dir ] ; then \
2101 sh skip-this-dir; \
2102 rm -f skip-this-dir; \
2103 cd ..; rmdir libf2c || true; \
2104 else \
2105 true; \
2106 fi; \
2107 else \
2108 true; \
2109 fi; \
2110 else \
2111 true; \
2112 fi
2113
2114.PHONY: all-target-libf2c
2115all-target-libf2c:
2116 @dir=libf2c ; \
2117 if [ -f $(TARGET_SUBDIR)/libf2c/Makefile ] ; then \
2118 r=`${PWD}`; export r; \
2119 s=`cd $(srcdir); ${PWD}`; export s; \
2120 $(SET_LIB_PATH) \
2121 (cd $(TARGET_SUBDIR)/libf2c; \
2122 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
2123 else \
2124 true; \
2125 fi
2126
2127.PHONY: check-target-libf2c
2128check-target-libf2c:
2129 @dir=libf2c ; \
2130 if [ -f $(TARGET_SUBDIR)/libf2c/Makefile ] ; then \
2131 r=`${PWD}`; export r; \
2132 s=`cd $(srcdir); ${PWD}`; export s; \
2133 $(SET_LIB_PATH) \
2134 (cd $(TARGET_SUBDIR)/libf2c; \
2135 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
2136 else \
2137 true; \
2138 fi
2139
2140\
2141.PHONY: install-target-libf2c
2142install-target-libf2c: installdirs
2143 @dir=libf2c ; \
2144 if [ -f $(TARGET_SUBDIR)/libf2c/Makefile ] ; then \
2145 r=`${PWD}`; export r; \
2146 s=`cd $(srcdir); ${PWD}`; export s; \
2147 $(SET_LIB_PATH) \
2148 (cd $(TARGET_SUBDIR)/libf2c; \
2149 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
2150 else \
2151 true; \
2152 fi
2153
2154
2155.PHONY: configure-target-libobjc
2156configure-target-libobjc:
2157 @if [ -d $(TARGET_SUBDIR)/libobjc ]; then \
2158 r=`${PWD}`; export r; \
2159 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libobjc/tmpmulti.out 2> /dev/null; \
2160 if [ -s $(TARGET_SUBDIR)/libobjc/tmpmulti.out ]; then \
2161 if [ -f $(TARGET_SUBDIR)/libobjc/multilib.out ]; then \
2162 if cmp $(TARGET_SUBDIR)/libobjc/multilib.out $(TARGET_SUBDIR)/libobjc/tmpmulti.out > /dev/null; then \
2163 rm -f $(TARGET_SUBDIR)/libobjc/tmpmulti.out; \
2164 else \
2165 echo "Multilibs changed for libobjc, reconfiguring"; \
2166 rm -f $(TARGET_SUBDIR)/libobjc/multilib.out $(TARGET_SUBDIR)/libobjc/Makefile; \
2167 mv $(TARGET_SUBDIR)/libobjc/tmpmulti.out $(TARGET_SUBDIR)/libobjc/multilib.out; \
2168 fi; \
2169 else \
2170 mv $(TARGET_SUBDIR)/libobjc/tmpmulti.out $(TARGET_SUBDIR)/libobjc/multilib.out; \
2171 fi; \
2172 fi; \
2173 fi; exit 0 # break command into two pieces
2174 @dir=libobjc ; \
2175 if [ ! -d $(TARGET_SUBDIR) ]; then \
2176 true; \
2177 elif [ -f $(TARGET_SUBDIR)/libobjc/Makefile ] ; then \
2178 true; \
2179 elif echo " $(TARGET_CONFIGDIRS) " | grep " libobjc " >/dev/null 2>&1; then \
2180 if [ -d $(srcdir)/libobjc ]; then \
2181 [ -d $(TARGET_SUBDIR)/libobjc ] || mkdir $(TARGET_SUBDIR)/libobjc;\
2182 r=`${PWD}`; export r; \
2183 s=`cd $(srcdir); ${PWD}`; export s; \
2184 $(SET_LIB_PATH) \
2185 AR="$(AR_FOR_TARGET)"; export AR; \
2186 AS="$(AS_FOR_TARGET)"; export AS; \
2187 CC="$(CC_FOR_TARGET)"; export CC; \
2188 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
2189 CXX="$(CXX_FOR_TARGET)"; export CXX; \
2190 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
2191 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
2192 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
2193 LD="$(LD_FOR_TARGET)"; export LD; \
2194 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
2195 NM="$(NM_FOR_TARGET)"; export NM; \
2196 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
2197 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
2198 echo Configuring in $(TARGET_SUBDIR)/libobjc; \
2199 cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \
2200 case $(srcdir) in \
2201 /* | [A-Za-z]:[\\/]*) \
2202 topdir=$(srcdir) ;; \
2203 *) \
2204 case "$(TARGET_SUBDIR)" in \
2205 .) topdir="../$(srcdir)" ;; \
2206 *) topdir="../../$(srcdir)" ;; \
2207 esac ;; \
2208 esac; \
2209 if [ "$(srcdir)" = "." ] ; then \
2210 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
2211 if $(SHELL) $$s/symlink-tree $${topdir}/libobjc "no-such-file" ; then \
2212 if [ -f Makefile ]; then \
2213 if $(MAKE) distclean; then \
2214 true; \
2215 else \
2216 exit 1; \
2217 fi; \
2218 else \
2219 true; \
2220 fi; \
2221 else \
2222 exit 1; \
2223 fi; \
2224 else \
2225 true; \
2226 fi; \
2227 srcdiroption="--srcdir=."; \
2228 libsrcdir="."; \
2229 else \
2230 srcdiroption="--srcdir=$${topdir}/libobjc"; \
2231 libsrcdir="$$s/libobjc"; \
2232 fi; \
2233 if [ -f $${libsrcdir}/configure ] ; then \
2234 rm -f no-such-file skip-this-dir; \
2235 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
2236 $(TARGET_CONFIGARGS) $${srcdiroption} \
2237 --with-target-subdir="$(TARGET_SUBDIR)"; \
2238 else \
2239 rm -f no-such-file skip-this-dir; \
2240 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
2241 $(TARGET_CONFIGARGS) $${srcdiroption} \
2242 --with-target-subdir="$(TARGET_SUBDIR)"; \
2243 fi || exit 1; \
2244 if [ -f skip-this-dir ] ; then \
2245 sh skip-this-dir; \
2246 rm -f skip-this-dir; \
2247 cd ..; rmdir libobjc || true; \
2248 else \
2249 true; \
2250 fi; \
2251 else \
2252 true; \
2253 fi; \
2254 else \
2255 true; \
2256 fi
2257
2258.PHONY: all-target-libobjc
2259all-target-libobjc:
2260 @dir=libobjc ; \
2261 if [ -f $(TARGET_SUBDIR)/libobjc/Makefile ] ; then \
2262 r=`${PWD}`; export r; \
2263 s=`cd $(srcdir); ${PWD}`; export s; \
2264 $(SET_LIB_PATH) \
2265 (cd $(TARGET_SUBDIR)/libobjc; \
2266 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
2267 else \
2268 true; \
2269 fi
2270
2271.PHONY: check-target-libobjc
2272check-target-libobjc:
2273 @dir=libobjc ; \
2274 if [ -f $(TARGET_SUBDIR)/libobjc/Makefile ] ; then \
2275 r=`${PWD}`; export r; \
2276 s=`cd $(srcdir); ${PWD}`; export s; \
2277 $(SET_LIB_PATH) \
2278 (cd $(TARGET_SUBDIR)/libobjc; \
2279 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
2280 else \
2281 true; \
2282 fi
2283
2284\
2285.PHONY: install-target-libobjc
2286install-target-libobjc: installdirs
2287 @dir=libobjc ; \
2288 if [ -f $(TARGET_SUBDIR)/libobjc/Makefile ] ; then \
2289 r=`${PWD}`; export r; \
2290 s=`cd $(srcdir); ${PWD}`; export s; \
2291 $(SET_LIB_PATH) \
2292 (cd $(TARGET_SUBDIR)/libobjc; \
2293 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
2294 else \
2295 true; \
2296 fi
2297
2298
2299.PHONY: configure-target-libtermcap
2300configure-target-libtermcap:
2301 @if [ -d $(TARGET_SUBDIR)/libtermcap ]; then \
2302 r=`${PWD}`; export r; \
2303 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libtermcap/tmpmulti.out 2> /dev/null; \
2304 if [ -s $(TARGET_SUBDIR)/libtermcap/tmpmulti.out ]; then \
2305 if [ -f $(TARGET_SUBDIR)/libtermcap/multilib.out ]; then \
2306 if cmp $(TARGET_SUBDIR)/libtermcap/multilib.out $(TARGET_SUBDIR)/libtermcap/tmpmulti.out > /dev/null; then \
2307 rm -f $(TARGET_SUBDIR)/libtermcap/tmpmulti.out; \
2308 else \
2309 echo "Multilibs changed for libtermcap, reconfiguring"; \
2310 rm -f $(TARGET_SUBDIR)/libtermcap/multilib.out $(TARGET_SUBDIR)/libtermcap/Makefile; \
2311 mv $(TARGET_SUBDIR)/libtermcap/tmpmulti.out $(TARGET_SUBDIR)/libtermcap/multilib.out; \
2312 fi; \
2313 else \
2314 mv $(TARGET_SUBDIR)/libtermcap/tmpmulti.out $(TARGET_SUBDIR)/libtermcap/multilib.out; \
2315 fi; \
2316 fi; \
2317 fi; exit 0 # break command into two pieces
2318 @dir=libtermcap ; \
2319 if [ ! -d $(TARGET_SUBDIR) ]; then \
2320 true; \
2321 elif [ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] ; then \
2322 true; \
2323 elif echo " $(TARGET_CONFIGDIRS) " | grep " libtermcap " >/dev/null 2>&1; then \
2324 if [ -d $(srcdir)/libtermcap ]; then \
2325 [ -d $(TARGET_SUBDIR)/libtermcap ] || mkdir $(TARGET_SUBDIR)/libtermcap;\
2326 r=`${PWD}`; export r; \
2327 s=`cd $(srcdir); ${PWD}`; export s; \
2328 $(SET_LIB_PATH) \
2329 AR="$(AR_FOR_TARGET)"; export AR; \
2330 AS="$(AS_FOR_TARGET)"; export AS; \
2331 CC="$(CC_FOR_TARGET)"; export CC; \
2332 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
2333 CXX="$(CXX_FOR_TARGET)"; export CXX; \
2334 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
2335 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
2336 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
2337 LD="$(LD_FOR_TARGET)"; export LD; \
2338 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
2339 NM="$(NM_FOR_TARGET)"; export NM; \
2340 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
2341 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
2342 echo Configuring in $(TARGET_SUBDIR)/libtermcap; \
2343 cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \
2344 case $(srcdir) in \
2345 /* | [A-Za-z]:[\\/]*) \
2346 topdir=$(srcdir) ;; \
2347 *) \
2348 case "$(TARGET_SUBDIR)" in \
2349 .) topdir="../$(srcdir)" ;; \
2350 *) topdir="../../$(srcdir)" ;; \
2351 esac ;; \
2352 esac; \
2353 if [ "$(srcdir)" = "." ] ; then \
2354 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
2355 if $(SHELL) $$s/symlink-tree $${topdir}/libtermcap "no-such-file" ; then \
2356 if [ -f Makefile ]; then \
2357 if $(MAKE) distclean; then \
2358 true; \
2359 else \
2360 exit 1; \
2361 fi; \
2362 else \
2363 true; \
2364 fi; \
2365 else \
2366 exit 1; \
2367 fi; \
2368 else \
2369 true; \
2370 fi; \
2371 srcdiroption="--srcdir=."; \
2372 libsrcdir="."; \
2373 else \
2374 srcdiroption="--srcdir=$${topdir}/libtermcap"; \
2375 libsrcdir="$$s/libtermcap"; \
2376 fi; \
2377 if [ -f $${libsrcdir}/configure ] ; then \
2378 rm -f no-such-file skip-this-dir; \
2379 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
2380 $(TARGET_CONFIGARGS) $${srcdiroption} \
2381 --with-target-subdir="$(TARGET_SUBDIR)"; \
2382 else \
2383 rm -f no-such-file skip-this-dir; \
2384 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
2385 $(TARGET_CONFIGARGS) $${srcdiroption} \
2386 --with-target-subdir="$(TARGET_SUBDIR)"; \
2387 fi || exit 1; \
2388 if [ -f skip-this-dir ] ; then \
2389 sh skip-this-dir; \
2390 rm -f skip-this-dir; \
2391 cd ..; rmdir libtermcap || true; \
2392 else \
2393 true; \
2394 fi; \
2395 else \
2396 true; \
2397 fi; \
2398 else \
2399 true; \
2400 fi
2401
2402.PHONY: all-target-libtermcap
2403all-target-libtermcap:
2404 @dir=libtermcap ; \
2405 if [ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] ; then \
2406 r=`${PWD}`; export r; \
2407 s=`cd $(srcdir); ${PWD}`; export s; \
2408 $(SET_LIB_PATH) \
2409 (cd $(TARGET_SUBDIR)/libtermcap; \
2410 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
2411 else \
2412 true; \
2413 fi
2414
2415\
2416.PHONY: install-target-libtermcap
2417install-target-libtermcap: installdirs
2418 @dir=libtermcap ; \
2419 if [ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] ; then \
2420 r=`${PWD}`; export r; \
2421 s=`cd $(srcdir); ${PWD}`; export s; \
2422 $(SET_LIB_PATH) \
2423 (cd $(TARGET_SUBDIR)/libtermcap; \
2424 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
2425 else \
2426 true; \
2427 fi
2428
2429
2430.PHONY: configure-target-winsup
2431configure-target-winsup:
2432 @if [ -d $(TARGET_SUBDIR)/winsup ]; then \
2433 r=`${PWD}`; export r; \
2434 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/winsup/tmpmulti.out 2> /dev/null; \
2435 if [ -s $(TARGET_SUBDIR)/winsup/tmpmulti.out ]; then \
2436 if [ -f $(TARGET_SUBDIR)/winsup/multilib.out ]; then \
2437 if cmp $(TARGET_SUBDIR)/winsup/multilib.out $(TARGET_SUBDIR)/winsup/tmpmulti.out > /dev/null; then \
2438 rm -f $(TARGET_SUBDIR)/winsup/tmpmulti.out; \
2439 else \
2440 echo "Multilibs changed for winsup, reconfiguring"; \
2441 rm -f $(TARGET_SUBDIR)/winsup/multilib.out $(TARGET_SUBDIR)/winsup/Makefile; \
2442 mv $(TARGET_SUBDIR)/winsup/tmpmulti.out $(TARGET_SUBDIR)/winsup/multilib.out; \
2443 fi; \
2444 else \
2445 mv $(TARGET_SUBDIR)/winsup/tmpmulti.out $(TARGET_SUBDIR)/winsup/multilib.out; \
2446 fi; \
2447 fi; \
2448 fi; exit 0 # break command into two pieces
2449 @dir=winsup ; \
2450 if [ ! -d $(TARGET_SUBDIR) ]; then \
2451 true; \
2452 elif [ -f $(TARGET_SUBDIR)/winsup/Makefile ] ; then \
2453 true; \
2454 elif echo " $(TARGET_CONFIGDIRS) " | grep " winsup " >/dev/null 2>&1; then \
2455 if [ -d $(srcdir)/winsup ]; then \
2456 [ -d $(TARGET_SUBDIR)/winsup ] || mkdir $(TARGET_SUBDIR)/winsup;\
2457 r=`${PWD}`; export r; \
2458 s=`cd $(srcdir); ${PWD}`; export s; \
2459 $(SET_LIB_PATH) \
2460 AR="$(AR_FOR_TARGET)"; export AR; \
2461 AS="$(AS_FOR_TARGET)"; export AS; \
2462 CC="$(CC_FOR_TARGET)"; export CC; \
2463 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
2464 CXX="$(CXX_FOR_TARGET)"; export CXX; \
2465 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
2466 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
2467 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
2468 LD="$(LD_FOR_TARGET)"; export LD; \
2469 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
2470 NM="$(NM_FOR_TARGET)"; export NM; \
2471 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
2472 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
2473 echo Configuring in $(TARGET_SUBDIR)/winsup; \
2474 cd "$(TARGET_SUBDIR)/winsup" || exit 1; \
2475 case $(srcdir) in \
2476 /* | [A-Za-z]:[\\/]*) \
2477 topdir=$(srcdir) ;; \
2478 *) \
2479 case "$(TARGET_SUBDIR)" in \
2480 .) topdir="../$(srcdir)" ;; \
2481 *) topdir="../../$(srcdir)" ;; \
2482 esac ;; \
2483 esac; \
2484 if [ "$(srcdir)" = "." ] ; then \
2485 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
2486 if $(SHELL) $$s/symlink-tree $${topdir}/winsup "no-such-file" ; then \
2487 if [ -f Makefile ]; then \
2488 if $(MAKE) distclean; then \
2489 true; \
2490 else \
2491 exit 1; \
2492 fi; \
2493 else \
2494 true; \
2495 fi; \
2496 else \
2497 exit 1; \
2498 fi; \
2499 else \
2500 true; \
2501 fi; \
2502 srcdiroption="--srcdir=."; \
2503 libsrcdir="."; \
2504 else \
2505 srcdiroption="--srcdir=$${topdir}/winsup"; \
2506 libsrcdir="$$s/winsup"; \
2507 fi; \
2508 if [ -f $${libsrcdir}/configure ] ; then \
2509 rm -f no-such-file skip-this-dir; \
2510 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
2511 $(TARGET_CONFIGARGS) $${srcdiroption} \
2512 --with-target-subdir="$(TARGET_SUBDIR)"; \
2513 else \
2514 rm -f no-such-file skip-this-dir; \
2515 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
2516 $(TARGET_CONFIGARGS) $${srcdiroption} \
2517 --with-target-subdir="$(TARGET_SUBDIR)"; \
2518 fi || exit 1; \
2519 if [ -f skip-this-dir ] ; then \
2520 sh skip-this-dir; \
2521 rm -f skip-this-dir; \
2522 cd ..; rmdir winsup || true; \
2523 else \
2524 true; \
2525 fi; \
2526 else \
2527 true; \
2528 fi; \
2529 else \
2530 true; \
2531 fi
2532
2533.PHONY: all-target-winsup
2534all-target-winsup:
2535 @dir=winsup ; \
2536 if [ -f $(TARGET_SUBDIR)/winsup/Makefile ] ; then \
2537 r=`${PWD}`; export r; \
2538 s=`cd $(srcdir); ${PWD}`; export s; \
2539 $(SET_LIB_PATH) \
2540 (cd $(TARGET_SUBDIR)/winsup; \
2541 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
2542 else \
2543 true; \
2544 fi
2545
2546.PHONY: check-target-winsup
2547check-target-winsup:
2548 @dir=winsup ; \
2549 if [ -f $(TARGET_SUBDIR)/winsup/Makefile ] ; then \
2550 r=`${PWD}`; export r; \
2551 s=`cd $(srcdir); ${PWD}`; export s; \
2552 $(SET_LIB_PATH) \
2553 (cd $(TARGET_SUBDIR)/winsup; \
2554 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
2555 else \
2556 true; \
2557 fi
2558
2559\
2560.PHONY: install-target-winsup
2561install-target-winsup: installdirs
2562 @dir=winsup ; \
2563 if [ -f $(TARGET_SUBDIR)/winsup/Makefile ] ; then \
2564 r=`${PWD}`; export r; \
2565 s=`cd $(srcdir); ${PWD}`; export s; \
2566 $(SET_LIB_PATH) \
2567 (cd $(TARGET_SUBDIR)/winsup; \
2568 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
2569 else \
2570 true; \
2571 fi
2572
2573
2574.PHONY: configure-target-libgloss
2575configure-target-libgloss:
2576 @if [ -d $(TARGET_SUBDIR)/libgloss ]; then \
2577 r=`${PWD}`; export r; \
2578 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgloss/tmpmulti.out 2> /dev/null; \
2579 if [ -s $(TARGET_SUBDIR)/libgloss/tmpmulti.out ]; then \
2580 if [ -f $(TARGET_SUBDIR)/libgloss/multilib.out ]; then \
2581 if cmp $(TARGET_SUBDIR)/libgloss/multilib.out $(TARGET_SUBDIR)/libgloss/tmpmulti.out > /dev/null; then \
2582 rm -f $(TARGET_SUBDIR)/libgloss/tmpmulti.out; \
2583 else \
2584 echo "Multilibs changed for libgloss, reconfiguring"; \
2585 rm -f $(TARGET_SUBDIR)/libgloss/multilib.out $(TARGET_SUBDIR)/libgloss/Makefile; \
2586 mv $(TARGET_SUBDIR)/libgloss/tmpmulti.out $(TARGET_SUBDIR)/libgloss/multilib.out; \
2587 fi; \
2588 else \
2589 mv $(TARGET_SUBDIR)/libgloss/tmpmulti.out $(TARGET_SUBDIR)/libgloss/multilib.out; \
2590 fi; \
2591 fi; \
2592 fi; exit 0 # break command into two pieces
2593 @dir=libgloss ; \
2594 if [ ! -d $(TARGET_SUBDIR) ]; then \
2595 true; \
2596 elif [ -f $(TARGET_SUBDIR)/libgloss/Makefile ] ; then \
2597 true; \
2598 elif echo " $(TARGET_CONFIGDIRS) " | grep " libgloss " >/dev/null 2>&1; then \
2599 if [ -d $(srcdir)/libgloss ]; then \
2600 [ -d $(TARGET_SUBDIR)/libgloss ] || mkdir $(TARGET_SUBDIR)/libgloss;\
2601 r=`${PWD}`; export r; \
2602 s=`cd $(srcdir); ${PWD}`; export s; \
2603 $(SET_LIB_PATH) \
2604 AR="$(AR_FOR_TARGET)"; export AR; \
2605 AS="$(AS_FOR_TARGET)"; export AS; \
2606 CC="$(CC_FOR_TARGET)"; export CC; \
2607 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
2608 CXX="$(CXX_FOR_TARGET)"; export CXX; \
2609 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
2610 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
2611 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
2612 LD="$(LD_FOR_TARGET)"; export LD; \
2613 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
2614 NM="$(NM_FOR_TARGET)"; export NM; \
2615 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
2616 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
2617 echo Configuring in $(TARGET_SUBDIR)/libgloss; \
2618 cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \
2619 case $(srcdir) in \
2620 /* | [A-Za-z]:[\\/]*) \
2621 topdir=$(srcdir) ;; \
2622 *) \
2623 case "$(TARGET_SUBDIR)" in \
2624 .) topdir="../$(srcdir)" ;; \
2625 *) topdir="../../$(srcdir)" ;; \
2626 esac ;; \
2627 esac; \
2628 if [ "$(srcdir)" = "." ] ; then \
2629 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
2630 if $(SHELL) $$s/symlink-tree $${topdir}/libgloss "no-such-file" ; then \
2631 if [ -f Makefile ]; then \
2632 if $(MAKE) distclean; then \
2633 true; \
2634 else \
2635 exit 1; \
2636 fi; \
2637 else \
2638 true; \
2639 fi; \
2640 else \
2641 exit 1; \
2642 fi; \
2643 else \
2644 true; \
2645 fi; \
2646 srcdiroption="--srcdir=."; \
2647 libsrcdir="."; \
2648 else \
2649 srcdiroption="--srcdir=$${topdir}/libgloss"; \
2650 libsrcdir="$$s/libgloss"; \
2651 fi; \
2652 if [ -f $${libsrcdir}/configure ] ; then \
2653 rm -f no-such-file skip-this-dir; \
2654 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
2655 $(TARGET_CONFIGARGS) $${srcdiroption} \
2656 --with-target-subdir="$(TARGET_SUBDIR)"; \
2657 else \
2658 rm -f no-such-file skip-this-dir; \
2659 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
2660 $(TARGET_CONFIGARGS) $${srcdiroption} \
2661 --with-target-subdir="$(TARGET_SUBDIR)"; \
2662 fi || exit 1; \
2663 if [ -f skip-this-dir ] ; then \
2664 sh skip-this-dir; \
2665 rm -f skip-this-dir; \
2666 cd ..; rmdir libgloss || true; \
2667 else \
2668 true; \
2669 fi; \
2670 else \
2671 true; \
2672 fi; \
2673 else \
2674 true; \
2675 fi
2676
2677.PHONY: all-target-libgloss
2678all-target-libgloss:
2679 @dir=libgloss ; \
2680 if [ -f $(TARGET_SUBDIR)/libgloss/Makefile ] ; then \
2681 r=`${PWD}`; export r; \
2682 s=`cd $(srcdir); ${PWD}`; export s; \
2683 $(SET_LIB_PATH) \
2684 (cd $(TARGET_SUBDIR)/libgloss; \
2685 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
2686 else \
2687 true; \
2688 fi
2689
2690\
2691.PHONY: install-target-libgloss
2692install-target-libgloss: installdirs
2693 @dir=libgloss ; \
2694 if [ -f $(TARGET_SUBDIR)/libgloss/Makefile ] ; then \
2695 r=`${PWD}`; export r; \
2696 s=`cd $(srcdir); ${PWD}`; export s; \
2697 $(SET_LIB_PATH) \
2698 (cd $(TARGET_SUBDIR)/libgloss; \
2699 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
2700 else \
2701 true; \
2702 fi
2703
2704
2705.PHONY: configure-target-libiberty
2706configure-target-libiberty:
2707 @if [ -d $(TARGET_SUBDIR)/libiberty ]; then \
2708 r=`${PWD}`; export r; \
2709 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libiberty/tmpmulti.out 2> /dev/null; \
2710 if [ -s $(TARGET_SUBDIR)/libiberty/tmpmulti.out ]; then \
2711 if [ -f $(TARGET_SUBDIR)/libiberty/multilib.out ]; then \
2712 if cmp $(TARGET_SUBDIR)/libiberty/multilib.out $(TARGET_SUBDIR)/libiberty/tmpmulti.out > /dev/null; then \
2713 rm -f $(TARGET_SUBDIR)/libiberty/tmpmulti.out; \
2714 else \
2715 echo "Multilibs changed for libiberty, reconfiguring"; \
2716 rm -f $(TARGET_SUBDIR)/libiberty/multilib.out $(TARGET_SUBDIR)/libiberty/Makefile; \
2717 mv $(TARGET_SUBDIR)/libiberty/tmpmulti.out $(TARGET_SUBDIR)/libiberty/multilib.out; \
2718 fi; \
2719 else \
2720 mv $(TARGET_SUBDIR)/libiberty/tmpmulti.out $(TARGET_SUBDIR)/libiberty/multilib.out; \
2721 fi; \
2722 fi; \
2723 fi; exit 0 # break command into two pieces
2724 @dir=libiberty ; \
2725 if [ ! -d $(TARGET_SUBDIR) ]; then \
2726 true; \
2727 elif [ -f $(TARGET_SUBDIR)/libiberty/Makefile ] ; then \
2728 true; \
2729 elif echo " $(TARGET_CONFIGDIRS) " | grep " libiberty " >/dev/null 2>&1; then \
2730 if [ -d $(srcdir)/libiberty ]; then \
2731 [ -d $(TARGET_SUBDIR)/libiberty ] || mkdir $(TARGET_SUBDIR)/libiberty;\
2732 r=`${PWD}`; export r; \
2733 s=`cd $(srcdir); ${PWD}`; export s; \
2734 $(SET_LIB_PATH) \
2735 AR="$(AR_FOR_TARGET)"; export AR; \
2736 AS="$(AS_FOR_TARGET)"; export AS; \
2737 CC="$(CC_FOR_TARGET)"; export CC; \
2738 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
2739 CXX="$(CXX_FOR_TARGET)"; export CXX; \
2740 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
2741 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
2742 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
2743 LD="$(LD_FOR_TARGET)"; export LD; \
2744 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
2745 NM="$(NM_FOR_TARGET)"; export NM; \
2746 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
2747 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
2748 echo Configuring in $(TARGET_SUBDIR)/libiberty; \
2749 cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \
2750 case $(srcdir) in \
2751 /* | [A-Za-z]:[\\/]*) \
2752 topdir=$(srcdir) ;; \
2753 *) \
2754 case "$(TARGET_SUBDIR)" in \
2755 .) topdir="../$(srcdir)" ;; \
2756 *) topdir="../../$(srcdir)" ;; \
2757 esac ;; \
2758 esac; \
2759 if [ "$(srcdir)" = "." ] ; then \
2760 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
2761 if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \
2762 if [ -f Makefile ]; then \
2763 if $(MAKE) distclean; then \
2764 true; \
2765 else \
2766 exit 1; \
2767 fi; \
2768 else \
2769 true; \
2770 fi; \
2771 else \
2772 exit 1; \
2773 fi; \
2774 else \
2775 true; \
2776 fi; \
2777 srcdiroption="--srcdir=."; \
2778 libsrcdir="."; \
2779 else \
2780 srcdiroption="--srcdir=$${topdir}/libiberty"; \
2781 libsrcdir="$$s/libiberty"; \
2782 fi; \
2783 if [ -f $${libsrcdir}/configure ] ; then \
2784 rm -f no-such-file skip-this-dir; \
2785 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
2786 $(TARGET_CONFIGARGS) $${srcdiroption} \
2787 --with-target-subdir="$(TARGET_SUBDIR)"; \
2788 else \
2789 rm -f no-such-file skip-this-dir; \
2790 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
2791 $(TARGET_CONFIGARGS) $${srcdiroption} \
2792 --with-target-subdir="$(TARGET_SUBDIR)"; \
2793 fi || exit 1; \
2794 if [ -f skip-this-dir ] ; then \
2795 sh skip-this-dir; \
2796 rm -f skip-this-dir; \
2797 cd ..; rmdir libiberty || true; \
2798 else \
2799 true; \
2800 fi; \
2801 else \
2802 true; \
2803 fi; \
2804 else \
2805 true; \
2806 fi
2807
2808.PHONY: all-target-libiberty
2809all-target-libiberty:
2810 @dir=libiberty ; \
2811 if [ -f $(TARGET_SUBDIR)/libiberty/Makefile ] ; then \
2812 r=`${PWD}`; export r; \
2813 s=`cd $(srcdir); ${PWD}`; export s; \
2814 $(SET_LIB_PATH) \
2815 (cd $(TARGET_SUBDIR)/libiberty; \
2816 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
2817 else \
2818 true; \
2819 fi
2820
2821.PHONY: check-target-libiberty
2822check-target-libiberty:
2823 @dir=libiberty ; \
2824 if [ -f $(TARGET_SUBDIR)/libiberty/Makefile ] ; then \
2825 r=`${PWD}`; export r; \
2826 s=`cd $(srcdir); ${PWD}`; export s; \
2827 $(SET_LIB_PATH) \
2828 (cd $(TARGET_SUBDIR)/libiberty; \
2829 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
2830 else \
2831 true; \
2832 fi
2833
2834\
2835.PHONY: install-target-libiberty
2836install-target-libiberty: installdirs
2837 @dir=libiberty ; \
2838 if [ -f $(TARGET_SUBDIR)/libiberty/Makefile ] ; then \
2839 r=`${PWD}`; export r; \
2840 s=`cd $(srcdir); ${PWD}`; export s; \
2841 $(SET_LIB_PATH) \
2842 (cd $(TARGET_SUBDIR)/libiberty; \
2843 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
2844 else \
2845 true; \
2846 fi
2847
2848
2849.PHONY: configure-target-gperf
2850configure-target-gperf:
2851 @if [ -d $(TARGET_SUBDIR)/gperf ]; then \
2852 r=`${PWD}`; export r; \
2853 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/gperf/tmpmulti.out 2> /dev/null; \
2854 if [ -s $(TARGET_SUBDIR)/gperf/tmpmulti.out ]; then \
2855 if [ -f $(TARGET_SUBDIR)/gperf/multilib.out ]; then \
2856 if cmp $(TARGET_SUBDIR)/gperf/multilib.out $(TARGET_SUBDIR)/gperf/tmpmulti.out > /dev/null; then \
2857 rm -f $(TARGET_SUBDIR)/gperf/tmpmulti.out; \
2858 else \
2859 echo "Multilibs changed for gperf, reconfiguring"; \
2860 rm -f $(TARGET_SUBDIR)/gperf/multilib.out $(TARGET_SUBDIR)/gperf/Makefile; \
2861 mv $(TARGET_SUBDIR)/gperf/tmpmulti.out $(TARGET_SUBDIR)/gperf/multilib.out; \
2862 fi; \
2863 else \
2864 mv $(TARGET_SUBDIR)/gperf/tmpmulti.out $(TARGET_SUBDIR)/gperf/multilib.out; \
2865 fi; \
2866 fi; \
2867 fi; exit 0 # break command into two pieces
2868 @dir=gperf ; \
2869 if [ ! -d $(TARGET_SUBDIR) ]; then \
2870 true; \
2871 elif [ -f $(TARGET_SUBDIR)/gperf/Makefile ] ; then \
2872 true; \
2873 elif echo " $(TARGET_CONFIGDIRS) " | grep " gperf " >/dev/null 2>&1; then \
2874 if [ -d $(srcdir)/gperf ]; then \
2875 [ -d $(TARGET_SUBDIR)/gperf ] || mkdir $(TARGET_SUBDIR)/gperf;\
2876 r=`${PWD}`; export r; \
2877 s=`cd $(srcdir); ${PWD}`; export s; \
2878 $(SET_LIB_PATH) \
2879 AR="$(AR_FOR_TARGET)"; export AR; \
2880 AS="$(AS_FOR_TARGET)"; export AS; \
2881 CC="$(CC_FOR_TARGET)"; export CC; \
2882 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
2883 CXX="$(CXX_FOR_TARGET)"; export CXX; \
2884 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
2885 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
2886 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
2887 LD="$(LD_FOR_TARGET)"; export LD; \
2888 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
2889 NM="$(NM_FOR_TARGET)"; export NM; \
2890 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
2891 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
2892 echo Configuring in $(TARGET_SUBDIR)/gperf; \
2893 cd "$(TARGET_SUBDIR)/gperf" || exit 1; \
2894 case $(srcdir) in \
2895 /* | [A-Za-z]:[\\/]*) \
2896 topdir=$(srcdir) ;; \
2897 *) \
2898 case "$(TARGET_SUBDIR)" in \
2899 .) topdir="../$(srcdir)" ;; \
2900 *) topdir="../../$(srcdir)" ;; \
2901 esac ;; \
2902 esac; \
2903 if [ "$(srcdir)" = "." ] ; then \
2904 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
2905 if $(SHELL) $$s/symlink-tree $${topdir}/gperf "no-such-file" ; then \
2906 if [ -f Makefile ]; then \
2907 if $(MAKE) distclean; then \
2908 true; \
2909 else \
2910 exit 1; \
2911 fi; \
2912 else \
2913 true; \
2914 fi; \
2915 else \
2916 exit 1; \
2917 fi; \
2918 else \
2919 true; \
2920 fi; \
2921 srcdiroption="--srcdir=."; \
2922 libsrcdir="."; \
2923 else \
2924 srcdiroption="--srcdir=$${topdir}/gperf"; \
2925 libsrcdir="$$s/gperf"; \
2926 fi; \
2927 if [ -f $${libsrcdir}/configure ] ; then \
2928 rm -f no-such-file skip-this-dir; \
2929 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
2930 $(TARGET_CONFIGARGS) $${srcdiroption} \
2931 --with-target-subdir="$(TARGET_SUBDIR)"; \
2932 else \
2933 rm -f no-such-file skip-this-dir; \
2934 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
2935 $(TARGET_CONFIGARGS) $${srcdiroption} \
2936 --with-target-subdir="$(TARGET_SUBDIR)"; \
2937 fi || exit 1; \
2938 if [ -f skip-this-dir ] ; then \
2939 sh skip-this-dir; \
2940 rm -f skip-this-dir; \
2941 cd ..; rmdir gperf || true; \
2942 else \
2943 true; \
2944 fi; \
2945 else \
2946 true; \
2947 fi; \
2948 else \
2949 true; \
2950 fi
2951
2952.PHONY: all-target-gperf
2953all-target-gperf:
2954 @dir=gperf ; \
2955 if [ -f $(TARGET_SUBDIR)/gperf/Makefile ] ; then \
2956 r=`${PWD}`; export r; \
2957 s=`cd $(srcdir); ${PWD}`; export s; \
2958 $(SET_LIB_PATH) \
2959 (cd $(TARGET_SUBDIR)/gperf; \
2960 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
2961 else \
2962 true; \
2963 fi
2964
2965.PHONY: check-target-gperf
2966check-target-gperf:
2967 @dir=gperf ; \
2968 if [ -f $(TARGET_SUBDIR)/gperf/Makefile ] ; then \
2969 r=`${PWD}`; export r; \
2970 s=`cd $(srcdir); ${PWD}`; export s; \
2971 $(SET_LIB_PATH) \
2972 (cd $(TARGET_SUBDIR)/gperf; \
2973 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
2974 else \
2975 true; \
2976 fi
2977
2978\
2979.PHONY: install-target-gperf
2980install-target-gperf: installdirs
2981 @dir=gperf ; \
2982 if [ -f $(TARGET_SUBDIR)/gperf/Makefile ] ; then \
2983 r=`${PWD}`; export r; \
2984 s=`cd $(srcdir); ${PWD}`; export s; \
2985 $(SET_LIB_PATH) \
2986 (cd $(TARGET_SUBDIR)/gperf; \
2987 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
2988 else \
2989 true; \
2990 fi
2991
2992
2993.PHONY: configure-target-examples
2994configure-target-examples:
2995 @if [ -d $(TARGET_SUBDIR)/examples ]; then \
2996 r=`${PWD}`; export r; \
2997 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/examples/tmpmulti.out 2> /dev/null; \
2998 if [ -s $(TARGET_SUBDIR)/examples/tmpmulti.out ]; then \
2999 if [ -f $(TARGET_SUBDIR)/examples/multilib.out ]; then \
3000 if cmp $(TARGET_SUBDIR)/examples/multilib.out $(TARGET_SUBDIR)/examples/tmpmulti.out > /dev/null; then \
3001 rm -f $(TARGET_SUBDIR)/examples/tmpmulti.out; \
3002 else \
3003 echo "Multilibs changed for examples, reconfiguring"; \
3004 rm -f $(TARGET_SUBDIR)/examples/multilib.out $(TARGET_SUBDIR)/examples/Makefile; \
3005 mv $(TARGET_SUBDIR)/examples/tmpmulti.out $(TARGET_SUBDIR)/examples/multilib.out; \
3006 fi; \
3007 else \
3008 mv $(TARGET_SUBDIR)/examples/tmpmulti.out $(TARGET_SUBDIR)/examples/multilib.out; \
3009 fi; \
3010 fi; \
3011 fi; exit 0 # break command into two pieces
3012 @dir=examples ; \
3013 if [ ! -d $(TARGET_SUBDIR) ]; then \
3014 true; \
3015 elif [ -f $(TARGET_SUBDIR)/examples/Makefile ] ; then \
3016 true; \
3017 elif echo " $(TARGET_CONFIGDIRS) " | grep " examples " >/dev/null 2>&1; then \
3018 if [ -d $(srcdir)/examples ]; then \
3019 [ -d $(TARGET_SUBDIR)/examples ] || mkdir $(TARGET_SUBDIR)/examples;\
3020 r=`${PWD}`; export r; \
3021 s=`cd $(srcdir); ${PWD}`; export s; \
3022 $(SET_LIB_PATH) \
3023 AR="$(AR_FOR_TARGET)"; export AR; \
3024 AS="$(AS_FOR_TARGET)"; export AS; \
3025 CC="$(CC_FOR_TARGET)"; export CC; \
3026 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
3027 CXX="$(CXX_FOR_TARGET)"; export CXX; \
3028 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
3029 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
3030 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
3031 LD="$(LD_FOR_TARGET)"; export LD; \
3032 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
3033 NM="$(NM_FOR_TARGET)"; export NM; \
3034 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
3035 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
3036 echo Configuring in $(TARGET_SUBDIR)/examples; \
3037 cd "$(TARGET_SUBDIR)/examples" || exit 1; \
3038 case $(srcdir) in \
3039 /* | [A-Za-z]:[\\/]*) \
3040 topdir=$(srcdir) ;; \
3041 *) \
3042 case "$(TARGET_SUBDIR)" in \
3043 .) topdir="../$(srcdir)" ;; \
3044 *) topdir="../../$(srcdir)" ;; \
3045 esac ;; \
3046 esac; \
3047 if [ "$(srcdir)" = "." ] ; then \
3048 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
3049 if $(SHELL) $$s/symlink-tree $${topdir}/examples "no-such-file" ; then \
3050 if [ -f Makefile ]; then \
3051 if $(MAKE) distclean; then \
3052 true; \
3053 else \
3054 exit 1; \
3055 fi; \
3056 else \
3057 true; \
3058 fi; \
3059 else \
3060 exit 1; \
3061 fi; \
3062 else \
3063 true; \
3064 fi; \
3065 srcdiroption="--srcdir=."; \
3066 libsrcdir="."; \
3067 else \
3068 srcdiroption="--srcdir=$${topdir}/examples"; \
3069 libsrcdir="$$s/examples"; \
3070 fi; \
3071 if [ -f $${libsrcdir}/configure ] ; then \
3072 rm -f no-such-file skip-this-dir; \
3073 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
3074 $(TARGET_CONFIGARGS) $${srcdiroption} \
3075 --with-target-subdir="$(TARGET_SUBDIR)"; \
3076 else \
3077 rm -f no-such-file skip-this-dir; \
3078 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
3079 $(TARGET_CONFIGARGS) $${srcdiroption} \
3080 --with-target-subdir="$(TARGET_SUBDIR)"; \
3081 fi || exit 1; \
3082 if [ -f skip-this-dir ] ; then \
3083 sh skip-this-dir; \
3084 rm -f skip-this-dir; \
3085 cd ..; rmdir examples || true; \
3086 else \
3087 true; \
3088 fi; \
3089 else \
3090 true; \
3091 fi; \
3092 else \
3093 true; \
3094 fi
3095
3096.PHONY: all-target-examples
3097all-target-examples:
3098 @dir=examples ; \
3099 if [ -f $(TARGET_SUBDIR)/examples/Makefile ] ; then \
3100 r=`${PWD}`; export r; \
3101 s=`cd $(srcdir); ${PWD}`; export s; \
3102 $(SET_LIB_PATH) \
3103 (cd $(TARGET_SUBDIR)/examples; \
3104 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
3105 else \
3106 true; \
3107 fi
3108
3109
3110
3111.PHONY: configure-target-libffi
3112configure-target-libffi:
3113 @if [ -d $(TARGET_SUBDIR)/libffi ]; then \
3114 r=`${PWD}`; export r; \
3115 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libffi/tmpmulti.out 2> /dev/null; \
3116 if [ -s $(TARGET_SUBDIR)/libffi/tmpmulti.out ]; then \
3117 if [ -f $(TARGET_SUBDIR)/libffi/multilib.out ]; then \
3118 if cmp $(TARGET_SUBDIR)/libffi/multilib.out $(TARGET_SUBDIR)/libffi/tmpmulti.out > /dev/null; then \
3119 rm -f $(TARGET_SUBDIR)/libffi/tmpmulti.out; \
3120 else \
3121 echo "Multilibs changed for libffi, reconfiguring"; \
3122 rm -f $(TARGET_SUBDIR)/libffi/multilib.out $(TARGET_SUBDIR)/libffi/Makefile; \
3123 mv $(TARGET_SUBDIR)/libffi/tmpmulti.out $(TARGET_SUBDIR)/libffi/multilib.out; \
3124 fi; \
3125 else \
3126 mv $(TARGET_SUBDIR)/libffi/tmpmulti.out $(TARGET_SUBDIR)/libffi/multilib.out; \
3127 fi; \
3128 fi; \
3129 fi; exit 0 # break command into two pieces
3130 @dir=libffi ; \
3131 if [ ! -d $(TARGET_SUBDIR) ]; then \
3132 true; \
3133 elif [ -f $(TARGET_SUBDIR)/libffi/Makefile ] ; then \
3134 true; \
3135 elif echo " $(TARGET_CONFIGDIRS) " | grep " libffi " >/dev/null 2>&1; then \
3136 if [ -d $(srcdir)/libffi ]; then \
3137 [ -d $(TARGET_SUBDIR)/libffi ] || mkdir $(TARGET_SUBDIR)/libffi;\
3138 r=`${PWD}`; export r; \
3139 s=`cd $(srcdir); ${PWD}`; export s; \
3140 $(SET_LIB_PATH) \
3141 AR="$(AR_FOR_TARGET)"; export AR; \
3142 AS="$(AS_FOR_TARGET)"; export AS; \
3143 CC="$(CC_FOR_TARGET)"; export CC; \
3144 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
3145 CXX="$(CXX_FOR_TARGET)"; export CXX; \
3146 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
3147 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
3148 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
3149 LD="$(LD_FOR_TARGET)"; export LD; \
3150 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
3151 NM="$(NM_FOR_TARGET)"; export NM; \
3152 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
3153 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
3154 echo Configuring in $(TARGET_SUBDIR)/libffi; \
3155 cd "$(TARGET_SUBDIR)/libffi" || exit 1; \
3156 case $(srcdir) in \
3157 /* | [A-Za-z]:[\\/]*) \
3158 topdir=$(srcdir) ;; \
3159 *) \
3160 case "$(TARGET_SUBDIR)" in \
3161 .) topdir="../$(srcdir)" ;; \
3162 *) topdir="../../$(srcdir)" ;; \
3163 esac ;; \
3164 esac; \
3165 if [ "$(srcdir)" = "." ] ; then \
3166 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
3167 if $(SHELL) $$s/symlink-tree $${topdir}/libffi "no-such-file" ; then \
3168 if [ -f Makefile ]; then \
3169 if $(MAKE) distclean; then \
3170 true; \
3171 else \
3172 exit 1; \
3173 fi; \
3174 else \
3175 true; \
3176 fi; \
3177 else \
3178 exit 1; \
3179 fi; \
3180 else \
3181 true; \
3182 fi; \
3183 srcdiroption="--srcdir=."; \
3184 libsrcdir="."; \
3185 else \
3186 srcdiroption="--srcdir=$${topdir}/libffi"; \
3187 libsrcdir="$$s/libffi"; \
3188 fi; \
3189 if [ -f $${libsrcdir}/configure ] ; then \
3190 rm -f no-such-file skip-this-dir; \
3191 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
3192 $(TARGET_CONFIGARGS) $${srcdiroption} \
3193 --with-target-subdir="$(TARGET_SUBDIR)"; \
3194 else \
3195 rm -f no-such-file skip-this-dir; \
3196 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
3197 $(TARGET_CONFIGARGS) $${srcdiroption} \
3198 --with-target-subdir="$(TARGET_SUBDIR)"; \
3199 fi || exit 1; \
3200 if [ -f skip-this-dir ] ; then \
3201 sh skip-this-dir; \
3202 rm -f skip-this-dir; \
3203 cd ..; rmdir libffi || true; \
3204 else \
3205 true; \
3206 fi; \
3207 else \
3208 true; \
3209 fi; \
3210 else \
3211 true; \
3212 fi
3213
3214.PHONY: all-target-libffi
3215all-target-libffi:
3216 @dir=libffi ; \
3217 if [ -f $(TARGET_SUBDIR)/libffi/Makefile ] ; then \
3218 r=`${PWD}`; export r; \
3219 s=`cd $(srcdir); ${PWD}`; export s; \
3220 $(SET_LIB_PATH) \
3221 (cd $(TARGET_SUBDIR)/libffi; \
3222 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
3223 else \
3224 true; \
3225 fi
3226
3227.PHONY: check-target-libffi
3228check-target-libffi:
3229 @dir=libffi ; \
3230 if [ -f $(TARGET_SUBDIR)/libffi/Makefile ] ; then \
3231 r=`${PWD}`; export r; \
3232 s=`cd $(srcdir); ${PWD}`; export s; \
3233 $(SET_LIB_PATH) \
3234 (cd $(TARGET_SUBDIR)/libffi; \
3235 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
3236 else \
3237 true; \
3238 fi
3239
3240
3241
3242.PHONY: configure-target-libjava
3243configure-target-libjava:
3244 @if [ -d $(TARGET_SUBDIR)/libjava ]; then \
3245 r=`${PWD}`; export r; \
3246 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libjava/tmpmulti.out 2> /dev/null; \
3247 if [ -s $(TARGET_SUBDIR)/libjava/tmpmulti.out ]; then \
3248 if [ -f $(TARGET_SUBDIR)/libjava/multilib.out ]; then \
3249 if cmp $(TARGET_SUBDIR)/libjava/multilib.out $(TARGET_SUBDIR)/libjava/tmpmulti.out > /dev/null; then \
3250 rm -f $(TARGET_SUBDIR)/libjava/tmpmulti.out; \
3251 else \
3252 echo "Multilibs changed for libjava, reconfiguring"; \
3253 rm -f $(TARGET_SUBDIR)/libjava/multilib.out $(TARGET_SUBDIR)/libjava/Makefile; \
3254 mv $(TARGET_SUBDIR)/libjava/tmpmulti.out $(TARGET_SUBDIR)/libjava/multilib.out; \
3255 fi; \
3256 else \
3257 mv $(TARGET_SUBDIR)/libjava/tmpmulti.out $(TARGET_SUBDIR)/libjava/multilib.out; \
3258 fi; \
3259 fi; \
3260 fi; exit 0 # break command into two pieces
3261 @dir=libjava ; \
3262 if [ ! -d $(TARGET_SUBDIR) ]; then \
3263 true; \
3264 elif [ -f $(TARGET_SUBDIR)/libjava/Makefile ] ; then \
3265 true; \
3266 elif echo " $(TARGET_CONFIGDIRS) " | grep " libjava " >/dev/null 2>&1; then \
3267 if [ -d $(srcdir)/libjava ]; then \
3268 [ -d $(TARGET_SUBDIR)/libjava ] || mkdir $(TARGET_SUBDIR)/libjava;\
3269 r=`${PWD}`; export r; \
3270 s=`cd $(srcdir); ${PWD}`; export s; \
3271 $(SET_LIB_PATH) \
3272 AR="$(AR_FOR_TARGET)"; export AR; \
3273 AS="$(AS_FOR_TARGET)"; export AS; \
3274 CC="$(CC_FOR_TARGET)"; export CC; \
3275 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
3276 CXX="$(CXX_FOR_TARGET)"; export CXX; \
3277 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
3278 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
3279 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
3280 LD="$(LD_FOR_TARGET)"; export LD; \
3281 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
3282 NM="$(NM_FOR_TARGET)"; export NM; \
3283 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
3284 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
3285 echo Configuring in $(TARGET_SUBDIR)/libjava; \
3286 cd "$(TARGET_SUBDIR)/libjava" || exit 1; \
3287 case $(srcdir) in \
3288 /* | [A-Za-z]:[\\/]*) \
3289 topdir=$(srcdir) ;; \
3290 *) \
3291 case "$(TARGET_SUBDIR)" in \
3292 .) topdir="../$(srcdir)" ;; \
3293 *) topdir="../../$(srcdir)" ;; \
3294 esac ;; \
3295 esac; \
3296 if [ "$(srcdir)" = "." ] ; then \
3297 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
3298 if $(SHELL) $$s/symlink-tree $${topdir}/libjava "no-such-file" ; then \
3299 if [ -f Makefile ]; then \
3300 if $(MAKE) distclean; then \
3301 true; \
3302 else \
3303 exit 1; \
3304 fi; \
3305 else \
3306 true; \
3307 fi; \
3308 else \
3309 exit 1; \
3310 fi; \
3311 else \
3312 true; \
3313 fi; \
3314 srcdiroption="--srcdir=."; \
3315 libsrcdir="."; \
3316 else \
3317 srcdiroption="--srcdir=$${topdir}/libjava"; \
3318 libsrcdir="$$s/libjava"; \
3319 fi; \
3320 if [ -f $${libsrcdir}/configure ] ; then \
3321 rm -f no-such-file skip-this-dir; \
3322 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
3323 $(TARGET_CONFIGARGS) $${srcdiroption} \
3324 --with-target-subdir="$(TARGET_SUBDIR)"; \
3325 else \
3326 rm -f no-such-file skip-this-dir; \
3327 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
3328 $(TARGET_CONFIGARGS) $${srcdiroption} \
3329 --with-target-subdir="$(TARGET_SUBDIR)"; \
3330 fi || exit 1; \
3331 if [ -f skip-this-dir ] ; then \
3332 sh skip-this-dir; \
3333 rm -f skip-this-dir; \
3334 cd ..; rmdir libjava || true; \
3335 else \
3336 true; \
3337 fi; \
3338 else \
3339 true; \
3340 fi; \
3341 else \
3342 true; \
3343 fi
3344
3345.PHONY: all-target-libjava
3346all-target-libjava:
3347 @dir=libjava ; \
3348 if [ -f $(TARGET_SUBDIR)/libjava/Makefile ] ; then \
3349 r=`${PWD}`; export r; \
3350 s=`cd $(srcdir); ${PWD}`; export s; \
3351 $(SET_LIB_PATH) \
3352 (cd $(TARGET_SUBDIR)/libjava; \
3353 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
3354 else \
3355 true; \
3356 fi
3357
3358.PHONY: check-target-libjava
3359check-target-libjava:
3360 @dir=libjava ; \
3361 if [ -f $(TARGET_SUBDIR)/libjava/Makefile ] ; then \
3362 r=`${PWD}`; export r; \
3363 s=`cd $(srcdir); ${PWD}`; export s; \
3364 $(SET_LIB_PATH) \
3365 (cd $(TARGET_SUBDIR)/libjava; \
3366 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
3367 else \
3368 true; \
3369 fi
3370
3371\
3372.PHONY: install-target-libjava
3373install-target-libjava: installdirs
3374 @dir=libjava ; \
3375 if [ -f $(TARGET_SUBDIR)/libjava/Makefile ] ; then \
3376 r=`${PWD}`; export r; \
3377 s=`cd $(srcdir); ${PWD}`; export s; \
3378 $(SET_LIB_PATH) \
3379 (cd $(TARGET_SUBDIR)/libjava; \
3380 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
3381 else \
3382 true; \
3383 fi
3384
3385
3386.PHONY: configure-target-zlib
3387configure-target-zlib:
3388 @if [ -d $(TARGET_SUBDIR)/zlib ]; then \
3389 r=`${PWD}`; export r; \
3390 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/tmpmulti.out 2> /dev/null; \
3391 if [ -s $(TARGET_SUBDIR)/zlib/tmpmulti.out ]; then \
3392 if [ -f $(TARGET_SUBDIR)/zlib/multilib.out ]; then \
3393 if cmp $(TARGET_SUBDIR)/zlib/multilib.out $(TARGET_SUBDIR)/zlib/tmpmulti.out > /dev/null; then \
3394 rm -f $(TARGET_SUBDIR)/zlib/tmpmulti.out; \
3395 else \
3396 echo "Multilibs changed for zlib, reconfiguring"; \
3397 rm -f $(TARGET_SUBDIR)/zlib/multilib.out $(TARGET_SUBDIR)/zlib/Makefile; \
3398 mv $(TARGET_SUBDIR)/zlib/tmpmulti.out $(TARGET_SUBDIR)/zlib/multilib.out; \
3399 fi; \
3400 else \
3401 mv $(TARGET_SUBDIR)/zlib/tmpmulti.out $(TARGET_SUBDIR)/zlib/multilib.out; \
3402 fi; \
3403 fi; \
3404 fi; exit 0 # break command into two pieces
3405 @dir=zlib ; \
3406 if [ ! -d $(TARGET_SUBDIR) ]; then \
3407 true; \
3408 elif [ -f $(TARGET_SUBDIR)/zlib/Makefile ] ; then \
3409 true; \
3410 elif echo " $(TARGET_CONFIGDIRS) " | grep " zlib " >/dev/null 2>&1; then \
3411 if [ -d $(srcdir)/zlib ]; then \
3412 [ -d $(TARGET_SUBDIR)/zlib ] || mkdir $(TARGET_SUBDIR)/zlib;\
3413 r=`${PWD}`; export r; \
3414 s=`cd $(srcdir); ${PWD}`; export s; \
3415 $(SET_LIB_PATH) \
3416 AR="$(AR_FOR_TARGET)"; export AR; \
3417 AS="$(AS_FOR_TARGET)"; export AS; \
3418 CC="$(CC_FOR_TARGET)"; export CC; \
3419 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
3420 CXX="$(CXX_FOR_TARGET)"; export CXX; \
3421 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
3422 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
3423 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
3424 LD="$(LD_FOR_TARGET)"; export LD; \
3425 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
3426 NM="$(NM_FOR_TARGET)"; export NM; \
3427 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
3428 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
3429 echo Configuring in $(TARGET_SUBDIR)/zlib; \
3430 cd "$(TARGET_SUBDIR)/zlib" || exit 1; \
3431 case $(srcdir) in \
3432 /* | [A-Za-z]:[\\/]*) \
3433 topdir=$(srcdir) ;; \
3434 *) \
3435 case "$(TARGET_SUBDIR)" in \
3436 .) topdir="../$(srcdir)" ;; \
3437 *) topdir="../../$(srcdir)" ;; \
3438 esac ;; \
3439 esac; \
3440 if [ "$(srcdir)" = "." ] ; then \
3441 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
3442 if $(SHELL) $$s/symlink-tree $${topdir}/zlib "no-such-file" ; then \
3443 if [ -f Makefile ]; then \
3444 if $(MAKE) distclean; then \
3445 true; \
3446 else \
3447 exit 1; \
3448 fi; \
3449 else \
3450 true; \
3451 fi; \
3452 else \
3453 exit 1; \
3454 fi; \
3455 else \
3456 true; \
3457 fi; \
3458 srcdiroption="--srcdir=."; \
3459 libsrcdir="."; \
3460 else \
3461 srcdiroption="--srcdir=$${topdir}/zlib"; \
3462 libsrcdir="$$s/zlib"; \
3463 fi; \
3464 if [ -f $${libsrcdir}/configure ] ; then \
3465 rm -f no-such-file skip-this-dir; \
3466 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
3467 $(TARGET_CONFIGARGS) $${srcdiroption} \
3468 --with-target-subdir="$(TARGET_SUBDIR)"; \
3469 else \
3470 rm -f no-such-file skip-this-dir; \
3471 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
3472 $(TARGET_CONFIGARGS) $${srcdiroption} \
3473 --with-target-subdir="$(TARGET_SUBDIR)"; \
3474 fi || exit 1; \
3475 if [ -f skip-this-dir ] ; then \
3476 sh skip-this-dir; \
3477 rm -f skip-this-dir; \
3478 cd ..; rmdir zlib || true; \
3479 else \
3480 true; \
3481 fi; \
3482 else \
3483 true; \
3484 fi; \
3485 else \
3486 true; \
252b5132
RH
3487 fi
3488
e393202e
NN
3489.PHONY: all-target-zlib
3490all-target-zlib:
3491 @dir=zlib ; \
3492 if [ -f $(TARGET_SUBDIR)/zlib/Makefile ] ; then \
3493 r=`${PWD}`; export r; \
3494 s=`cd $(srcdir); ${PWD}`; export s; \
3495 $(SET_LIB_PATH) \
3496 (cd $(TARGET_SUBDIR)/zlib; \
3497 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
252b5132 3498 else \
e393202e 3499 true; \
252b5132
RH
3500 fi
3501
e393202e
NN
3502.PHONY: check-target-zlib
3503check-target-zlib:
3504 @dir=zlib ; \
3505 if [ -f $(TARGET_SUBDIR)/zlib/Makefile ] ; then \
d5de0a84 3506 r=`${PWD}`; export r; \
e393202e 3507 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 3508 $(SET_LIB_PATH) \
e393202e
NN
3509 (cd $(TARGET_SUBDIR)/zlib; \
3510 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
3511 else \
3512 true; \
3513 fi
252b5132 3514
e393202e
NN
3515\
3516.PHONY: install-target-zlib
3517install-target-zlib: installdirs
3518 @dir=zlib ; \
3519 if [ -f $(TARGET_SUBDIR)/zlib/Makefile ] ; then \
d5de0a84
NC
3520 r=`${PWD}`; export r; \
3521 s=`cd $(srcdir); ${PWD}`; export s; \
e393202e
NN
3522 $(SET_LIB_PATH) \
3523 (cd $(TARGET_SUBDIR)/zlib; \
3524 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
49b7683b
DD
3525 else \
3526 true; \
3527 fi
3528
e393202e
NN
3529
3530.PHONY: configure-target-boehm-gc
3531configure-target-boehm-gc:
3532 @if [ -d $(TARGET_SUBDIR)/boehm-gc ]; then \
3533 r=`${PWD}`; export r; \
3534 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out 2> /dev/null; \
3535 if [ -s $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out ]; then \
3536 if [ -f $(TARGET_SUBDIR)/boehm-gc/multilib.out ]; then \
3537 if cmp $(TARGET_SUBDIR)/boehm-gc/multilib.out $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out > /dev/null; then \
3538 rm -f $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out; \
3539 else \
3540 echo "Multilibs changed for boehm-gc, reconfiguring"; \
3541 rm -f $(TARGET_SUBDIR)/boehm-gc/multilib.out $(TARGET_SUBDIR)/boehm-gc/Makefile; \
3542 mv $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out $(TARGET_SUBDIR)/boehm-gc/multilib.out; \
3543 fi; \
3544 else \
3545 mv $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out $(TARGET_SUBDIR)/boehm-gc/multilib.out; \
3546 fi; \
3547 fi; \
3548 fi; exit 0 # break command into two pieces
3549 @dir=boehm-gc ; \
3550 if [ ! -d $(TARGET_SUBDIR) ]; then \
49b7683b 3551 true; \
e393202e 3552 elif [ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] ; then \
49b7683b 3553 true; \
e393202e
NN
3554 elif echo " $(TARGET_CONFIGDIRS) " | grep " boehm-gc " >/dev/null 2>&1; then \
3555 if [ -d $(srcdir)/boehm-gc ]; then \
3556 [ -d $(TARGET_SUBDIR)/boehm-gc ] || mkdir $(TARGET_SUBDIR)/boehm-gc;\
d5de0a84
NC
3557 r=`${PWD}`; export r; \
3558 s=`cd $(srcdir); ${PWD}`; export s; \
e393202e
NN
3559 $(SET_LIB_PATH) \
3560 AR="$(AR_FOR_TARGET)"; export AR; \
3561 AS="$(AS_FOR_TARGET)"; export AS; \
3562 CC="$(CC_FOR_TARGET)"; export CC; \
3563 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
3564 CXX="$(CXX_FOR_TARGET)"; export CXX; \
3565 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
3566 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
3567 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
3568 LD="$(LD_FOR_TARGET)"; export LD; \
3569 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
3570 NM="$(NM_FOR_TARGET)"; export NM; \
3571 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
3572 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
3573 echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \
3574 cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \
49b7683b
DD
3575 case $(srcdir) in \
3576 /* | [A-Za-z]:[\\/]*) \
3577 topdir=$(srcdir) ;; \
3578 *) \
e393202e 3579 case "$(TARGET_SUBDIR)" in \
49b7683b
DD
3580 .) topdir="../$(srcdir)" ;; \
3581 *) topdir="../../$(srcdir)" ;; \
3582 esac ;; \
3583 esac; \
3584 if [ "$(srcdir)" = "." ] ; then \
e393202e
NN
3585 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
3586 if $(SHELL) $$s/symlink-tree $${topdir}/boehm-gc "no-such-file" ; then \
49b7683b
DD
3587 if [ -f Makefile ]; then \
3588 if $(MAKE) distclean; then \
3589 true; \
3590 else \
3591 exit 1; \
3592 fi; \
3593 else \
3594 true; \
3595 fi; \
3596 else \
3597 exit 1; \
3598 fi; \
3599 else \
3600 true; \
3601 fi; \
3602 srcdiroption="--srcdir=."; \
3603 libsrcdir="."; \
3604 else \
e393202e
NN
3605 srcdiroption="--srcdir=$${topdir}/boehm-gc"; \
3606 libsrcdir="$$s/boehm-gc"; \
49b7683b
DD
3607 fi; \
3608 if [ -f $${libsrcdir}/configure ] ; then \
3609 rm -f no-such-file skip-this-dir; \
3610 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
e393202e
NN
3611 $(TARGET_CONFIGARGS) $${srcdiroption} \
3612 --with-target-subdir="$(TARGET_SUBDIR)"; \
49b7683b
DD
3613 else \
3614 rm -f no-such-file skip-this-dir; \
3615 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
e393202e
NN
3616 $(TARGET_CONFIGARGS) $${srcdiroption} \
3617 --with-target-subdir="$(TARGET_SUBDIR)"; \
49b7683b
DD
3618 fi || exit 1; \
3619 if [ -f skip-this-dir ] ; then \
3620 sh skip-this-dir; \
3621 rm -f skip-this-dir; \
e393202e 3622 cd ..; rmdir boehm-gc || true; \
49b7683b
DD
3623 else \
3624 true; \
3625 fi; \
3626 else \
3627 true; \
3628 fi; \
3629 else \
3630 true; \
3631 fi
3632
e393202e
NN
3633.PHONY: all-target-boehm-gc
3634all-target-boehm-gc:
3635 @dir=boehm-gc ; \
3636 if [ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] ; then \
d5de0a84
NC
3637 r=`${PWD}`; export r; \
3638 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 3639 $(SET_LIB_PATH) \
e393202e
NN
3640 (cd $(TARGET_SUBDIR)/boehm-gc; \
3641 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
252b5132
RH
3642 else \
3643 true; \
3644 fi
3645
e393202e
NN
3646.PHONY: check-target-boehm-gc
3647check-target-boehm-gc:
3648 @dir=boehm-gc ; \
3649 if [ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] ; then \
3650 r=`${PWD}`; export r; \
3651 s=`cd $(srcdir); ${PWD}`; export s; \
3652 $(SET_LIB_PATH) \
3653 (cd $(TARGET_SUBDIR)/boehm-gc; \
3654 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
3655 else \
3656 true; \
3657 fi
252b5132 3658
e393202e
NN
3659\
3660.PHONY: install-target-boehm-gc
3661install-target-boehm-gc: installdirs
3662 @dir=boehm-gc ; \
3663 if [ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] ; then \
3664 r=`${PWD}`; export r; \
3665 s=`cd $(srcdir); ${PWD}`; export s; \
3666 $(SET_LIB_PATH) \
3667 (cd $(TARGET_SUBDIR)/boehm-gc; \
3668 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
3669 else \
3670 true; \
3671 fi
3672
3673
3674.PHONY: configure-target-qthreads
3675configure-target-qthreads:
3676 @if [ -d $(TARGET_SUBDIR)/qthreads ]; then \
3677 r=`${PWD}`; export r; \
3678 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/qthreads/tmpmulti.out 2> /dev/null; \
3679 if [ -s $(TARGET_SUBDIR)/qthreads/tmpmulti.out ]; then \
3680 if [ -f $(TARGET_SUBDIR)/qthreads/multilib.out ]; then \
3681 if cmp $(TARGET_SUBDIR)/qthreads/multilib.out $(TARGET_SUBDIR)/qthreads/tmpmulti.out > /dev/null; then \
3682 rm -f $(TARGET_SUBDIR)/qthreads/tmpmulti.out; \
3683 else \
3684 echo "Multilibs changed for qthreads, reconfiguring"; \
3685 rm -f $(TARGET_SUBDIR)/qthreads/multilib.out $(TARGET_SUBDIR)/qthreads/Makefile; \
3686 mv $(TARGET_SUBDIR)/qthreads/tmpmulti.out $(TARGET_SUBDIR)/qthreads/multilib.out; \
3687 fi; \
3688 else \
3689 mv $(TARGET_SUBDIR)/qthreads/tmpmulti.out $(TARGET_SUBDIR)/qthreads/multilib.out; \
3690 fi; \
3691 fi; \
3692 fi; exit 0 # break command into two pieces
3693 @dir=qthreads ; \
3694 if [ ! -d $(TARGET_SUBDIR) ]; then \
3695 true; \
3696 elif [ -f $(TARGET_SUBDIR)/qthreads/Makefile ] ; then \
3697 true; \
3698 elif echo " $(TARGET_CONFIGDIRS) " | grep " qthreads " >/dev/null 2>&1; then \
3699 if [ -d $(srcdir)/qthreads ]; then \
3700 [ -d $(TARGET_SUBDIR)/qthreads ] || mkdir $(TARGET_SUBDIR)/qthreads;\
d5de0a84
NC
3701 r=`${PWD}`; export r; \
3702 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 3703 $(SET_LIB_PATH) \
e393202e
NN
3704 AR="$(AR_FOR_TARGET)"; export AR; \
3705 AS="$(AS_FOR_TARGET)"; export AS; \
3706 CC="$(CC_FOR_TARGET)"; export CC; \
3707 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
3708 CXX="$(CXX_FOR_TARGET)"; export CXX; \
3709 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
3710 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
3711 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
3712 LD="$(LD_FOR_TARGET)"; export LD; \
3713 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
3714 NM="$(NM_FOR_TARGET)"; export NM; \
3715 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
3716 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
3717 echo Configuring in $(TARGET_SUBDIR)/qthreads; \
3718 cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \
3719 case $(srcdir) in \
3720 /* | [A-Za-z]:[\\/]*) \
3721 topdir=$(srcdir) ;; \
3722 *) \
3723 case "$(TARGET_SUBDIR)" in \
3724 .) topdir="../$(srcdir)" ;; \
3725 *) topdir="../../$(srcdir)" ;; \
3726 esac ;; \
3727 esac; \
3728 if [ "$(srcdir)" = "." ] ; then \
3729 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
3730 if $(SHELL) $$s/symlink-tree $${topdir}/qthreads "no-such-file" ; then \
3731 if [ -f Makefile ]; then \
3732 if $(MAKE) distclean; then \
3733 true; \
3734 else \
3735 exit 1; \
3736 fi; \
3737 else \
3738 true; \
3739 fi; \
3740 else \
3741 exit 1; \
3742 fi; \
3743 else \
3744 true; \
3745 fi; \
3746 srcdiroption="--srcdir=."; \
3747 libsrcdir="."; \
3748 else \
3749 srcdiroption="--srcdir=$${topdir}/qthreads"; \
3750 libsrcdir="$$s/qthreads"; \
3751 fi; \
3752 if [ -f $${libsrcdir}/configure ] ; then \
3753 rm -f no-such-file skip-this-dir; \
3754 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
3755 $(TARGET_CONFIGARGS) $${srcdiroption} \
3756 --with-target-subdir="$(TARGET_SUBDIR)"; \
3757 else \
3758 rm -f no-such-file skip-this-dir; \
3759 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
3760 $(TARGET_CONFIGARGS) $${srcdiroption} \
3761 --with-target-subdir="$(TARGET_SUBDIR)"; \
3762 fi || exit 1; \
3763 if [ -f skip-this-dir ] ; then \
3764 sh skip-this-dir; \
3765 rm -f skip-this-dir; \
3766 cd ..; rmdir qthreads || true; \
3767 else \
3768 true; \
3769 fi; \
252b5132
RH
3770 else \
3771 true; \
3772 fi; \
e393202e
NN
3773 else \
3774 true; \
252b5132
RH
3775 fi
3776
e393202e
NN
3777.PHONY: all-target-qthreads
3778all-target-qthreads:
3779 @dir=qthreads ; \
3780 if [ -f $(TARGET_SUBDIR)/qthreads/Makefile ] ; then \
d5de0a84
NC
3781 r=`${PWD}`; export r; \
3782 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 3783 $(SET_LIB_PATH) \
e393202e
NN
3784 (cd $(TARGET_SUBDIR)/qthreads; \
3785 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
252b5132
RH
3786 else \
3787 true; \
3788 fi
3789
e393202e
NN
3790.PHONY: check-target-qthreads
3791check-target-qthreads:
3792 @dir=qthreads ; \
3793 if [ -f $(TARGET_SUBDIR)/qthreads/Makefile ] ; then \
d5de0a84
NC
3794 r=`${PWD}`; export r; \
3795 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 3796 $(SET_LIB_PATH) \
e393202e
NN
3797 (cd $(TARGET_SUBDIR)/qthreads; \
3798 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
3799 else \
3800 true; \
3801 fi
3802
3803\
3804.PHONY: install-target-qthreads
3805install-target-qthreads: installdirs
3806 @dir=qthreads ; \
3807 if [ -f $(TARGET_SUBDIR)/qthreads/Makefile ] ; then \
3808 r=`${PWD}`; export r; \
3809 s=`cd $(srcdir); ${PWD}`; export s; \
3810 $(SET_LIB_PATH) \
3811 (cd $(TARGET_SUBDIR)/qthreads; \
3812 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
252b5132
RH
3813 else \
3814 true; \
3815 fi
3816
e393202e
NN
3817
3818.PHONY: configure-target-rda
3819configure-target-rda:
3820 @if [ -d $(TARGET_SUBDIR)/rda ]; then \
d5de0a84 3821 r=`${PWD}`; export r; \
e393202e
NN
3822 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/rda/tmpmulti.out 2> /dev/null; \
3823 if [ -s $(TARGET_SUBDIR)/rda/tmpmulti.out ]; then \
3824 if [ -f $(TARGET_SUBDIR)/rda/multilib.out ]; then \
3825 if cmp $(TARGET_SUBDIR)/rda/multilib.out $(TARGET_SUBDIR)/rda/tmpmulti.out > /dev/null; then \
3826 rm -f $(TARGET_SUBDIR)/rda/tmpmulti.out; \
252b5132 3827 else \
e393202e
NN
3828 echo "Multilibs changed for rda, reconfiguring"; \
3829 rm -f $(TARGET_SUBDIR)/rda/multilib.out $(TARGET_SUBDIR)/rda/Makefile; \
3830 mv $(TARGET_SUBDIR)/rda/tmpmulti.out $(TARGET_SUBDIR)/rda/multilib.out; \
252b5132
RH
3831 fi; \
3832 else \
e393202e 3833 mv $(TARGET_SUBDIR)/rda/tmpmulti.out $(TARGET_SUBDIR)/rda/multilib.out; \
252b5132
RH
3834 fi; \
3835 fi; \
3836 fi; exit 0 # break command into two pieces
e393202e 3837 @dir=rda ; \
252b5132
RH
3838 if [ ! -d $(TARGET_SUBDIR) ]; then \
3839 true; \
e393202e 3840 elif [ -f $(TARGET_SUBDIR)/rda/Makefile ] ; then \
252b5132 3841 true; \
e393202e
NN
3842 elif echo " $(TARGET_CONFIGDIRS) " | grep " rda " >/dev/null 2>&1; then \
3843 if [ -d $(srcdir)/rda ]; then \
3844 [ -d $(TARGET_SUBDIR)/rda ] || mkdir $(TARGET_SUBDIR)/rda;\
d5de0a84
NC
3845 r=`${PWD}`; export r; \
3846 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
3847 $(SET_LIB_PATH) \
3848 AR="$(AR_FOR_TARGET)"; export AR; \
3849 AS="$(AS_FOR_TARGET)"; export AS; \
3850 CC="$(CC_FOR_TARGET)"; export CC; \
3851 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
3852 CXX="$(CXX_FOR_TARGET)"; export CXX; \
3853 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
75205f78 3854 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
252b5132
RH
3855 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
3856 LD="$(LD_FOR_TARGET)"; export LD; \
3857 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
3858 NM="$(NM_FOR_TARGET)"; export NM; \
3859 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
3860 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
e393202e
NN
3861 echo Configuring in $(TARGET_SUBDIR)/rda; \
3862 cd "$(TARGET_SUBDIR)/rda" || exit 1; \
252b5132 3863 case $(srcdir) in \
75205f78 3864 /* | [A-Za-z]:[\\/]*) \
252b5132
RH
3865 topdir=$(srcdir) ;; \
3866 *) \
3867 case "$(TARGET_SUBDIR)" in \
3868 .) topdir="../$(srcdir)" ;; \
3869 *) topdir="../../$(srcdir)" ;; \
3870 esac ;; \
3871 esac; \
3872 if [ "$(srcdir)" = "." ] ; then \
3873 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
e393202e 3874 if $(SHELL) $$s/symlink-tree $${topdir}/rda "no-such-file" ; then \
252b5132
RH
3875 if [ -f Makefile ]; then \
3876 if $(MAKE) distclean; then \
3877 true; \
3878 else \
3879 exit 1; \
3880 fi; \
3881 else \
3882 true; \
3883 fi; \
3884 else \
3885 exit 1; \
3886 fi; \
3887 else \
3888 true; \
3889 fi; \
3890 srcdiroption="--srcdir=."; \
3891 libsrcdir="."; \
3892 else \
e393202e
NN
3893 srcdiroption="--srcdir=$${topdir}/rda"; \
3894 libsrcdir="$$s/rda"; \
252b5132
RH
3895 fi; \
3896 if [ -f $${libsrcdir}/configure ] ; then \
3897 rm -f no-such-file skip-this-dir; \
3898 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
49b7683b 3899 $(TARGET_CONFIGARGS) $${srcdiroption} \
252b5132
RH
3900 --with-target-subdir="$(TARGET_SUBDIR)"; \
3901 else \
3902 rm -f no-such-file skip-this-dir; \
3903 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
49b7683b 3904 $(TARGET_CONFIGARGS) $${srcdiroption} \
252b5132 3905 --with-target-subdir="$(TARGET_SUBDIR)"; \
75205f78 3906 fi || exit 1; \
252b5132
RH
3907 if [ -f skip-this-dir ] ; then \
3908 sh skip-this-dir; \
3909 rm -f skip-this-dir; \
e393202e 3910 cd ..; rmdir rda || true; \
252b5132
RH
3911 else \
3912 true; \
3913 fi; \
3914 else \
3915 true; \
3916 fi; \
3917 else \
3918 true; \
3919 fi
3920
e393202e
NN
3921.PHONY: all-target-rda
3922all-target-rda:
3923 @dir=rda ; \
3924 if [ -f $(TARGET_SUBDIR)/rda/Makefile ] ; then \
d5de0a84
NC
3925 r=`${PWD}`; export r; \
3926 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 3927 $(SET_LIB_PATH) \
e393202e 3928 (cd $(TARGET_SUBDIR)/rda; \
dec0cb0c 3929 $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
252b5132
RH
3930 else \
3931 true; \
3932 fi
3933
e393202e
NN
3934.PHONY: check-target-rda
3935check-target-rda:
3936 @dir=rda ; \
3937 if [ -f $(TARGET_SUBDIR)/rda/Makefile ] ; then \
d5de0a84
NC
3938 r=`${PWD}`; export r; \
3939 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 3940 $(SET_LIB_PATH) \
e393202e 3941 (cd $(TARGET_SUBDIR)/rda; \
dec0cb0c 3942 $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
252b5132
RH
3943 else \
3944 true; \
3945 fi
3946
e393202e
NN
3947\
3948.PHONY: install-target-rda
3949install-target-rda: installdirs
3950 @dir=rda ; \
3951 if [ -f $(TARGET_SUBDIR)/rda/Makefile ] ; then \
d5de0a84
NC
3952 r=`${PWD}`; export r; \
3953 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132 3954 $(SET_LIB_PATH) \
e393202e 3955 (cd $(TARGET_SUBDIR)/rda; \
252b5132
RH
3956 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
3957 else \
3958 true; \
3959 fi
3960
e393202e
NN
3961
3962
252b5132
RH
3963# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
3964# To build a target all-X means to cd to X and make all.
3965.PHONY: $(ALL_X11_MODULES)
3966$(ALL_X11_MODULES):
3967 @dir=`echo $@ | sed -e 's/all-//'`; \
3968 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
3969 r=`${PWD}`; export r; \
3970 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
3971 $(SET_LIB_PATH) \
3972 (cd $${dir}; \
3973 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
3974 else \
3975 true; \
3976 fi
3977
3978# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
3979# To build a target check-X means to cd to X and make all.
3980.PHONY: $(CHECK_X11_MODULES)
3981$(CHECK_X11_MODULES):
3982 @dir=`echo $@ | sed -e 's/check-//'`; \
3983 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
3984 r=`${PWD}`; export r; \
3985 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
3986 $(SET_LIB_PATH) \
3987 (cd $${dir}; \
3988 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
3989 else \
3990 true; \
3991 fi
3992
3993# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
3994# To build a target install-X means to cd to X and make install.
3995.PHONY: $(INSTALL_X11_MODULES)
3996$(INSTALL_X11_MODULES): installdirs
3997 @dir=`echo $@ | sed -e 's/install-//'`; \
3998 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
3999 r=`${PWD}`; export r; \
4000 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
4001 $(SET_LIB_PATH) \
4002 (cd $${dir}; \
4003 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
4004 else \
4005 true; \
4006 fi
4007
4008# gcc is the only module which uses GCC_FLAGS_TO_PASS.
4009.PHONY: all-gcc
4010all-gcc:
4011 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
4012 r=`${PWD}`; export r; \
4013 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
4014 $(SET_LIB_PATH) \
4015 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
4016 else \
4017 true; \
4018 fi
4019
4020# Building GCC uses some tools for rebuilding "source" files
4021# like texinfo, bison/byacc, etc. So we must depend on those.
4022#
4023# While building GCC, it may be necessary to run various target
4024# programs like the assembler, linker, etc. So we depend on
4025# those too.
4026#
4027# In theory, on an SMP all those dependencies can be resolved
4028# in parallel.
4029#
1aa8389d
DD
4030.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
4031bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap
d5de0a84
NC
4032 @r=`${PWD}`; export r; \
4033 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
4034 $(SET_LIB_PATH) \
4035 echo "Bootstrapping the compiler"; \
5cec67bf 4036 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
d5de0a84
NC
4037 @r=`${PWD}`; export r; \
4038 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
4039 case "$@" in \
4040 *bootstrap4-lean ) \
4041 msg="Comparing stage3 and stage4 of the compiler"; \
4042 compare=compare3-lean ;; \
4043 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
4044 compare=compare3 ;; \
4045 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
4046 compare=compare-lean ;; \
4047 * ) msg="Comparing stage2 and stage3 of the compiler"; \
4048 compare=compare ;; \
4049 esac; \
4050 $(SET_LIB_PATH) \
4051 echo "$$msg"; \
5cec67bf 4052 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
d5de0a84
NC
4053 @r=`${PWD}`; export r; \
4054 s=`cd $(srcdir); ${PWD}` ; export s; \
252b5132
RH
4055 $(SET_LIB_PATH) \
4056 echo "Building runtime libraries"; \
dec0cb0c 4057 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
252b5132
RH
4058
4059.PHONY: cross
4060cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
d5de0a84
NC
4061 @r=`${PWD}`; export r; \
4062 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
4063 $(SET_LIB_PATH) \
4064 echo "Building the C and C++ compiler"; \
5cec67bf 4065 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
d5de0a84
NC
4066 @r=`${PWD}`; export r; \
4067 s=`cd $(srcdir); ${PWD}` ; export s; \
252b5132
RH
4068 $(SET_LIB_PATH) \
4069 echo "Building runtime libraries"; \
dec0cb0c
AO
4070 $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
4071 LANGUAGES="c c++" all
252b5132
RH
4072
4073.PHONY: check-gcc
4074check-gcc:
4075 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
4076 r=`${PWD}`; export r; \
4077 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
4078 $(SET_LIB_PATH) \
4079 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
4080 else \
4081 true; \
4082 fi
4083
75205f78
DD
4084.PHONY: check-c++
4085check-c++:
4086 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
4087 r=`${PWD}`; export r; \
4088 s=`cd $(srcdir); ${PWD}`; export s; \
75205f78
DD
4089 $(SET_LIB_PATH) \
4090 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
4091 $(MAKE) check-target-libstdc++-v3; \
4092 else \
4093 true; \
4094 fi
4095
252b5132
RH
4096.PHONY: install-gcc
4097install-gcc:
4098 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
4099 r=`${PWD}`; export r; \
4100 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
4101 $(SET_LIB_PATH) \
4102 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
4103 else \
4104 true; \
4105 fi
4106
4107.PHONY: install-gcc-cross
4108install-gcc-cross:
4109 @if [ -f ./gcc/Makefile ] ; then \
d5de0a84
NC
4110 r=`${PWD}`; export r; \
4111 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
4112 $(SET_LIB_PATH) \
4113 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
4114 else \
4115 true; \
4116 fi
4117# EXPERIMENTAL STUFF
4118# This rule is used to install the modules which use FLAGS_TO_PASS.
4119# To build a target install-X means to cd to X and make install.
4120.PHONY: install-dosrel
4121install-dosrel: installdirs info
4122 @dir=`echo $@ | sed -e 's/install-//'`; \
4123 if [ -f ./$${dir}/Makefile ] ; then \
d5de0a84
NC
4124 r=`${PWD}`; export r; \
4125 s=`cd $(srcdir); ${PWD}`; export s; \
252b5132
RH
4126 $(SET_LIB_PATH) \
4127 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
4128 else \
4129 true; \
4130 fi
4131
4132install-dosrel-fake:
4133
c559bb17
AO
4134ALL_GCC = all-gcc
4135ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss
75205f78 4136ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3
252b5132
RH
4137
4138# This is a list of inter-dependencies among modules.
252b5132
RH
4139all-ash:
4140all-autoconf: all-m4 all-texinfo
4141all-automake: all-m4 all-texinfo
4142all-bash:
4143all-bfd: all-libiberty all-intl
4144all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
227b9953 4145all-bison: all-texinfo
75205f78 4146configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads
252b5132
RH
4147all-byacc:
4148all-bzip2:
252b5132
RH
4149all-db:
4150all-dejagnu: all-tcl all-expect all-tk
4151all-diff: all-libiberty
252b5132 4152all-etc:
5cec67bf 4153configure-target-examples: $(ALL_GCC_C)
252b5132
RH
4154all-expect: all-tcl all-tk
4155all-fileutils: all-libiberty
4156all-findutils:
4157all-find:
4158all-flex: all-libiberty all-bison all-byacc
4159all-gas: all-libiberty all-opcodes all-bfd all-intl
252b5132 4160all-gawk:
5cec67bf 4161all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib
2809b4b9 4162all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
403d9505 4163GDB_TK = @GDB_TK@
252b5132
RH
4164all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
4165all-gettext:
4166all-gnuserv:
373688ac 4167configure-target-gperf: $(ALL_GCC_CXX)
907a7241 4168all-target-gperf: all-target-libiberty all-target-libstdc++-v3
252b5132 4169all-gprof: all-libiberty all-bfd all-opcodes all-intl
ba73c63f 4170all-grep: all-libiberty
252b5132
RH
4171all-guile:
4172all-gzip: all-libiberty
4173all-hello: all-libiberty
4174all-indent:
252b5132 4175all-intl:
fd8958d5 4176all-itcl: all-tcl all-tk
252b5132 4177all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
252b5132 4178configure-target-libgloss: $(ALL_GCC)
907a7241 4179all-target-libgloss: configure-target-newlib
fd8958d5 4180all-libgui: all-tcl all-tk all-itcl
252b5132 4181all-libiberty:
49b7683b
DD
4182
4183all-build-libiberty: configure-build-libiberty
4184
5cec67bf 4185configure-target-libffi: $(ALL_GCC_C)
75205f78 4186configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
907a7241 4187all-target-libjava: all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
5cec67bf 4188configure-target-libstdc++-v3: $(ALL_GCC_C)
907a7241 4189all-target-libstdc++-v3: all-target-libiberty
252b5132 4190all-libtool:
5cec67bf 4191configure-target-libf2c: $(ALL_GCC_C)
907a7241 4192all-target-libf2c: all-target-libiberty
5cec67bf 4193configure-target-libobjc: $(ALL_GCC_C)
907a7241 4194all-target-libobjc: all-target-libiberty
b0dad762 4195all-m4: all-libiberty all-texinfo
252b5132
RH
4196all-make: all-libiberty
4197all-mmalloc:
4198configure-target-newlib: $(ALL_GCC)
5cec67bf 4199configure-target-libtermcap: $(ALL_GCC_C)
cdb9e2b8 4200all-opcodes: all-bfd all-libiberty
252b5132
RH
4201all-patch: all-libiberty
4202all-perl:
4203all-prms: all-libiberty
5cec67bf 4204configure-target-qthreads: $(ALL_GCC_C)
252b5132
RH
4205all-rcs:
4206all-readline:
4207all-recode: all-libiberty
4208all-sed: all-libiberty
4209all-send-pr: all-prms
4210all-shellutils:
8817b92e 4211all-sid: all-tcl all-tk
cdb9e2b8 4212all-sim: all-libiberty all-bfd all-opcodes all-readline
48d19748 4213all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui
252b5132
RH
4214all-tar: all-libiberty
4215all-tcl:
252b5132
RH
4216all-tclX: all-tcl all-tk
4217all-tk: all-tcl
252b5132
RH
4218all-texinfo: all-libiberty
4219all-textutils:
252b5132 4220all-time:
fd8958d5 4221all-tix: all-tcl all-tk
252b5132 4222all-wdiff:
5cec67bf 4223configure-target-winsup: $(ALL_GCC_C)
907a7241 4224all-target-winsup: all-target-libiberty all-target-libtermcap
252b5132
RH
4225all-uudecode: all-libiberty
4226all-zip:
51601921 4227all-zlib:
5cec67bf 4228configure-target-zlib: $(ALL_GCC_C)
75205f78
DD
4229all-fastjar: all-zlib all-libiberty
4230configure-target-fastjar: configure-target-zlib
4231all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty
5cec67bf 4232configure-target-libiberty: $(ALL_GCC_C)
403d9505 4233configure-target: $(CONFIGURE_TARGET_MODULES)
252b5132
RH
4234all-target: $(ALL_TARGET_MODULES)
4235install-target: $(INSTALL_TARGET_MODULES)
afb8d725 4236install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
8817b92e 4237install-sid: install-tcl install-tk
907a7241 4238
a9590527
NN
4239# We put install-opcodes before install-binutils because the installed
4240# binutils might be on PATH, and they might need the shared opcodes
4241# library.
4242install-binutils: install-opcodes
4243
4244# We put install-tcl before install-itcl because itcl wants to run a
4245# program on installation which uses the Tcl libraries.
4246install-itcl: install-tcl
4247
4248
907a7241
NN
4249# Dependencies of all-target-foo on configure-target-foo.
4250all-target-libstdc++-v3: configure-target-libstdc++-v3
4251all-target-newlib: configure-target-newlib
4252all-target-libf2c: configure-target-libf2c
4253all-target-libobjc: configure-target-libobjc
4254all-target-libtermcap: configure-target-libtermcap
4255all-target-winsup: configure-target-winsup
4256all-target-libgloss: configure-target-libgloss
4257all-target-libiberty: configure-target-libiberty
4258all-target-gperf: configure-target-gperf
4259all-target-examples: configure-target-examples
4260all-target-libffi: configure-target-libffi
4261all-target-libjava: configure-target-libjava
4262all-target-zlib: configure-target-zlib
4263all-target-boehm-gc: configure-target-boehm-gc
4264all-target-qthreads: configure-target-qthreads
dd2768ff 4265all-target-rda: configure-target-rda
907a7241
NN
4266
4267
252b5132
RH
4268### other supporting targets
4269
4270MAKEDIRS= \
d3d8a9ee
NC
4271 $(DESTDIR)$(prefix) \
4272 $(DESTDIR)$(exec_prefix)
252b5132
RH
4273.PHONY: installdirs
4274installdirs: mkinstalldirs
4275 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
4276
4277dir.info: do-install-info
4278 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
4279 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
4280 mv -f dir.info.new dir.info ; \
4281 else true ; \
4282 fi
4283
4284dist:
4285 @echo "Building a full distribution of this tree isn't done"
4286 @echo "via 'make dist'. Check out the etc/ subdirectory"
4287
4288etags tags: TAGS
4289
4290# Right now this just builds TAGS in each subdirectory. emacs19 has the
4291# ability to use several tags files at once, so there is probably no need
4292# to combine them into one big TAGS file (like CVS 1.3 does). We could
4293# (if we felt like it) have this Makefile write a piece of elisp which
4294# the user could load to tell emacs19 where all the TAGS files we just
4295# built are.
4296TAGS: do-TAGS
4297
14a2a2f1
NN
4298# Rebuilding Makefile.in, using autogen.
4299$(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
4300 cd $(srcdir) && autogen Makefile.def
4301
252b5132
RH
4302# with the gnu make, this is done automatically.
4303
583d52d7
NN
4304host_makefile_frag=@host_makefile_frag@
4305target_makefile_frag=@target_makefile_frag@
4306
252b5132
RH
4307Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
4308 $(SHELL) ./config.status
4309
4310#
252b5132
RH
4311
4312.NOEXPORT:
4313MAKEOVERRIDES=
4314
4315# end of Makefile.in
This page took 0.331362 seconds and 4 git commands to generate.