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