]> git.ipfire.org Git - thirdparty/gcc.git/blame - Makefile.tpl
Fix mips-elf --enable-libmudflap make -j2 failure.
[thirdparty/gcc.git] / Makefile.tpl
CommitLineData
f507a3cb 1[+ AutoGen5 template -*- Mode: Makefile -*-
2a1ac811 2in
3+]
4
5# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
6#
7# Makefile for directory with subdirs to build.
8# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
27e3aebd 9# 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
2a1ac811 10#
11# This file is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
06b8a6e6 23# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2a1ac811 24#
25
f7ca337f 26# -------------------------------
27# Standard Autoconf-set variables
28# -------------------------------
805e22b2 29VPATH=@srcdir@
805e22b2 30
31build_alias=@build_alias@
ab8cf29b 32build=@build@
805e22b2 33host_alias=@host_alias@
ab8cf29b 34host=@host@
805e22b2 35target_alias=@target_alias@
ab8cf29b 36target=@target@
805e22b2 37
f7ca337f 38program_transform_name = @program_transform_name@
0311ff84 39
40prefix = @prefix@
41exec_prefix = @exec_prefix@
42
f7ca337f 43srcdir = @srcdir@
44
0311ff84 45bindir = @bindir@
46sbindir = @sbindir@
47libexecdir = @libexecdir@
48datadir = @datadir@
49sysconfdir = @sysconfdir@
50sharedstatedir = @sharedstatedir@
51localstatedir = @localstatedir@
52libdir = @libdir@
53includedir = @includedir@
54oldincludedir = @oldincludedir@
55infodir = @infodir@
56mandir = @mandir@
2a1ac811 57man1dir = $(mandir)/man1
58man2dir = $(mandir)/man2
59man3dir = $(mandir)/man3
60man4dir = $(mandir)/man4
61man5dir = $(mandir)/man5
62man6dir = $(mandir)/man6
63man7dir = $(mandir)/man7
64man8dir = $(mandir)/man8
65man9dir = $(mandir)/man9
2a1ac811 66
450e6c84 67INSTALL = @INSTALL@
68INSTALL_PROGRAM = @INSTALL_PROGRAM@
69INSTALL_SCRIPT = @INSTALL_SCRIPT@
70INSTALL_DATA = @INSTALL_DATA@
599a3eac 71LN = @LN@
72LN_S = @LN_S@
2a1ac811 73
f7ca337f 74# -------------------------------------------------
75# Miscellaneous non-standard autoconf-set variables
76# -------------------------------------------------
2a1ac811 77
f7ca337f 78# The gcc driver likes to know the arguments it was configured with.
79TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@
2a1ac811 80
f7ca337f 81tooldir = @tooldir@
82build_tooldir = @build_tooldir@
2a1ac811 83
f7ca337f 84GDB_NLM_DEPS =
2a1ac811 85
f7ca337f 86# This is the name of the environment variable used for the path to
87# the libraries.
88RPATH_ENVVAR = @RPATH_ENVVAR@
2a1ac811 89
f7ca337f 90# This is the list of directories to be built for the build system.
39a1c4e9 91BUILD_CONFIGDIRS = libiberty
f7ca337f 92# Build programs are put under this directory.
93BUILD_SUBDIR = @build_subdir@
94# This is set by the configure script to the arguments to use when configuring
95# directories built for the build system.
c15fb64c 96BUILD_CONFIGARGS = @build_configargs@ --with-build-subdir="$(BUILD_SUBDIR)"
2f8725b0 97
98# This is the list of variables to export in the environment when
99# configuring any subdirectory. It must also be exported whenever
100# recursing into a build directory in case that directory's Makefile
101# re-runs configure.
102BASE_EXPORTS = \
103 FLEX="$(FLEX)"; export FLEX; \
104 LEX="$(LEX)"; export LEX; \
105 BISON="$(BISON)"; export BISON; \
106 YACC="$(YACC)"; export YACC; \
107 M4="$(M4)"; export M4; \
108 MAKEINFO="$(MAKEINFO)"; export MAKEINFO;
109
27e3aebd 110# This is the list of variables to export in the environment when
2f8725b0 111# configuring subdirectories for the build system.
27e3aebd 112BUILD_EXPORTS = \
2f8725b0 113 $(BASE_EXPORTS) \
27e3aebd 114 AR="$(AR_FOR_BUILD)"; export AR; \
115 AS="$(AS_FOR_BUILD)"; export AS; \
116 CC="$(CC_FOR_BUILD)"; export CC; \
117 CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
118 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
119 CXX="$(CXX_FOR_BUILD)"; export CXX; \
120 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
121 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
122 GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
123 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
124 LD="$(LD_FOR_BUILD)"; export LD; \
125 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
126 NM="$(NM_FOR_BUILD)"; export NM; \
127 RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
128 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES;
f7ca337f 129
130# This is the list of directories to built for the host system.
131SUBDIRS = @configdirs@
132# This is set by the configure script to the arguments to use when configuring
133# directories built for the host system.
134HOST_CONFIGARGS = @host_configargs@
c1eb9e31 135# Host programs are put under this directory, which is . except if building
136# with srcdir=..
137HOST_SUBDIR = @host_subdir@
27e3aebd 138# This is the list of variables to export in the environment when
2f8725b0 139# configuring subdirectories for the host system.
27e3aebd 140HOST_EXPORTS = \
2f8725b0 141 $(BASE_EXPORTS) \
27e3aebd 142 CC="$(CC)"; export CC; \
143 CFLAGS="$(CFLAGS)"; export CFLAGS; \
144 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
145 CXX="$(CXX)"; export CXX; \
146 CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
147 AR="$(AR)"; export AR; \
148 AS="$(AS)"; export AS; \
149 CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
150 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
151 LD="$(LD)"; export LD; \
152 LDFLAGS="$(LDFLAGS)"; export LDFLAGS; \
153 NM="$(NM)"; export NM; \
154 RANLIB="$(RANLIB)"; export RANLIB; \
155 WINDRES="$(WINDRES)"; export WINDRES; \
156 OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
1e6242a4 157 OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
27e3aebd 158 TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
159 GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
d389b7e3 160 GMPINC="$(HOST_GMPINC)"; export GMPINC; \
85115a11 161 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
27e3aebd 162
163# Similar, for later GCC stages.
12fb418d 164POSTSTAGE1_HOST_EXPORTS = \
85115a11 165 $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
1b53fe78 166 $(HOST_EXPORTS) \
c1eb9e31 167 CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
168 -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
169 CC_FOR_BUILD="$(STAGE_CC_WRAPPER) \
170 $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
171 -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
172 -B$(build_tooldir)/bin/"; export CC_FOR_BUILD;
f7ca337f 173
174# This is set by the configure script to the list of directories which
175# should be built using the target tools.
176TARGET_CONFIGDIRS = @target_configdirs@
177# Target libraries are put under this directory:
178TARGET_SUBDIR = @target_subdir@
179# This is set by the configure script to the arguments to use when configuring
180# directories built for the target.
c15fb64c 181TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
27e3aebd 182# This is the list of variables to export in the environment when
2f8725b0 183# configuring subdirectories for the host system.
27e3aebd 184BASE_TARGET_EXPORTS = \
2f8725b0 185 $(BASE_EXPORTS) \
27e3aebd 186 AR="$(AR_FOR_TARGET)"; export AR; \
187 AS="$(AS_FOR_TARGET)"; export AS; \
188 CC="$(CC_FOR_TARGET)"; export CC; \
189 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
190 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
cac4ee55 191 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
27e3aebd 192 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
193 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
194 GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
195 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
196 LD="$(LD_FOR_TARGET)"; export LD; \
197 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
9fec3fa8 198 LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \
27e3aebd 199 NM="$(NM_FOR_TARGET)"; export NM; \
200 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
9fec3fa8 201 STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
d389b7e3 202 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
85115a11 203 $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
27e3aebd 204
205RAW_CXX_TARGET_EXPORTS = \
206 $(BASE_TARGET_EXPORTS) \
207 CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
208 CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
209
210NORMAL_TARGET_EXPORTS = \
211 $(BASE_TARGET_EXPORTS) \
212 CXX="$(CXX_FOR_TARGET)"; export CXX;
f7ca337f 213
4ee9c684 214# Where to find GMP
215HOST_GMPLIBS = @gmplibs@
216HOST_GMPINC = @gmpinc@
217
f7ca337f 218# ----------------------------------------------
219# Programs producing files for the BUILD machine
220# ----------------------------------------------
221
222SHELL = @config_shell@
223
224# pwd command to use. Allow user to override default by setting PWDCMD in
225# the environment to account for automounters. The make variable must not
226# be called PWDCMD, otherwise the value set here is passed to make
227# subprocesses and overrides the setting from the user's environment.
7a8ca04a 228# Don't use PWD since it is a common shell environment variable and we
229# don't want to corrupt it.
230PWD_COMMAND = $${PWDCMD-pwd}
f7ca337f 231
232# compilers to use to create programs which must be run in the build
233# environment.
234CC_FOR_BUILD = @CC_FOR_BUILD@
d8e9ea04 235CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
f7ca337f 236
237CXX_FOR_BUILD = $(CXX)
238
239# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
240# here so that they can be overridden by Makefile fragments.
f7ca337f 241BUILD_PREFIX = @BUILD_PREFIX@
242BUILD_PREFIX_1 = @BUILD_PREFIX_1@
2a1ac811 243
2b64d19b 244# Flags to pass to stage2 and later makes. They are defined
245# here so that they can be overridden by Makefile fragments.
246BOOT_CFLAGS= -g -O2
247
2f8725b0 248CONFIGURED_BISON = @CONFIGURED_BISON@
a1ad7483 249BISON = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
250 echo $$r/$(BUILD_SUBDIR)/bison/tests/bison ; \
2a1ac811 251 else \
2f8725b0 252 echo ${CONFIGURED_BISON} ; \
2a1ac811 253 fi`
254
2f8725b0 255CONFIGURED_YACC = @CONFIGURED_YACC@
a1ad7483 256YACC = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
257 echo $$r/$(BUILD_SUBDIR)/bison/tests/bison -y ; \
258 elif [ -f $$r/$(BUILD_SUBDIR)/byacc/byacc ] ; then \
259 echo $$r/$(BUILD_SUBDIR)/byacc/byacc ; \
2a1ac811 260 else \
2f8725b0 261 echo ${CONFIGURED_YACC} ; \
2a1ac811 262 fi`
263
2f8725b0 264CONFIGURED_FLEX = @CONFIGURED_FLEX@
a1ad7483 265FLEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
266 then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
2f8725b0 267 else echo ${CONFIGURED_FLEX} ; fi`
268
269CONFIGURED_LEX = @CONFIGURED_LEX@
a1ad7483 270LEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
271 then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
2f8725b0 272 else echo ${CONFIGURED_LEX} ; fi`
2a1ac811 273
2f8725b0 274CONFIGURED_M4 = @CONFIGURED_M4@
a1ad7483 275M4 = `if [ -f $$r/$(BUILD_SUBDIR)/m4/m4 ] ; \
276 then echo $$r/$(BUILD_SUBDIR)/m4/m4 ; \
2f8725b0 277 else echo ${CONFIGURED_M4} ; fi`
2a1ac811 278
d8b01fbe 279# For an installed makeinfo, we require it to be from texinfo 4.2 or
2f8725b0 280# higher, else we use the "missing" dummy. We also pass the subdirectory
281# makeinfo even if only the Makefile is there, because Texinfo builds its
282# manual when made, and it requires its own version.
283CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@
a1ad7483 284MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \
285 then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \
2f8725b0 286 else if (${CONFIGURED_MAKEINFO} --version \
d8b01fbe 287 | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
2f8725b0 288 then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
2a1ac811 289
290# This just becomes part of the MAKEINFO definition passed down to
291# sub-makes. It lets flags be given on the command line while still
292# using the makeinfo from the object tree.
516b2e07 293# (Default to avoid splitting info files by setting the threshold high.)
294MAKEINFOFLAGS = --split-size=5000000
2a1ac811 295
c1eb9e31 296# FIXME: expect may become a build tool?
297EXPECT = `if [ -f $$r/$(HOST_SUBDIR)/expect/expect ] ; \
298 then echo $$r/$(HOST_SUBDIR)/expect/expect ; \
2a1ac811 299 else echo expect ; fi`
300
301RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
302 then echo $$s/dejagnu/runtest ; \
303 else echo runtest ; fi`
304
f7ca337f 305# ---------------------------------------------
306# Programs producing files for the HOST machine
307# ---------------------------------------------
2a1ac811 308
f7ca337f 309AS = @AS@
2a1ac811 310
f7ca337f 311AR = @AR@
312AR_FLAGS = rc
2a1ac811 313
f7ca337f 314CC = @CC@
315CFLAGS = @CFLAGS@
316LIBCFLAGS = $(CFLAGS)
2a1ac811 317
f7ca337f 318CXX = @CXX@
319CXXFLAGS = @CXXFLAGS@
320LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
2a1ac811 321
f7ca337f 322DLLTOOL = @DLLTOOL@
2a1ac811 323
f7ca337f 324NM = @NM@
805e22b2 325
f7ca337f 326LD = @LD@
327LDFLAGS =
805e22b2 328
f7ca337f 329RANLIB = @RANLIB@
2a1ac811 330
f7ca337f 331WINDRES = @WINDRES@
2a1ac811 332
f7ca337f 333PICFLAG =
334
335# -----------------------------------------------
336# Programs producing files for the TARGET machine
337# -----------------------------------------------
2a1ac811 338
0e1ac85c 339FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
2a1ac811 340
f7ca337f 341AR_FOR_TARGET=@AR_FOR_TARGET@
49aae208 342CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@
f7ca337f 343USUAL_AR_FOR_TARGET = ` \
c1eb9e31 344 if [ -f $$r/$(HOST_SUBDIR)/binutils/ar ] ; then \
345 echo $$r/$(HOST_SUBDIR)/binutils/ar ; \
f7ca337f 346 else \
ab8cf29b 347 if [ '$(host)' = '$(target)' ] ; then \
f7ca337f 348 echo $(AR); \
349 else \
49aae208 350 echo $(CONFIGURED_AR_FOR_TARGET) ; \
f7ca337f 351 fi; \
352 fi`
2a1ac811 353
805e22b2 354AS_FOR_TARGET=@AS_FOR_TARGET@
49aae208 355CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
805e22b2 356USUAL_AS_FOR_TARGET = ` \
c1eb9e31 357 if [ -f $$r/$(HOST_SUBDIR)/gas/as-new ] ; then \
358 echo $$r/$(HOST_SUBDIR)/gas/as-new ; \
ef8184c7 359 elif [ -f $$r/$(HOST_SUBDIR)/gcc/as ]; then \
360 echo $$r/$(HOST_SUBDIR)/gcc/as ; \
2a1ac811 361 else \
ab8cf29b 362 if [ '$(host)' = '$(target)' ] ; then \
2a1ac811 363 echo $(AS); \
364 else \
49aae208 365 echo $(CONFIGURED_AS_FOR_TARGET) ; \
2a1ac811 366 fi; \
367 fi`
368
ef8184c7 369CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
370CONFIGURED_CC_FOR_TARGET=@CONFIGURED_CC_FOR_TARGET@
371USUAL_CC_FOR_TARGET = ` \
372 if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \
28a54140 373 echo $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ ; \
ef8184c7 374 else \
375 if [ '$(host)' = '$(target)' ] ; then \
376 echo $(CC); \
377 else \
378 echo $(CONFIGURED_CC_FOR_TARGET) ; \
379 fi; \
380 fi`
381
f7ca337f 382# During gcc bootstrap, if we use some random cc for stage1 then
383# CFLAGS will be just -g. We want to ensure that TARGET libraries
384# (which we know are built with gcc) are built with optimizations so
385# prepend -O2 when setting CFLAGS_FOR_TARGET.
ffa8502d 386CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
ef8184c7 387SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
388
f7ca337f 389# If GCC_FOR_TARGET is not overriden on the command line, then this
390# variable is passed down to the gcc Makefile, where it is used to
391# build libgcc2.a. We define it here so that it can itself be
392# overridden on the command line.
393GCC_FOR_TARGET=@GCC_FOR_TARGET@
ef8184c7 394CONFIGURED_GCC_FOR_TARGET=@CONFIGURED_GCC_FOR_TARGET@
c1eb9e31 395USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) \
396 $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ $(FLAGS_FOR_TARGET)
f7ca337f 397LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
398
ef8184c7 399CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
400CONFIGURED_CXX_FOR_TARGET=@CONFIGURED_CXX_FOR_TARGET@
401USUAL_CXX_FOR_TARGET = ` \
402 if [ -f $$r/$(HOST_SUBDIR)/gcc/g++ ] ; then \
403 (echo $$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++; \
404 test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; \
405 echo -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs) | tr '\015\012' ' '; \
406 else \
407 if [ '$(host)' = '$(target)' ] ; then \
408 echo $(CXX); \
409 else \
410 echo $(CONFIGURED_CXX_FOR_TARGET) ; \
411 fi; \
412 fi`
413
414RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
415USUAL_RAW_CXX_FOR_TARGET = ` \
416 if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \
417 echo $$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs; \
418 else \
419 if [ '$(host)' = '$(target)' ] ; then \
420 echo $(CXX); \
421 else \
422 echo $(CONFIGURED_CXX_FOR_TARGET) ; \
423 fi; \
424 fi`
425
ffa8502d 426CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
f7ca337f 427LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
2a1ac811 428
ef8184c7 429GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
430CONFIGURED_GCJ_FOR_TARGET=@CONFIGURED_GCJ_FOR_TARGET@
431USUAL_GCJ_FOR_TARGET = ` \
432 if [ -f $$r/$(HOST_SUBDIR)/gcc/gcj ] ; then \
433 echo $$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc ; \
434 else \
435 if [ '$(host)' = '$(target)' ] ; then \
436 echo $(GCJ); \
437 else \
438 echo $(CONFIGURED_GCJ_FOR_TARGET) ; \
439 fi; \
440 fi`
441
442GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
443CONFIGURED_GFORTRAN_FOR_TARGET=@CONFIGURED_GFORTRAN_FOR_TARGET@
444USUAL_GFORTRAN_FOR_TARGET = ` \
445 if [ -f $$r/$(HOST_SUBDIR)/gcc/gfortran ] ; then \
446 echo $$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc ; \
447 else \
448 if [ '$(host)' = '$(target)' ] ; then \
449 echo $(GFORTRAN); \
450 else \
451 echo $(CONFIGURED_GFORTRAN_FOR_TARGET) ; \
452 fi; \
453 fi`
454
455
805e22b2 456DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
49aae208 457CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
805e22b2 458USUAL_DLLTOOL_FOR_TARGET = ` \
c1eb9e31 459 if [ -f $$r/$(HOST_SUBDIR)/binutils/dlltool ] ; then \
460 echo $$r/$(HOST_SUBDIR)/binutils/dlltool ; \
2a1ac811 461 else \
ab8cf29b 462 if [ '$(host)' = '$(target)' ] ; then \
2a1ac811 463 echo $(DLLTOOL); \
464 else \
49aae208 465 echo $(CONFIGURED_DLLTOOL_FOR_TARGET) ; \
2a1ac811 466 fi; \
467 fi`
468
f7ca337f 469LD_FOR_TARGET=@LD_FOR_TARGET@
49aae208 470CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
f7ca337f 471USUAL_LD_FOR_TARGET = ` \
c1eb9e31 472 if [ -f $$r/$(HOST_SUBDIR)/ld/ld-new ] ; then \
473 echo $$r/$(HOST_SUBDIR)/ld/ld-new ; \
ef8184c7 474 elif [ -f $$r/$(HOST_SUBDIR)/gcc/collect-ld ]; then \
475 echo $$r/$(HOST_SUBDIR)/gcc/collect-ld ; \
2a1ac811 476 else \
ab8cf29b 477 if [ '$(host)' = '$(target)' ] ; then \
f7ca337f 478 echo $(LD); \
2a1ac811 479 else \
49aae208 480 echo $(CONFIGURED_LD_FOR_TARGET) ; \
2a1ac811 481 fi; \
482 fi`
483
f7ca337f 484LDFLAGS_FOR_TARGET =
485
9fec3fa8 486LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
487CONFIGURED_LIPO_FOR_TARGET=@CONFIGURED_LIPO_FOR_TARGET@
488USUAL_LIPO_FOR_TARGET = ` \
489 if [ '$(host)' = '$(target)' ] ; then \
490 if [ x'$(LIPO)' != x ]; then \
491 echo $(LIPO); \
492 else \
493 echo lipo; \
494 fi; \
495 else \
496 echo $(CONFIGURED_LIPO_FOR_TARGET) ; \
497 fi`
498
f7ca337f 499NM_FOR_TARGET=@NM_FOR_TARGET@
49aae208 500CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
f7ca337f 501USUAL_NM_FOR_TARGET = ` \
c1eb9e31 502 if [ -f $$r/$(HOST_SUBDIR)/binutils/nm-new ] ; then \
503 echo $$r/$(HOST_SUBDIR)/binutils/nm-new ; \
ef8184c7 504 elif [ -f $$r/$(HOST_SUBDIR)/gcc/nm ]; then \
505 echo $$r/$(HOST_SUBDIR)/gcc/nm ; \
2a1ac811 506 else \
ab8cf29b 507 if [ '$(host)' = '$(target)' ] ; then \
f7ca337f 508 echo $(NM); \
2a1ac811 509 else \
49aae208 510 echo $(CONFIGURED_NM_FOR_TARGET) ; \
2a1ac811 511 fi; \
512 fi`
513
805e22b2 514RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
49aae208 515CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@
805e22b2 516USUAL_RANLIB_FOR_TARGET = ` \
c1eb9e31 517 if [ -f $$r/$(HOST_SUBDIR)/binutils/ranlib ] ; then \
518 echo $$r/$(HOST_SUBDIR)/binutils/ranlib ; \
2a1ac811 519 else \
ab8cf29b 520 if [ '$(host)' = '$(target)' ] ; then \
2a1ac811 521 if [ x'$(RANLIB)' != x ]; then \
522 echo $(RANLIB); \
523 else \
524 echo ranlib; \
525 fi; \
526 else \
49aae208 527 echo $(CONFIGURED_RANLIB_FOR_TARGET) ; \
2a1ac811 528 fi; \
529 fi`
530
9fec3fa8 531STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
532CONFIGURED_STRIP_FOR_TARGET=@CONFIGURED_STRIP_FOR_TARGET@
533USUAL_STRIP_FOR_TARGET = ` \
534 if [ -f $$r/$(HOST_SUBDIR)/binutils/strip ] ; then \
535 echo $$r/$(HOST_SUBDIR)/binutils/strip ; \
536 else \
537 if [ '$(host)' = '$(target)' ] ; then \
538 if [ x'$(STRIP)' != x ]; then \
539 echo $(STRIP); \
540 else \
541 echo strip; \
542 fi; \
543 else \
544 echo $(CONFIGURED_STRIP_FOR_TARGET) ; \
545 fi; \
546 fi`
547
f7ca337f 548WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
49aae208 549CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@
f7ca337f 550USUAL_WINDRES_FOR_TARGET = ` \
c1eb9e31 551 if [ -f $$r/$(HOST_SUBDIR)/binutils/windres ] ; then \
552 echo $$r/$(HOST_SUBDIR)/binutils/windres ; \
2a1ac811 553 else \
ab8cf29b 554 if [ '$(host)' = '$(target)' ] ; then \
f7ca337f 555 echo $(WINDRES); \
2a1ac811 556 else \
49aae208 557 echo $(CONFIGURED_WINDRES_FOR_TARGET) ; \
2a1ac811 558 fi; \
559 fi`
560
f7ca337f 561PICFLAG_FOR_TARGET =
562
563# ------------------------------------
564# Miscellaneous targets and flag lists
565# ------------------------------------
566
2a1ac811 567# The first rule in the file had better be this one. Don't put any above it.
568# This lives here to allow makefile fragments to contain dependencies.
54f0538b 569@default_target@:
2a1ac811 570
2a1ac811 571#### host and target specific makefile fragments come in here.
71ab34df 572@target_makefile_frag@
573@alphaieee_frag@
574@ospace_frag@
575@host_makefile_frag@
2a1ac811 576###
577
85115a11 578# This is the list of directories that may be needed in RPATH_ENVVAR
579# so that prorgams built for the target machine work.
580TARGET_LIB_PATH = [+ FOR target_modules +][+
581 IF lib_path +]$(TARGET_LIB_PATH_[+module+])[+ ENDIF lib_path +][+
582 ENDFOR target_modules +]$(HOST_LIB_PATH_gcc)
583[+ FOR target_modules +][+ IF lib_path +]
584@if target-[+module+]
585TARGET_LIB_PATH_[+module+] = $$r/$(TARGET_SUBDIR)/[+module+]/[+lib_path+]:
586@endif target-[+module+]
587[+ ENDIF lib_path +][+ ENDFOR target_modules +]
588
589
590# This is the list of directories that may be needed in RPATH_ENVVAR
591# so that programs built for the host machine work.
592HOST_LIB_PATH = [+ FOR host_modules +][+
593 IF lib_path +]$(HOST_LIB_PATH_[+module+])[+ ENDIF lib_path +][+
594 ENDFOR host_modules +]
595
596# Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
597@if gcc
598HOST_LIB_PATH_gcc = $$r/$(HOST_SUBDIR)/gcc:$$r/$(HOST_SUBDIR)/prev-gcc:
599@endif gcc
600
601[+ FOR host_modules +][+ IF lib_path +]
602@if [+module+]
603HOST_LIB_PATH_[+module+] = \
604 $$r/$(HOST_SUBDIR)/[+module+]/[+lib_path+]:[+ IF bootstrap
605 +]$$r/$(HOST_SUBDIR)/prev-[+module+]/[+lib_path+]:[+ ENDIF bootstrap +]
606@endif [+module+]
607[+ ENDIF lib_path +][+ ENDFOR host_modules +]
608
2a1ac811 609# Flags to pass down to all sub-makes.
36bbd884 610BASE_FLAGS_TO_PASS = [+ FOR flags_to_pass +]\
611 "[+flag+]=$([+flag+])" [+ ENDFOR flags_to_pass +]\
3a6fbbb0 612 "CONFIG_SHELL=$(SHELL)" \
36bbd884 613 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
2a1ac811 614
ef8184c7 615# We leave this in just in case, but it is not needed anymore.
616RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)
599a3eac 617
2a1ac811 618# Flags to pass down to most sub-makes, in which we're building with
619# the host environment.
2a1ac811 620EXTRA_HOST_FLAGS = \
621 'AR=$(AR)' \
622 'AS=$(AS)' \
623 'CC=$(CC)' \
624 'CXX=$(CXX)' \
625 'DLLTOOL=$(DLLTOOL)' \
626 'LD=$(LD)' \
627 'NM=$(NM)' \
224ed654 628 'RANLIB=$(RANLIB)' \
2a1ac811 629 'WINDRES=$(WINDRES)'
630
631FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
632
633# Flags that are concerned with the location of the X11 include files
634# and library files
635#
636# NOTE: until the top-level is getting the values via autoconf, it only
637# causes problems to have this top-level Makefile overriding the autoconf-set
638# values in child directories. Only variables that don't conflict with
639# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
640#
641X11_FLAGS_TO_PASS = \
642 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
643 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
644
645# Flags to pass down to makes which are built with the target environment.
646# The double $ decreases the length of the command line; the variables
647# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
2a1ac811 648EXTRA_TARGET_FLAGS = \
649 'AR=$$(AR_FOR_TARGET)' \
650 'AS=$$(AS_FOR_TARGET)' \
651 'CC=$$(CC_FOR_TARGET)' \
652 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
653 'CXX=$$(CXX_FOR_TARGET)' \
654 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
655 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
656 'LD=$$(LD_FOR_TARGET)' \
29327bb4 657 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
2a1ac811 658 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
659 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
660 'NM=$$(NM_FOR_TARGET)' \
661 'RANLIB=$$(RANLIB_FOR_TARGET)' \
662 'WINDRES=$$(WINDRES_FOR_TARGET)'
663
664TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
665
666# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
667# unfortunately needs the native compiler and the target ar and
668# ranlib.
669# If any variables are added here, they must be added to do-*, below.
ff2e99a4 670# The BUILD_* variables are a special case, which are used for the gcc
2a1ac811 671# cross-building scheme.
672EXTRA_GCC_FLAGS = \
2a1ac811 673 'BUILD_PREFIX=$(BUILD_PREFIX)' \
674 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
2a1ac811 675 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
75fc7adc 676 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
677 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
678 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
679 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
680 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
681 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
682 "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
683 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
684 "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
2a1ac811 685
70356f61 686GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
2a1ac811 687
6f4f34a7 688.PHONY: configure-host
6caa530d 689configure-host: [+
6f4f34a7 690 FOR host_modules +] \
691 maybe-configure-[+module+][+
692 ENDFOR host_modules +]
693.PHONY: configure-target
694configure-target: [+
695 FOR target_modules +] \
696 maybe-configure-target-[+module+][+
697 ENDFOR target_modules +]
2a1ac811 698
54f0538b 699# The target built for a native non-bootstrap build.
700.PHONY: all
a1ad7483 701all: unstage all-host all-target stage
6f4f34a7 702
2f8725b0 703.PHONY: all-build
704all-build: [+
705 FOR build_modules +] \
706 maybe-all-build-[+module+][+
707 ENDFOR build_modules +]
6f4f34a7 708.PHONY: all-host
6caa530d 709all-host: [+
6f4f34a7 710 FOR host_modules +] \
711 maybe-all-[+module+][+
712 ENDFOR host_modules +]
713.PHONY: all-target
714all-target: [+
715 FOR target_modules +] \
716 maybe-all-target-[+module+][+
717 ENDFOR target_modules +]
2a1ac811 718
719# Do a target for all the subdirectories. A ``make do-X'' will do a
720# ``make X'' in all subdirectories (because, in general, there is a
721# dependency (below) of X upon do-X, a ``make X'' will also do this,
722# but it may do additional work as well).
805e22b2 723[+ FOR recursive_targets +]
ffe98fac 724.PHONY: do-[+make_target+]
6caa530d 725do-[+make_target+]: unstage [+make_target+]-host [+make_target+]-target stage
ff2e99a4 726
727.PHONY: [+make_target+]-host
6caa530d 728[+make_target+]-host: [+
ff2e99a4 729 FOR host_modules +] \
730 maybe-[+make_target+]-[+module+][+
731 ENDFOR host_modules +]
732
733.PHONY: [+make_target+]-target
734[+make_target+]-target: [+
735 FOR target_modules +] \
736 maybe-[+make_target+]-target-[+module+][+
737 ENDFOR target_modules +]
805e22b2 738[+ ENDFOR recursive_targets +]
739
2a1ac811 740# Here are the targets which correspond to the do-X targets.
741
956942fa 742.PHONY: info installcheck dvi html install-info
2a1ac811 743.PHONY: clean distclean mostlyclean maintainer-clean realclean
744.PHONY: local-clean local-distclean local-maintainer-clean
745info: do-info
746installcheck: do-installcheck
747dvi: do-dvi
956942fa 748html: do-html
2a1ac811 749
20672016 750# Make sure makeinfo is built before we do a `make info', if we're
751# in fact building texinfo.
752do-info: maybe-all-texinfo
2a1ac811 753
754install-info: do-install-info dir.info
7a8ca04a 755 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2a1ac811 756 if [ -f dir.info ] ; then \
05794691 757 $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
2a1ac811 758 else true ; fi
759
760local-clean:
761 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
762
763local-distclean:
764 -rm -f Makefile config.status config.cache mh-frag mt-frag
11d8013a 765 -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
2a1ac811 766 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
767 rm -rf $(TARGET_SUBDIR); \
768 else true; fi
170853d0 769 -rm -rf $(BUILD_SUBDIR)
c1eb9e31 770 -if [ "$(HOST_SUBDIR)" != "." ]; then \
771 rm -rf $(HOST_SUBDIR); \
772 else true; fi
2a1ac811 773 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
774 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
775 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
776 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
777 -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
778
779local-maintainer-clean:
780 @echo "This command is intended for maintainers to use;"
781 @echo "it deletes files that may require special tools to rebuild."
782
783clean: do-clean local-clean
784mostlyclean: do-mostlyclean local-clean
785distclean: do-distclean local-clean local-distclean
786maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
787maintainer-clean: local-distclean
788realclean: maintainer-clean
789
ff2e99a4 790# Extra dependency for clean-target, owing to the mixed nature of gcc
791clean-target: clean-target-libgcc
2a1ac811 792clean-target-libgcc:
793 test ! -d gcc/libgcc || \
794 (cd gcc/libgcc && find . -type d -print) | \
795 while read d; do rm -f gcc/$$d/libgcc.a || : ; done
796 -rm -rf gcc/libgcc
39b9d49f 797 -rm -f gcc/stmp-dirs
2a1ac811 798
799# Check target.
800
801.PHONY: check do-check
465fccaf 802check: do-check
2a1ac811 803
805e22b2 804# Only include modules actually being configured and built.
6caa530d 805do-check: unstage [+
4d9c9c81 806 FOR host_modules +] \
807 maybe-check-[+module+][+
808 ENDFOR host_modules +][+
809 FOR target_modules +] \
810 maybe-check-target-[+module+][+
6caa530d 811 ENDFOR target_modules +] stage
2a1ac811 812
813# Automated reporting of test results.
814
815warning.log: build.log
816 $(srcdir)/contrib/warn_summary build.log > $@
817
818mail-report.log:
819 if test x'$(BOOT_CFLAGS)' != x''; then \
820 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
821 fi; \
822 $(srcdir)/contrib/test_summary -t >$@
823 chmod +x $@
824 echo If you really want to send e-mail, run ./$@ now
825
826mail-report-with-warnings.log: warning.log
827 if test x'$(BOOT_CFLAGS)' != x''; then \
828 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
829 fi; \
830 $(srcdir)/contrib/test_summary -t -i warning.log >$@
831 chmod +x $@
832 echo If you really want to send e-mail, run ./$@ now
833
834# Installation targets.
835
805e22b2 836.PHONY: install uninstall
ef8184c7 837install: installdirs install-host install-target
6f4f34a7 838
4d9c9c81 839.PHONY: install-host-nogcc
840install-host-nogcc: [+
ea8d3d75 841 FOR host_modules +][+ IF (not (= (get "module") "gcc")) +] \
842 maybe-install-[+module+][+ ENDIF +][+
4d9c9c81 843 ENDFOR host_modules +]
844
6f4f34a7 845.PHONY: install-host
6caa530d 846install-host: [+
6f4f34a7 847 FOR host_modules +] \
848 maybe-install-[+module+][+
849 ENDFOR host_modules +]
4d9c9c81 850
6f4f34a7 851.PHONY: install-target
852install-target: [+
853 FOR target_modules +] \
854 maybe-install-target-[+module+][+
855 ENDFOR target_modules +]
2a1ac811 856
857uninstall:
858 @echo "the uninstall target is not supported in this tree"
859
2a1ac811 860.PHONY: install.all
861install.all: install-no-fixedincludes
862 @if [ -f ./gcc/Makefile ] ; then \
7a8ca04a 863 r=`${PWD_COMMAND}` ; export r ; \
1b53fe78 864 $(HOST_EXPORTS) \
ca86fd55 865 (cd ./gcc && \
2a1ac811 866 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
867 else \
868 true ; \
869 fi
870
871# install-no-fixedincludes is used because Cygnus can not distribute
872# the fixed header files.
873.PHONY: install-no-fixedincludes
4d9c9c81 874install-no-fixedincludes: installdirs install-host-nogcc \
6f4f34a7 875 install-target gcc-no-fixedincludes
2a1ac811 876
805e22b2 877### other supporting targets
2a1ac811 878
805e22b2 879MAKEDIRS= \
880 $(DESTDIR)$(prefix) \
881 $(DESTDIR)$(exec_prefix)
882.PHONY: installdirs
883installdirs: mkinstalldirs
884 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
885
886dir.info: do-install-info
887 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
05794691 888 $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
805e22b2 889 mv -f dir.info.new dir.info ; \
890 else true ; \
2a1ac811 891 fi
892
805e22b2 893dist:
894 @echo "Building a full distribution of this tree isn't done"
895 @echo "via 'make dist'. Check out the etc/ subdirectory"
896
897etags tags: TAGS
898
899# Right now this just builds TAGS in each subdirectory. emacs19 has the
900# ability to use several tags files at once, so there is probably no need
901# to combine them into one big TAGS file (like CVS 1.3 does). We could
902# (if we felt like it) have this Makefile write a piece of elisp which
903# the user could load to tell emacs19 where all the TAGS files we just
904# built are.
905TAGS: do-TAGS
906
c15fb64c 907# ------------------------------------
908# Macros for configure and all targets
909# ------------------------------------
910
911[+ DEFINE configure +]
912.PHONY: configure-[+prefix+][+module+] maybe-configure-[+prefix+][+module+]
913maybe-configure-[+prefix+][+module+]:
914@if [+prefix+][+module+]
915maybe-configure-[+prefix+][+module+]: configure-[+prefix+][+module+]
916configure-[+prefix+][+module+]: [+deps+]
917 @[+ IF bootstrap +]test -f stage_last && exit 0; \
918 [+ ENDIF bootstrap +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
919 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
7a8ca04a 920 r=`${PWD_COMMAND}`; export r; \
921 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
c15fb64c 922 [+exports+] \
923 echo Configuring in [+subdir+]/[+module+]; \
924 cd "[+subdir+]/[+module+]" || exit 1; \
602d002b 925 case $(srcdir) in \
c1eb9e31 926 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
c15fb64c 927 *) topdir=`echo [+subdir+]/[+module+]/ | \
c1eb9e31 928 sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
602d002b 929 esac; \
c1eb9e31 930 srcdiroption="--srcdir=$${topdir}/[+module+]"; \
931 libsrcdir="$$s/[+module+]"; \
c15fb64c 932 [+ IF no-config-site +]rm -f no-such-file || : ; \
933 CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) $${libsrcdir}/configure \
934 [+args+] $${srcdiroption} [+extra_configure_flags+] \
602d002b 935 || exit 1
c15fb64c 936@endif [+prefix+][+module+]
12fb418d 937
938[+ IF bootstrap +]
939[+ FOR bootstrap_stage +]
940.PHONY: configure-stage[+id+]-[+prefix+][+module+] maybe-configure-stage[+id+]-[+prefix+][+module+]
941maybe-configure-stage[+id+]-[+prefix+][+module+]:
942@if [+module+]-bootstrap
943maybe-configure-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
944configure-stage[+id+]-[+prefix+][+module+]: [+deps+]
945 @$(MAKE) stage[+id+]-start
946 @[ -f [+subdir+]/[+module+]/Makefile ] && exit 0 || : ; \
947 r=`${PWD_COMMAND}`; export r; \
948 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
949 [+exports+][+ IF prev +] \
950 [+poststage1_exports+][+ ENDIF prev +] \
951 echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
952 cd [+subdir+]/[+module+] || exit 1; \
953 case $(srcdir) in \
954 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
955 *) topdir=`echo [+subdir+]/[+module+]/ | \
956 sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
957 esac; \
958 srcdiroption="--srcdir=$${topdir}/[+module+]"; \
959 libsrcdir="$$s/[+module+]"; \
960 $(SHELL) $${libsrcdir}/configure \
961 [+args+] $${srcdiroption} \
962 [+stage_configure_flags+] [+extra_configure_flags+]
963@endif [+module+]-bootstrap
964[+ ENDFOR bootstrap_stage +]
965[+ ENDIF bootstrap +]
c15fb64c 966[+ ENDDEF +]
967
968[+ DEFINE all +]
969.PHONY: all-[+prefix+][+module+] maybe-all-[+prefix+][+module+]
970maybe-all-[+prefix+][+module+]:
971@if [+prefix+][+module+]
972TARGET-[+prefix+][+module+]=[+
973 IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
974maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+]
975all-[+prefix+][+module+]: configure-[+prefix+][+module+]
976 @[+ IF bootstrap +]test -f stage_last && exit 0; \
977 [+ ENDIF bootstrap +]r=`${PWD_COMMAND}`; export r; \
7a8ca04a 978 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
c15fb64c 979 [+exports+] \
980 (cd [+subdir+]/[+module+] && \
981 $(MAKE) [+args+] [+extra_make_flags+] $(TARGET-[+prefix+][+module+]))
982@endif [+prefix+][+module+]
12fb418d 983
984[+ IF bootstrap +]
985[+ FOR bootstrap_stage +]
986.PHONY: all-stage[+id+]-[+prefix+][+module+] maybe-all-stage[+id+]-[+prefix+][+module+]
987.PHONY: clean-stage[+id+]-[+prefix+][+module+] maybe-clean-stage[+id+]-[+prefix+][+module+]
988maybe-all-stage[+id+]-[+prefix+][+module+]:
989maybe-clean-stage[+id+]-[+prefix+][+module+]:
990@if [+module+]-bootstrap
991maybe-all-stage[+id+]-[+prefix+][+module+]: all-stage[+id+]-[+prefix+][+module+]
992all-stage[+id+]: all-stage[+id+]-[+prefix+][+module+]
993all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
994 @$(MAKE) stage[+id+]-start
995 @r=`${PWD_COMMAND}`; export r; \
996 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
997 [+exports+][+ IF prev +] \
998 [+poststage1_exports+][+ ENDIF prev +] \
999 cd [+subdir+]/[+module+] && \
1000 $(MAKE) [+args+] [+ IF prev
1001 +][+poststage1_args+][+ ENDIF prev
1002 +] [+stage_make_flags+] [+extra_make_flags+]
1003
1004maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+]
1005clean-stage[+id+]: clean-stage[+id+]-[+prefix+][+module+]
1006clean-stage[+id+]-[+prefix+][+module+]:
1007 @[ -f [+subdir+]/[+module+]/Makefile ] || [ -f [+subdir+]/stage[+id+]-[+module+]/Makefile ] \
1008 || exit 0 ; \
1009 [ -f [+subdir+]/[+module+]/Makefile ] || $(MAKE) stage[+id+]-start ; \
1010 cd [+subdir+]/[+module+] && \
1011 $(MAKE) [+args+] [+ IF prev +] \
1012 [+poststage1_args+] [+ ENDIF prev +] \
1013 [+stage_make_flags+] [+extra_make_flags+] clean
1014@endif [+module+]-bootstrap
1015
1016[+ ENDFOR bootstrap_stage +]
1017[+ ENDIF bootstrap +]
c15fb64c 1018[+ ENDDEF +]
1019
1020# --------------------------------------
1021# Modules which run on the build machine
1022# --------------------------------------
1023[+ FOR build_modules +]
1024[+ configure prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
1025 args="$(BUILD_CONFIGARGS)" no-config-site=true +]
1026
1027[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +]
1028[+ ENDFOR build_module +]
805e22b2 1029
1030# --------------------------------------
1031# Modules which run on the host machine
1032# --------------------------------------
1033[+ FOR host_modules +]
12fb418d 1034[+ configure prefix="" subdir="$(HOST_SUBDIR)"
1035 exports="$(HOST_EXPORTS)"
1036 poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
c15fb64c 1037 args="$(HOST_CONFIGARGS)" +]
2a1ac811 1038
12fb418d 1039[+ all prefix="" subdir="$(HOST_SUBDIR)"
1040 exports="$(HOST_EXPORTS)"
1041 poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
1042 args="$(FLAGS_TO_PASS)"
1043 poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +]
805e22b2 1044
4d9c9c81 1045.PHONY: check-[+module+] maybe-check-[+module+]
1046maybe-check-[+module+]:
01b41571 1047@if [+module+]
1048maybe-check-[+module+]: check-[+module+]
805e22b2 1049[+ IF no_check +]
805e22b2 1050check-[+module+]:
1051[+ ELIF no_check_cross +]
805e22b2 1052# This module is only tested in a native toolchain.
1053check-[+module+]:
ab8cf29b 1054 @if [ '$(host)' = '$(target)' ] ; then \
7a8ca04a 1055 r=`${PWD_COMMAND}`; export r; \
1056 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
27e3aebd 1057 $(HOST_EXPORTS) \
c1eb9e31 1058 (cd $(HOST_SUBDIR)/[+module+] && \
5745a02a 1059 $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check); \
602d002b 1060 fi
1061[+ ELSE check +]
602d002b 1062check-[+module+]:
7a8ca04a 1063 @r=`${PWD_COMMAND}`; export r; \
1064 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
27e3aebd 1065 $(HOST_EXPORTS) \
c1eb9e31 1066 (cd $(HOST_SUBDIR)/[+module+] && \
1067 $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check)
805e22b2 1068[+ ENDIF no_check +]
01b41571 1069@endif [+module+]
805e22b2 1070
805e22b2 1071.PHONY: install-[+module+] maybe-install-[+module+]
1072maybe-install-[+module+]:
01b41571 1073@if [+module+]
1074maybe-install-[+module+]: install-[+module+]
4d9c9c81 1075[+ IF no_install +]
805e22b2 1076install-[+module+]:
1077[+ ELSE install +]
805e22b2 1078install-[+module+]: installdirs
7a8ca04a 1079 @r=`${PWD_COMMAND}`; export r; \
1080 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
27e3aebd 1081 $(HOST_EXPORTS) \
c1eb9e31 1082 (cd $(HOST_SUBDIR)/[+module+] && \
39c05b8e 1083 $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] install)
805e22b2 1084[+ ENDIF no_install +]
01b41571 1085@endif [+module+]
9621e512 1086
1087# Other targets (info, dvi, etc.)
1088[+ FOR recursive_targets +]
1089.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
1090maybe-[+make_target+]-[+module+]:
01b41571 1091@if [+module+]
1092maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
9621e512 1093[+ IF (match-value? = "missing" (get "make_target") ) +]
1094# [+module+] doesn't support [+make_target+].
1095[+make_target+]-[+module+]:
1096[+ ELSE +]
1097[+make_target+]-[+module+]: [+
1098 FOR depend +]\
1099 [+depend+]-[+module+] [+
1100 ENDFOR depend +]
1101 @[ -f ./[+module+]/Makefile ] || exit 0; \
1102 r=`${PWD_COMMAND}`; export r; \
1103 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
27e3aebd 1104 $(HOST_EXPORTS) \
6caa530d 1105 for flag in $(EXTRA_HOST_FLAGS) [+extra_make_flags+]; do \
9621e512 1106 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1107 done; \
1108 echo "Doing [+make_target+] in [+module+]" ; \
c1eb9e31 1109 (cd $(HOST_SUBDIR)/[+module+] && \
9621e512 1110 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1111 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1112 "RANLIB=$${RANLIB}" \
1113 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
6caa530d 1114 [+make_target+]) \
9621e512 1115 || exit 1
1116[+ ENDIF +]
01b41571 1117@endif [+module+]
9621e512 1118[+ ENDFOR recursive_targets +]
805e22b2 1119[+ ENDFOR host_modules +]
1120
1121# ---------------------------------------
1122# Modules which run on the target machine
1123# ---------------------------------------
1124[+ FOR target_modules +]
805e22b2 1125
ca86fd55 1126# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
c15fb64c 1127@if target-[+module+]
ca86fd55 1128$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
2f61b8ca 1129 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \
11d8013a 1130 rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \
ca86fd55 1131 cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out
01b41571 1132@endif target-[+module+]
805e22b2 1133
c15fb64c 1134[+ IF raw_cxx +]
1135[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
1136 deps=(string-append "$(TARGET_SUBDIR)/" (get "module") "/multilib.out")
1137 exports="$(RAW_CXX_TARGET_EXPORTS)"
1138 args="$(TARGET_CONFIGARGS)" no-config-site=true +]
1139
1140[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
1141 exports="$(RAW_CXX_TARGET_EXPORTS)"
1142 args="$(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
1143[+ ELSE +]
1144[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
1145 deps=(string-append "$(TARGET_SUBDIR)/" (get "module") "/multilib.out")
1146 exports="$(NORMAL_TARGET_EXPORTS)"
1147 args="$(TARGET_CONFIGARGS)" no-config-site=true +]
1148
1149[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
1150 exports="$(NORMAL_TARGET_EXPORTS)"
1151 args="$(TARGET_FLAGS_TO_PASS)" +]
1152[+ ENDIF +]
4d9c9c81 1153
1154.PHONY: check-target-[+module+] maybe-check-target-[+module+]
1155maybe-check-target-[+module+]:
01b41571 1156@if target-[+module+]
1157maybe-check-target-[+module+]: check-target-[+module+]
805e22b2 1158[+ IF no_check +]
1159# Dummy target for uncheckable module.
805e22b2 1160check-target-[+module+]:
1161[+ ELSE check +]
805e22b2 1162check-target-[+module+]:
7a8ca04a 1163 @r=`${PWD_COMMAND}`; export r; \
85115a11 1164 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
27e3aebd 1165IF raw_cxx +]
1166 $(RAW_CXX_TARGET_EXPORTS) \[+
1167ELSE normal_cxx +]
1168 $(NORMAL_TARGET_EXPORTS) \[+
1169ENDIF raw_cxx +]
602d002b 1170 (cd $(TARGET_SUBDIR)/[+module+] && \
1171 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
1172 IF raw_cxx
1173 +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
1174 ENDIF raw_cxx
1b53fe78 1175 +] [+extra_make_flags+] check)
805e22b2 1176[+ ENDIF no_check +]
01b41571 1177@endif target-[+module+]
4d9c9c81 1178
805e22b2 1179.PHONY: install-target-[+module+] maybe-install-target-[+module+]
1180maybe-install-target-[+module+]:
01b41571 1181@if target-[+module+]
1182maybe-install-target-[+module+]: install-target-[+module+]
4d9c9c81 1183[+ IF no_install +]
805e22b2 1184# Dummy target for uninstallable.
1185install-target-[+module+]:
1186[+ ELSE install +]
805e22b2 1187install-target-[+module+]: installdirs
7a8ca04a 1188 @r=`${PWD_COMMAND}`; export r; \
85115a11 1189 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
27e3aebd 1190IF raw_cxx +]
1191 $(RAW_CXX_TARGET_EXPORTS) \[+
1192ELSE normal_cxx +]
1193 $(NORMAL_TARGET_EXPORTS) \[+
1194ENDIF raw_cxx +]
602d002b 1195 (cd $(TARGET_SUBDIR)/[+module+] && \
1b53fe78 1196 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+extra_make_flags+] install)
805e22b2 1197[+ ENDIF no_install +]
01b41571 1198@endif target-[+module+]
9621e512 1199
1200# Other targets (info, dvi, etc.)
1201[+ FOR recursive_targets +]
1202.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
1203maybe-[+make_target+]-target-[+module+]:
01b41571 1204@if target-[+module+]
1205maybe-[+make_target+]-target-[+module+]: [+make_target+]-target-[+module+]
9621e512 1206[+ IF (match-value? = "missing" (get "make_target") ) +]
1207# [+module+] doesn't support [+make_target+].
1208[+make_target+]-target-[+module+]:
1209[+ ELSE +]
1210[+make_target+]-target-[+module+]: [+
1211 FOR depend +]\
1212 [+depend+]-target-[+module+] [+
1213 ENDFOR depend +]
1214 @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
1215 r=`${PWD_COMMAND}`; export r; \
85115a11 1216 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
27e3aebd 1217IF raw_cxx +]
1218 $(RAW_CXX_TARGET_EXPORTS) \[+
1219ELSE normal_cxx +]
1220 $(NORMAL_TARGET_EXPORTS) \[+
1221ENDIF raw_cxx +]
9621e512 1222 echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
1223 for flag in $(EXTRA_TARGET_FLAGS); do \
1224 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1225 done; \
1226 (cd $(TARGET_SUBDIR)/[+module+] && \
1227 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1228 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1229 "RANLIB=$${RANLIB}" \
1230 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1b53fe78 1231 [+extra_make_flags+] [+make_target+]) \
9621e512 1232 || exit 1
1233[+ ENDIF +]
01b41571 1234@endif target-[+module+]
9621e512 1235[+ ENDFOR recursive_targets +]
805e22b2 1236[+ ENDFOR target_modules +]
2a1ac811 1237
805e22b2 1238# ----------
1239# GCC module
1240# ----------
2a1ac811 1241
54f0538b 1242@if gcc-no-bootstrap
6caa530d 1243# GCC has some more recursive targets, which trigger the old
1244# (but still current, until the toplevel bootstrap project
1245# is finished) compiler bootstrapping rules.
2a1ac811 1246
057705e9 1247GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
1248.PHONY: $(GCC_STRAP_TARGETS)
ea8d3d75 1249$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
7a8ca04a 1250 @r=`${PWD_COMMAND}`; export r; \
1251 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1b53fe78 1252 $(HOST_EXPORTS) \
2a1ac811 1253 echo "Bootstrapping the compiler"; \
85115a11 1254 $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,:[ :]*,:,g;s,^[ :]*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
2a1ac811 1255 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
7a8ca04a 1256 @r=`${PWD_COMMAND}`; export r; \
1257 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2a1ac811 1258 case "$@" in \
1259 *bootstrap4-lean ) \
602d002b 1260 msg="Comparing stage3 and stage4 of the compiler"; \
1261 compare=compare3-lean ;; \
1262 *bootstrap4 ) \
1263 msg="Comparing stage3 and stage4 of the compiler"; \
1264 compare=compare3 ;; \
1265 *-lean ) \
1266 msg="Comparing stage2 and stage3 of the compiler"; \
1267 compare=compare-lean ;; \
1268 * ) \
1269 msg="Comparing stage2 and stage3 of the compiler"; \
1270 compare=compare ;; \
2a1ac811 1271 esac; \
1b53fe78 1272 $(HOST_EXPORTS) \
2a1ac811 1273 echo "$$msg"; \
1274 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
7a8ca04a 1275 @r=`${PWD_COMMAND}`; export r; \
1276 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
2a1ac811 1277 echo "Building runtime libraries"; \
599a3eac 1278 $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
2a1ac811 1279
ea8d3d75 1280profiledbootstrap: all-prebootstrap configure-gcc
7a8ca04a 1281 @r=`${PWD_COMMAND}`; export r; \
1282 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1b53fe78 1283 $(HOST_EXPORTS) \
85115a11 1284 $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,:[ :]*,:,g;s,^[ :]*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
d45eaefd 1285 echo "Bootstrapping training compiler"; \
ef3bb540 1286 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
7a8ca04a 1287 @r=`${PWD_COMMAND}`; export r; \
7a8ca04a 1288 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1b53fe78 1289 $(HOST_EXPORTS) \
ef3bb540 1290 echo "Building feedback based compiler"; \
1291 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
d45eaefd 1292 @r=`${PWD_COMMAND}`; export r; \
1293 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
d45eaefd 1294 echo "Building runtime libraries"; \
1295 $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
ef3bb540 1296
2a1ac811 1297.PHONY: cross
a1ad7483 1298cross: all-build all-gas all-ld
7a8ca04a 1299 @r=`${PWD_COMMAND}`; export r; \
1300 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1b53fe78 1301 $(HOST_EXPORTS) \
2a1ac811 1302 echo "Building the C and C++ compiler"; \
1303 cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
7a8ca04a 1304 @r=`${PWD_COMMAND}`; export r; \
1305 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
2a1ac811 1306 echo "Building runtime libraries"; \
599a3eac 1307 $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
54f0538b 1308@endif gcc-no-bootstrap
2a1ac811 1309
01b41571 1310@if gcc
7c28bad6 1311.PHONY: check-gcc-c++
1312check-gcc-c++:
2a1ac811 1313 @if [ -f ./gcc/Makefile ] ; then \
7a8ca04a 1314 r=`${PWD_COMMAND}`; export r; \
1315 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1b53fe78 1316 $(HOST_EXPORTS) \
ca86fd55 1317 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
2a1ac811 1318 else \
1319 true; \
7c28bad6 1320 fi
1321
1322.PHONY: check-c++
465fccaf 1323check-c++: check-target-libstdc++-v3 check-gcc-c++
2a1ac811 1324
805e22b2 1325# Install the gcc headers files, but not the fixed include files,
1326# which Cygnus is not allowed to distribute. This rule is very
1327# dependent on the workings of the gcc Makefile.in.
1328.PHONY: gcc-no-fixedincludes
1329gcc-no-fixedincludes:
1330 @if [ -f ./gcc/Makefile ]; then \
1331 rm -rf gcc/tmp-include; \
1332 mv gcc/include gcc/tmp-include 2>/dev/null; \
1333 mkdir gcc/include; \
1334 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1335 touch gcc/stmp-fixinc gcc/include/fixed; \
1336 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
7a8ca04a 1337 r=`${PWD_COMMAND}`; export r; \
1338 s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
1b53fe78 1339 $(HOST_EXPORTS) \
ca86fd55 1340 (cd ./gcc && \
805e22b2 1341 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1342 rm -rf gcc/include; \
1343 mv gcc/tmp-include gcc/include 2>/dev/null; \
1344 else true; fi
01b41571 1345@endif gcc
9621e512 1346
2d64c2fd 1347# ---------------------
1348# GCC bootstrap support
1349# ---------------------
1350
6caa530d 1351# We track the current stage (the one in 'gcc') in the stage_current file.
1352# stage_last instead tracks the stage that was built last. These targets
1353# are dummy when toplevel bootstrap is not active.
1354
1355.PHONY: unstage
1356unstage:
1357@if gcc-bootstrap
1358 @[ -f stage_current ] || $(MAKE) `cat stage_last`-start
1359@endif gcc-bootstrap
1360
1361.PHONY: stage
1362stage:
1363@if gcc-bootstrap
1364 @$(MAKE) `cat stage_current`-end
1365@endif gcc-bootstrap
1366
5965d276 1367# We name the build directories for the various stages "stage1-gcc",
1368# "stage2-gcc","stage3-gcc", etc.
1369
1370# Since the 'compare' process will fail (on debugging information) if any
1371# directory names are different, we need to link the gcc directory for
1372# the previous stage to a constant name ('gcc-prev'), and to make the name of
1373# the build directories constant as well. For the latter, we use naked names
1374# like 'gcc', because the scripts in that directory assume it. We use
1375# mv on platforms where symlinks to directories do not work or are not
1376# reliable.
1377
1378# At the end of the bootstrap, a symlink to 'stage3-gcc' named 'gcc' must
1379# be kept, so that libraries can find it. Ick!
1380
1381# It would be best to preinstall gcc into a staging area (and in the
1382# future, gather there all prebootstrap packages). This would allow
1383# assemblers and linkers can be bootstrapped as well as the compiler
1384# (both in a combined tree, or separately). This however requires some
1385# change to the gcc driver, again in order to avoid comparison failures.
2d64c2fd 1386
2b64d19b 1387# Bugs: This is crippled when doing parallel make, the `make all-host'
1388# and `make all-target' phases can be parallelized.
1389
2d64c2fd 1390
1391# 'touch' doesn't work right on some platforms.
1392STAMP = echo timestamp >
1393
1394# Only build the C compiler for stage1, because that is the only one that
1395# we can guarantee will build with the native compiler, and also it is the
1396# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
1397# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
1398# overrideable (for a bootstrap build stage1 also builds gcc.info).
1399
1400STAGE1_CFLAGS=@stage1_cflags@
1401STAGE1_LANGUAGES=@stage1_languages@
1402
5965d276 1403# We only want to compare .o files, so set this!
1404objext = .o
2d64c2fd 1405
2d64c2fd 1406# Flags to pass to stage2 and later makes.
2d64c2fd 1407POSTSTAGE1_FLAGS_TO_PASS = \
599a3eac 1408 CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
f6463472 1409 STAGE_PREFIX=$$r/prev-gcc/ \
2d64c2fd 1410 CFLAGS="$(BOOT_CFLAGS)" \
32fbc463 1411 ADAC="\$$(CC)"
2d64c2fd 1412
5965d276 1413# For stage 1:
1414# * We force-disable intermodule optimizations, even if
1415# --enable-intermodule was passed, since the installed compiler probably
1416# can't handle them. Luckily, autoconf always respects
1417# the last argument when conflicting --enable arguments are passed.
1418# * Likewise, we force-disable coverage flags, since the installed compiler
1419# probably has never heard of them.
1420# * We build only C (and possibly Ada).
1421
1422[+ FOR bootstrap-stage +]
54f0538b 1423.PHONY: stage[+id+]-start stage[+id+]-end
5965d276 1424
599a3eac 1425stage[+id+]-start::
3c782584 1426 @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
6caa530d 1427 echo stage[+id+] > stage_current ; \
c1eb9e31 1428 echo stage[+id+] > stage_last; \
97d52533 1429 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)[+
c1eb9e31 1430 FOR host_modules +][+ IF bootstrap +]
a1ad7483 1431@if [+ module +]
c1eb9e31 1432 @cd $(HOST_SUBDIR); [ -d stage[+id+]-[+module+] ] || \
1433 mkdir stage[+id+]-[+module+]; \
1434 set stage[+id+]-[+module+] [+module+] ; \
1435 @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \
1436 set stage[+prev+]-[+module+] prev-[+module+] ; \
1437 @CREATE_LINK_TO_DIR@ [+ ENDIF prev +]
97d52533 1438@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +][+
1439 FOR target_modules +][+ IF bootstrap +]
1440@if target-[+ module +]
1441 @cd $(TARGET_SUBDIR); [ -d stage[+id+]-[+module+] ] || \
1442 mkdir stage[+id+]-[+module+]; \
1443 set stage[+id+]-[+module+] [+module+] ; \
1444 @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \
1445 set stage[+prev+]-[+module+] prev-[+module+] ; \
1446 @CREATE_LINK_TO_DIR@ [+ ENDIF prev +]
1447@endif target-[+ module +][+ ENDIF bootstrap +][+ ENDFOR target_modules +]
5965d276 1448
599a3eac 1449stage[+id+]-end::
3c782584 1450 @rm -f stage_current[+ FOR host_modules +][+ IF bootstrap +]
a1ad7483 1451@if [+ module +]
c1eb9e31 1452 @cd $(HOST_SUBDIR); set [+module+] stage[+id+]-[+module+] ; \
1453 @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \
1454 set prev-[+module+] stage[+prev+]-[+module+] ; \
1455 @UNDO_LINK_TO_DIR@ [+ ENDIF prev +]
97d52533 1456@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +][+
1457 FOR target_modules +][+ IF bootstrap +]
1458@if target-[+ module +]
1459 @cd $(HOST_SUBDIR); set [+module+] stage[+id+]-[+module+] ; \
1460 @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \
1461 set prev-[+module+] stage[+prev+]-[+module+] ; \
1462 @UNDO_LINK_TO_DIR@ [+ ENDIF prev +]
1463@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR target_modules +]
5965d276 1464
1465# Bubble a bugfix through all the stages up to stage [+id+]. They
1466# are remade, but not reconfigured. The next stage (if any) will not
1467# be reconfigured as well.
54f0538b 1468.PHONY: stage[+id+]-bubble
3c782584 1469stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +][+IF lean +]
1470 @bootstrap_lean@-rm -rf stage[+lean+]-* ; $(STAMP) stage[+lean+]-lean[+ ENDIF lean +]
1471 @if test -f stage[+id+]-lean [+
1472 IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +] ; then \
1473 echo Skipping rebuild of stage[+id+] ; \
1474 else \
2b64d19b 1475 $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage[+id+]; \
3c782584 1476 fi
a1ad7483 1477
2b64d19b 1478.PHONY: all-stage[+id+] clean-stage[+id+]
2b64d19b 1479do-clean: clean-stage[+id+]
2d64c2fd 1480
a1ad7483 1481# FIXME: Will not need to be conditional when toplevel bootstrap is the
1482# only possibility, but now it conflicts with no-bootstrap rules
1483@if gcc-bootstrap
5965d276 1484[+ IF compare-target +]
3c782584 1485[+compare-target+]:
1486 @if test -f stage[+prev+]-lean; then \
1487 echo Cannot compare object files as stage [+prev+] was deleted. ; \
1488 exit 0 ; \
1489 fi; \
1490 [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
5965d276 1491 @r=`${PWD_COMMAND}`; export r; \
2d64c2fd 1492 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1493 rm -f .bad_compare ; \
5965d276 1494 cd stage[+id+]-gcc; \
2d64c2fd 1495 files=`find . -name "*$(objext)" -print` ; \
1496 cd .. ; \
1497 for file in $${files} ; do \
5965d276 1498 f1=$$r/stage[+prev+]-gcc/$$file; f2=$$r/stage[+id+]-gcc/$$file; \
7bcc3b4a 1499 @do_compare@ > /dev/null 2>&1; \
2d64c2fd 1500 test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
1501 done ; \
1502 if [ -f .bad_compare ]; then \
1503 echo "Bootstrap comparison failure!"; \
1504 cat .bad_compare; \
1505 exit 1; \
1506 else \
1507 true; \
1508 fi ; \
3c782584 1509 $(STAMP) [+compare-target+][+ IF prev +]
1510 @bootstrap_lean@-rm -rf stage[+prev+]-* ; $(STAMP) stage[+prev+]-lean[+ ENDIF prev +]
5965d276 1511[+ ENDIF compare-target +]
1512
1513[+ IF bootstrap-target +]
1514.PHONY: [+bootstrap-target+]
3c782584 1515[+bootstrap-target+]: stage[+id+]-bubble [+compare-target+] all
5965d276 1516[+ ENDIF bootstrap-target +]
1517
2b64d19b 1518# Rules to wipe a stage and all the following ones, also used for cleanstrap
599a3eac 1519[+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +]
2b64d19b 1520.PHONY: distclean-stage[+id+]
599a3eac 1521distclean-stage[+id+]::
6caa530d 1522 [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
3c782584 1523 rm -rf stage[+id+]-* [+
5965d276 1524 IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
5965d276 1525
1526[+ IF cleanstrap-target +]
1527.PHONY: [+cleanstrap-target+]
2b64d19b 1528[+cleanstrap-target+]: distclean [+bootstrap-target+]
5965d276 1529[+ ENDIF cleanstrap-target +]
a1ad7483 1530@endif gcc-bootstrap
5965d276 1531
1532[+ ENDFOR bootstrap-stage +]
599a3eac 1533
919a60fa 1534stageprofile-end::
1535 $(MAKE) distclean-stagefeedback
599a3eac 1536
919a60fa 1537stagefeedback-start::
599a3eac 1538 @r=`${PWD_COMMAND}`; export r; \
1539 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
919a60fa 1540 for i in prev-*; do \
1541 j=`echo $$i | sed s/^prev-//` ; \
1542 cd $$r/$$i && \
1543 { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL) ; } && \
1544 { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL) ; } ; \
1545 done
33e3141d 1546
2b64d19b 1547@if gcc-bootstrap
1548NOTPARALLEL = .NOTPARALLEL
1549$(NOTPARALLEL):
1550do-distclean: distclean-stage1
1551@endif gcc-bootstrap
1552
805e22b2 1553# --------------------------------------
1554# Dependencies between different modules
1555# --------------------------------------
1556
ea8d3d75 1557# Generic dependencies for target modules on host stuff, especially gcc
97d52533 1558[+ FOR target_modules +][+ IF bootstrap +]
1559@if gcc-bootstrap[+ FOR bootstrap_stage +]
1560configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-gcc[+ ENDFOR +]
1561@endif gcc-bootstrap[+ ENDIF bootstrap +]
ea8d3d75 1562configure-target-[+module+]: maybe-all-gcc
1563[+ ENDFOR target_modules +]
1564
1565[+ FOR lang_env_dependencies +]
1566configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss
1567[+ IF cxx +]configure-target-[+module+]: maybe-all-target-libstdc++-v3
1568[+ ENDIF cxx +][+ ENDFOR lang_env_dependencies +]
1569
805e22b2 1570# There are two types of dependencies here: 'hard' dependencies, where one
1571# module simply won't build without the other; and 'soft' dependencies, where
1572# if the depended-on module is missing, the depending module will do without
1573# or find a substitute somewhere (perhaps installed). Soft dependencies
ea8d3d75 1574# are made here to depend on a 'maybe-' target. If you're not sure,
805e22b2 1575# it's safer to use a soft dependency.
1576
ea8d3d75 1577[+ ;; These Scheme functions build the bulk of the dependencies.
1578 ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc",
1579 ;; where "maybe-" is only included if HARD is true, and all-gcc
1580 ;; is taken from VAR-NAME.
1581 (define dep-target (lambda (module-kind var-name hard)
1582 (string-append
1583 (if hard "" "maybe-")
1584 (dep-subtarget var-name)
1585 module-kind
1586 (dep-module var-name)
1587 )))
1588
1589 ;; make-dep builds a dependency from the MODULE and ON AutoGen vars.
a1ad7483 1590 (define make-dep (lambda (module-kind on-kind)
ea8d3d75 1591 (string-append
1592 (dep-target module-kind "module" #t) ": "
a1ad7483 1593 (dep-target on-kind "on" (exist? "hard")))))
ea8d3d75 1594
1595 ;; dep-subtarget extracts everything up to the first dash in the given
1596 ;; AutoGen variable, for example it extracts "all-" out of "all-gcc".
1597 (define dep-subtarget (lambda (var-name)
1598 (substring (get var-name) 0 (+ 1 (string-index (get var-name) #\-)))))
1599
1600 ;; dep-module extracts everything up to the first dash in the given
1601 ;; AutoGen variable, for example it extracts "gcc" out of "all-gcc".
1602 (define dep-module (lambda (var-name)
1603 (substring (get var-name) (+ 1 (string-index (get var-name) #\-)))))
1604
1605 ;; dep-stage builds a string for the prefix of a bootstrap stage.
1606 (define dep-stage (lambda ()
1607 (string-append
1608 "stage"
1609 (get "id")
1610 "-")))
1611
1612 ;; dep-maybe is the same as the AutoGen expression "- hard 'maybe-'"
1613 ;; but is written in Scheme.
1614 (define dep-maybe (lambda ()
1615 (if (exist? "hard") "" "maybe-")))
1616
7799fdb2 1617 ;; dep-kind returns "normal" if the dependency is on an "install" target,
1618 ;; or if either module is not bootstrapped. It returns "bootstrap" for
ea8d3d75 1619 ;; configure or build dependencies between bootstrapped modules; it returns
1620 ;; "prebootstrap" for configure or build dependencies of bootstrapped
a1ad7483 1621 ;; modules on a build module (e.g. all-gcc on all-build-bison). All this
ea8d3d75 1622 ;; is only necessary for host modules.
1623 (define dep-kind (lambda ()
a1ad7483 1624 (if (and (hash-ref boot-modules (dep-module "module"))
1625 (=* (dep-module "on") "build-"))
1626 "prebootstrap"
ea8d3d75 1627
a1ad7483 1628 (if (or (= (dep-subtarget "on") "install-")
7799fdb2 1629 (not (hash-ref boot-modules (dep-module "module")))
1630 (not (hash-ref boot-modules (dep-module "on"))))
a1ad7483 1631 "normal"
1632 "bootstrap"))))
ea8d3d75 1633
1634 ;; We now build the hash table that is used by dep-kind.
1635 (define boot-modules (make-hash-table 113))
ea8d3d75 1636+]
1637
1638[+ FOR host_modules +][+
1639 (if (exist? "bootstrap")
1640 (hash-create-handle! boot-modules (get "module") #t))
1641 "" +][+ ENDFOR host_modules +]
97d52533 1642[+ FOR target_modules +][+
1643 (if (exist? "bootstrap")
1644 (hash-create-handle! boot-modules (string-append "target-" (get "module")) #t))
1645 "" +][+ ENDFOR target_modules +]
ea8d3d75 1646
1647# With all the machinery above in place, it is pretty easy to generate
1648# dependencies. Host dependencies are a bit more complex because we have
1649# to check for bootstrap/prebootstrap dependencies. To resolve
1650# prebootstrap dependencies, prebootstrap modules are gathered in
1651# a hash table.
a1ad7483 1652[+ FOR dependencies +][+ (make-dep "" "") +]
1653[+ CASE (dep-kind) +]
1654[+ == "prebootstrap"
ea8d3d75 1655 +][+ FOR bootstrap_stage +]
a1ad7483 1656[+ (make-dep (dep-stage) "") +][+
1657 ENDFOR bootstrap_stage +]
1658all-prebootstrap: [+ (dep-target "" "on" (exist? "hard")) +]
1659[+ == "bootstrap"
1660 +][+ FOR bootstrap_stage +]
1661[+ (make-dep (dep-stage) (dep-stage)) +][+
ea8d3d75 1662 ENDFOR bootstrap_stage +]
1663[+ ESAC +][+
1664ENDFOR dependencies +]
1665
a1ad7483 1666# Non-toplevel bootstrap rules must depend on several packages, to be built
1667# before gcc. Another wart that will go away, hopefully soon.
ea8d3d75 1668@if gcc-no-bootstrap
1669[+ FOR host_modules +][+
1670 IF (and (not (= (get "module") "gcc"))
1671 (hash-ref boot-modules (get "module"))) +]
1672all-prebootstrap: maybe-all-[+module+][+
1673 ENDIF +][+
1674ENDFOR host_modules +]
1675@endif gcc-no-bootstrap
1676
0311ff84 1677GDB_TK = @GDB_TK@
ea8d3d75 1678all-gdb: $(gdbnlmrequirements) $(GDB_TK)
2a1ac811 1679
805e22b2 1680# Serialization dependencies. Host configures don't work well in parallel to
1681# each other, due to contention over config.cache. Target configures and
1682# build configures are similar.
1683@serialization_dependencies@
2a1ac811 1684
805e22b2 1685# --------------------------------
1686# Regenerating top level configury
1687# --------------------------------
2a1ac811 1688
ca86fd55 1689# Multilib.out tells target dirs what multilibs they should build.
1690# There is really only one copy. We use the 'timestamp' method to
1691# work around various timestamp bugs on some systems.
1692# We use move-if-change so that it's only considered updated when it
1693# actually changes, because it has to depend on a phony target.
11d8013a 1694multilib.out: maybe-all-gcc
7a8ca04a 1695 @r=`${PWD_COMMAND}`; export r; \
ca86fd55 1696 echo "Checking multilib configuration..."; \
1697 $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
1698 $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
ca86fd55 1699
2a1ac811 1700# Rebuilding Makefile.in, using autogen.
041dd099 1701AUTOGEN = autogen
3290c0cf 1702$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
041dd099 1703 cd $(srcdir) && $(AUTOGEN) Makefile.def
2a1ac811 1704
71ab34df 1705# Rebuilding Makefile.
041dd099 1706Makefile: $(srcdir)/Makefile.in config.status
1707 CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
1708
9624cab1 1709config.status: configure
3a6fbbb0 1710 CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck
2a1ac811 1711
71ab34df 1712# Rebuilding configure.
041dd099 1713AUTOCONF = autoconf
3290c0cf 1714$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4
041dd099 1715 cd $(srcdir) && $(AUTOCONF)
2a1ac811 1716
523318a0 1717# ------------------------------
1718# Special directives to GNU Make
1719# ------------------------------
1720
523318a0 1721# Don't pass command-line variables to submakes.
1722.NOEXPORT:
1723MAKEOVERRIDES=
1724
2a1ac811 1725# end of Makefile.in