Mercurial > hg > CbC > CbC_gcc
annotate Makefile.tpl @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
rev | line source |
---|---|
0 | 1 [+ AutoGen5 template -*- Mode: Makefile -*- |
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, | |
111 | 9 # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 |
0 | 10 # Free Software Foundation |
11 # | |
12 # This file is free software; you can redistribute it and/or modify | |
13 # it under the terms of the GNU General Public License as published by | |
14 # the Free Software Foundation; either version 3 of the License, or | |
15 # (at your option) any later version. | |
16 # | |
17 # This program is distributed in the hope that it will be useful, | |
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 # GNU General Public License for more details. | |
21 # | |
22 # You should have received a copy of the GNU General Public License | |
23 # along with this program; see the file COPYING3. If not see | |
24 # <http://www.gnu.org/licenses/>. | |
25 # | |
26 | |
27 # First, test for a proper version of make, but only where one is required. | |
28 | |
29 @if gcc | |
30 ifeq (,$(.VARIABLES)) # The variable .VARIABLES, new with 3.80, is never empty. | |
31 $(error GNU make version 3.80 or newer is required.) | |
32 endif | |
33 @endif gcc | |
34 | |
35 # ------------------------------- | |
36 # Standard Autoconf-set variables | |
37 # ------------------------------- | |
38 VPATH=@srcdir@ | |
39 | |
40 build_alias=@build_noncanonical@ | |
41 build_vendor=@build_vendor@ | |
42 build_os=@build_os@ | |
43 build=@build@ | |
44 host_alias=@host_noncanonical@ | |
45 host_vendor=@host_vendor@ | |
46 host_os=@host_os@ | |
47 host=@host@ | |
48 target_alias=@target_noncanonical@ | |
49 target_vendor=@target_vendor@ | |
50 target_os=@target_os@ | |
51 target=@target@ | |
52 | |
53 program_transform_name = @program_transform_name@ | |
54 | |
55 prefix = @prefix@ | |
56 exec_prefix = @exec_prefix@ | |
57 | |
58 srcdir = @srcdir@ | |
59 | |
60 bindir = @bindir@ | |
61 sbindir = @sbindir@ | |
62 libexecdir = @libexecdir@ | |
63 datadir = @datadir@ | |
64 sysconfdir = @sysconfdir@ | |
65 sharedstatedir = @sharedstatedir@ | |
66 localstatedir = @localstatedir@ | |
67 libdir = @libdir@ | |
68 includedir = @includedir@ | |
69 oldincludedir = @oldincludedir@ | |
70 infodir = @infodir@ | |
71 datarootdir = @datarootdir@ | |
72 docdir = @docdir@ | |
73 pdfdir = @pdfdir@ | |
74 htmldir = @htmldir@ | |
75 mandir = @mandir@ | |
76 man1dir = $(mandir)/man1 | |
77 man2dir = $(mandir)/man2 | |
78 man3dir = $(mandir)/man3 | |
79 man4dir = $(mandir)/man4 | |
80 man5dir = $(mandir)/man5 | |
81 man6dir = $(mandir)/man6 | |
82 man7dir = $(mandir)/man7 | |
83 man8dir = $(mandir)/man8 | |
84 man9dir = $(mandir)/man9 | |
85 | |
86 INSTALL = @INSTALL@ | |
87 INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
88 INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
89 INSTALL_DATA = @INSTALL_DATA@ | |
90 LN = @LN@ | |
91 LN_S = @LN_S@ | |
92 MAINT = @MAINT@ | |
93 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ | |
94 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ | |
95 | |
96 # ------------------------------------------------- | |
97 # Miscellaneous non-standard autoconf-set variables | |
98 # ------------------------------------------------- | |
99 | |
100 # The gcc driver likes to know the arguments it was configured with. | |
101 TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@ | |
102 | |
103 tooldir = @tooldir@ | |
104 build_tooldir = @build_tooldir@ | |
105 | |
106 # This is the name of the environment variable used for the path to | |
107 # the libraries. | |
108 RPATH_ENVVAR = @RPATH_ENVVAR@ | |
109 | |
110 # On targets where RPATH_ENVVAR is PATH, a subdirectory of the GCC build path | |
111 # is used instead of the directory itself to avoid including built | |
112 # executables in PATH. | |
113 GCC_SHLIB_SUBDIR = @GCC_SHLIB_SUBDIR@ | |
114 | |
115 # Build programs are put under this directory. | |
116 BUILD_SUBDIR = @build_subdir@ | |
117 # This is set by the configure script to the arguments to use when configuring | |
118 # directories built for the build system. | |
119 BUILD_CONFIGARGS = @build_configargs@ --with-build-subdir="$(BUILD_SUBDIR)" | |
120 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
121 # Linker flags to use on the host, for stage1 or when not |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
122 # bootstrapping. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
123 STAGE1_LDFLAGS = @stage1_ldflags@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
124 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
125 # Libraries to use on the host, for stage1 or when not bootstrapping. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
126 STAGE1_LIBS = @stage1_libs@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
127 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
128 # Linker flags to use for stage2 and later. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
129 POSTSTAGE1_LDFLAGS = @poststage1_ldflags@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
130 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
131 # Libraries to use for stage2 and later. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
132 POSTSTAGE1_LIBS = @poststage1_libs@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
133 |
0 | 134 # This is the list of variables to export in the environment when |
135 # configuring any subdirectory. It must also be exported whenever | |
136 # recursing into a build directory in case that directory's Makefile | |
137 # re-runs configure. | |
138 BASE_EXPORTS = \ | |
139 FLEX="$(FLEX)"; export FLEX; \ | |
140 LEX="$(LEX)"; export LEX; \ | |
141 BISON="$(BISON)"; export BISON; \ | |
142 YACC="$(YACC)"; export YACC; \ | |
143 M4="$(M4)"; export M4; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
144 SED="$(SED)"; export SED; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
145 AWK="$(AWK)"; export AWK; \ |
0 | 146 MAKEINFO="$(MAKEINFO)"; export MAKEINFO; |
147 | |
148 # This is the list of variables to export in the environment when | |
149 # configuring subdirectories for the build system. | |
150 BUILD_EXPORTS = \ | |
151 $(BASE_EXPORTS) \ | |
152 AR="$(AR_FOR_BUILD)"; export AR; \ | |
153 AS="$(AS_FOR_BUILD)"; export AS; \ | |
154 CC="$(CC_FOR_BUILD)"; export CC; \ | |
155 CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ | |
156 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ | |
157 CXX="$(CXX_FOR_BUILD)"; export CXX; \ | |
158 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ | |
159 GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
160 GOC="$(GOC_FOR_BUILD)"; export GOC; \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
161 GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \ |
145 | 162 GDC="$(GDC_FOR_BUILD)"; export GDC; \ |
163 GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \ | |
0 | 164 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ |
165 LD="$(LD_FOR_BUILD)"; export LD; \ | |
166 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ | |
167 NM="$(NM_FOR_BUILD)"; export NM; \ | |
168 RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ | |
169 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ | |
170 WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC; | |
171 | |
172 # These variables must be set on the make command line for directories | |
111 | 173 # built for the build system to override those in BASE_FLAGS_TO_PASS. |
0 | 174 EXTRA_BUILD_FLAGS = \ |
175 CFLAGS="$(CFLAGS_FOR_BUILD)" \ | |
176 LDFLAGS="$(LDFLAGS_FOR_BUILD)" | |
177 | |
178 # This is the list of directories to built for the host system. | |
179 SUBDIRS = @configdirs@ | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
180 TARGET_CONFIGDIRS = @target_configdirs@ |
0 | 181 # This is set by the configure script to the arguments to use when configuring |
182 # directories built for the host system. | |
183 HOST_CONFIGARGS = @host_configargs@ | |
184 # Host programs are put under this directory, which is . except if building | |
185 # with srcdir=.. | |
186 HOST_SUBDIR = @host_subdir@ | |
187 # This is the list of variables to export in the environment when | |
188 # configuring subdirectories for the host system. We need to pass | |
189 # some to the GCC configure because of its hybrid host/target nature. | |
190 HOST_EXPORTS = \ | |
191 $(BASE_EXPORTS) \ | |
192 CC="$(CC)"; export CC; \ | |
193 ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ | |
194 CFLAGS="$(CFLAGS)"; export CFLAGS; \ | |
195 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ | |
196 CXX="$(CXX)"; export CXX; \ | |
197 CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
198 GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
199 GOC="$(GOC)"; export GOC; \ |
145 | 200 GDC="$(GDC)"; export GDC; \ |
0 | 201 AR="$(AR)"; export AR; \ |
202 AS="$(AS)"; export AS; \ | |
203 CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ | |
145 | 204 CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \ |
0 | 205 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ |
206 LD="$(LD)"; export LD; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
207 LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \ |
0 | 208 NM="$(NM)"; export NM; \ |
209 RANLIB="$(RANLIB)"; export RANLIB; \ | |
210 WINDRES="$(WINDRES)"; export WINDRES; \ | |
211 WINDMC="$(WINDMC)"; export WINDMC; \ | |
212 OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ | |
213 OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ | |
145 | 214 OTOOL="$(OTOOL)"; export OTOOL; \ |
111 | 215 READELF="$(READELF)"; export READELF; \ |
0 | 216 AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ |
217 AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ | |
218 GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \ | |
219 LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \ | |
220 NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ | |
221 OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ | |
111 | 222 OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY_FOR_TARGET; \ |
145 | 223 OTOOL_FOR_TARGET="$(OTOOL_FOR_TARGET)"; export OTOOL_FOR_TARGET; \ |
0 | 224 RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ |
111 | 225 READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \ |
0 | 226 TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
227 HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \ |
0 | 228 GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ |
229 GMPINC="$(HOST_GMPINC)"; export GMPINC; \ | |
111 | 230 ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \ |
231 ISLINC="$(HOST_ISLINC)"; export ISLINC; \ | |
232 LIBELFLIBS="$(HOST_LIBELFLIBS)"; export LIBELFLIBS; \ | |
233 LIBELFINC="$(HOST_LIBELFINC)"; export LIBELFINC; \ | |
234 XGCC_FLAGS_FOR_TARGET="$(XGCC_FLAGS_FOR_TARGET)"; export XGCC_FLAGS_FOR_TARGET; \ | |
0 | 235 @if gcc-bootstrap |
236 $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \ | |
237 @endif gcc-bootstrap | |
238 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); | |
239 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
240 POSTSTAGE1_CXX_EXPORT = \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
241 CXX='$(CXX)'; export CXX; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
242 CXX_FOR_BUILD='$(CXX_FOR_BUILD)'; export CXX_FOR_BUILD; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
243 @if target-libstdc++-v3-bootstrap |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
244 # Override the above if we're bootstrapping C++. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
245 POSTSTAGE1_CXX_EXPORT = \ |
111 | 246 CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xg++$(exeext) \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
247 -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
248 -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ |
111 | 249 -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \ |
250 `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \ | |
251 `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \ | |
252 `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$s/libstdc++-v3/libsupc++ \ | |
253 -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ | |
254 -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \ | |
255 export CXX; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
256 CXX_FOR_BUILD="$$CXX"; export CXX_FOR_BUILD; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
257 @endif target-libstdc++-v3-bootstrap |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
258 |
0 | 259 # Similar, for later GCC stages. |
260 POSTSTAGE1_HOST_EXPORTS = \ | |
261 $(HOST_EXPORTS) \ | |
262 CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
263 -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
264 $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
265 CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
266 $(POSTSTAGE1_CXX_EXPORT) \ |
111 | 267 $(LTO_EXPORTS) \ |
145 | 268 GDC="$$r/$(HOST_SUBDIR)/prev-gcc/gdc$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \ |
269 -B$(build_tooldir)/bin/ $(GDC_FLAGS_FOR_TARGET) \ | |
270 -B$$r/prev-$(TARGET_SUBDIR)/libphobos/src \ | |
271 -I$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime -I$$s/libphobos/libdruntime \ | |
272 -L$$r/prev-$(TARGET_SUBDIR)/libphobos/src/.libs \ | |
273 -L$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/.libs"; \ | |
274 export GDC; \ | |
275 GDC_FOR_BUILD="$$GDC"; export GDC_FOR_BUILD; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
276 GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
277 LDFLAGS="$(POSTSTAGE1_LDFLAGS) $(BOOT_LDFLAGS)"; export LDFLAGS; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
278 HOST_LIBS="$(POSTSTAGE1_LIBS)"; export HOST_LIBS; |
0 | 279 |
280 # Target libraries are put under this directory: | |
281 TARGET_SUBDIR = @target_subdir@ | |
282 # This is set by the configure script to the arguments to use when configuring | |
283 # directories built for the target. | |
284 TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)" | |
285 # This is the list of variables to export in the environment when | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
286 # configuring subdirectories for the target system. |
0 | 287 BASE_TARGET_EXPORTS = \ |
288 $(BASE_EXPORTS) \ | |
289 AR="$(AR_FOR_TARGET)"; export AR; \ | |
290 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
291 CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
292 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ |
0 | 293 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ |
294 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
295 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
296 GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
297 GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \ |
145 | 298 GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \ |
0 | 299 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ |
300 LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \ | |
301 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ | |
302 LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \ | |
303 NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \ | |
304 OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \ | |
111 | 305 OBJCOPY="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY; \ |
145 | 306 OTOOL="$(OTOOL_FOR_TARGET)"; export OTOOL; \ |
0 | 307 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ |
111 | 308 READELF="$(READELF_FOR_TARGET)"; export READELF; \ |
0 | 309 STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \ |
310 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ | |
311 WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \ | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
312 @if gcc-bootstrap |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
313 $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
314 @endif gcc-bootstrap |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
315 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
316 TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS; |
0 | 317 |
318 RAW_CXX_TARGET_EXPORTS = \ | |
319 $(BASE_TARGET_EXPORTS) \ | |
320 CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
321 CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; |
0 | 322 |
323 NORMAL_TARGET_EXPORTS = \ | |
324 $(BASE_TARGET_EXPORTS) \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
325 CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; |
0 | 326 |
327 # Where to find GMP | |
328 HOST_GMPLIBS = @gmplibs@ | |
329 HOST_GMPINC = @gmpinc@ | |
330 | |
111 | 331 # Where to find isl |
332 HOST_ISLLIBS = @isllibs@ | |
333 HOST_ISLINC = @islinc@ | |
0 | 334 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
335 # Where to find libelf |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
336 HOST_LIBELFLIBS = @libelflibs@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
337 HOST_LIBELFINC = @libelfinc@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
338 |
0 | 339 # ---------------------------------------------- |
340 # Programs producing files for the BUILD machine | |
341 # ---------------------------------------------- | |
342 | |
111 | 343 SHELL = @SHELL@ |
0 | 344 |
345 # pwd command to use. Allow user to override default by setting PWDCMD in | |
346 # the environment to account for automounters. The make variable must not | |
347 # be called PWDCMD, otherwise the value set here is passed to make | |
348 # subprocesses and overrides the setting from the user's environment. | |
349 # Don't use PWD since it is a common shell environment variable and we | |
350 # don't want to corrupt it. | |
351 PWD_COMMAND = $${PWDCMD-pwd} | |
352 | |
353 # compilers to use to create programs which must be run in the build | |
354 # environment. | |
355 AR_FOR_BUILD = @AR_FOR_BUILD@ | |
356 AS_FOR_BUILD = @AS_FOR_BUILD@ | |
357 CC_FOR_BUILD = @CC_FOR_BUILD@ | |
358 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ | |
359 CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ | |
360 CXX_FOR_BUILD = @CXX_FOR_BUILD@ | |
361 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ | |
362 GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@ | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
363 GOC_FOR_BUILD = @GOC_FOR_BUILD@ |
145 | 364 GDC_FOR_BUILD = @GDC_FOR_BUILD@ |
0 | 365 LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ |
366 LD_FOR_BUILD = @LD_FOR_BUILD@ | |
367 NM_FOR_BUILD = @NM_FOR_BUILD@ | |
368 RANLIB_FOR_BUILD = @RANLIB_FOR_BUILD@ | |
369 WINDMC_FOR_BUILD = @WINDMC_FOR_BUILD@ | |
370 WINDRES_FOR_BUILD = @WINDRES_FOR_BUILD@ | |
371 | |
372 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined | |
373 # here so that they can be overridden by Makefile fragments. | |
374 BUILD_PREFIX = @BUILD_PREFIX@ | |
375 BUILD_PREFIX_1 = @BUILD_PREFIX_1@ | |
376 | |
377 # Flags to pass to stage2 and later makes. They are defined | |
378 # here so that they can be overridden by Makefile fragments. | |
379 BOOT_CFLAGS= -g -O2 | |
380 BOOT_LDFLAGS= | |
111 | 381 BOOT_ADAFLAGS= -gnatpg |
0 | 382 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
383 AWK = @AWK@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
384 SED = @SED@ |
0 | 385 BISON = @BISON@ |
386 YACC = @YACC@ | |
387 FLEX = @FLEX@ | |
388 LEX = @LEX@ | |
389 M4 = @M4@ | |
390 MAKEINFO = @MAKEINFO@ | |
391 EXPECT = @EXPECT@ | |
392 RUNTEST = @RUNTEST@ | |
393 | |
145 | 394 AUTO_PROFILE = gcc-auto-profile -c 10000000 |
111 | 395 |
0 | 396 # This just becomes part of the MAKEINFO definition passed down to |
397 # sub-makes. It lets flags be given on the command line while still | |
398 # using the makeinfo from the object tree. | |
399 # (Default to avoid splitting info files by setting the threshold high.) | |
400 MAKEINFOFLAGS = --split-size=5000000 | |
401 | |
402 # --------------------------------------------- | |
403 # Programs producing files for the HOST machine | |
404 # --------------------------------------------- | |
405 | |
406 AS = @AS@ | |
407 AR = @AR@ | |
408 AR_FLAGS = rc | |
409 CC = @CC@ | |
410 CXX = @CXX@ | |
411 DLLTOOL = @DLLTOOL@ | |
412 LD = @LD@ | |
413 LIPO = @LIPO@ | |
414 NM = @NM@ | |
415 OBJDUMP = @OBJDUMP@ | |
145 | 416 OTOOL = @OTOOL@ |
0 | 417 RANLIB = @RANLIB@ |
111 | 418 READELF = @READELF@ |
0 | 419 STRIP = @STRIP@ |
420 WINDRES = @WINDRES@ | |
421 WINDMC = @WINDMC@ | |
422 | |
145 | 423 GDC = @GDC@ |
0 | 424 GNATBIND = @GNATBIND@ |
425 GNATMAKE = @GNATMAKE@ | |
426 | |
427 CFLAGS = @CFLAGS@ | |
428 LDFLAGS = @LDFLAGS@ | |
429 LIBCFLAGS = $(CFLAGS) | |
430 CXXFLAGS = @CXXFLAGS@ | |
431 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
432 GOCFLAGS = $(CFLAGS) |
145 | 433 GDCFLAGS = $(CFLAGS) |
0 | 434 |
111 | 435 CREATE_GCOV = create_gcov |
436 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
437 TFLAGS = |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
438 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
439 # Defaults for all stages; some are overridden below. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
440 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
441 STAGE_CFLAGS = $(BOOT_CFLAGS) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
442 STAGE_TFLAGS = $(TFLAGS) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
443 STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
444 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
445 [+ FOR bootstrap-stage +] |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
446 # Defaults for stage [+id+]; some are overridden below. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
447 STAGE[+id+]_CFLAGS = $(STAGE_CFLAGS) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
448 STAGE[+id+]_CXXFLAGS = $(CXXFLAGS) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
449 @if target-libstdc++-v3-bootstrap |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
450 # Override the above if we're bootstrapping C++. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
451 STAGE[+id+]_CXXFLAGS = $(STAGE[+id+]_CFLAGS) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
452 @endif target-libstdc++-v3-bootstrap |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
453 STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
454 STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
455 [+ ENDFOR bootstrap-stage +] |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
456 |
111 | 457 # By default, C and C++ are the only stage1 languages, because they are the |
458 # only ones we require to build with the bootstrap compiler, and also the | |
459 # only ones useful for building stage2. | |
0 | 460 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
461 STAGE1_CFLAGS = @stage1_cflags@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
462 STAGE1_CHECKING = @stage1_checking@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
463 STAGE1_LANGUAGES = @stage1_languages@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
464 # * We force-disable intermodule optimizations, even if |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
465 # --enable-intermodule was passed, since the installed compiler |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
466 # probably can't handle them. Luckily, autoconf always respects |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
467 # the last argument when conflicting --enable arguments are passed. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
468 # * Likewise, we force-disable coverage flags, since the installed |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
469 # compiler probably has never heard of them. |
111 | 470 # * We also disable -Wformat, since older GCCs don't understand newer %s. |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
471 STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \ |
111 | 472 --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \ |
473 --disable-build-format-warnings | |
0 | 474 |
131 | 475 # When using the slow stage1 compiler disable IL verification and forcefully |
476 # enable it when using the stage2 compiler instead. As we later compare | |
477 # stage2 and stage3 we are merely avoid doing redundant work, plus we apply | |
478 # checking when building all target libraries for release builds. | |
479 STAGE1_TFLAGS += -fno-checking | |
480 STAGE2_CFLAGS += -fno-checking | |
481 STAGE2_TFLAGS += -fno-checking | |
482 STAGE3_CFLAGS += -fchecking=1 | |
483 STAGE3_TFLAGS += -fchecking=1 | |
484 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
485 STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
486 STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) |
0 | 487 |
131 | 488 STAGEtrain_CFLAGS = $(filter-out -fchecking=1,$(STAGE3_CFLAGS)) |
489 STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS)) | |
111 | 490 |
491 STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use | |
492 STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS) | |
493 | |
494 STAGEautoprofile_CFLAGS = $(STAGE2_CFLAGS) -g | |
495 STAGEautoprofile_TFLAGS = $(STAGE2_TFLAGS) | |
496 | |
497 STAGEautofeedback_CFLAGS = $(STAGE3_CFLAGS) | |
498 STAGEautofeedback_TFLAGS = $(STAGE3_TFLAGS) | |
0 | 499 |
500 do-compare = @do_compare@ | |
501 do-compare3 = $(do-compare) | |
502 | |
503 # ----------------------------------------------- | |
504 # Programs producing files for the TARGET machine | |
505 # ----------------------------------------------- | |
506 | |
507 AR_FOR_TARGET=@AR_FOR_TARGET@ | |
508 AS_FOR_TARGET=@AS_FOR_TARGET@ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
509 CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ |
0 | 510 |
511 # If GCC_FOR_TARGET is not overriden on the command line, then this | |
512 # variable is passed down to the gcc Makefile, where it is used to | |
513 # build libgcc2.a. We define it here so that it can itself be | |
514 # overridden on the command line. | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
515 GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
516 CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
517 RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
518 GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
519 GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@ |
145 | 520 GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@ |
0 | 521 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ |
522 LD_FOR_TARGET=@LD_FOR_TARGET@ | |
523 | |
524 LIPO_FOR_TARGET=@LIPO_FOR_TARGET@ | |
525 NM_FOR_TARGET=@NM_FOR_TARGET@ | |
526 OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@ | |
111 | 527 OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@ |
145 | 528 OTOOL_FOR_TARGET=@OTOOL_FOR_TARGET@ |
0 | 529 RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ |
111 | 530 READELF_FOR_TARGET=@READELF_FOR_TARGET@ |
0 | 531 STRIP_FOR_TARGET=@STRIP_FOR_TARGET@ |
532 WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ | |
533 WINDMC_FOR_TARGET=@WINDMC_FOR_TARGET@ | |
534 | |
535 COMPILER_AS_FOR_TARGET=@COMPILER_AS_FOR_TARGET@ | |
536 COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@ | |
537 COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@ | |
538 | |
539 CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@ | |
540 CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ | |
541 | |
542 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) | |
543 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates | |
111 | 544 LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
545 GOCFLAGS_FOR_TARGET = -O2 -g |
145 | 546 GDCFLAGS_FOR_TARGET = -O2 -g |
0 | 547 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
548 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
549 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
550 DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
551 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
552 XGCC_FLAGS_FOR_TARGET = $(FLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
553 |
0 | 554 # ------------------------------------ |
555 # Miscellaneous targets and flag lists | |
556 # ------------------------------------ | |
557 | |
558 # The first rule in the file had better be this one. Don't put any above it. | |
559 # This lives here to allow makefile fragments to contain dependencies. | |
560 all: | |
561 | |
562 #### host and target specific makefile fragments come in here. | |
563 @target_makefile_frag@ | |
564 @alphaieee_frag@ | |
565 @ospace_frag@ | |
566 @host_makefile_frag@ | |
567 ### | |
568 | |
569 # This is the list of directories that may be needed in RPATH_ENVVAR | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
570 # so that programs built for the target machine work. |
0 | 571 TARGET_LIB_PATH = [+ FOR target_modules +][+ |
572 IF lib_path +]$(TARGET_LIB_PATH_[+module+])[+ ENDIF lib_path +][+ | |
573 ENDFOR target_modules +]$(HOST_LIB_PATH_gcc) | |
574 [+ FOR target_modules +][+ IF lib_path +] | |
575 @if target-[+module+] | |
576 TARGET_LIB_PATH_[+module+] = $$r/$(TARGET_SUBDIR)/[+module+]/[+lib_path+]: | |
577 @endif target-[+module+] | |
578 [+ ENDIF lib_path +][+ ENDFOR target_modules +] | |
579 | |
580 | |
581 # This is the list of directories that may be needed in RPATH_ENVVAR | |
582 # so that programs built for the host machine work. | |
583 HOST_LIB_PATH = [+ FOR host_modules +][+ | |
584 IF lib_path +]$(HOST_LIB_PATH_[+module+])[+ ENDIF lib_path +][+ | |
585 ENDFOR host_modules +] | |
586 | |
587 # Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch | |
588 @if gcc | |
589 HOST_LIB_PATH_gcc = $$r/$(HOST_SUBDIR)/gcc$(GCC_SHLIB_SUBDIR):$$r/$(HOST_SUBDIR)/prev-gcc$(GCC_SHLIB_SUBDIR): | |
590 @endif gcc | |
591 | |
592 [+ FOR host_modules +][+ IF lib_path +] | |
593 @if [+module+] | |
594 HOST_LIB_PATH_[+module+] = \ | |
595 $$r/$(HOST_SUBDIR)/[+module+]/[+lib_path+]:[+ IF bootstrap | |
596 +]$$r/$(HOST_SUBDIR)/prev-[+module+]/[+lib_path+]:[+ ENDIF bootstrap +] | |
597 @endif [+module+] | |
598 [+ ENDIF lib_path +][+ ENDFOR host_modules +] | |
599 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
600 CXX_FOR_TARGET_FLAG_TO_PASS = \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
601 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
602 @if target-libstdc++-v3 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
603 # CXX_FOR_TARGET is tricky to get right for target libs that require a |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
604 # functional C++ compiler. When we recurse, if we expand |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
605 # CXX_FOR_TARGET before configuring libstdc++-v3, we won't get |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
606 # libstdc++ include flags from the script. Instead, we get an |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
607 # -funconfigured-* word, so that we'll get errors if this invalid C++ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
608 # command line is used for anything, but also so that we can use the |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
609 # word to decide whether or not to pass on this CXX_FOR_TARGET. If we |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
610 # don't pass it on, sub-make will use the default definition, that |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
611 # re-expands it at the time of use, so we'll get it right when we need |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
612 # it. One potential exception is the expansion of CXX_FOR_TARGET |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
613 # passed down as part of CXX within TARGET_FLAGS, but this wouldn't |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
614 # really work, for C++ host programs can't depend on the current-stage |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
615 # C++ target library. |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
616 CXX_FOR_TARGET_FLAG_TO_PASS = \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
617 $(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
618 @endif target-libstdc++-v3 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
619 |
111 | 620 # Flags to pass down to all sub-makes. STAGE*FLAGS, |
621 # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them | |
622 # overrideable (for a bootstrap build stage1 also builds gcc.info). | |
0 | 623 BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \ |
624 "`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
625 "[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +][+ FOR bootstrap-stage +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
626 "STAGE[+id+]_CFLAGS=$(STAGE[+id+]_CFLAGS)" \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
627 "STAGE[+id+]_CXXFLAGS=$(STAGE[+id+]_CXXFLAGS)" \ |
145 | 628 "STAGE[+id+]_GENERATOR_CFLAGS=$(STAGE[+id+]_GENERATOR_CFLAGS)" \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
629 "STAGE[+id+]_TFLAGS=$(STAGE[+id+]_TFLAGS)"[+ ENDFOR bootstrap-stage +] \ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
630 $(CXX_FOR_TARGET_FLAG_TO_PASS) \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
631 "TFLAGS=$(TFLAGS)" \ |
0 | 632 "CONFIG_SHELL=$(SHELL)" \ |
111 | 633 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ |
634 $(if $(LSAN_OPTIONS),"LSAN_OPTIONS=$(LSAN_OPTIONS)") | |
0 | 635 |
636 # We leave this in just in case, but it is not needed anymore. | |
637 RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) | |
638 | |
639 # Flags to pass down to most sub-makes, in which we're building with | |
640 # the host environment. | |
641 EXTRA_HOST_FLAGS = \ | |
642 'AR=$(AR)' \ | |
643 'AS=$(AS)' \ | |
644 'CC=$(CC)' \ | |
645 'CXX=$(CXX)' \ | |
646 'DLLTOOL=$(DLLTOOL)' \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
647 'GFORTRAN=$(GFORTRAN)' \ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
648 'GOC=$(GOC)' \ |
145 | 649 'GDC=$(GDC)' \ |
0 | 650 'LD=$(LD)' \ |
651 'LIPO=$(LIPO)' \ | |
652 'NM=$(NM)' \ | |
653 'OBJDUMP=$(OBJDUMP)' \ | |
145 | 654 'OTOOL=$(OTOOL)' \ |
0 | 655 'RANLIB=$(RANLIB)' \ |
111 | 656 'READELF=$(READELF)' \ |
0 | 657 'STRIP=$(STRIP)' \ |
658 'WINDRES=$(WINDRES)' \ | |
111 | 659 'WINDMC=$(WINDMC)' \ |
660 'CREATE_GCOV=$(CREATE_GCOV)' | |
0 | 661 |
662 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) | |
663 | |
111 | 664 # Flags to pass to stage1 or when not bootstrapping. |
665 | |
666 STAGE1_FLAGS_TO_PASS = \ | |
667 LDFLAGS="$${LDFLAGS}" \ | |
668 HOST_LIBS="$${HOST_LIBS}" | |
0 | 669 |
670 # Flags to pass to stage2 and later makes. | |
671 | |
672 POSTSTAGE1_FLAGS_TO_PASS = \ | |
673 CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
674 CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \ |
145 | 675 GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
676 GNATBIND="$${GNATBIND}" \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
677 LDFLAGS="$${LDFLAGS}" \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
678 HOST_LIBS="$${HOST_LIBS}" \ |
111 | 679 $(LTO_FLAGS_TO_PASS) \ |
0 | 680 "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" |
681 | |
111 | 682 @if gcc-bootstrap |
683 EXTRA_HOST_EXPORTS = if [ $(current_stage) != stage1 ]; then \ | |
684 $(POSTSTAGE1_HOST_EXPORTS) \ | |
685 fi; | |
686 | |
687 EXTRA_BOOTSTRAP_FLAGS = CC="$$CC" CXX="$$CXX" LDFLAGS="$$LDFLAGS" | |
688 @endif gcc-bootstrap | |
689 | |
0 | 690 # Flags to pass down to makes which are built with the target environment. |
691 # The double $ decreases the length of the command line; those variables | |
692 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The | |
693 # *_CFLAGS_FOR_TARGET variables are not passed down and most often empty, | |
694 # so we expand them here. | |
695 EXTRA_TARGET_FLAGS = \ | |
696 'AR=$$(AR_FOR_TARGET)' \ | |
697 'AS=$(COMPILER_AS_FOR_TARGET)' \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
698 'CC=$$(CC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
699 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ |
111 | 700 'CXX=$$(CXX_FOR_TARGET) -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ |
701 -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \ | |
702 $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
703 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ |
0 | 704 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
705 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
706 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
707 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \ |
145 | 708 'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ |
709 'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \ | |
0 | 710 'LD=$(COMPILER_LD_FOR_TARGET)' \ |
711 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
712 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
713 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ |
0 | 714 'NM=$(COMPILER_NM_FOR_TARGET)' \ |
715 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \ | |
111 | 716 'OBJCOPY=$$(OBJCOPY_FOR_TARGET)' \ |
0 | 717 'RANLIB=$$(RANLIB_FOR_TARGET)' \ |
111 | 718 'READELF=$$(READELF_FOR_TARGET)' \ |
0 | 719 'WINDRES=$$(WINDRES_FOR_TARGET)' \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
720 'WINDMC=$$(WINDMC_FOR_TARGET)' \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
721 'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \ |
111 | 722 'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \ |
723 'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
724 "TFLAGS=$$TFLAGS" |
0 | 725 |
726 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) | |
727 | |
728 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it | |
729 # unfortunately needs the native compiler and the target ar and | |
730 # ranlib. | |
731 # If any variables are added here, they must be added to do-*, below. | |
732 # The BUILD_* variables are a special case, which are used for the gcc | |
733 # cross-building scheme. | |
734 EXTRA_GCC_FLAGS = \ | |
735 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ | |
736 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ | |
111 | 737 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" |
0 | 738 |
739 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) | |
740 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
741 @if gcc |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
742 BUILD_CONFIG = @BUILD_CONFIG@ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
743 ifneq ($(BUILD_CONFIG),) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
744 include $(foreach CONFIG, $(BUILD_CONFIG), $(srcdir)/config/$(CONFIG).mk) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
745 endif |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
746 @endif gcc |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
747 |
0 | 748 .PHONY: configure-host |
749 configure-host: [+ | |
750 FOR host_modules +] \ | |
751 maybe-configure-[+module+][+ | |
752 ENDFOR host_modules +] | |
753 .PHONY: configure-target | |
754 configure-target: [+ | |
755 FOR target_modules +] \ | |
756 maybe-configure-target-[+module+][+ | |
757 ENDFOR target_modules +] | |
758 | |
759 # The target built for a native non-bootstrap build. | |
760 .PHONY: all | |
761 all: | |
762 @if gcc-bootstrap | |
763 [ -f stage_final ] || echo stage3 > stage_final | |
764 @r=`${PWD_COMMAND}`; export r; \ | |
765 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
766 $(MAKE) $(RECURSE_FLAGS_TO_PASS) `cat stage_final`-bubble | |
767 @endif gcc-bootstrap | |
768 @: $(MAKE); $(unstage) | |
769 @r=`${PWD_COMMAND}`; export r; \ | |
770 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
771 @if gcc-bootstrap |
0 | 772 if [ -f stage_last ]; then \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
773 TFLAGS="$(STAGE$(shell test ! -f stage_last || sed s,^stage,, stage_last)_TFLAGS)"; \ |
0 | 774 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \ |
775 else \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
776 @endif gcc-bootstrap |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
777 $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
778 @if gcc-bootstrap |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
779 ; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
780 fi \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
781 @endif gcc-bootstrap |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
782 && : |
0 | 783 |
784 .PHONY: all-build | |
785 [+ FOR build_modules +] | |
786 all-build: maybe-all-build-[+module+][+ ENDFOR build_modules +] | |
787 | |
788 .PHONY: all-host | |
789 [+ FOR host_modules +][+ IF bootstrap +] | |
790 @if [+module+]-no-bootstrap[+ ENDIF bootstrap +] | |
791 all-host: maybe-all-[+module+][+ IF bootstrap +] | |
792 @endif [+module+]-no-bootstrap[+ ENDIF bootstrap +][+ ENDFOR host_modules +] | |
793 | |
794 .PHONY: all-target | |
795 [+ FOR target_modules +][+ IF bootstrap +] | |
796 @if target-[+module+]-no-bootstrap[+ ENDIF bootstrap +] | |
797 all-target: maybe-all-target-[+module+][+ IF bootstrap +] | |
798 @endif target-[+module+]-no-bootstrap[+ | |
799 ENDIF bootstrap +][+ ENDFOR target_modules +] | |
800 | |
801 # Do a target for all the subdirectories. A ``make do-X'' will do a | |
802 # ``make X'' in all subdirectories (because, in general, there is a | |
803 # dependency (below) of X upon do-X, a ``make X'' will also do this, | |
804 # but it may do additional work as well). | |
805 [+ FOR recursive_targets +] | |
806 .PHONY: do-[+make_target+] | |
807 do-[+make_target+]: | |
808 @: $(MAKE); $(unstage) | |
809 @r=`${PWD_COMMAND}`; export r; \ | |
810 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
811 $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+make_target+]-host \ | |
812 [+make_target+]-target | |
813 | |
814 | |
815 .PHONY: [+make_target+]-host | |
816 [+ FOR host_modules +] | |
817 [+make_target+]-host: maybe-[+make_target+]-[+module+][+ ENDFOR host_modules +] | |
818 | |
819 .PHONY: [+make_target+]-target | |
820 [+ FOR target_modules +] | |
821 [+make_target+]-target: maybe-[+make_target+]-target-[+module+][+ ENDFOR target_modules +] | |
822 [+ ENDFOR recursive_targets +] | |
823 | |
824 # Here are the targets which correspond to the do-X targets. | |
825 | |
826 .PHONY: info installcheck dvi pdf html | |
827 .PHONY: install-info install-pdf install-html | |
828 .PHONY: clean distclean mostlyclean maintainer-clean realclean | |
829 .PHONY: local-clean local-distclean local-maintainer-clean | |
830 info: do-info | |
831 installcheck: do-installcheck | |
832 dvi: do-dvi | |
833 pdf: do-pdf | |
834 html: do-html | |
835 | |
836 # Make sure makeinfo is built before we do a `make info', if we're | |
837 # in fact building texinfo. | |
838 do-info: maybe-all-texinfo | |
839 | |
840 install-info: do-install-info dir.info | |
841 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
111 | 842 if [ -f dir.info ]; then \ |
843 $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info; \ | |
844 else true; fi | |
0 | 845 |
846 install-pdf: do-install-pdf | |
847 | |
848 install-html: do-install-html | |
849 | |
850 local-clean: | |
851 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log | |
852 | |
853 local-distclean: | |
854 -rm -f Makefile config.status config.cache mh-frag mt-frag | |
111 | 855 -rm -f maybedep.tmp serdep.tmp stage_final |
0 | 856 -if [ "$(TARGET_SUBDIR)" != "." ]; then \ |
857 rm -rf $(TARGET_SUBDIR); \ | |
858 else true; fi | |
859 -rm -rf $(BUILD_SUBDIR) | |
860 -if [ "$(HOST_SUBDIR)" != "." ]; then \ | |
861 rm -rf $(HOST_SUBDIR); \ | |
862 else true; fi | |
863 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile | |
864 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES | |
865 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null | |
866 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null | |
111 | 867 -rmdir fastjar gcc gnattools gotools libcc1 libiberty 2>/dev/null |
868 -rmdir texinfo zlib 2>/dev/null | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
869 -find . -name config.cache -exec rm -f {} \; \; 2>/dev/null |
0 | 870 |
871 local-maintainer-clean: | |
872 @echo "This command is intended for maintainers to use;" | |
873 @echo "it deletes files that may require special tools to rebuild." | |
874 | |
875 clean: do-clean local-clean | |
876 mostlyclean: do-mostlyclean local-clean | |
877 distclean: do-distclean local-clean local-distclean | |
878 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean | |
879 maintainer-clean: local-distclean | |
880 realclean: maintainer-clean | |
881 | |
882 # Check target. | |
883 | |
884 .PHONY: check do-check | |
885 check: do-check | |
886 | |
887 # Only include modules actually being configured and built. | |
888 .PHONY: check-host | |
889 check-host: [+ | |
890 FOR host_modules +] \ | |
891 maybe-check-[+module+][+ | |
892 ENDFOR host_modules +] | |
893 | |
894 .PHONY: check-target | |
895 check-target: [+ | |
896 FOR target_modules +] \ | |
897 maybe-check-target-[+module+][+ | |
898 ENDFOR target_modules +] | |
899 | |
900 do-check: | |
901 @: $(MAKE); $(unstage) | |
902 @r=`${PWD_COMMAND}`; export r; \ | |
903 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
904 $(MAKE) $(RECURSE_FLAGS_TO_PASS) check-host check-target | |
905 | |
906 # Automated reporting of test results. | |
907 | |
908 warning.log: build.log | |
909 $(srcdir)/contrib/warn_summary build.log > $@ | |
910 | |
911 mail-report.log: | |
912 if test x'$(BOOT_CFLAGS)' != x''; then \ | |
913 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ | |
914 fi; \ | |
915 $(srcdir)/contrib/test_summary -t >$@ | |
916 chmod +x $@ | |
917 echo If you really want to send e-mail, run ./$@ now | |
918 | |
919 mail-report-with-warnings.log: warning.log | |
920 if test x'$(BOOT_CFLAGS)' != x''; then \ | |
921 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ | |
922 fi; \ | |
923 $(srcdir)/contrib/test_summary -t -i warning.log >$@ | |
924 chmod +x $@ | |
925 echo If you really want to send e-mail, run ./$@ now | |
926 | |
111 | 927 # Local Vim config |
928 | |
929 $(srcdir)/.local.vimrc: | |
930 $(LN_S) contrib/vimrc $@ | |
931 | |
932 $(srcdir)/.lvimrc: | |
933 $(LN_S) contrib/vimrc $@ | |
934 | |
935 vimrc: $(srcdir)/.local.vimrc $(srcdir)/.lvimrc | |
936 | |
937 .PHONY: vimrc | |
938 | |
939 # clang-format config | |
940 | |
941 $(srcdir)/.clang-format: | |
942 $(LN_S) contrib/clang-format $@ | |
943 | |
944 clang-format: $(srcdir)/.clang-format | |
945 | |
946 .PHONY: clang-format | |
947 | |
0 | 948 # Installation targets. |
949 | |
950 .PHONY: install uninstall | |
951 install: | |
952 @: $(MAKE); $(unstage) | |
953 @r=`${PWD_COMMAND}`; export r; \ | |
954 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
955 $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-host install-target | |
956 | |
957 .PHONY: install-host-nogcc | |
958 install-host-nogcc: [+ | |
959 FOR host_modules +][+ IF (not (= (get "module") "gcc")) +] \ | |
960 maybe-install-[+module+][+ ENDIF +][+ | |
961 ENDFOR host_modules +] | |
962 | |
963 .PHONY: install-host | |
964 install-host: [+ | |
965 FOR host_modules +] \ | |
966 maybe-install-[+module+][+ | |
967 ENDFOR host_modules +] | |
968 | |
969 .PHONY: install-target | |
970 install-target: [+ | |
971 FOR target_modules +] \ | |
972 maybe-install-target-[+module+][+ | |
973 ENDFOR target_modules +] | |
974 | |
975 uninstall: | |
976 @echo "the uninstall target is not supported in this tree" | |
977 | |
978 .PHONY: install.all | |
979 install.all: install-no-fixedincludes | |
111 | 980 @if [ -f ./gcc/Makefile ]; then \ |
981 r=`${PWD_COMMAND}`; export r; \ | |
0 | 982 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ |
983 $(HOST_EXPORTS) \ | |
984 (cd ./gcc && \ | |
111 | 985 $(MAKE) $(FLAGS_TO_PASS) install-headers); \ |
0 | 986 else \ |
111 | 987 true; \ |
0 | 988 fi |
989 | |
111 | 990 # install-no-fixedincludes is used to allow the elaboration of binary packages |
991 # suitable for distribution, where we cannot include the fixed system header | |
992 # files. | |
0 | 993 .PHONY: install-no-fixedincludes |
994 install-no-fixedincludes: installdirs install-host-nogcc \ | |
111 | 995 install-target gcc-install-no-fixedincludes |
0 | 996 |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
997 .PHONY: install-strip |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
998 install-strip: |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
999 @: $(MAKE); $(unstage) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1000 @r=`${PWD_COMMAND}`; export r; \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1001 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1002 $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-strip-host install-strip-target |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1003 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1004 .PHONY: install-strip-host |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1005 install-strip-host: [+ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1006 FOR host_modules +] \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1007 maybe-install-strip-[+module+][+ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1008 ENDFOR host_modules +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1009 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1010 .PHONY: install-strip-target |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1011 install-strip-target: [+ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1012 FOR target_modules +] \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1013 maybe-install-strip-target-[+module+][+ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1014 ENDFOR target_modules +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1015 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1016 |
0 | 1017 ### other supporting targets |
1018 | |
1019 MAKEDIRS= \ | |
1020 $(DESTDIR)$(prefix) \ | |
1021 $(DESTDIR)$(exec_prefix) | |
1022 .PHONY: installdirs | |
1023 installdirs: mkinstalldirs | |
1024 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) | |
1025 | |
1026 dir.info: do-install-info | |
111 | 1027 if [ -f $(srcdir)/texinfo/gen-info-dir ]; then \ |
1028 $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new; \ | |
1029 mv -f dir.info.new dir.info; \ | |
1030 else true; \ | |
0 | 1031 fi |
1032 | |
1033 dist: | |
1034 @echo "Building a full distribution of this tree isn't done" | |
1035 @echo "via 'make dist'. Check out the etc/ subdirectory" | |
1036 | |
1037 etags tags: TAGS | |
1038 | |
1039 # Right now this just builds TAGS in each subdirectory. emacs19 has the | |
1040 # ability to use several tags files at once, so there is probably no need | |
1041 # to combine them into one big TAGS file (like CVS 1.3 does). We could | |
1042 # (if we felt like it) have this Makefile write a piece of elisp which | |
1043 # the user could load to tell emacs19 where all the TAGS files we just | |
1044 # built are. | |
1045 TAGS: do-TAGS | |
1046 | |
1047 # ------------------------------------ | |
1048 # Macros for configure and all targets | |
1049 # ------------------------------------ | |
1050 | |
1051 [+ DEFINE configure +] | |
1052 .PHONY: configure-[+prefix+][+module+] maybe-configure-[+prefix+][+module+] | |
1053 maybe-configure-[+prefix+][+module+]: | |
1054 @if gcc-bootstrap | |
1055 configure-[+prefix+][+module+]: stage_current | |
1056 @endif gcc-bootstrap | |
1057 @if [+prefix+][+module+] | |
1058 maybe-configure-[+prefix+][+module+]: configure-[+prefix+][+module+] | |
1059 configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +] | |
1060 @: $(MAKE); $(unstage)[+ ENDIF bootstrap +] | |
1061 @r=`${PWD_COMMAND}`; export r; \ | |
1062 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1063 [+ IF check_multilibs | |
1064 +]echo "Checking multilib configuration for [+module+]..."; \ | |
111 | 1065 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \ |
1066 $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null; \ | |
0 | 1067 if test -r [+subdir+]/[+module+]/multilib.out; then \ |
1068 if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \ | |
1069 rm -f [+subdir+]/[+module+]/multilib.tmp; \ | |
1070 else \ | |
1071 rm -f [+subdir+]/[+module+]/Makefile; \ | |
1072 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ | |
1073 fi; \ | |
1074 else \ | |
1075 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ | |
1076 fi; \ | |
1077 [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \ | |
111 | 1078 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1079 [+exports+] [+extra_exports+] \ |
0 | 1080 echo Configuring in [+subdir+]/[+module+]; \ |
1081 cd "[+subdir+]/[+module+]" || exit 1; \ | |
1082 case $(srcdir) in \ | |
1083 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ | |
1084 *) topdir=`echo [+subdir+]/[+module+]/ | \ | |
1085 sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ | |
1086 esac; \ | |
111 | 1087 module_srcdir=[+? module_srcdir (get "module_srcdir") (get "module")+]; \ |
0 | 1088 [+ IF no-config-site +]rm -f no-such-file || : ; \ |
111 | 1089 CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) \ |
1090 $$s/$$module_srcdir/configure \ | |
1091 --srcdir=$${topdir}/$$module_srcdir \ | |
0 | 1092 [+args+] --build=${build_alias} --host=[+host_alias+] \ |
111 | 1093 --target=[+target_alias+] [+extra_configure_flags+] \ |
0 | 1094 || exit 1 |
1095 @endif [+prefix+][+module+] | |
1096 | |
1097 [+ IF bootstrap +] | |
1098 [+ FOR bootstrap_stage +] | |
1099 .PHONY: configure-stage[+id+]-[+prefix+][+module+] maybe-configure-stage[+id+]-[+prefix+][+module+] | |
1100 maybe-configure-stage[+id+]-[+prefix+][+module+]: | |
1101 @if [+prefix+][+module+]-bootstrap | |
1102 maybe-configure-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+] | |
1103 configure-stage[+id+]-[+prefix+][+module+]: | |
1104 @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start | |
1105 @$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] | |
1106 @r=`${PWD_COMMAND}`; export r; \ | |
1107 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1108 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \ |
0 | 1109 [+ IF check_multilibs |
1110 +]echo "Checking multilib configuration for [+module+]..."; \ | |
111 | 1111 $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null; \ |
0 | 1112 if test -r [+subdir+]/[+module+]/multilib.out; then \ |
1113 if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \ | |
1114 rm -f [+subdir+]/[+module+]/multilib.tmp; \ | |
1115 else \ | |
1116 rm -f [+subdir+]/[+module+]/Makefile; \ | |
1117 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ | |
1118 fi; \ | |
1119 else \ | |
1120 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ | |
1121 fi; \ | |
1122 [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \ | |
1123 [+exports+][+ IF prev +] \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1124 [+poststage1_exports+][+ ENDIF prev +][+ IF prefix +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1125 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1126 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1127 LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS;[+ ELSE prefix +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1128 CFLAGS="$(STAGE[+id+]_CFLAGS)"; export CFLAGS; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1129 CXXFLAGS="$(STAGE[+id+]_CXXFLAGS)"; export CXXFLAGS;[+ IF prev +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1130 LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1131 LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +]; export LIBCFLAGS;[+ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1132 ENDIF prefix +] [+extra_exports+] \ |
111 | 1133 echo Configuring stage [+id+] in [+subdir+]/[+module+]; \ |
1134 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \ | |
0 | 1135 cd [+subdir+]/[+module+] || exit 1; \ |
1136 case $(srcdir) in \ | |
1137 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ | |
1138 *) topdir=`echo [+subdir+]/[+module+]/ | \ | |
1139 sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ | |
1140 esac; \ | |
111 | 1141 module_srcdir=[+? module_srcdir (get "module_srcdir") (get "module")+]; \ |
1142 $(SHELL) $$s/$$module_srcdir/configure \ | |
1143 --srcdir=$${topdir}/$$module_srcdir \ | |
0 | 1144 [+args+] --build=${build_alias} --host=[+host_alias+] \ |
111 | 1145 --target=[+target_alias+] \ |
1146 [+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1147 $(STAGE[+id+]_CONFIGURE_FLAGS)[+ IF extra_configure_flags +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1148 [+extra_configure_flags+][+ ENDIF extra_configure_flags +] |
0 | 1149 @endif [+prefix+][+module+]-bootstrap |
1150 [+ ENDFOR bootstrap_stage +] | |
1151 [+ ENDIF bootstrap +] | |
1152 [+ ENDDEF +] | |
1153 | |
1154 [+ DEFINE all +] | |
1155 .PHONY: all-[+prefix+][+module+] maybe-all-[+prefix+][+module+] | |
1156 maybe-all-[+prefix+][+module+]: | |
1157 @if gcc-bootstrap | |
1158 all-[+prefix+][+module+]: stage_current | |
1159 @endif gcc-bootstrap | |
1160 @if [+prefix+][+module+] | |
1161 TARGET-[+prefix+][+module+]=[+ | |
1162 IF all_target +][+all_target+][+ ELSE +]all[+ ENDIF all_target +] | |
1163 maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+] | |
1164 all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELSE +] | |
1165 @: $(MAKE); $(unstage)[+ ENDIF bootstrap +] | |
1166 @r=`${PWD_COMMAND}`; export r; \ | |
1167 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1168 [+exports+] [+extra_exports+] \ |
0 | 1169 (cd [+subdir+]/[+module+] && \ |
111 | 1170 $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+stage1_args+] [+extra_make_flags+] \ |
0 | 1171 $(TARGET-[+prefix+][+module+])) |
1172 @endif [+prefix+][+module+] | |
1173 | |
1174 [+ IF bootstrap +] | |
1175 [+ FOR bootstrap_stage +] | |
1176 .PHONY: all-stage[+id+]-[+prefix+][+module+] maybe-all-stage[+id+]-[+prefix+][+module+] | |
1177 .PHONY: clean-stage[+id+]-[+prefix+][+module+] maybe-clean-stage[+id+]-[+prefix+][+module+] | |
1178 maybe-all-stage[+id+]-[+prefix+][+module+]: | |
1179 maybe-clean-stage[+id+]-[+prefix+][+module+]: | |
1180 @if [+prefix+][+module+]-bootstrap | |
1181 maybe-all-stage[+id+]-[+prefix+][+module+]: all-stage[+id+]-[+prefix+][+module+] | |
1182 all-stage[+id+]: all-stage[+id+]-[+prefix+][+module+] | |
1183 TARGET-stage[+id+]-[+prefix+][+module+] = $(TARGET-[+prefix+][+module+]) | |
1184 all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+] | |
1185 @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start | |
1186 @r=`${PWD_COMMAND}`; export r; \ | |
1187 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1188 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \ |
0 | 1189 [+exports+][+ IF prev +] \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1190 [+poststage1_exports+][+ ENDIF prev +] [+extra_exports+] \ |
0 | 1191 cd [+subdir+]/[+module+] && \ |
111 | 1192 [+autoprofile+] \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1193 $(MAKE) $(BASE_FLAGS_TO_PASS)[+ IF prefix +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1194 CFLAGS="$(CFLAGS_FOR_TARGET)" \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1195 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1196 LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"[+ ELSE prefix +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1197 CFLAGS="$(STAGE[+id+]_CFLAGS)" \ |
145 | 1198 GENERATOR_CFLAGS="$(STAGE[+id+]_GENERATOR_CFLAGS)" \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1199 CXXFLAGS="$(STAGE[+id+]_CXXFLAGS)"[+ IF prev +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1200 LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1201 LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +][+ ENDIF prefix +] \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1202 CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1203 CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1204 LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ |
111 | 1205 [+args+] [+IF prev +][+poststage1_args+][+ ELSE prev +] \ |
1206 [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] \ | |
1207 TFLAGS="$(STAGE[+id+]_TFLAGS)" [+profile_data+] \ | |
0 | 1208 $(TARGET-stage[+id+]-[+prefix+][+module+]) |
1209 | |
1210 maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+] | |
1211 clean-stage[+id+]: clean-stage[+id+]-[+prefix+][+module+] | |
1212 clean-stage[+id+]-[+prefix+][+module+]: | |
1213 @if [ $(current_stage) = stage[+id+] ]; then \ | |
1214 [ -f [+subdir+]/[+module+]/Makefile ] || exit 0; \ | |
1215 else \ | |
1216 [ -f [+subdir+]/stage[+id+]-[+module+]/Makefile ] || exit 0; \ | |
1217 $(MAKE) stage[+id+]-start; \ | |
1218 fi; \ | |
1219 cd [+subdir+]/[+module+] && \ | |
111 | 1220 $(MAKE) [+args+] [+ IF prev +][+poststage1_args+][+ ELSE prev +] \ |
1221 [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] clean | |
0 | 1222 @endif [+prefix+][+module+]-bootstrap |
1223 | |
1224 [+ ENDFOR bootstrap_stage +] | |
1225 [+ ENDIF bootstrap +] | |
1226 [+ ENDDEF +] | |
1227 | |
1228 # -------------------------------------- | |
1229 # Modules which run on the build machine | |
1230 # -------------------------------------- | |
1231 [+ FOR build_modules +] | |
1232 [+ configure prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" | |
1233 host_alias=(get "host" "${build_alias}") | |
1234 target_alias=(get "target" "${target_alias}") | |
1235 args="$(BUILD_CONFIGARGS)" no-config-site=true +] | |
1236 | |
1237 [+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" | |
1238 args="$(EXTRA_BUILD_FLAGS)" +] | |
1239 [+ ENDFOR build_module +] | |
1240 | |
1241 # -------------------------------------- | |
1242 # Modules which run on the host machine | |
1243 # -------------------------------------- | |
1244 [+ FOR host_modules +] | |
1245 [+ configure prefix="" subdir="$(HOST_SUBDIR)" | |
1246 exports="$(HOST_EXPORTS)" | |
1247 poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)" | |
1248 host_alias=(get "host" "${host_alias}") | |
1249 target_alias=(get "target" "${target_alias}") | |
1250 args="$(HOST_CONFIGARGS)" +] | |
1251 | |
1252 [+ all prefix="" subdir="$(HOST_SUBDIR)" | |
1253 exports="$(HOST_EXPORTS)" | |
1254 poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)" | |
1255 args="$(EXTRA_HOST_FLAGS)" | |
111 | 1256 stage1_args="$(STAGE1_FLAGS_TO_PASS)" |
0 | 1257 poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +] |
1258 | |
1259 .PHONY: check-[+module+] maybe-check-[+module+] | |
1260 maybe-check-[+module+]: | |
1261 @if [+module+] | |
1262 maybe-check-[+module+]: check-[+module+] | |
1263 [+ IF no_check +] | |
1264 check-[+module+]: | |
1265 [+ ELIF no_check_cross +] | |
1266 # This module is only tested in a native toolchain. | |
1267 check-[+module+]: | |
1268 @: $(MAKE); $(unstage) | |
111 | 1269 @if [ '$(host)' = '$(target)' ]; then \ |
0 | 1270 r=`${PWD_COMMAND}`; export r; \ |
1271 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
111 | 1272 $(HOST_EXPORTS) [+ IF bootstrap +]$(EXTRA_HOST_EXPORTS)[+ |
1273 ENDIF bootstrap +] \ | |
0 | 1274 (cd $(HOST_SUBDIR)/[+module+] && \ |
111 | 1275 $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+][+ |
1276 IF bootstrap +] $(EXTRA_BOOTSTRAP_FLAGS)[+ ENDIF bootstrap +] check) | |
0 | 1277 fi |
1278 [+ ELSE check +] | |
1279 check-[+module+]: | |
1280 @: $(MAKE); $(unstage) | |
1281 @r=`${PWD_COMMAND}`; export r; \ | |
1282 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
111 | 1283 $(HOST_EXPORTS) [+ IF bootstrap +]$(EXTRA_HOST_EXPORTS)[+ |
1284 ENDIF bootstrap +] \ | |
0 | 1285 (cd $(HOST_SUBDIR)/[+module+] && \ |
111 | 1286 $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+][+ |
1287 IF bootstrap +] $(EXTRA_BOOTSTRAP_FLAGS)[+ ENDIF bootstrap +] check) | |
0 | 1288 [+ ENDIF no_check +] |
1289 @endif [+module+] | |
1290 | |
1291 .PHONY: install-[+module+] maybe-install-[+module+] | |
1292 maybe-install-[+module+]: | |
1293 @if [+module+] | |
1294 maybe-install-[+module+]: install-[+module+] | |
1295 [+ IF no_install +] | |
1296 install-[+module+]: | |
1297 [+ ELSE install +] | |
1298 install-[+module+]: installdirs | |
1299 @: $(MAKE); $(unstage) | |
1300 @r=`${PWD_COMMAND}`; export r; \ | |
1301 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1302 $(HOST_EXPORTS) \ | |
1303 (cd $(HOST_SUBDIR)/[+module+] && \ | |
1304 $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] install) | |
1305 [+ ENDIF no_install +] | |
1306 @endif [+module+] | |
1307 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1308 .PHONY: install-strip-[+module+] maybe-install-strip-[+module+] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1309 maybe-install-strip-[+module+]: |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1310 @if [+module+] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1311 maybe-install-strip-[+module+]: install-strip-[+module+] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1312 [+ IF no_install +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1313 install-strip-[+module+]: |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1314 [+ ELSE install +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1315 install-strip-[+module+]: installdirs |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1316 @: $(MAKE); $(unstage) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1317 @r=`${PWD_COMMAND}`; export r; \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1318 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1319 $(HOST_EXPORTS) \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1320 (cd $(HOST_SUBDIR)/[+module+] && \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1321 $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] install-strip) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1322 [+ ENDIF no_install +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1323 @endif [+module+] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1324 |
0 | 1325 # Other targets (info, dvi, pdf, etc.) |
1326 [+ FOR recursive_targets +] | |
1327 .PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+] | |
1328 maybe-[+make_target+]-[+module+]: | |
1329 @if [+module+] | |
1330 maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+] | |
1331 [+ IF (match-value? = "missing" (get "make_target") ) +] | |
1332 # [+module+] doesn't support [+make_target+]. | |
1333 [+make_target+]-[+module+]: | |
1334 [+ ELSE +] | |
1335 [+make_target+]-[+module+]: [+ | |
1336 FOR depend +]\ | |
1337 [+depend+]-[+module+] [+ | |
1338 ENDFOR depend +] | |
1339 @[+ IF bootstrap +][+ ELSE +]: $(MAKE); $(unstage) | |
1340 @[+ ENDIF bootstrap +][ -f ./[+module+]/Makefile ] || exit 0; \ | |
1341 r=`${PWD_COMMAND}`; export r; \ | |
1342 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1343 $(HOST_EXPORTS) \ | |
1344 for flag in $(EXTRA_HOST_FLAGS) [+extra_make_flags+]; do \ | |
1345 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ | |
1346 done; \ | |
111 | 1347 echo "Doing [+make_target+] in [+module+]"; \ |
0 | 1348 (cd $(HOST_SUBDIR)/[+module+] && \ |
1349 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
1350 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ | |
1351 "RANLIB=$${RANLIB}" \ | |
1352 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ | |
1353 [+make_target+]) \ | |
1354 || exit 1 | |
1355 [+ ENDIF +] | |
1356 @endif [+module+] | |
1357 [+ ENDFOR recursive_targets +] | |
1358 [+ ENDFOR host_modules +] | |
1359 | |
1360 # --------------------------------------- | |
1361 # Modules which run on the target machine | |
1362 # --------------------------------------- | |
1363 [+ FOR target_modules +] | |
1364 | |
1365 [+ IF raw_cxx +] | |
1366 [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)" | |
1367 check_multilibs=true | |
1368 exports="$(RAW_CXX_TARGET_EXPORTS)" | |
1369 host_alias=(get "host" "${target_alias}") | |
1370 target_alias=(get "target" "${target_alias}") | |
1371 args="$(TARGET_CONFIGARGS)" no-config-site=true +] | |
1372 | |
1373 [+ all prefix="target-" subdir="$(TARGET_SUBDIR)" | |
1374 exports="$(RAW_CXX_TARGET_EXPORTS)" | |
1375 args="$(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +] | |
1376 [+ ELSE +] | |
1377 [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)" | |
1378 check_multilibs=true | |
1379 exports="$(NORMAL_TARGET_EXPORTS)" | |
1380 host_alias=(get "host" "${target_alias}") | |
1381 target_alias=(get "target" "${target_alias}") | |
1382 args="$(TARGET_CONFIGARGS)" no-config-site=true +] | |
1383 | |
1384 [+ all prefix="target-" subdir="$(TARGET_SUBDIR)" | |
1385 exports="$(NORMAL_TARGET_EXPORTS)" | |
1386 args="$(EXTRA_TARGET_FLAGS)" +] | |
1387 [+ ENDIF +] | |
1388 | |
1389 .PHONY: check-target-[+module+] maybe-check-target-[+module+] | |
1390 maybe-check-target-[+module+]: | |
1391 @if target-[+module+] | |
1392 maybe-check-target-[+module+]: check-target-[+module+] | |
1393 [+ IF no_check +] | |
1394 # Dummy target for uncheckable module. | |
1395 check-target-[+module+]: | |
1396 [+ ELSE check +] | |
1397 check-target-[+module+]: | |
1398 @: $(MAKE); $(unstage) | |
1399 @r=`${PWD_COMMAND}`; export r; \ | |
1400 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+ | |
1401 IF raw_cxx +] | |
1402 $(RAW_CXX_TARGET_EXPORTS) \[+ | |
1403 ELSE normal_cxx +] | |
1404 $(NORMAL_TARGET_EXPORTS) \[+ | |
1405 ENDIF raw_cxx +] | |
1406 (cd $(TARGET_SUBDIR)/[+module+] && \ | |
1407 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+ | |
1408 IF raw_cxx | |
1409 +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+ | |
1410 ENDIF raw_cxx | |
1411 +] [+extra_make_flags+] check) | |
1412 [+ ENDIF no_check +] | |
1413 @endif target-[+module+] | |
1414 | |
1415 .PHONY: install-target-[+module+] maybe-install-target-[+module+] | |
1416 maybe-install-target-[+module+]: | |
1417 @if target-[+module+] | |
1418 maybe-install-target-[+module+]: install-target-[+module+] | |
1419 [+ IF no_install +] | |
1420 # Dummy target for uninstallable. | |
1421 install-target-[+module+]: | |
1422 [+ ELSE install +] | |
1423 install-target-[+module+]: installdirs | |
1424 @: $(MAKE); $(unstage) | |
1425 @r=`${PWD_COMMAND}`; export r; \ | |
1426 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+ | |
1427 IF raw_cxx +] | |
1428 $(RAW_CXX_TARGET_EXPORTS) \[+ | |
1429 ELSE normal_cxx +] | |
1430 $(NORMAL_TARGET_EXPORTS) \[+ | |
1431 ENDIF raw_cxx +] | |
1432 (cd $(TARGET_SUBDIR)/[+module+] && \ | |
1433 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+extra_make_flags+] install) | |
1434 [+ ENDIF no_install +] | |
1435 @endif target-[+module+] | |
1436 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1437 .PHONY: install-strip-target-[+module+] maybe-install-strip-target-[+module+] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1438 maybe-install-strip-target-[+module+]: |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1439 @if target-[+module+] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1440 maybe-install-strip-target-[+module+]: install-strip-target-[+module+] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1441 [+ IF no_install +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1442 # Dummy target for uninstallable. |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1443 install-strip-target-[+module+]: |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1444 [+ ELSE install +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1445 install-strip-target-[+module+]: installdirs |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1446 @: $(MAKE); $(unstage) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1447 @r=`${PWD_COMMAND}`; export r; \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1448 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1449 IF raw_cxx +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1450 $(RAW_CXX_TARGET_EXPORTS) \[+ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1451 ELSE normal_cxx +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1452 $(NORMAL_TARGET_EXPORTS) \[+ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1453 ENDIF raw_cxx +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1454 (cd $(TARGET_SUBDIR)/[+module+] && \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1455 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+extra_make_flags+] install-strip) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1456 [+ ENDIF no_install +] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1457 @endif target-[+module+] |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1458 |
0 | 1459 # Other targets (info, dvi, pdf, etc.) |
1460 [+ FOR recursive_targets +] | |
1461 .PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+] | |
1462 maybe-[+make_target+]-target-[+module+]: | |
1463 @if target-[+module+] | |
1464 maybe-[+make_target+]-target-[+module+]: [+make_target+]-target-[+module+] | |
1465 [+ IF (match-value? = "missing" (get "make_target") ) +] | |
1466 # [+module+] doesn't support [+make_target+]. | |
1467 [+make_target+]-target-[+module+]: | |
1468 [+ ELSE +] | |
1469 [+make_target+]-target-[+module+]: [+ | |
1470 FOR depend +]\ | |
1471 [+depend+]-target-[+module+] [+ | |
1472 ENDFOR depend +] | |
1473 @: $(MAKE); $(unstage) | |
111 | 1474 @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0; \ |
0 | 1475 r=`${PWD_COMMAND}`; export r; \ |
1476 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+ | |
1477 IF raw_cxx +] | |
1478 $(RAW_CXX_TARGET_EXPORTS) \[+ | |
1479 ELSE normal_cxx +] | |
1480 $(NORMAL_TARGET_EXPORTS) \[+ | |
1481 ENDIF raw_cxx +] | |
111 | 1482 echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]"; \ |
0 | 1483 for flag in $(EXTRA_TARGET_FLAGS); do \ |
1484 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ | |
1485 done; \ | |
1486 (cd $(TARGET_SUBDIR)/[+module+] && \ | |
1487 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
1488 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ | |
1489 "RANLIB=$${RANLIB}" \ | |
1490 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ | |
1491 [+extra_make_flags+] [+make_target+]) \ | |
1492 || exit 1 | |
1493 [+ ENDIF +] | |
1494 @endif target-[+module+] | |
1495 [+ ENDFOR recursive_targets +] | |
1496 [+ ENDFOR target_modules +] | |
1497 | |
111 | 1498 @if target-libgomp |
1499 .PHONY: check-target-libgomp-c++ | |
1500 check-target-libgomp-c++: | |
1501 $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libgomp | |
1502 | |
131 | 1503 .PHONY: check-target-libgomp-fortran |
1504 check-target-libgomp-fortran: | |
1505 $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) fortran.exp" check-target-libgomp | |
1506 | |
111 | 1507 @endif target-libgomp |
1508 | |
1509 @if target-libitm | |
1510 .PHONY: check-target-libitm-c++ | |
1511 check-target-libitm-c++: | |
1512 $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libitm | |
1513 | |
1514 @endif target-libitm | |
1515 | |
0 | 1516 # ---------- |
1517 # GCC module | |
1518 # ---------- | |
1519 | |
1520 @if gcc-no-bootstrap | |
1521 .PHONY: cross | |
1522 cross: all-build all-gas all-ld | |
1523 @r=`${PWD_COMMAND}`; export r; \ | |
1524 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1525 $(HOST_EXPORTS) \ | |
1526 echo "Building the C and C++ compiler"; \ | |
1527 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" | |
1528 @r=`${PWD_COMMAND}`; export r; \ | |
111 | 1529 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ |
0 | 1530 echo "Building runtime libraries"; \ |
1531 $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all | |
1532 @endif gcc-no-bootstrap | |
1533 | |
1534 @if gcc | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1535 [+ FOR languages +] |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1536 .PHONY: check-gcc-[+language+] check-[+language+] |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1537 check-gcc-[+language+]: |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1538 r=`${PWD_COMMAND}`; export r; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1539 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1540 $(HOST_EXPORTS) \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1541 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) [+gcc-check-target+]); |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
1542 check-[+language+]: check-gcc-[+language+][+ FOR lib-check-target +] [+ lib-check-target +][+ ENDFOR lib-check-target +] |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1543 [+ ENDFOR languages +] |
0 | 1544 |
111 | 1545 # The gcc part of install-no-fixedincludes, which relies on an intimate |
1546 # knowledge of how a number of gcc internal targets (inter)operate. Delegate. | |
1547 .PHONY: gcc-install-no-fixedincludes | |
1548 gcc-install-no-fixedincludes: | |
0 | 1549 @if [ -f ./gcc/Makefile ]; then \ |
1550 r=`${PWD_COMMAND}`; export r; \ | |
111 | 1551 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ |
0 | 1552 $(HOST_EXPORTS) \ |
111 | 1553 (cd ./gcc \ |
1554 && $(MAKE) $(GCC_FLAGS_TO_PASS) install-no-fixedincludes); \ | |
0 | 1555 else true; fi |
1556 @endif gcc | |
1557 | |
1558 # --------------------- | |
1559 # GCC bootstrap support | |
1560 # --------------------- | |
1561 | |
1562 # We track the current stage (the one in 'gcc') in the stage_current file. | |
1563 # stage_last instead tracks the stage that was built last. These targets | |
1564 # are dummy when toplevel bootstrap is not active. | |
1565 | |
1566 # While making host and target tools, symlinks to the final stage must be | |
1567 # there, so $(unstage) should be run at various points. To avoid excessive | |
1568 # recursive invocations of make, we "inline" them using a variable. These | |
1569 # must be referenced as ": $(MAKE) ; $(unstage)" rather than "$(unstage)" | |
1570 # to avoid warnings from the GNU Make job server. | |
1571 | |
1572 unstage = : | |
1573 stage = : | |
1574 current_stage = "" | |
1575 | |
1576 @if gcc-bootstrap | |
1577 unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit 1; else :; fi | |
1578 stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end || exit 1; else :; fi | |
1579 current_stage = "`cat stage_current 2> /dev/null`" | |
1580 @endif gcc-bootstrap | |
1581 | |
1582 .PHONY: unstage stage | |
1583 unstage: | |
1584 @: $(MAKE); $(unstage) | |
1585 stage: | |
1586 @: $(MAKE); $(stage) | |
1587 | |
1588 # Disable commands for lean bootstrap. | |
1589 LEAN = false | |
1590 | |
1591 # We name the build directories for the various stages "stage1-gcc", | |
1592 # "stage2-gcc","stage3-gcc", etc. | |
1593 | |
1594 # Since the 'compare' process will fail (on debugging information) if any | |
1595 # directory names are different, we need to link the gcc directory for | |
1596 # the previous stage to a constant name ('prev-gcc'), and to make the name of | |
1597 # the build directories constant as well. For the latter, we use naked names | |
1598 # like 'gcc', because the scripts in that directory assume it. We use | |
1599 # mv on platforms where symlinks to directories do not work or are not | |
1600 # reliable. | |
1601 | |
1602 # 'touch' doesn't work right on some platforms. | |
1603 STAMP = echo timestamp > | |
1604 | |
1605 # We only want to compare .o files, so set this! | |
1606 objext = .o | |
1607 | |
1608 [+ FOR bootstrap-stage +] | |
1609 .PHONY: stage[+id+]-start stage[+id+]-end | |
1610 | |
1611 stage[+id+]-start:: | |
1612 @: $(MAKE); $(stage); \ | |
111 | 1613 echo stage[+id+] > stage_current; \ |
0 | 1614 echo stage[+id+] > stage_last; \ |
1615 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)[+ | |
1616 FOR host_modules +][+ IF bootstrap +] | |
1617 @if [+ module +] | |
1618 @cd $(HOST_SUBDIR); [ -d stage[+id+]-[+module+] ] || \ | |
1619 mkdir stage[+id+]-[+module+]; \ | |
111 | 1620 mv stage[+id+]-[+module+] [+module+][+ IF prev +]; \ |
0 | 1621 mv stage[+prev+]-[+module+] prev-[+module+] || test -f stage[+prev+]-lean [+ ENDIF prev +] |
1622 @endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +] | |
1623 @[ -d stage[+id+]-$(TARGET_SUBDIR) ] || \ | |
1624 mkdir stage[+id+]-$(TARGET_SUBDIR); \ | |
111 | 1625 mv stage[+id+]-$(TARGET_SUBDIR) $(TARGET_SUBDIR)[+ IF prev +]; \ |
0 | 1626 mv stage[+prev+]-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage[+prev+]-lean [+ ENDIF prev +] |
1627 | |
1628 stage[+id+]-end:: [+ FOR host_modules +][+ IF bootstrap +] | |
1629 @if [+ module +] | |
111 | 1630 @if test -d $(HOST_SUBDIR)/[+module+]; then \ |
1631 cd $(HOST_SUBDIR); mv [+module+] stage[+id+]-[+module+][+ IF prev +]; \ | |
1632 mv prev-[+module+] stage[+prev+]-[+module+]; : [+ ENDIF prev +]; \ | |
0 | 1633 fi |
1634 @endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +] | |
111 | 1635 @if test -d $(TARGET_SUBDIR); then \ |
1636 mv $(TARGET_SUBDIR) stage[+id+]-$(TARGET_SUBDIR)[+ IF prev +]; \ | |
1637 mv prev-$(TARGET_SUBDIR) stage[+prev+]-$(TARGET_SUBDIR); : [+ ENDIF prev +]; \ | |
0 | 1638 fi |
1639 rm -f stage_current | |
1640 | |
1641 # Bubble a bug fix through all the stages up to stage [+id+]. They are | |
1642 # remade, but not reconfigured. The next stage (if any) will not be | |
1643 # reconfigured either. | |
1644 .PHONY: stage[+id+]-bubble | |
1645 stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +] | |
1646 @r=`${PWD_COMMAND}`; export r; \ | |
1647 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1648 if test -f stage[+id+]-lean [+ | |
111 | 1649 IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +]; then \ |
1650 echo Skipping rebuild of stage[+id+]; \ | |
0 | 1651 else \ |
1652 $(MAKE) stage[+id+]-start; \[+IF lean +] | |
1653 if $(LEAN); then \ | |
111 | 1654 rm -rf stage[+lean+]-*; \ |
1655 $(STAMP) stage[+lean+]-lean; \ | |
0 | 1656 fi; \[+ ENDIF lean +] |
1657 $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \ | |
1658 fi[+ IF compare-target +] | |
1659 $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+compare-target+][+ ENDIF compare-target +] | |
1660 | |
1661 .PHONY: all-stage[+id+] clean-stage[+id+] | |
1662 do-clean: clean-stage[+id+] | |
1663 | |
1664 # FIXME: Will not need to be conditional when toplevel bootstrap is the | |
1665 # only possibility, but now it conflicts with no-bootstrap rules | |
1666 @if gcc-bootstrap | |
1667 [+ IF compare-target +] | |
1668 [+compare-target+]: | |
1669 @r=`${PWD_COMMAND}`; export r; \ | |
1670 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1671 if test -f stage[+prev+]-lean; then \ | |
111 | 1672 echo Cannot compare object files as stage [+prev+] was deleted.; \ |
1673 exit 0; \ | |
0 | 1674 fi; \ |
1675 : $(MAKE); $(stage); \ | |
111 | 1676 rm -f .bad_compare; \ |
1677 echo Comparing stages [+prev+] and [+id+]; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1678 sed=`echo stage[+id+] | sed 's,^stage,,;s,.,.,g'`; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1679 files=`find stage[+id+]-* -name "*$(objext)" -print | \ |
111 | 1680 sed -n s,^stage$$sed-,,p`; \ |
145 | 1681 for file in $${files} ${extra-compare}; do \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1682 f1=$$r/stage[+prev+]-$$file; f2=$$r/stage[+id+]-$$file; \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1683 if test ! -f $$f1; then continue; fi; \ |
0 | 1684 $(do-[+compare-target+]) > /dev/null 2>&1; \ |
1685 if test $$? -eq 1; then \ | |
1686 case $$file in \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1687 @compare_exclusions@) \ |
0 | 1688 echo warning: $$file differs ;; \ |
1689 *) \ | |
1690 echo $$file differs >> .bad_compare ;; \ | |
111 | 1691 esac; \ |
1692 fi; \ | |
1693 done; \ | |
0 | 1694 if [ -f .bad_compare ]; then \ |
1695 echo "Bootstrap comparison failure!"; \ | |
1696 cat .bad_compare; \ | |
1697 exit 1; \ | |
1698 else \ | |
1699 echo Comparison successful.; \ | |
111 | 1700 fi; \ |
0 | 1701 $(STAMP) [+compare-target+][+ IF prev +] |
1702 if $(LEAN); then \ | |
1703 rm -rf stage[+prev+]-*; \ | |
1704 $(STAMP) stage[+prev+]-lean; \ | |
1705 fi[+ ENDIF prev +] | |
1706 [+ ENDIF compare-target +] | |
1707 | |
1708 [+ IF bootstrap-target +] | |
1709 .PHONY: [+bootstrap-target+] [+bootstrap-target+]-lean | |
1710 [+bootstrap-target+]: | |
1711 echo stage[+id+] > stage_final | |
1712 @r=`${PWD_COMMAND}`; export r; \ | |
1713 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1714 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble | |
1715 @: $(MAKE); $(unstage) | |
1716 @r=`${PWD_COMMAND}`; export r; \ | |
1717 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1718 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \ |
0 | 1719 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target |
1720 | |
1721 [+bootstrap-target+]-lean: | |
1722 echo stage[+id+] > stage_final | |
1723 @r=`${PWD_COMMAND}`; export r; \ | |
1724 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1725 $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage[+id+]-bubble | |
1726 @: $(MAKE); $(unstage) | |
1727 @r=`${PWD_COMMAND}`; export r; \ | |
1728 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1729 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \ |
0 | 1730 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target |
1731 [+ ENDIF bootstrap-target +] | |
1732 | |
1733 # Rules to wipe a stage and all the following ones, also used for cleanstrap | |
1734 [+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +] | |
1735 .PHONY: distclean-stage[+id+] | |
1736 distclean-stage[+id+]:: | |
1737 @: $(MAKE); $(stage) | |
1738 @test "`cat stage_last`" != stage[+id+] || rm -f stage_last | |
1739 rm -rf stage[+id+]-* [+ | |
1740 IF compare-target +][+compare-target+] [+ ENDIF compare-target +] | |
1741 | |
1742 [+ IF cleanstrap-target +] | |
1743 .PHONY: [+cleanstrap-target+] | |
1744 [+cleanstrap-target+]: do-distclean local-clean | |
1745 echo stage[+id+] > stage_final | |
1746 @r=`${PWD_COMMAND}`; export r; \ | |
1747 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1748 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble | |
1749 @: $(MAKE); $(unstage) | |
1750 @r=`${PWD_COMMAND}`; export r; \ | |
1751 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1752 TFLAGS="$(STAGE[+id+]_TFLAGS)"; \ |
0 | 1753 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target |
1754 [+ ENDIF cleanstrap-target +] | |
1755 @endif gcc-bootstrap | |
1756 | |
1757 [+ ENDFOR bootstrap-stage +] | |
1758 | |
1759 stageprofile-end:: | |
1760 $(MAKE) distclean-stagefeedback | |
1761 | |
1762 stagefeedback-start:: | |
1763 @r=`${PWD_COMMAND}`; export r; \ | |
1764 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
145 | 1765 for i in prev-*; do \ |
1766 j=`echo $$i | sed s/^prev-//`; \ | |
0 | 1767 cd $$r/$$i && \ |
111 | 1768 { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL); } && \ |
1769 { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL); }; \ | |
0 | 1770 done |
1771 | |
1772 @if gcc-bootstrap | |
1773 do-distclean: distclean-stage1 | |
1774 | |
1775 # Provide a GCC build when we're building target libraries. This does | |
1776 # not work as a dependency, just as the minimum necessary to avoid errors. | |
1777 stage_last: | |
1778 @r=`${PWD_COMMAND}`; export r; \ | |
1779 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ | |
1780 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage1-bubble | |
1781 | |
1782 # Same as unstage, but not phony and defaulting to stage1-start. We place | |
1783 # it in the dependency so that for example `make -j3 all-gcc' works. | |
1784 stage_current: | |
1785 @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi | |
1786 | |
1787 .PHONY: restrap | |
1788 restrap:: | |
1789 @: $(MAKE); $(stage) | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1790 rm -rf stage1-$(TARGET_SUBDIR)[+ FOR bootstrap-stage +][+ IF prev |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1791 +] stage[+id+]-*[+ ENDIF prev +][+ ENDFOR bootstrap-stage +] |
0 | 1792 restrap:: all |
1793 @endif gcc-bootstrap | |
1794 | |
1795 # -------------------------------------- | |
1796 # Dependencies between different modules | |
1797 # -------------------------------------- | |
1798 | |
1799 # Generic dependencies for target modules on host stuff, especially gcc | |
1800 @if gcc-bootstrap[+ FOR target_modules +][+ IF bootstrap | |
1801 +][+ FOR bootstrap_stage +] | |
1802 configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-gcc[+ | |
1803 ENDFOR +][+ ELSE bootstrap +] | |
1804 configure-target-[+module+]: stage_last[+ | |
1805 ENDIF bootstrap +][+ ENDFOR target_modules +] | |
1806 @endif gcc-bootstrap | |
1807 | |
1808 @if gcc-no-bootstrap[+ FOR target_modules +] | |
1809 configure-target-[+module+]: maybe-all-gcc[+ | |
1810 ENDFOR target_modules +] | |
1811 @endif gcc-no-bootstrap | |
1812 | |
1813 | |
1814 # There are two types of dependencies here: 'hard' dependencies, where one | |
1815 # module simply won't build without the other; and 'soft' dependencies, where | |
1816 # if the depended-on module is missing, the depending module will do without | |
1817 # or find a substitute somewhere (perhaps installed). Soft dependencies | |
1818 # are made here to depend on a 'maybe-' target. If you're not sure, | |
1819 # it's safer to use a soft dependency. | |
1820 | |
1821 [+ ;; These Scheme functions build the bulk of the dependencies. | |
1822 ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc", | |
1823 ;; where "maybe-" is only included if HARD is not true, and all-gcc | |
1824 ;; is taken from VAR-NAME. | |
1825 (define dep-target (lambda (module-kind var-name hard) | |
1826 (string-append | |
1827 (if hard "" "maybe-") | |
1828 (dep-subtarget var-name) | |
1829 module-kind | |
1830 (dep-module var-name) | |
1831 ))) | |
1832 | |
1833 ;; make-dep builds a dependency from the MODULE and ON AutoGen vars. | |
1834 (define make-dep (lambda (module-kind on-kind) | |
1835 (string-append | |
1836 (dep-target module-kind "module" #t) ": " | |
1837 (dep-target on-kind "on" (exist? "hard"))))) | |
1838 | |
1839 ;; dep-subtarget extracts everything up to the first dash in the given | |
1840 ;; AutoGen variable, for example it extracts "all-" out of "all-gcc". | |
1841 (define dep-subtarget (lambda (var-name) | |
1842 (substring (get var-name) 0 (+ 1 (string-index (get var-name) #\-))))) | |
1843 | |
1844 ;; dep-module extracts everything up to the first dash in the given | |
1845 ;; AutoGen variable, for example it extracts "gcc" out of "all-gcc". | |
1846 (define dep-module (lambda (var-name) | |
1847 (substring (get var-name) (+ 1 (string-index (get var-name) #\-))))) | |
1848 | |
1849 ;; dep-stage builds a string for the prefix of a bootstrap stage. | |
1850 (define dep-stage (lambda () | |
1851 (string-append | |
1852 "stage" | |
1853 (get "id") | |
1854 "-"))) | |
1855 | |
1856 ;; dep-maybe is the same as the AutoGen expression "- hard 'maybe-'" | |
1857 ;; but is written in Scheme. | |
1858 (define dep-maybe (lambda () | |
1859 (if (exist? "hard") "" "maybe-"))) | |
1860 | |
131 | 1861 ;; dep-kind returns returns "prebootstrap" for configure or build |
1862 ;; dependencies of bootstrapped modules on a build module | |
1863 ;; (e.g. all-gcc on all-build-bison); "normal" if the dependency is | |
1864 ;; on an "install" target, or if the dependence module is not | |
1865 ;; bootstrapped; otherwise, it returns "bootstrap" or | |
1866 ;; "postbootstrap" depending on whether the dependent module is | |
1867 ;; bootstrapped. All this is only necessary for host and target | |
1868 ;; modules. It might seem like, in order to avoid build races, we | |
1869 ;; might need more elaborate detection between prebootstrap and | |
1870 ;; postbootstrap modules, but there are no host prebootstrap | |
1871 ;; modules. If there were any non-bootstrap host modules that | |
1872 ;; bootstrap modules depended on, we'd get unsatisfied per-stage | |
1873 ;; dependencies on them, which would be immediately noticed. | |
0 | 1874 (define dep-kind (lambda () |
131 | 1875 (cond |
1876 ((and (hash-ref boot-modules (dep-module "module")) | |
1877 (=* (dep-module "on") "build-")) | |
1878 "prebootstrap") | |
1879 | |
1880 ((or (= (dep-subtarget "on") "install-") | |
1881 (not (hash-ref boot-modules (dep-module "on")))) | |
1882 "normal") | |
0 | 1883 |
131 | 1884 ((hash-ref boot-modules (dep-module "module")) |
1885 "bootstrap") | |
1886 | |
1887 (1 "postbootstrap")))) | |
1888 | |
1889 (define make-postboot-dep (lambda () | |
1890 (let ((target (dep-module "module")) (dep "stage_last")) | |
1891 (unless (= (hash-ref postboot-targets target) dep) | |
1892 (hash-create-handle! postboot-targets target dep) | |
1893 ;; All non-bootstrap modules' configure target already | |
1894 ;; depend on dep. | |
1895 (unless (=* target "target-") | |
1896 (string-append "configure-" target ": " dep "\n")))))) | |
0 | 1897 |
1898 ;; We now build the hash table that is used by dep-kind. | |
1899 (define boot-modules (make-hash-table 113)) | |
131 | 1900 (define postboot-targets (make-hash-table 113)) |
0 | 1901 +] |
1902 | |
1903 [+ FOR host_modules +][+ | |
1904 (if (exist? "bootstrap") | |
1905 (hash-create-handle! boot-modules (get "module") #t)) | |
1906 "" +][+ ENDFOR host_modules +] | |
1907 [+ FOR target_modules +][+ | |
1908 (if (exist? "bootstrap") | |
1909 (hash-create-handle! boot-modules (string-append "target-" (get "module")) #t)) | |
1910 "" +][+ ENDFOR target_modules +] | |
1911 | |
1912 # With all the machinery above in place, it is pretty easy to generate | |
1913 # dependencies. Host dependencies are a bit more complex because we have | |
1914 # to check for bootstrap/prebootstrap dependencies. To resolve | |
1915 # prebootstrap dependencies, prebootstrap modules are gathered in | |
1916 # a hash table. | |
131 | 1917 [+ FOR dependencies +][+ CASE (dep-kind) +] |
1918 [+ == "prebootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +] | |
1919 [+ (make-dep (dep-stage) "") +][+ ENDFOR bootstrap_stage +] | |
1920 [+ == "bootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +] | |
1921 [+ (make-dep (dep-stage) (dep-stage)) +][+ ENDFOR bootstrap_stage +] | |
1922 [+ == "normal" +][+ (make-dep "" "") +] | |
1923 [+ ESAC +][+ ENDFOR dependencies +] | |
1924 | |
1925 @if gcc-bootstrap | |
1926 [+ FOR dependencies +][+ CASE (dep-kind) +] | |
1927 [+ == "postbootstrap" +][+ (make-postboot-dep) +][+ ESAC +][+ | |
1928 ENDFOR dependencies +]@endif gcc-bootstrap | |
1929 | |
1930 @unless gcc-bootstrap | |
1931 [+ FOR dependencies +][+ CASE (dep-kind) +] | |
1932 [+ == "postbootstrap" +][+ (make-dep "" "") +] | |
1933 [+ ESAC +][+ ENDFOR dependencies +]@endunless gcc-bootstrap | |
0 | 1934 |
1935 # Dependencies for target modules on other target modules are | |
1936 # described by lang_env_dependencies; the defaults apply to anything | |
1937 # not mentioned there. | |
1938 [+ | |
1939 ;; Predicate for whether LANG was specified in lang_env_dependencies. | |
1940 (define lang-dep (lambda (lang) | |
1941 (hash-ref lang-env-deps (string-append (get "module") "-" lang)))) | |
1942 | |
1943 ;; Build the hash table we will need. | |
1944 (define lang-env-deps (make-hash-table 7)) | |
1945 +][+ FOR lang_env_dependencies +][+ | |
1946 (if (exist? "cxx") | |
1947 (hash-create-handle! lang-env-deps | |
1948 (string-append (get "module") "-" "cxx") #t)) | |
1949 | |
1950 (if (exist? "no_c") | |
1951 (hash-create-handle! lang-env-deps | |
1952 (string-append (get "module") "-" "no_c") #t)) | |
1953 | |
1954 (if (exist? "no_gcc") | |
1955 (hash-create-handle! lang-env-deps | |
1956 (string-append (get "module") "-" "no_gcc") #t)) | |
1957 "" +][+ ENDFOR lang_env_dependencies +] | |
1958 | |
1959 @if gcc-bootstrap[+ FOR target_modules +][+ IF (not (lang-dep "no_gcc")) | |
1960 +][+ IF bootstrap +][+ FOR bootstrap_stage +] | |
1961 configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-target-libgcc[+ | |
1962 ENDFOR +][+ ENDIF bootstrap +][+ ENDIF +][+ ENDFOR target_modules +] | |
1963 @endif gcc-bootstrap | |
1964 | |
1965 @if gcc-no-bootstrap[+ FOR target_modules +][+ IF (not (lang-dep "no_gcc")) +] | |
1966 configure-target-[+module+]: maybe-all-target-libgcc[+ | |
1967 ENDIF +][+ ENDFOR target_modules +] | |
1968 @endif gcc-no-bootstrap | |
1969 | |
1970 [+ FOR target_modules +][+ IF (not (lang-dep "no_c")) +] | |
1971 configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss[+ | |
1972 ENDIF +][+ IF (lang-dep "cxx") +] | |
1973 configure-target-[+module+]: maybe-all-target-libstdc++-v3[+ | |
1974 ENDIF +] | |
1975 [+ ENDFOR target_modules +] | |
1976 | |
1977 CONFIGURE_GDB_TK = @CONFIGURE_GDB_TK@ | |
1978 GDB_TK = @GDB_TK@ | |
1979 INSTALL_GDB_TK = @INSTALL_GDB_TK@ | |
1980 configure-gdb: $(CONFIGURE_GDB_TK) | |
1981 all-gdb: $(gdbnlmrequirements) $(GDB_TK) | |
1982 install-gdb: $(INSTALL_GDB_TK) | |
1983 | |
1984 # Serialization dependencies. Host configures don't work well in parallel to | |
1985 # each other, due to contention over config.cache. Target configures and | |
1986 # build configures are similar. | |
1987 @serialization_dependencies@ | |
1988 | |
1989 # -------------------------------- | |
1990 # Regenerating top level configury | |
1991 # -------------------------------- | |
1992 | |
1993 # Rebuilding Makefile.in, using autogen. | |
1994 AUTOGEN = autogen | |
1995 $(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def | |
1996 cd $(srcdir) && $(AUTOGEN) Makefile.def | |
1997 | |
1998 # Rebuilding Makefile. | |
1999 Makefile: $(srcdir)/Makefile.in config.status | |
2000 CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
2001 | |
2002 config.status: configure | |
2003 CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck | |
2004 | |
2005 # Rebuilding configure. | |
2006 AUTOCONF = autoconf | |
2007 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \ | |
111 | 2008 $(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4 \ |
2009 $(srcdir)/config/elf.m4 $(srcdir)/config/isl.m4 \ | |
2010 $(srcdir)/libtool.m4 $(srcdir)/ltoptions.m4 $(srcdir)/ltsugar.m4 \ | |
2011 $(srcdir)/ltversion.m4 $(srcdir)/lt~obsolete.m4 | |
0 | 2012 cd $(srcdir) && $(AUTOCONF) |
2013 | |
2014 # ------------------------------ | |
2015 # Special directives to GNU Make | |
2016 # ------------------------------ | |
2017 | |
2018 # Don't pass command-line variables to submakes. | |
2019 .NOEXPORT: | |
2020 MAKEOVERRIDES= | |
2021 | |
2022 # end of Makefile.in |