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