Commit | Line | Data |
---|---|---|
52d7cdee | 1 | [+ AutoGen5 template -*- Mode: Makefile -*- |
405ea7a0 NN |
2 | in |
3 | +] | |
4 | ||
5 | # Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. | |
6 | # | |
7 | # Makefile for directory with subdirs to build. | |
8 | # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, | |
9 | # 1999, 2000, 2001, 2002 Free Software Foundation | |
10 | # | |
11 | # This file is free software; you can redistribute it and/or modify | |
12 | # it under the terms of the GNU General Public License as published by | |
13 | # the Free Software Foundation; either version 2 of the License, or | |
14 | # (at your option) any later version. | |
15 | # | |
16 | # This program is distributed in the hope that it will be useful, | |
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | # GNU General Public License for more details. | |
20 | # | |
21 | # You should have received a copy of the GNU General Public License | |
22 | # along with this program; if not, write to the Free Software | |
23 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
24 | # | |
25 | ||
26 | # Tell GNU make 3.79 not to run the top level in parallel. This | |
27 | # prevents contention for $builddir/$target/config.cache, as well | |
28 | # as minimizing scatter in file system caches. | |
29 | NOTPARALLEL = .NOTPARALLEL | |
30 | $(NOTPARALLEL): | |
31 | ||
583d52d7 NN |
32 | VPATH=@srcdir@ |
33 | links=@configlinks@ | |
34 | ||
35 | build_alias=@build_alias@ | |
36 | build_cpu=@build_cpu@ | |
37 | build_vendor=@build_vendor@ | |
38 | build_os=@build_os@ | |
39 | build_canonical=@build_cpu@-@build_vendor@-@build_os@ | |
40 | host_alias=@host_alias@ | |
41 | host_cpu=@host_cpu@ | |
42 | host_vendor=@host_vendor@ | |
43 | host_os=@host_os@ | |
44 | host_canonical=@host_cpu@-@host_vendor@-@host_os@ | |
45 | target_alias=@target_alias@ | |
46 | target_cpu=@target_cpu@ | |
47 | target_vendor=@target_vendor@ | |
48 | target_os=@target_os@ | |
49 | target_canonical=@target_cpu@-@target_vendor@-@target_os@ | |
50 | ||
51 | enable_shared = @enable_shared@ | |
52 | enable_threads = @enable_threads@ | |
53 | enable_version_specific_runtime_libs = @enable_version_specific_runtime_libs@ | |
54 | # The file containing GCC's version number. | |
55 | gcc_version_trigger = @gcc_version_trigger@ | |
56 | gcc_version = @gcc_version@ | |
57 | ||
c66d951e NN |
58 | srcdir = @srcdir@ |
59 | ||
60 | prefix = @prefix@ | |
61 | exec_prefix = @exec_prefix@ | |
62 | ||
63 | bindir = @bindir@ | |
64 | sbindir = @sbindir@ | |
65 | libexecdir = @libexecdir@ | |
66 | datadir = @datadir@ | |
67 | sysconfdir = @sysconfdir@ | |
68 | sharedstatedir = @sharedstatedir@ | |
69 | localstatedir = @localstatedir@ | |
70 | libdir = @libdir@ | |
71 | includedir = @includedir@ | |
72 | oldincludedir = @oldincludedir@ | |
73 | infodir = @infodir@ | |
74 | mandir = @mandir@ | |
58daee98 | 75 | gxx_include_dir=@gxx_include_dir@ |
405ea7a0 | 76 | |
c66d951e NN |
77 | tooldir = @tooldir@ |
78 | build_tooldir = @build_tooldir@ | |
405ea7a0 | 79 | |
c66d951e | 80 | program_transform_name = @program_transform_name@ |
405ea7a0 NN |
81 | |
82 | man1dir = $(mandir)/man1 | |
83 | man2dir = $(mandir)/man2 | |
84 | man3dir = $(mandir)/man3 | |
85 | man4dir = $(mandir)/man4 | |
86 | man5dir = $(mandir)/man5 | |
87 | man6dir = $(mandir)/man6 | |
88 | man7dir = $(mandir)/man7 | |
89 | man8dir = $(mandir)/man8 | |
90 | man9dir = $(mandir)/man9 | |
405ea7a0 NN |
91 | # Directory in which the compiler finds executables, libraries, etc. |
92 | libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version) | |
93 | GDB_NLM_DEPS = | |
94 | ||
c66d951e | 95 | SHELL = @config_shell@ |
405ea7a0 NN |
96 | |
97 | # pwd command to use. Allow user to override default by setting PWDCMD in | |
98 | # the environment to account for automounters. The make variable must not | |
99 | # be called PWDCMD, otherwise the value set here is passed to make | |
100 | # subprocesses and overrides the setting from the user's environment. | |
101 | PWD = $${PWDCMD-pwd} | |
102 | ||
103 | # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a | |
104 | # cygwin host. | |
105 | INSTALL_PROGRAM_ARGS = | |
106 | ||
107 | INSTALL = $(SHELL) $$s/install-sh -c | |
108 | INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS) | |
109 | INSTALL_SCRIPT = $(INSTALL) | |
110 | INSTALL_DATA = $(INSTALL) -m 644 | |
111 | ||
852e5f18 NN |
112 | AS = @AS@ |
113 | AR = @AR@ | |
405ea7a0 NN |
114 | AR_FLAGS = rc |
115 | CC = cc | |
116 | ||
117 | # Special variables passed down in EXTRA_GCC_FLAGS. They are defined | |
118 | # here so that they can be overridden by Makefile fragments. | |
3866be5d | 119 | BUILD_CC = $(CC_FOR_BUILD) |
852e5f18 NN |
120 | BUILD_PREFIX = @BUILD_PREFIX@ |
121 | BUILD_PREFIX_1 = @BUILD_PREFIX_1@ | |
405ea7a0 NN |
122 | |
123 | # These flag values are normally overridden by the configure script. | |
124 | CFLAGS = -g | |
125 | CXXFLAGS = -g -O2 | |
126 | ||
127 | LDFLAGS = | |
128 | LIBCFLAGS = $(CFLAGS) | |
129 | CFLAGS_FOR_BUILD = $(CFLAGS) | |
130 | # During gcc bootstrap, if we use some random cc for stage1 then | |
131 | # CFLAGS will be just -g. We want to ensure that TARGET libraries | |
132 | # (which we know are built with gcc) are built with optimizations so | |
133 | # prepend -O2 when setting CFLAGS_FOR_TARGET. | |
134 | CFLAGS_FOR_TARGET = -O2 $(CFLAGS) | |
135 | LDFLAGS_FOR_TARGET = | |
136 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) | |
137 | PICFLAG = | |
138 | PICFLAG_FOR_TARGET = | |
139 | ||
140 | CXX = c++ | |
141 | ||
142 | # Use -O2 to stress test the compiler. | |
143 | LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates | |
144 | CXXFLAGS_FOR_TARGET = $(CXXFLAGS) | |
145 | LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates | |
146 | ||
852e5f18 NN |
147 | DLLTOOL = @DLLTOOL@ |
148 | WINDRES = @WINDRES@ | |
405ea7a0 | 149 | |
852e5f18 | 150 | NM = @NM@ |
405ea7a0 | 151 | |
852e5f18 | 152 | LD = @LD@ |
405ea7a0 | 153 | |
405ea7a0 | 154 | # These values are substituted by configure. |
c66d951e NN |
155 | DEFAULT_YACC = @DEFAULT_YACC@ |
156 | DEFAULT_LEX = @DEFAULT_LEX@ | |
157 | DEFAULT_M4 = @DEFAULT_M4@ | |
405ea7a0 | 158 | |
852e5f18 NN |
159 | BISON=@BISON@ |
160 | USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \ | |
405ea7a0 NN |
161 | echo $$r/bison/bison -L $$s/bison/ ; \ |
162 | else \ | |
163 | echo bison ; \ | |
164 | fi` | |
165 | ||
852e5f18 NN |
166 | YACC=@YACC@ |
167 | USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \ | |
405ea7a0 NN |
168 | echo $$r/bison/bison -y -L $$s/bison/ ; \ |
169 | elif [ -f $$r/byacc/byacc ] ; then \ | |
170 | echo $$r/byacc/byacc ; \ | |
171 | else \ | |
172 | echo ${DEFAULT_YACC} ; \ | |
173 | fi` | |
174 | ||
852e5f18 NN |
175 | LEX=@LEX@ |
176 | USUAL_LEX = `if [ -f $$r/flex/flex ] ; \ | |
405ea7a0 NN |
177 | then echo $$r/flex/flex ; \ |
178 | else echo ${DEFAULT_LEX} ; fi` | |
179 | ||
180 | M4 = `if [ -f $$r/m4/m4 ] ; \ | |
181 | then echo $$r/m4/m4 ; \ | |
182 | else echo ${DEFAULT_M4} ; fi` | |
183 | ||
184 | # For an installed makeinfo, we require it to be from texinfo 4 or | |
185 | # higher, else we use the "missing" dummy. | |
852e5f18 NN |
186 | MAKEINFO=@MAKEINFO@ |
187 | USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ | |
405ea7a0 NN |
188 | then echo $$r/texinfo/makeinfo/makeinfo ; \ |
189 | else if (makeinfo --version \ | |
190 | | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \ | |
191 | then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` | |
192 | ||
193 | # This just becomes part of the MAKEINFO definition passed down to | |
194 | # sub-makes. It lets flags be given on the command line while still | |
195 | # using the makeinfo from the object tree. | |
196 | MAKEINFOFLAGS = | |
197 | ||
198 | EXPECT = `if [ -f $$r/expect/expect ] ; \ | |
199 | then echo $$r/expect/expect ; \ | |
200 | else echo expect ; fi` | |
201 | ||
202 | RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ | |
203 | then echo $$s/dejagnu/runtest ; \ | |
204 | else echo runtest ; fi` | |
205 | ||
206 | ||
207 | # compilers to use to create programs which must be run in the build | |
208 | # environment. | |
852e5f18 | 209 | CC_FOR_BUILD = @CC_FOR_BUILD@ |
405ea7a0 NN |
210 | CXX_FOR_BUILD = $(CXX) |
211 | ||
f03b4789 | 212 | SUBDIRS = @configdirs@ |
405ea7a0 NN |
213 | |
214 | # This is set by the configure script to the list of directories which | |
215 | # should be built using the target tools. | |
58daee98 | 216 | TARGET_CONFIGDIRS = @target_configdirs@ |
405ea7a0 NN |
217 | |
218 | # Target libraries are put under this directory: | |
219 | # Changed by configure to $(target_alias) if cross. | |
58daee98 | 220 | TARGET_SUBDIR = @target_subdir@ |
405ea7a0 NN |
221 | |
222 | BUILD_CONFIGDIRS = libiberty | |
58daee98 | 223 | BUILD_SUBDIR = @build_subdir@ |
405ea7a0 NN |
224 | |
225 | # This is set by the configure script to the arguments to use when configuring | |
226 | # directories built for the target. | |
58daee98 | 227 | TARGET_CONFIGARGS = @target_configargs@ |
405ea7a0 NN |
228 | |
229 | # This is set by the configure script to the arguments to use when configuring | |
230 | # directories built for the build system. | |
58daee98 | 231 | BUILD_CONFIGARGS = @build_configargs@ |
405ea7a0 NN |
232 | |
233 | # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared | |
234 | # was used. | |
8607b6c9 | 235 | SET_LIB_PATH = @SET_LIB_PATH@ |
405ea7a0 NN |
236 | |
237 | # This is the name of the environment variable used for the path to | |
238 | # the libraries. This may be changed by configure.in. | |
8607b6c9 | 239 | RPATH_ENVVAR = @RPATH_ENVVAR@ |
405ea7a0 NN |
240 | |
241 | # This is the list of directories that may be needed in RPATH_ENVVAR | |
242 | # so that programs built for the host machine work. | |
243 | HOST_LIB_PATH = $$r/bfd:$$r/opcodes | |
244 | ||
245 | # This is the list of directories that may be needed in RPATH_ENVVAR | |
246 | # so that prorgams built for the target machine work. | |
247 | TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: | |
248 | ||
249 | # configure.in sets SET_LIB_PATH to this if --enable-shared was used. | |
250 | # Some platforms don't like blank entries, so we remove duplicate, | |
251 | # leading and trailing colons. | |
252 | REALLY_SET_LIB_PATH = \ | |
253 | $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); | |
254 | ||
405ea7a0 | 255 | # Should be substed by configure.in |
58daee98 NN |
256 | FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ |
257 | CC_FOR_TARGET = @CC_FOR_TARGET@ | |
258 | CXX_FOR_TARGET = @CXX_FOR_TARGET@ | |
930314a4 | 259 | RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@ |
58daee98 | 260 | CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ |
930314a4 | 261 | RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ |
58daee98 | 262 | GCJ_FOR_TARGET = @GCJ_FOR_TARGET@ |
405ea7a0 NN |
263 | |
264 | # If GCC_FOR_TARGET is not overriden on the command line, then this | |
265 | # variable is passed down to the gcc Makefile, where it is used to | |
266 | # build libgcc2.a. We define it here so that it can itself be | |
267 | # overridden on the command line. | |
852e5f18 NN |
268 | GCC_FOR_TARGET=@GCC_FOR_TARGET@ |
269 | USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) | |
405ea7a0 | 270 | |
852e5f18 NN |
271 | AS_FOR_TARGET=@AS_FOR_TARGET@ |
272 | USUAL_AS_FOR_TARGET = ` \ | |
405ea7a0 NN |
273 | if [ -f $$r/gas/as-new ] ; then \ |
274 | echo $$r/gas/as-new ; \ | |
275 | elif [ -f $$r/gcc/xgcc ]; then \ | |
276 | $(CC_FOR_TARGET) -print-prog-name=as ; \ | |
277 | else \ | |
278 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ | |
279 | echo $(AS); \ | |
280 | else \ | |
281 | t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \ | |
282 | fi; \ | |
283 | fi` | |
284 | ||
852e5f18 NN |
285 | LD_FOR_TARGET=@LD_FOR_TARGET@ |
286 | USUAL_LD_FOR_TARGET = ` \ | |
405ea7a0 NN |
287 | if [ -f $$r/ld/ld-new ] ; then \ |
288 | echo $$r/ld/ld-new ; \ | |
289 | elif [ -f $$r/gcc/xgcc ]; then \ | |
290 | $(CC_FOR_TARGET) -print-prog-name=ld ; \ | |
291 | else \ | |
292 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ | |
293 | echo $(LD); \ | |
294 | else \ | |
295 | t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \ | |
296 | fi; \ | |
297 | fi` | |
298 | ||
852e5f18 NN |
299 | DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ |
300 | USUAL_DLLTOOL_FOR_TARGET = ` \ | |
405ea7a0 NN |
301 | if [ -f $$r/binutils/dlltool ] ; then \ |
302 | echo $$r/binutils/dlltool ; \ | |
303 | else \ | |
304 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ | |
305 | echo $(DLLTOOL); \ | |
306 | else \ | |
307 | t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \ | |
308 | fi; \ | |
309 | fi` | |
310 | ||
852e5f18 NN |
311 | WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ |
312 | USUAL_WINDRES_FOR_TARGET = ` \ | |
405ea7a0 NN |
313 | if [ -f $$r/binutils/windres ] ; then \ |
314 | echo $$r/binutils/windres ; \ | |
315 | else \ | |
316 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ | |
317 | echo $(WINDRES); \ | |
318 | else \ | |
319 | t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \ | |
320 | fi; \ | |
321 | fi` | |
322 | ||
852e5f18 NN |
323 | AR_FOR_TARGET=@AR_FOR_TARGET@ |
324 | USUAL_AR_FOR_TARGET = ` \ | |
405ea7a0 NN |
325 | if [ -f $$r/binutils/ar ] ; then \ |
326 | echo $$r/binutils/ar ; \ | |
327 | else \ | |
328 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ | |
329 | echo $(AR); \ | |
330 | else \ | |
331 | t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \ | |
332 | fi; \ | |
333 | fi` | |
334 | ||
852e5f18 NN |
335 | RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ |
336 | USUAL_RANLIB_FOR_TARGET = ` \ | |
405ea7a0 NN |
337 | if [ -f $$r/binutils/ranlib ] ; then \ |
338 | echo $$r/binutils/ranlib ; \ | |
339 | else \ | |
340 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ | |
341 | if [ x'$(RANLIB)' != x ]; then \ | |
342 | echo $(RANLIB); \ | |
343 | else \ | |
344 | echo ranlib; \ | |
345 | fi; \ | |
346 | else \ | |
347 | t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \ | |
348 | fi; \ | |
349 | fi` | |
350 | ||
852e5f18 NN |
351 | NM_FOR_TARGET=@NM_FOR_TARGET@ |
352 | USUAL_NM_FOR_TARGET = ` \ | |
405ea7a0 NN |
353 | if [ -f $$r/binutils/nm-new ] ; then \ |
354 | echo $$r/binutils/nm-new ; \ | |
355 | elif [ -f $$r/gcc/xgcc ]; then \ | |
356 | $(CC_FOR_TARGET) -print-prog-name=nm ; \ | |
357 | else \ | |
358 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ | |
359 | echo $(NM); \ | |
360 | else \ | |
361 | t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \ | |
362 | fi; \ | |
363 | fi` | |
364 | ||
365 | # The first rule in the file had better be this one. Don't put any above it. | |
366 | # This lives here to allow makefile fragments to contain dependencies. | |
367 | all: all.normal | |
368 | .PHONY: all | |
369 | ||
405ea7a0 NN |
370 | #### host and target specific makefile fragments come in here. |
371 | ### | |
372 | ||
373 | # Flags to pass down to all sub-makes. | |
374 | # Please keep these in alphabetical order. | |
375 | BASE_FLAGS_TO_PASS = \ | |
376 | "AR_FLAGS=$(AR_FLAGS)" \ | |
377 | "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ | |
378 | "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ | |
379 | "BISON=$(BISON)" \ | |
380 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ | |
381 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ | |
382 | "CFLAGS=$(CFLAGS)" \ | |
383 | "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ | |
384 | "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \ | |
385 | "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ | |
386 | "CXXFLAGS=$(CXXFLAGS)" \ | |
387 | "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ | |
388 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ | |
389 | "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ | |
390 | "INSTALL=$(INSTALL)" \ | |
391 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
392 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
393 | "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ | |
394 | "LDFLAGS=$(LDFLAGS)" \ | |
395 | "LEX=$(LEX)" \ | |
396 | "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ | |
397 | "LIBCFLAGS=$(LIBCFLAGS)" \ | |
398 | "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ | |
399 | "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ | |
400 | "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ | |
401 | "M4=$(M4)" \ | |
402 | "MAKE=$(MAKE)" \ | |
403 | "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ | |
404 | "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ | |
405 | "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ | |
406 | "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ | |
407 | "SHELL=$(SHELL)" \ | |
408 | "EXPECT=$(EXPECT)" \ | |
409 | "RUNTEST=$(RUNTEST)" \ | |
410 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ | |
411 | "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ | |
412 | "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ | |
413 | "YACC=$(YACC)" \ | |
414 | "bindir=$(bindir)" \ | |
415 | "datadir=$(datadir)" \ | |
416 | "exec_prefix=$(exec_prefix)" \ | |
417 | "includedir=$(includedir)" \ | |
418 | "infodir=$(infodir)" \ | |
419 | "libdir=$(libdir)" \ | |
420 | "libexecdir=$(libexecdir)" \ | |
421 | "lispdir=$(lispdir)" \ | |
422 | "libstdcxx_incdir=$(libstdcxx_incdir)" \ | |
423 | "libsubdir=$(libsubdir)" \ | |
424 | "localstatedir=$(localstatedir)" \ | |
425 | "mandir=$(mandir)" \ | |
426 | "oldincludedir=$(oldincludedir)" \ | |
427 | "prefix=$(prefix)" \ | |
428 | "sbindir=$(sbindir)" \ | |
429 | "sharedstatedir=$(sharedstatedir)" \ | |
430 | "sysconfdir=$(sysconfdir)" \ | |
431 | "tooldir=$(tooldir)" \ | |
432 | "build_tooldir=$(build_tooldir)" \ | |
433 | "gxx_include_dir=$(gxx_include_dir)" \ | |
434 | "gcc_version=$(gcc_version)" \ | |
435 | "gcc_version_trigger=$(gcc_version_trigger)" \ | |
436 | "target_alias=$(target_alias)" | |
437 | ||
438 | # For any flags above that may contain shell code that varies from one | |
439 | # target library to another. When doing recursive invocations of the | |
440 | # top-level Makefile, we don't want the outer make to evaluate them, | |
441 | # so we pass these variables down unchanged. They must not contain | |
442 | # single nor double quotes. | |
443 | RECURSE_FLAGS = \ | |
930314a4 NN |
444 | CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ |
445 | RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ | |
405ea7a0 NN |
446 | |
447 | # Flags to pass down to most sub-makes, in which we're building with | |
448 | # the host environment. | |
449 | # If any variables are added here, they must be added to do-*, below. | |
450 | EXTRA_HOST_FLAGS = \ | |
451 | 'AR=$(AR)' \ | |
452 | 'AS=$(AS)' \ | |
453 | 'CC=$(CC)' \ | |
454 | 'CXX=$(CXX)' \ | |
455 | 'DLLTOOL=$(DLLTOOL)' \ | |
456 | 'LD=$(LD)' \ | |
457 | 'NM=$(NM)' \ | |
458 | "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \ | |
459 | 'WINDRES=$(WINDRES)' | |
460 | ||
461 | FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) | |
462 | ||
463 | # Flags that are concerned with the location of the X11 include files | |
464 | # and library files | |
465 | # | |
466 | # NOTE: until the top-level is getting the values via autoconf, it only | |
467 | # causes problems to have this top-level Makefile overriding the autoconf-set | |
468 | # values in child directories. Only variables that don't conflict with | |
469 | # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. | |
470 | # | |
471 | X11_FLAGS_TO_PASS = \ | |
472 | 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ | |
473 | 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' | |
474 | ||
475 | # Flags to pass down to makes which are built with the target environment. | |
476 | # The double $ decreases the length of the command line; the variables | |
477 | # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. | |
478 | # If any variables are added here, they must be added to do-*, below. | |
479 | EXTRA_TARGET_FLAGS = \ | |
480 | 'AR=$$(AR_FOR_TARGET)' \ | |
481 | 'AS=$$(AS_FOR_TARGET)' \ | |
482 | 'CC=$$(CC_FOR_TARGET)' \ | |
483 | 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ | |
484 | 'CXX=$$(CXX_FOR_TARGET)' \ | |
485 | 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ | |
486 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ | |
487 | 'LD=$$(LD_FOR_TARGET)' \ | |
488 | 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ | |
489 | 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ | |
490 | 'NM=$$(NM_FOR_TARGET)' \ | |
491 | 'RANLIB=$$(RANLIB_FOR_TARGET)' \ | |
492 | 'WINDRES=$$(WINDRES_FOR_TARGET)' | |
493 | ||
494 | TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) | |
495 | ||
496 | # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it | |
497 | # unfortunately needs the native compiler and the target ar and | |
498 | # ranlib. | |
499 | # If any variables are added here, they must be added to do-*, below. | |
500 | # The HOST_* variables are a special case, which are used for the gcc | |
501 | # cross-building scheme. | |
502 | EXTRA_GCC_FLAGS = \ | |
503 | 'AR=$(AR)' \ | |
504 | 'AS=$(AS)' \ | |
505 | 'CC=$(CC)' \ | |
506 | 'CXX=$(CXX)' \ | |
507 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ | |
3866be5d | 508 | 'BUILD_CC=$(CC_FOR_BUILD)' \ |
405ea7a0 NN |
509 | 'BUILD_PREFIX=$(BUILD_PREFIX)' \ |
510 | 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \ | |
511 | 'NM=$(NM)' \ | |
512 | "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \ | |
513 | 'WINDRES=$$(WINDRES_FOR_TARGET)' \ | |
514 | "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ | |
515 | "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ | |
516 | "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \ | |
517 | "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \ | |
518 | "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \ | |
519 | "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ | |
520 | "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ | |
521 | "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \ | |
522 | "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \ | |
523 | "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ | |
524 | "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" | |
525 | ||
526 | GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) | |
527 | ||
405ea7a0 NN |
528 | # This is a list of the configure targets for all of the modules which |
529 | # are compiled using the target tools. | |
52d7cdee NN |
530 | CONFIGURE_TARGET_MODULES =[+ |
531 | FOR target_modules +] \ | |
532 | configure-target-[+module+][+ | |
533 | ENDFOR target_modules +] | |
405ea7a0 | 534 | |
3866be5d | 535 | configure-target: $(CONFIGURE_TARGET_MODULES) |
405ea7a0 NN |
536 | |
537 | # This is a list of the targets for which we can do a clean-{target}. | |
52d7cdee NN |
538 | CLEAN_MODULES =[+ |
539 | FOR host_modules +][+ | |
540 | IF (not (or (exist? "no_clean") (exist? "with_x"))) +] \ | |
541 | clean-[+module+][+ | |
542 | ENDIF no_clean +][+ | |
543 | ENDFOR host_modules +] | |
405ea7a0 NN |
544 | |
545 | # All of the target modules that can be cleaned | |
52d7cdee NN |
546 | CLEAN_TARGET_MODULES =[+ |
547 | FOR target_modules +][+ | |
548 | IF (not (exist? "no_clean")) +] \ | |
549 | clean-target-[+module+][+ | |
550 | ENDIF no_clean +][+ | |
551 | ENDFOR target_modules +] | |
405ea7a0 NN |
552 | |
553 | # All of the x11 modules that can be cleaned | |
852e5f18 NN |
554 | CLEAN_X11_MODULES = [+ FOR host_modules +][+ IF with_x +]\ |
555 | clean-[+module+] [+ ENDIF with_x +][+ ENDFOR host_modules +] | |
405ea7a0 NN |
556 | |
557 | # The target built for a native build. | |
3866be5d | 558 | # This list only includes modules actually being configured and built. |
405ea7a0 | 559 | .PHONY: all.normal |
3866be5d NN |
560 | all.normal: @all_build_modules@ \ |
561 | @all_host_modules@ \ | |
562 | @all_target_modules@ | |
563 | ||
564 | all-target: @all_target_modules@ | |
405ea7a0 NN |
565 | |
566 | # Do a target for all the subdirectories. A ``make do-X'' will do a | |
567 | # ``make X'' in all subdirectories (because, in general, there is a | |
568 | # dependency (below) of X upon do-X, a ``make X'' will also do this, | |
569 | # but it may do additional work as well). | |
570 | # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, | |
571 | # because it is so large that it can easily overflow the command line | |
572 | # length limit on some systems. | |
e393202e NN |
573 | [+ FOR recursive_targets +] |
574 | .PHONY: do-[+target+] | |
575 | do-[+target+]: | |
576 | @r=`${PWD}`; export r; \ | |
405ea7a0 NN |
577 | s=`cd $(srcdir); ${PWD}`; export s; \ |
578 | $(SET_LIB_PATH) \ | |
579 | for i in $(SUBDIRS) -dummy-; do \ | |
580 | if [ -f ./$$i/Makefile ]; then \ | |
581 | case $$i in \ | |
582 | gcc) \ | |
583 | for flag in $(EXTRA_GCC_FLAGS); do \ | |
584 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ | |
585 | done; \ | |
586 | ;; \ | |
587 | *) \ | |
588 | for flag in $(EXTRA_HOST_FLAGS); do \ | |
589 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ | |
590 | done; \ | |
591 | ;; \ | |
592 | esac ; \ | |
593 | if (cd ./$$i; \ | |
594 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
595 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ | |
596 | "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ | |
597 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ | |
e393202e | 598 | [+target+]); \ |
405ea7a0 NN |
599 | then true; else exit 1; fi; \ |
600 | else true; fi; \ | |
601 | done | |
e393202e | 602 | # Break into two pieces |
405ea7a0 NN |
603 | r=`${PWD}`; export r; \ |
604 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
605 | $(SET_LIB_PATH) \ | |
606 | for i in $(TARGET_CONFIGDIRS) -dummy-; do \ | |
607 | if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ | |
608 | for flag in $(EXTRA_TARGET_FLAGS); do \ | |
609 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ | |
610 | done; \ | |
611 | if (cd $(TARGET_SUBDIR)/$$i; \ | |
612 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
613 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ | |
614 | "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ | |
615 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ | |
e393202e | 616 | [+target+]); \ |
405ea7a0 NN |
617 | then true; else exit 1; fi; \ |
618 | else true; fi; \ | |
619 | done | |
e393202e NN |
620 | [+ ENDFOR recursive_targets +] |
621 | ||
405ea7a0 NN |
622 | |
623 | # Here are the targets which correspond to the do-X targets. | |
624 | ||
625 | .PHONY: info installcheck dvi install-info | |
626 | .PHONY: clean distclean mostlyclean maintainer-clean realclean | |
627 | .PHONY: local-clean local-distclean local-maintainer-clean | |
628 | info: do-info | |
629 | installcheck: do-installcheck | |
630 | dvi: do-dvi | |
631 | ||
632 | # Make sure makeinfo is built before we do a `make info'. | |
633 | do-info: all-texinfo | |
634 | ||
635 | install-info: do-install-info dir.info | |
636 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
637 | if [ -f dir.info ] ; then \ | |
638 | $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ | |
639 | else true ; fi | |
640 | ||
641 | local-clean: | |
642 | -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log | |
643 | ||
644 | local-distclean: | |
645 | -rm -f Makefile config.status config.cache mh-frag mt-frag | |
646 | -if [ "$(TARGET_SUBDIR)" != "." ]; then \ | |
647 | rm -rf $(TARGET_SUBDIR); \ | |
648 | else true; fi | |
649 | -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile | |
650 | -rm -f texinfo/doc/Makefile texinfo/po/POTFILES | |
651 | -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null | |
652 | -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null | |
653 | -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null | |
654 | ||
655 | local-maintainer-clean: | |
656 | @echo "This command is intended for maintainers to use;" | |
657 | @echo "it deletes files that may require special tools to rebuild." | |
658 | ||
659 | clean: do-clean local-clean | |
660 | mostlyclean: do-mostlyclean local-clean | |
661 | distclean: do-distclean local-clean local-distclean | |
662 | maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean | |
663 | maintainer-clean: local-distclean | |
664 | realclean: maintainer-clean | |
665 | ||
666 | # This rule is used to clean specific modules. | |
667 | .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc | |
668 | $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc: | |
669 | @dir=`echo $@ | sed -e 's/clean-//'`; \ | |
670 | if [ -f ./$${dir}/Makefile ] ; then \ | |
671 | r=`${PWD}`; export r; \ | |
672 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
673 | $(SET_LIB_PATH) \ | |
674 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \ | |
675 | else \ | |
676 | true; \ | |
677 | fi | |
678 | ||
679 | .PHONY: $(CLEAN_TARGET_MODULES) | |
680 | $(CLEAN_TARGET_MODULES): | |
681 | @dir=`echo $@ | sed -e 's/clean-target-//'`; \ | |
682 | rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ | |
683 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
684 | r=`${PWD}`; export r; \ | |
685 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
686 | $(SET_LIB_PATH) \ | |
687 | (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \ | |
688 | else \ | |
689 | true; \ | |
690 | fi | |
691 | ||
692 | clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc | |
693 | clean-target-libgcc: | |
694 | test ! -d gcc/libgcc || \ | |
695 | (cd gcc/libgcc && find . -type d -print) | \ | |
696 | while read d; do rm -f gcc/$$d/libgcc.a || : ; done | |
697 | -rm -rf gcc/libgcc | |
698 | ||
699 | # Check target. | |
700 | ||
701 | .PHONY: check do-check | |
702 | check: | |
703 | $(MAKE) do-check NOTPARALLEL=parallel-ok | |
704 | ||
3866be5d NN |
705 | # Only include modules actually being configured and built. |
706 | do-check: @check_host_modules@ \ | |
707 | @check_target_modules@ | |
405ea7a0 NN |
708 | |
709 | # Automated reporting of test results. | |
710 | ||
711 | warning.log: build.log | |
712 | $(srcdir)/contrib/warn_summary build.log > $@ | |
713 | ||
714 | mail-report.log: | |
715 | if test x'$(BOOT_CFLAGS)' != x''; then \ | |
716 | BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ | |
717 | fi; \ | |
718 | $(srcdir)/contrib/test_summary -t >$@ | |
719 | chmod +x $@ | |
720 | echo If you really want to send e-mail, run ./$@ now | |
721 | ||
722 | mail-report-with-warnings.log: warning.log | |
723 | if test x'$(BOOT_CFLAGS)' != x''; then \ | |
724 | BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ | |
725 | fi; \ | |
726 | $(srcdir)/contrib/test_summary -t -i warning.log >$@ | |
727 | chmod +x $@ | |
728 | echo If you really want to send e-mail, run ./$@ now | |
729 | ||
730 | # Installation targets. | |
731 | ||
3866be5d NN |
732 | .PHONY: install uninstall source-vault binary-vault vault-install |
733 | install: installdirs @install_host_modules@ @install_target_modules@ | |
734 | ||
735 | install-target: @install_target_modules@ | |
405ea7a0 NN |
736 | |
737 | uninstall: | |
738 | @echo "the uninstall target is not supported in this tree" | |
739 | ||
740 | source-vault: | |
741 | $(MAKE) -f ./release/Build-A-Release \ | |
742 | host=$(host_alias) source-vault | |
743 | ||
744 | binary-vault: | |
745 | $(MAKE) -f ./release/Build-A-Release \ | |
746 | host=$(host_alias) target=$(target_alias) | |
747 | ||
748 | vault-install: | |
749 | @if [ -f ./release/vault-install ] ; then \ | |
750 | ./release/vault-install $(host_alias) $(target_alias) ; \ | |
751 | else \ | |
752 | true ; \ | |
753 | fi | |
754 | ||
755 | .PHONY: install.all | |
756 | install.all: install-no-fixedincludes | |
757 | @if [ -f ./gcc/Makefile ] ; then \ | |
758 | r=`${PWD}` ; export r ; \ | |
759 | $(SET_LIB_PATH) \ | |
760 | (cd ./gcc; \ | |
761 | $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ | |
762 | else \ | |
763 | true ; \ | |
764 | fi | |
765 | ||
766 | # install-no-fixedincludes is used because Cygnus can not distribute | |
767 | # the fixed header files. | |
768 | .PHONY: install-no-fixedincludes | |
3866be5d NN |
769 | install-no-fixedincludes: installdirs @install_host_modules_nogcc@ \ |
770 | @install_target_modules@ gcc-no-fixedincludes | |
405ea7a0 NN |
771 | |
772 | # Install the gcc headers files, but not the fixed include files, | |
773 | # which Cygnus is not allowed to distribute. This rule is very | |
774 | # dependent on the workings of the gcc Makefile.in. | |
775 | .PHONY: gcc-no-fixedincludes | |
776 | gcc-no-fixedincludes: | |
777 | @if [ -f ./gcc/Makefile ]; then \ | |
778 | rm -rf gcc/tmp-include; \ | |
779 | mv gcc/include gcc/tmp-include 2>/dev/null; \ | |
780 | mkdir gcc/include; \ | |
781 | cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ | |
782 | touch gcc/stmp-fixinc gcc/include/fixed; \ | |
783 | rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ | |
784 | r=`${PWD}`; export r; \ | |
785 | s=`cd $(srcdir); ${PWD}` ; export s; \ | |
786 | $(SET_LIB_PATH) \ | |
787 | (cd ./gcc; \ | |
788 | $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
789 | rm -rf gcc/include; \ | |
790 | mv gcc/tmp-include gcc/include 2>/dev/null; \ | |
791 | else true; fi | |
792 | ||
e393202e | 793 | # These rules are used to build the modules which are built with the |
405ea7a0 | 794 | # build machine's native compiler. |
e393202e | 795 | [+ FOR build_modules +] |
930314a4 NN |
796 | .PHONY: all-build-[+module+] maybe-all-build-[+module+] |
797 | maybe-all-build-[+module+]: | |
e393202e NN |
798 | all-build-[+module+]: |
799 | @if [ -f ./[+module+]/Makefile ] ; then \ | |
405ea7a0 NN |
800 | r=`${PWD}`; export r; \ |
801 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
e393202e | 802 | (cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all); \ |
405ea7a0 NN |
803 | else \ |
804 | true; \ | |
805 | fi | |
806 | ||
930314a4 NN |
807 | .PHONY: configure-build-[+module+] maybe-configure-build-[+module+] |
808 | maybe-configure-build-[+module+]: | |
e393202e NN |
809 | configure-build-[+module+]: |
810 | @if [ ! -d $(BUILD_SUBDIR) ]; then \ | |
405ea7a0 | 811 | true; \ |
e393202e | 812 | elif [ -f $(BUILD_SUBDIR)/[+module+]/Makefile ] ; then \ |
405ea7a0 | 813 | true; \ |
e393202e NN |
814 | elif echo " $(BUILD_CONFIGDIRS) " | grep " [+module+] " >/dev/null 2>&1; then \ |
815 | if [ -d $(srcdir)/[+module+] ]; then \ | |
816 | [ -d $(BUILD_SUBDIR)/[+module+] ] || mkdir $(BUILD_SUBDIR)/[+module+];\ | |
405ea7a0 NN |
817 | r=`${PWD}`; export r; \ |
818 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
819 | AR="$(AR_FOR_BUILD)"; export AR; \ | |
820 | AS="$(AS_FOR_BUILD)"; export AS; \ | |
821 | CC="$(CC_FOR_BUILD)"; export CC; \ | |
822 | CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ | |
823 | CXX="$(CXX_FOR_BUILD)"; export CXX; \ | |
824 | CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ | |
825 | GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ | |
826 | DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ | |
827 | LD="$(LD_FOR_BUILD)"; export LD; \ | |
828 | LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ | |
829 | NM="$(NM_FOR_BUILD)"; export NM; \ | |
830 | RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ | |
831 | WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ | |
e393202e NN |
832 | echo Configuring in $(BUILD_SUBDIR)/[+module+]; \ |
833 | cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \ | |
405ea7a0 NN |
834 | case $(srcdir) in \ |
835 | /* | [A-Za-z]:[\\/]*) \ | |
836 | topdir=$(srcdir) ;; \ | |
837 | *) \ | |
838 | case "$(BUILD_SUBDIR)" in \ | |
839 | .) topdir="../$(srcdir)" ;; \ | |
840 | *) topdir="../../$(srcdir)" ;; \ | |
841 | esac ;; \ | |
842 | esac; \ | |
843 | if [ "$(srcdir)" = "." ] ; then \ | |
844 | if [ "$(BUILD_SUBDIR)" != "." ] ; then \ | |
e393202e | 845 | if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \ |
405ea7a0 NN |
846 | if [ -f Makefile ]; then \ |
847 | if $(MAKE) distclean; then \ | |
848 | true; \ | |
849 | else \ | |
850 | exit 1; \ | |
851 | fi; \ | |
852 | else \ | |
853 | true; \ | |
854 | fi; \ | |
855 | else \ | |
856 | exit 1; \ | |
857 | fi; \ | |
858 | else \ | |
859 | true; \ | |
860 | fi; \ | |
861 | srcdiroption="--srcdir=."; \ | |
862 | libsrcdir="."; \ | |
863 | else \ | |
e393202e NN |
864 | srcdiroption="--srcdir=$${topdir}/[+module+]"; \ |
865 | libsrcdir="$$s/[+module+]"; \ | |
405ea7a0 | 866 | fi; \ |
930314a4 NN |
867 | rm -f no-such-file || : ; \ |
868 | CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ | |
869 | $(BUILD_CONFIGARGS) $${srcdiroption} \ | |
870 | --with-build-subdir="$(BUILD_SUBDIR)" \ | |
871 | || exit 1; \ | |
405ea7a0 NN |
872 | else \ |
873 | true; \ | |
874 | fi; \ | |
875 | else \ | |
876 | true; \ | |
877 | fi | |
e393202e | 878 | [+ ENDFOR build_modules +] |
405ea7a0 | 879 | |
3866be5d | 880 | # These rules are used to build the modules which use FLAGS_TO_PASS. To |
405ea7a0 | 881 | # build a target all-X means to cd to X and make all. |
3866be5d | 882 | [+ FOR host_modules +] |
930314a4 NN |
883 | .PHONY: all-[+module+] maybe-all-[+module+] |
884 | maybe-all-[+module+]: | |
3866be5d | 885 | all-[+module+]: |
930314a4 | 886 | @r=`${PWD}`; export r; \ |
405ea7a0 NN |
887 | s=`cd $(srcdir); ${PWD}`; export s; \ |
888 | $(SET_LIB_PATH) \ | |
3866be5d NN |
889 | (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ |
890 | IF with_x | |
891 | +] $(X11_FLAGS_TO_PASS)[+ | |
930314a4 | 892 | ENDIF with_x +] all) |
405ea7a0 | 893 | |
3866be5d NN |
894 | [+ IF no_check +] |
895 | .PHONY: check-[+module+] | |
896 | check-[+module+]: | |
897 | [+ ELIF no_check_cross +] | |
898 | .PHONY: check-[+module+] | |
899 | # This module is only tested in a native toolchain. | |
900 | check-[+module+]: | |
405ea7a0 | 901 | @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ |
405ea7a0 NN |
902 | r=`${PWD}`; export r; \ |
903 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
904 | $(SET_LIB_PATH) \ | |
3866be5d NN |
905 | (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ |
906 | IF with_x | |
907 | +] $(X11_FLAGS_TO_PASS)[+ | |
908 | ENDIF with_x +] check); \ | |
405ea7a0 | 909 | fi |
3866be5d NN |
910 | [+ ELSE check +] |
911 | .PHONY: check-[+module+] | |
912 | check-[+module+]: | |
930314a4 | 913 | @r=`${PWD}`; export r; \ |
405ea7a0 NN |
914 | s=`cd $(srcdir); ${PWD}`; export s; \ |
915 | $(SET_LIB_PATH) \ | |
3866be5d NN |
916 | (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ |
917 | IF with_x | |
918 | +] $(X11_FLAGS_TO_PASS)[+ | |
930314a4 | 919 | ENDIF with_x +] check) |
3866be5d | 920 | [+ ENDIF no_check +] |
405ea7a0 | 921 | |
3866be5d | 922 | [+ IF no_install +] |
930314a4 NN |
923 | .PHONY: install-[+module+] maybe-install-[+module+] |
924 | maybe-install-[+module+]: | |
3866be5d NN |
925 | install-[+module+]: |
926 | [+ ELSE install +] | |
930314a4 NN |
927 | .PHONY: install-[+module+] maybe-install-[+module+] |
928 | maybe-install-[+module+]: | |
3866be5d | 929 | install-[+module+]: installdirs |
930314a4 | 930 | @r=`${PWD}`; export r; \ |
405ea7a0 NN |
931 | s=`cd $(srcdir); ${PWD}`; export s; \ |
932 | $(SET_LIB_PATH) \ | |
3866be5d NN |
933 | (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ |
934 | IF with_x | |
935 | +] $(X11_FLAGS_TO_PASS)[+ | |
930314a4 | 936 | ENDIF with_x +] install) |
3866be5d NN |
937 | [+ ENDIF no_install +] |
938 | [+ ENDFOR host_modules +] | |
405ea7a0 | 939 | |
e393202e NN |
940 | # These rules are used to build the modules which are built with the target |
941 | # tools. To make foo-X means to cd to X and make foo. | |
942 | [+ FOR target_modules +] | |
930314a4 NN |
943 | .PHONY: configure-target-[+module+] maybe-configure-target-[+module+] |
944 | maybe-configure-target-[+module+]: | |
e393202e | 945 | configure-target-[+module+]: |
930314a4 | 946 | @r=`${PWD}`; export r; \ |
e393202e NN |
947 | $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/[+module+]/tmpmulti.out 2> /dev/null; \ |
948 | if [ -s $(TARGET_SUBDIR)/[+module+]/tmpmulti.out ]; then \ | |
949 | if [ -f $(TARGET_SUBDIR)/[+module+]/multilib.out ]; then \ | |
950 | if cmp $(TARGET_SUBDIR)/[+module+]/multilib.out $(TARGET_SUBDIR)/[+module+]/tmpmulti.out > /dev/null; then \ | |
951 | rm -f $(TARGET_SUBDIR)/[+module+]/tmpmulti.out; \ | |
405ea7a0 | 952 | else \ |
e393202e NN |
953 | echo "Multilibs changed for [+module+], reconfiguring"; \ |
954 | rm -f $(TARGET_SUBDIR)/[+module+]/multilib.out $(TARGET_SUBDIR)/[+module+]/Makefile; \ | |
955 | mv $(TARGET_SUBDIR)/[+module+]/tmpmulti.out $(TARGET_SUBDIR)/[+module+]/multilib.out; \ | |
405ea7a0 NN |
956 | fi; \ |
957 | else \ | |
e393202e | 958 | mv $(TARGET_SUBDIR)/[+module+]/tmpmulti.out $(TARGET_SUBDIR)/[+module+]/multilib.out; \ |
405ea7a0 | 959 | fi; \ |
405ea7a0 | 960 | fi; exit 0 # break command into two pieces |
930314a4 | 961 | @if [ -d $(srcdir)/[+module+] ]; then \ |
e393202e | 962 | [ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\ |
405ea7a0 NN |
963 | r=`${PWD}`; export r; \ |
964 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
965 | $(SET_LIB_PATH) \ | |
966 | AR="$(AR_FOR_TARGET)"; export AR; \ | |
967 | AS="$(AS_FOR_TARGET)"; export AS; \ | |
968 | CC="$(CC_FOR_TARGET)"; export CC; \ | |
930314a4 NN |
969 | CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \[+ |
970 | IF raw_cxx +] | |
971 | CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ | |
972 | CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \[+ | |
973 | ELSE normal_cxx +] | |
974 | CXX="$(CXX_FOR_TARGET)"; export CXX; \[+ | |
975 | ENDIF raw_cxx +] | |
405ea7a0 NN |
976 | CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ |
977 | GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ | |
978 | DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ | |
979 | LD="$(LD_FOR_TARGET)"; export LD; \ | |
980 | LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ | |
981 | NM="$(NM_FOR_TARGET)"; export NM; \ | |
982 | RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ | |
983 | WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ | |
e393202e NN |
984 | echo Configuring in $(TARGET_SUBDIR)/[+module+]; \ |
985 | cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \ | |
405ea7a0 NN |
986 | case $(srcdir) in \ |
987 | /* | [A-Za-z]:[\\/]*) \ | |
988 | topdir=$(srcdir) ;; \ | |
989 | *) \ | |
990 | case "$(TARGET_SUBDIR)" in \ | |
991 | .) topdir="../$(srcdir)" ;; \ | |
992 | *) topdir="../../$(srcdir)" ;; \ | |
993 | esac ;; \ | |
994 | esac; \ | |
995 | if [ "$(srcdir)" = "." ] ; then \ | |
996 | if [ "$(TARGET_SUBDIR)" != "." ] ; then \ | |
e393202e | 997 | if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \ |
405ea7a0 NN |
998 | if [ -f Makefile ]; then \ |
999 | if $(MAKE) distclean; then \ | |
1000 | true; \ | |
1001 | else \ | |
1002 | exit 1; \ | |
1003 | fi; \ | |
1004 | else \ | |
1005 | true; \ | |
1006 | fi; \ | |
1007 | else \ | |
1008 | exit 1; \ | |
1009 | fi; \ | |
1010 | else \ | |
1011 | true; \ | |
1012 | fi; \ | |
1013 | srcdiroption="--srcdir=."; \ | |
1014 | libsrcdir="."; \ | |
1015 | else \ | |
e393202e NN |
1016 | srcdiroption="--srcdir=$${topdir}/[+module+]"; \ |
1017 | libsrcdir="$$s/[+module+]"; \ | |
405ea7a0 | 1018 | fi; \ |
930314a4 NN |
1019 | rm -f no-such-file || : ; \ |
1020 | CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ | |
1021 | $(TARGET_CONFIGARGS) $${srcdiroption} \ | |
1022 | --with-target-subdir="$(TARGET_SUBDIR)" \ | |
1023 | || exit 1; \ | |
405ea7a0 NN |
1024 | else \ |
1025 | true; \ | |
930314a4 | 1026 | fi |
405ea7a0 | 1027 | |
930314a4 NN |
1028 | .PHONY: all-target-[+module+] maybe-all-target-[+module+] |
1029 | maybe-all-target-[+module+]: | |
e393202e | 1030 | all-target-[+module+]: |
930314a4 | 1031 | @r=`${PWD}`; export r; \ |
405ea7a0 NN |
1032 | s=`cd $(srcdir); ${PWD}`; export s; \ |
1033 | $(SET_LIB_PATH) \ | |
e393202e | 1034 | (cd $(TARGET_SUBDIR)/[+module+]; \ |
930314a4 NN |
1035 | $(MAKE) $(TARGET_FLAGS_TO_PASS) [+ |
1036 | IF raw_cxx | |
1037 | +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+ | |
1038 | ENDIF raw_cxx | |
1039 | +] all) | |
3866be5d NN |
1040 | [+ IF no_check +] |
1041 | # Dummy target for uncheckable module. | |
1042 | .PHONY: check-target-[+module+] | |
1043 | check-target-[+module+]: | |
1044 | [+ ELSE check +] | |
e393202e NN |
1045 | .PHONY: check-target-[+module+] |
1046 | check-target-[+module+]: | |
930314a4 | 1047 | @r=`${PWD}`; export r; \ |
405ea7a0 NN |
1048 | s=`cd $(srcdir); ${PWD}`; export s; \ |
1049 | $(SET_LIB_PATH) \ | |
e393202e | 1050 | (cd $(TARGET_SUBDIR)/[+module+]; \ |
930314a4 NN |
1051 | $(MAKE) $(TARGET_FLAGS_TO_PASS) [+ |
1052 | IF raw_cxx | |
1053 | +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+ | |
1054 | ENDIF raw_cxx | |
1055 | +] check) | |
e393202e | 1056 | [+ ENDIF no_check +] |
930314a4 NN |
1057 | [+ IF no_install +] |
1058 | .PHONY: install-target-[+module+] maybe-install-target-[+module+] | |
1059 | maybe-install-target-[+module+]: | |
1060 | # Dummy target for uninstallable. | |
1061 | install-target-[+module+]: | |
1062 | [+ ELSE install +] | |
1063 | .PHONY: install-target-[+module+] maybe-install-target-[+module+] | |
1064 | maybe-install-target-[+module+]: | |
e393202e | 1065 | install-target-[+module+]: installdirs |
930314a4 | 1066 | @r=`${PWD}`; export r; \ |
405ea7a0 NN |
1067 | s=`cd $(srcdir); ${PWD}`; export s; \ |
1068 | $(SET_LIB_PATH) \ | |
e393202e | 1069 | (cd $(TARGET_SUBDIR)/[+module+]; \ |
930314a4 | 1070 | $(MAKE) $(TARGET_FLAGS_TO_PASS) install) |
e393202e NN |
1071 | [+ ENDIF no_install +] |
1072 | [+ ENDFOR target_modules +] | |
405ea7a0 | 1073 | |
405ea7a0 | 1074 | # gcc is the only module which uses GCC_FLAGS_TO_PASS. |
930314a4 NN |
1075 | .PHONY: all-gcc maybe-all-gcc |
1076 | maybe-all-gcc: | |
405ea7a0 NN |
1077 | all-gcc: |
1078 | @if [ -f ./gcc/Makefile ] ; then \ | |
1079 | r=`${PWD}`; export r; \ | |
1080 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
1081 | $(SET_LIB_PATH) \ | |
1082 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ | |
1083 | else \ | |
1084 | true; \ | |
1085 | fi | |
1086 | ||
1087 | # Building GCC uses some tools for rebuilding "source" files | |
1088 | # like texinfo, bison/byacc, etc. So we must depend on those. | |
1089 | # | |
1090 | # While building GCC, it may be necessary to run various target | |
1091 | # programs like the assembler, linker, etc. So we depend on | |
1092 | # those too. | |
1093 | # | |
1094 | # In theory, on an SMP all those dependencies can be resolved | |
1095 | # in parallel. | |
1096 | # | |
1aa8389d DD |
1097 | .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap |
1098 | bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap | |
405ea7a0 NN |
1099 | @r=`${PWD}`; export r; \ |
1100 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
1101 | $(SET_LIB_PATH) \ | |
1102 | echo "Bootstrapping the compiler"; \ | |
1103 | cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ | |
1104 | @r=`${PWD}`; export r; \ | |
1105 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
1106 | case "$@" in \ | |
1107 | *bootstrap4-lean ) \ | |
1108 | msg="Comparing stage3 and stage4 of the compiler"; \ | |
1109 | compare=compare3-lean ;; \ | |
1110 | *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \ | |
1111 | compare=compare3 ;; \ | |
1112 | *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \ | |
1113 | compare=compare-lean ;; \ | |
1114 | * ) msg="Comparing stage2 and stage3 of the compiler"; \ | |
1115 | compare=compare ;; \ | |
1116 | esac; \ | |
1117 | $(SET_LIB_PATH) \ | |
1118 | echo "$$msg"; \ | |
1119 | cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare | |
1120 | @r=`${PWD}`; export r; \ | |
1121 | s=`cd $(srcdir); ${PWD}` ; export s; \ | |
1122 | $(SET_LIB_PATH) \ | |
1123 | echo "Building runtime libraries"; \ | |
1124 | $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all | |
1125 | ||
1126 | .PHONY: cross | |
1127 | cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld | |
1128 | @r=`${PWD}`; export r; \ | |
1129 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
1130 | $(SET_LIB_PATH) \ | |
1131 | echo "Building the C and C++ compiler"; \ | |
1132 | cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" | |
1133 | @r=`${PWD}`; export r; \ | |
1134 | s=`cd $(srcdir); ${PWD}` ; export s; \ | |
1135 | $(SET_LIB_PATH) \ | |
1136 | echo "Building runtime libraries"; \ | |
1137 | $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ | |
1138 | LANGUAGES="c c++" all | |
1139 | ||
1140 | .PHONY: check-gcc | |
1141 | check-gcc: | |
1142 | @if [ -f ./gcc/Makefile ] ; then \ | |
1143 | r=`${PWD}`; export r; \ | |
1144 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
1145 | $(SET_LIB_PATH) \ | |
1146 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ | |
1147 | else \ | |
1148 | true; \ | |
1149 | fi | |
1150 | ||
1151 | .PHONY: check-c++ | |
1152 | check-c++: | |
1153 | @if [ -f ./gcc/Makefile ] ; then \ | |
1154 | r=`${PWD}`; export r; \ | |
1155 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
1156 | $(SET_LIB_PATH) \ | |
1157 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ | |
1158 | $(MAKE) check-target-libstdc++-v3; \ | |
1159 | else \ | |
1160 | true; \ | |
1161 | fi | |
1162 | ||
930314a4 NN |
1163 | .PHONY: install-gcc maybe-install-gcc |
1164 | maybe-install-gcc: | |
405ea7a0 NN |
1165 | install-gcc: |
1166 | @if [ -f ./gcc/Makefile ] ; then \ | |
1167 | r=`${PWD}`; export r; \ | |
1168 | s=`cd $(srcdir); ${PWD}`; export s; \ | |
1169 | $(SET_LIB_PATH) \ | |
1170 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
1171 | else \ | |
1172 | true; \ | |
1173 | fi | |
1174 | ||
930314a4 NN |
1175 | ALL_GCC = maybe-all-gcc |
1176 | ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss | |
1177 | ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 | |
405ea7a0 NN |
1178 | |
1179 | # This is a list of inter-dependencies among modules. | |
930314a4 NN |
1180 | all-autoconf: maybe-all-m4 maybe-all-texinfo |
1181 | all-automake: maybe-all-m4 maybe-all-texinfo | |
1182 | all-bfd: maybe-all-libiberty maybe-all-intl | |
1183 | all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl | |
1184 | all-bison: maybe-all-texinfo | |
1185 | configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads | |
1186 | all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk | |
1187 | all-diff: maybe-all-libiberty | |
405ea7a0 | 1188 | configure-target-examples: $(ALL_GCC_C) |
930314a4 NN |
1189 | all-expect: maybe-all-tcl maybe-all-tk |
1190 | all-fileutils: maybe-all-libiberty | |
1191 | all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc | |
1192 | all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl | |
1193 | all-gcc: maybe-all-libiberty maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib | |
1194 | all-bootstrap: maybe-all-libiberty maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib | |
c66d951e | 1195 | GDB_TK = @GDB_TK@ |
930314a4 | 1196 | all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK) |
405ea7a0 | 1197 | configure-target-gperf: $(ALL_GCC_CXX) |
930314a4 NN |
1198 | all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 |
1199 | all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl | |
1200 | all-grep: maybe-all-libiberty | |
1201 | all-gzip: maybe-all-libiberty | |
1202 | all-hello: maybe-all-libiberty | |
1203 | all-itcl: maybe-all-tcl maybe-all-tk | |
1204 | all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl | |
405ea7a0 | 1205 | configure-target-libgloss: $(ALL_GCC) |
930314a4 NN |
1206 | all-target-libgloss: maybe-configure-target-newlib |
1207 | all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl | |
405ea7a0 | 1208 | configure-target-libffi: $(ALL_GCC_C) |
930314a4 NN |
1209 | configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi |
1210 | all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi | |
405ea7a0 | 1211 | configure-target-libstdc++-v3: $(ALL_GCC_C) |
930314a4 | 1212 | all-target-libstdc++-v3: maybe-all-target-libiberty |
405ea7a0 | 1213 | configure-target-libf2c: $(ALL_GCC_C) |
930314a4 | 1214 | all-target-libf2c: maybe-all-target-libiberty |
405ea7a0 | 1215 | configure-target-libobjc: $(ALL_GCC_C) |
930314a4 NN |
1216 | all-target-libobjc: maybe-all-target-libiberty |
1217 | all-m4: maybe-all-libiberty maybe-all-texinfo | |
1218 | all-make: maybe-all-libiberty | |
405ea7a0 | 1219 | configure-target-newlib: $(ALL_GCC) |
405ea7a0 | 1220 | configure-target-libtermcap: $(ALL_GCC_C) |
930314a4 NN |
1221 | all-opcodes: maybe-all-bfd maybe-all-libiberty |
1222 | all-patch: maybe-all-libiberty | |
1223 | all-prms: maybe-all-libiberty | |
405ea7a0 | 1224 | configure-target-qthreads: $(ALL_GCC_C) |
930314a4 NN |
1225 | all-recode: maybe-all-libiberty |
1226 | all-sed: maybe-all-libiberty | |
1227 | all-send-pr: maybe-all-prms | |
1228 | all-sid: maybe-all-tcl maybe-all-tk | |
1229 | all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline | |
1230 | all-snavigator: maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-db maybe-all-grep maybe-all-libgui | |
1231 | all-tar: maybe-all-libiberty | |
1232 | all-tclX: maybe-all-tcl maybe-all-tk | |
1233 | all-tk: maybe-all-tcl | |
1234 | all-texinfo: maybe-all-libiberty | |
1235 | all-tix: maybe-all-tcl maybe-all-tk | |
405ea7a0 | 1236 | configure-target-winsup: $(ALL_GCC_C) |
930314a4 NN |
1237 | all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap |
1238 | all-uudecode: maybe-all-libiberty | |
405ea7a0 | 1239 | configure-target-zlib: $(ALL_GCC_C) |
930314a4 NN |
1240 | all-fastjar: maybe-all-zlib maybe-all-libiberty |
1241 | configure-target-fastjar: maybe-configure-target-zlib | |
1242 | all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty | |
405ea7a0 | 1243 | configure-target-libiberty: $(ALL_GCC_C) |
930314a4 NN |
1244 | install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui |
1245 | install-sid: maybe-install-tcl maybe-install-tk | |
907a7241 | 1246 | |
a9590527 NN |
1247 | # We put install-opcodes before install-binutils because the installed |
1248 | # binutils might be on PATH, and they might need the shared opcodes | |
1249 | # library. | |
930314a4 | 1250 | install-binutils: maybe-install-opcodes |
a9590527 NN |
1251 | |
1252 | # We put install-tcl before install-itcl because itcl wants to run a | |
1253 | # program on installation which uses the Tcl libraries. | |
930314a4 | 1254 | install-itcl: maybe-install-tcl |
a9590527 | 1255 | |
3866be5d NN |
1256 | # This is a slightly kludgy method of getting dependencies on |
1257 | # all-build-libiberty correct; it would be better to build it every time. | |
930314a4 | 1258 | all-gcc: maybe-all-build-libiberty |
3866be5d NN |
1259 | |
1260 | # Dependencies of all-build-foo on configure-build-foo. | |
930314a4 NN |
1261 | [+ FOR build_modules +]all-build-[+module+]: configure-build-[+module+] |
1262 | [+ ENDFOR build_modules +] | |
a9590527 | 1263 | |
907a7241 NN |
1264 | # Dependencies of all-target-foo on configure-target-foo. |
1265 | [+ FOR target_modules +]all-target-[+module+]: configure-target-[+module+] | |
1266 | [+ ENDFOR target_modules +] | |
1267 | ||
930314a4 NN |
1268 | # Dependencies of maybe-foo on foo. These are used because, for example, |
1269 | # all-gcc only depends on all-gas if gas is present and being configured. | |
1270 | @maybe_dependencies@ | |
1271 | ||
405ea7a0 NN |
1272 | ### other supporting targets |
1273 | ||
1274 | MAKEDIRS= \ | |
1275 | $(DESTDIR)$(prefix) \ | |
1276 | $(DESTDIR)$(exec_prefix) | |
1277 | .PHONY: installdirs | |
1278 | installdirs: mkinstalldirs | |
1279 | $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) | |
1280 | ||
1281 | dir.info: do-install-info | |
1282 | if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ | |
1283 | $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ | |
1284 | mv -f dir.info.new dir.info ; \ | |
1285 | else true ; \ | |
1286 | fi | |
1287 | ||
1288 | dist: | |
1289 | @echo "Building a full distribution of this tree isn't done" | |
1290 | @echo "via 'make dist'. Check out the etc/ subdirectory" | |
1291 | ||
1292 | etags tags: TAGS | |
1293 | ||
1294 | # Right now this just builds TAGS in each subdirectory. emacs19 has the | |
1295 | # ability to use several tags files at once, so there is probably no need | |
1296 | # to combine them into one big TAGS file (like CVS 1.3 does). We could | |
1297 | # (if we felt like it) have this Makefile write a piece of elisp which | |
1298 | # the user could load to tell emacs19 where all the TAGS files we just | |
1299 | # built are. | |
1300 | TAGS: do-TAGS | |
1301 | ||
1302 | # Rebuilding Makefile.in, using autogen. | |
907a7241 | 1303 | $(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def |
405ea7a0 NN |
1304 | cd $(srcdir) && autogen Makefile.def |
1305 | ||
1306 | # with the gnu make, this is done automatically. | |
1307 | ||
583d52d7 NN |
1308 | host_makefile_frag=@host_makefile_frag@ |
1309 | target_makefile_frag=@target_makefile_frag@ | |
1310 | ||
405ea7a0 NN |
1311 | Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger) |
1312 | $(SHELL) ./config.status | |
1313 | ||
1314 | # | |
405ea7a0 NN |
1315 | |
1316 | .NOEXPORT: | |
1317 | MAKEOVERRIDES= | |
1318 | ||
1319 | # end of Makefile.in |