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