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