Makefile.in revision 61843
1# 2# Makefile for directory with subdirs to build. 3# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 4# Free Software Foundation 5# 6# This file is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 2 of the License, or 9# (at your option) any later version. 10# 11# This program is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15# 16# You should have received a copy of the GNU General Public License 17# along with this program; if not, write to the Free Software 18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19# 20 21srcdir = . 22 23prefix = /usr/local 24exec_prefix = $(prefix) 25 26bindir=${exec_prefix}/bin 27sbindir=${exec_prefix}/sbin 28libexecdir=${exec_prefix}/libexec 29datadir=${prefix}/share 30sysconfdir=${prefix}/etc 31sharedstatedir=${prefix}/com 32localstatedir=${prefix}/var 33libdir=${exec_prefix}/lib 34includedir=${prefix}/include 35oldincludedir=/usr/include 36infodir=${prefix}/info 37mandir=${prefix}/man 38gxx_include_dir=${includedir}/g++ 39 40tooldir = $(exec_prefix)/$(target) 41 42program_transform_name = 43 44man1dir = $(mandir)/man1 45man2dir = $(mandir)/man2 46man3dir = $(mandir)/man3 47man4dir = $(mandir)/man4 48man5dir = $(mandir)/man5 49man6dir = $(mandir)/man6 50man7dir = $(mandir)/man7 51man8dir = $(mandir)/man8 52man9dir = $(mandir)/man9 53infodir = $(prefix)/info 54includedir = $(prefix)/include 55# Directory in which the compiler finds executables, libraries, etc. 56libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version) 57GDB_NLM_DEPS = 58 59SHELL = /bin/sh 60 61# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a 62# cygwin host. 63INSTALL_PROGRAM_ARGS = 64 65INSTALL = $(SHELL) $$s/install-sh -c 66INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS) 67INSTALL_SCRIPT = $(INSTALL) 68INSTALL_DATA = $(INSTALL) -m 644 69 70INSTALL_DOSREL = install-dosrel-fake 71 72AS = as 73AR = ar 74AR_FLAGS = rc 75CC = cc 76 77# Special variables passed down in EXTRA_GCC_FLAGS. They are defined 78# here so that they can be overridden by Makefile fragments. 79HOST_CC = $(CC_FOR_BUILD) 80HOST_PREFIX = 81HOST_PREFIX_1 = loser- 82 83# These flag values are normally overridden by the configure script. 84CFLAGS = -g 85CXXFLAGS = -g -O2 86 87LDFLAGS = 88LIBCFLAGS = $(CFLAGS) 89CFLAGS_FOR_TARGET = $(CFLAGS) 90LDFLAGS_FOR_TARGET = 91LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) 92PICFLAG = 93PICFLAG_FOR_TARGET = 94 95CHILLFLAGS = $(CFLAGS) 96CHILL_LIB = -lchill 97CXX = c++ 98 99# Use -O2 to stress test the compiler. 100LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions 101CXXFLAGS_FOR_TARGET = $(CXXFLAGS) 102LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions 103 104RANLIB = ranlib 105 106DLLTOOL = dlltool 107WINDRES = windres 108 109NM = nm 110 111LD = ld 112 113BZIPPROG = bzip2 114 115# These values are substituted by configure. 116DEFAULT_YACC = yacc 117DEFAULT_LEX = lex 118DEFAULT_M4 = m4 119 120BISON = `if [ -f $$r/bison/bison ] ; then \ 121 echo $$r/bison/bison -L $$s/bison/ ; \ 122 else \ 123 echo bison ; \ 124 fi` 125 126YACC = `if [ -f $$r/bison/bison ] ; then \ 127 echo $$r/bison/bison -y -L $$s/bison/ ; \ 128 elif [ -f $$r/byacc/byacc ] ; then \ 129 echo $$r/byacc/byacc ; \ 130 else \ 131 echo ${DEFAULT_YACC} ; \ 132 fi` 133 134LEX = `if [ -f $$r/flex/flex ] ; \ 135 then echo $$r/flex/flex ; \ 136 else echo ${DEFAULT_LEX} ; fi` 137 138M4 = `if [ -f $$r/m4/m4 ] ; \ 139 then echo $$r/m4/m4 ; \ 140 else echo ${DEFAULT_M4} ; fi` 141 142MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \ 143 then echo $$r/texinfo/makeinfo/makeinfo ; \ 144 else echo makeinfo ; fi` 145 146# This just becomes part of the MAKEINFO definition passed down to 147# sub-makes. It lets flags be given on the command line while still 148# using the makeinfo from the object tree. 149MAKEINFOFLAGS = 150 151EXPECT = `if [ -f $$r/expect/expect ] ; \ 152 then echo $$r/expect/expect ; \ 153 else echo expect ; fi` 154 155RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ 156 then echo $$s/dejagnu/runtest ; \ 157 else echo runtest ; fi` 158 159 160# compilers to use to create programs which must be run in the build 161# environment. 162CC_FOR_BUILD = $(CC) 163CXX_FOR_BUILD = $(CXX) 164 165SUBDIRS = "this is set via configure, don't edit this" 166OTHERS = 167 168# This is set by the configure script to the list of directories which 169# should be built using the target tools. 170 171 172TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon 173 174# Target libraries are put under this directory: 175# Changed by configure to $(target_alias) if cross. 176TARGET_SUBDIR = . 177 178# This is set by the configure script to the arguments passed to configure. 179CONFIG_ARGUMENTS = 180 181# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared 182# was used. 183SET_LIB_PATH = 184 185# This is the name of the environment variable used for the path to 186# the libraries. This may be changed by configure.in. 187RPATH_ENVVAR = LD_LIBRARY_PATH 188 189# configure.in sets SET_LIB_PATH to this if --enable-shared was used. 190REALLY_SET_LIB_PATH = \ 191 if [ x"$$$(RPATH_ENVVAR)" != x ]; then \ 192 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \ 193 else \ 194 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \ 195 fi; \ 196 export $(RPATH_ENVVAR); 197 198ALL = all.normal 199INSTALL_TARGET = installdirs \ 200 install-gcc \ 201 $(INSTALL_MODULES) \ 202 $(INSTALL_TARGET_MODULES) \ 203 $(INSTALL_X11_MODULES) \ 204 $(INSTALL_DOSREL) 205 206INSTALL_TARGET_CROSS = installdirs \ 207 install-gcc-cross \ 208 $(INSTALL_MODULES) \ 209 $(INSTALL_TARGET_MODULES) \ 210 $(INSTALL_X11_MODULES) \ 211 $(INSTALL_DOSREL) 212 213CC_FOR_TARGET = ` \ 214 if [ -f $$r/gcc/xgcc ] ; then \ 215 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ 216 case "$(target_canonical)" in \ 217 i[3456]86-*-cygwin*) \ 218 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \ 219 ;; \ 220 *) \ 221 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ 222 ;; \ 223 esac \ 224 else \ 225 echo $$r/gcc/xgcc -B$$r/gcc/; \ 226 fi; \ 227 else \ 228 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 229 echo $(CC); \ 230 else \ 231 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ 232 fi; \ 233 fi` 234 235# If CC_FOR_TARGET is not overriden on the command line, then this 236# variable is passed down to the gcc Makefile, where it is used to 237# build libgcc2.a. We define it here so that it can itself be 238# overridden on the command line. 239GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ 240 241CHILL_FOR_TARGET = ` \ 242 if [ -f $$r/gcc/xgcc ] ; then \ 243 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \ 244 else \ 245 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 246 echo $(CC); \ 247 else \ 248 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ 249 fi; \ 250 fi` 251 252CXX_FOR_TARGET = ` \ 253 if [ -f $$r/gcc/xgcc ] ; then \ 254 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ 255 case "$(target_canonical)" in \ 256 i[3456]86-*-cygwin*) \ 257 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \ 258 ;; \ 259 *) \ 260 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ 261 ;; \ 262 esac \ 263 else \ 264 echo $$r/gcc/xgcc -B$$r/gcc/; \ 265 fi; \ 266 else \ 267 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 268 echo $(CXX); \ 269 else \ 270 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \ 271 fi; \ 272 fi` 273 274AS_FOR_TARGET = ` \ 275 if [ -f $$r/gas/as-new ] ; then \ 276 echo $$r/gas/as-new ; \ 277 else \ 278 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 279 echo $(AS); \ 280 else \ 281 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \ 282 fi; \ 283 fi` 284 285LD_FOR_TARGET = ` \ 286 if [ -f $$r/ld/ld-new ] ; then \ 287 echo $$r/ld/ld-new ; \ 288 else \ 289 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 290 echo $(LD); \ 291 else \ 292 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \ 293 fi; \ 294 fi` 295 296DLLTOOL_FOR_TARGET = ` \ 297 if [ -f $$r/binutils/dlltool ] ; then \ 298 echo $$r/binutils/dlltool ; \ 299 else \ 300 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 301 echo $(DLLTOOL); \ 302 else \ 303 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \ 304 fi; \ 305 fi` 306 307WINDRES_FOR_TARGET = ` \ 308 if [ -f $$r/binutils/windres ] ; then \ 309 echo $$r/binutils/windres ; \ 310 else \ 311 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 312 echo $(WINDRES); \ 313 else \ 314 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \ 315 fi; \ 316 fi` 317 318AR_FOR_TARGET = ` \ 319 if [ -f $$r/binutils/ar ] ; then \ 320 echo $$r/binutils/ar ; \ 321 else \ 322 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 323 echo $(AR); \ 324 else \ 325 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \ 326 fi; \ 327 fi` 328 329RANLIB_FOR_TARGET = ` \ 330 if [ -f $$r/binutils/ranlib ] ; then \ 331 echo $$r/binutils/ranlib ; \ 332 else \ 333 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 334 echo $(RANLIB); \ 335 else \ 336 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \ 337 fi; \ 338 fi` 339 340NM_FOR_TARGET = ` \ 341 if [ -f $$r/binutils/nm-new ] ; then \ 342 echo $$r/binutils/nm-new ; \ 343 else \ 344 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 345 echo $(NM); \ 346 else \ 347 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \ 348 fi; \ 349 fi` 350 351# The first rule in the file had better be this one. Don't put any above it. 352# This lives here to allow makefile fragments to contain dependencies. 353all: all.normal 354.PHONY: all 355 356# These can be overridden by config/mt-*. 357# The _TARGET_ is because they're specified in mt-foo. 358# The _HOST_ is because they're programs that run on the host. 359EXTRA_TARGET_HOST_ALL_MODULES = 360EXTRA_TARGET_HOST_INSTALL_MODULES = 361EXTRA_TARGET_HOST_CHECK_MODULES = 362 363#### host and target specific makefile fragments come in here. 364### 365 366# Flags to pass down to all sub-makes. 367# Please keep these in alphabetical order. 368BASE_FLAGS_TO_PASS = \ 369 "AR_FLAGS=$(AR_FLAGS)" \ 370 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ 371 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ 372 "BISON=$(BISON)" \ 373 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ 374 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ 375 "CFLAGS=$(CFLAGS)" \ 376 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ 377 "CHILLFLAGS=$(CHILLFLAGS)" \ 378 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ 379 "CHILL_LIB=$(CHILL_LIB)" \ 380 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ 381 "CXXFLAGS=$(CXXFLAGS)" \ 382 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ 383 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ 384 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ 385 "INSTALL=$(INSTALL)" \ 386 "INSTALL_DATA=$(INSTALL_DATA)" \ 387 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ 388 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ 389 "LDFLAGS=$(LDFLAGS)" \ 390 "LEX=$(LEX)" \ 391 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ 392 "LIBCFLAGS=$(LIBCFLAGS)" \ 393 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ 394 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ 395 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ 396 "M4=$(M4)" \ 397 "MAKE=$(MAKE)" \ 398 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ 399 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ 400 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ 401 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ 402 "SHELL=$(SHELL)" \ 403 "EXPECT=$(EXPECT)" \ 404 "RUNTEST=$(RUNTEST)" \ 405 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ 406 "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ 407 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ 408 "YACC=$(YACC)" \ 409 "bindir=$(bindir)" \ 410 "datadir=$(datadir)" \ 411 "exec_prefix=$(exec_prefix)" \ 412 "includedir=$(includedir)" \ 413 "infodir=$(infodir)" \ 414 "libdir=$(libdir)" \ 415 "libexecdir=$(libexecdir)" \ 416 "lispdir=$(lispdir)" \ 417 "localstatedir=$(localstatedir)" \ 418 "mandir=$(mandir)" \ 419 "oldincludedir=$(oldincludedir)" \ 420 "prefix=$(prefix)" \ 421 "sbindir=$(sbindir)" \ 422 "sharedstatedir=$(sharedstatedir)" \ 423 "sysconfdir=$(sysconfdir)" \ 424 "tooldir=$(tooldir)" \ 425 "gxx_include_dir=$(gxx_include_dir)" \ 426 "gcc_version=$(gcc_version)" \ 427 "gcc_version_trigger=$(gcc_version_trigger)" \ 428 "target_alias=$(target_alias)" \ 429 "libsubdir=$(libsubdir)" 430 431# Flags to pass down to most sub-makes, in which we're building with 432# the host environment. 433# If any variables are added here, they must be added to do-*, below. 434EXTRA_HOST_FLAGS = \ 435 'AR=$(AR)' \ 436 'AS=$(AS)' \ 437 'CC=$(CC)' \ 438 'CXX=$(CXX)' \ 439 'DLLTOOL=$(DLLTOOL)' \ 440 'LD=$(LD)' \ 441 'NM=$(NM)' \ 442 'RANLIB=$(RANLIB)' \ 443 'WINDRES=$(WINDRES)' 444 445FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) 446 447# Flags that are concerned with the location of the X11 include files 448# and library files 449# 450# NOTE: until the top-level is getting the values via autoconf, it only 451# causes problems to have this top-level Makefile overriding the autoconf-set 452# values in child directories. Only variables that don't conflict with 453# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. 454# 455X11_FLAGS_TO_PASS = \ 456 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ 457 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' 458 459# Flags to pass down to makes which are built with the target environment. 460# The double $ decreases the length of the command line; the variables 461# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. 462# If any variables are added here, they must be added to do-*, below. 463EXTRA_TARGET_FLAGS = \ 464 'AR=$$(AR_FOR_TARGET)' \ 465 'AS=$$(AS_FOR_TARGET)' \ 466 'CC=$$(CC_FOR_TARGET)' \ 467 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ 468 'CXX=$$(CXX_FOR_TARGET)' \ 469 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ 470 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ 471 'LD=$$(LD_FOR_TARGET)' \ 472 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ 473 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ 474 'NM=$$(NM_FOR_TARGET)' \ 475 'RANLIB=$$(RANLIB_FOR_TARGET)' \ 476 'WINDRES=$$(WINDRES_FOR_TARGET)' 477 478TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 479 480# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it 481# unfortunately needs the native compiler and the target ar and 482# ranlib. 483# If any variables are added here, they must be added to do-*, below. 484# The HOST_* variables are a special case, which are used for the gcc 485# cross-building scheme. 486EXTRA_GCC_FLAGS = \ 487 'AR=$(AR)' \ 488 'AS=$(AS)' \ 489 'CC=$(CC)' \ 490 'CXX=$(CXX)' \ 491 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ 492 'HOST_CC=$(CC_FOR_BUILD)' \ 493 'HOST_PREFIX=$(HOST_PREFIX)' \ 494 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \ 495 'NM=$(NM)' \ 496 'RANLIB=$(RANLIB)' \ 497 'WINDRES=$$(WINDRES_FOR_TARGET)' \ 498 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ 499 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \ 500 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \ 501 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \ 502 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \ 503 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ 504 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ 505 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \ 506 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \ 507 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" 508 509GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) 510 511# This is a list of the targets for all of the modules which are compiled 512# using $(FLAGS_TO_PASS). 513ALL_MODULES = \ 514 all-apache \ 515 all-ash \ 516 all-autoconf \ 517 all-automake \ 518 all-bash \ 519 all-bfd \ 520 all-binutils \ 521 all-bison \ 522 all-byacc \ 523 all-bzip2 \ 524 all-cvssrc \ 525 all-db \ 526 all-dejagnu \ 527 all-diff \ 528 all-dosutils \ 529 all-etc \ 530 all-fileutils \ 531 all-findutils \ 532 all-find \ 533 all-flex \ 534 all-gas \ 535 all-gawk \ 536 all-gettext \ 537 all-gnuserv \ 538 all-gprof \ 539 all-grep \ 540 all-grez \ 541 all-gzip \ 542 all-hello \ 543 all-indent \ 544 all-inet \ 545 all-intl \ 546 all-ispell \ 547 all-itcl \ 548 all-ld \ 549 all-libgui \ 550 all-libiberty \ 551 all-libtool \ 552 all-m4 \ 553 all-make \ 554 all-mmalloc \ 555 all-opcodes \ 556 all-patch \ 557 all-perl \ 558 all-prms \ 559 all-rcs \ 560 all-readline \ 561 all-release \ 562 all-recode \ 563 all-sed \ 564 all-send-pr \ 565 all-shellutils \ 566 all-sim \ 567 all-tar \ 568 all-tcl \ 569 all-tcl8.1 \ 570 all-texinfo \ 571 all-textutils \ 572 all-tgas \ 573 all-time \ 574 all-uudecode \ 575 all-wdiff \ 576 all-zip \ 577 $(EXTRA_TARGET_HOST_ALL_MODULES) 578 579# This is a list of the check targets for all of the modules which are 580# compiled using $(FLAGS_TO_PASS). 581# 582# The list is in two parts. The first lists those tools which 583# are tested as part of the host's native tool-chain, and not 584# tested in a cross configuration. 585NATIVE_CHECK_MODULES = \ 586 check-bison \ 587 check-byacc \ 588 check-flex \ 589 check-zip 590 591CROSS_CHECK_MODULES = \ 592 check-apache \ 593 check-ash \ 594 check-autoconf \ 595 check-automake \ 596 check-bash \ 597 check-bfd \ 598 check-binutils \ 599 check-bzip2 \ 600 check-cvssrc \ 601 check-db \ 602 check-dejagnu \ 603 check-diff \ 604 check-etc \ 605 check-fileutils \ 606 check-findutils \ 607 check-find \ 608 check-gas \ 609 check-gawk \ 610 check-gettext \ 611 check-gnuserv \ 612 check-gprof \ 613 check-grep \ 614 check-gzip \ 615 check-hello \ 616 check-indent \ 617 check-inet \ 618 check-intl \ 619 check-ispell \ 620 check-itcl \ 621 check-ld \ 622 check-libgui \ 623 check-libiberty \ 624 check-libtool \ 625 check-m4 \ 626 check-make \ 627 check-mmcheckoc \ 628 check-opcodes \ 629 check-patch \ 630 check-perl \ 631 check-prms \ 632 check-rcs \ 633 check-readline \ 634 check-recode \ 635 check-sed \ 636 check-send-pr \ 637 check-shellutils \ 638 check-sim \ 639 check-tar \ 640 check-tcl \ 641 check-texinfo \ 642 check-textutils \ 643 check-tgas \ 644 check-time \ 645 check-uudecode \ 646 check-wdiff \ 647 $(EXTRA_TARGET_HOST_CHECK_MODULES) 648 649CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) 650 651# This is a list of the install targets for all of the modules which are 652# compiled using $(FLAGS_TO_PASS). 653# We put install-opcodes before install-binutils because the installed 654# binutils might be on PATH, and they might need the shared opcodes 655# library. 656# We put install-tcl before install-itcl because itcl wants to run a 657# program on installation which uses the Tcl libraries. 658INSTALL_MODULES = \ 659 install-apache \ 660 install-ash \ 661 install-autoconf \ 662 install-automake \ 663 install-bash \ 664 install-bfd \ 665 install-bzip2 \ 666 install-opcodes \ 667 install-binutils \ 668 install-bison \ 669 install-byacc \ 670 install-cvssrc \ 671 install-db \ 672 install-dejagnu \ 673 install-diff \ 674 install-dosutils \ 675 install-etc \ 676 install-fileutils \ 677 install-findutils \ 678 install-find \ 679 install-flex \ 680 install-gas \ 681 install-gawk \ 682 install-gettext \ 683 install-gnuserv \ 684 install-gprof \ 685 install-grep \ 686 install-grez \ 687 install-gzip \ 688 install-hello \ 689 install-indent \ 690 install-inet \ 691 install-intl \ 692 install-ispell \ 693 install-tcl \ 694 install-tcl8.1 \ 695 install-itcl \ 696 install-ld \ 697 install-libgui \ 698 install-libiberty \ 699 install-libtool \ 700 install-m4 \ 701 install-make \ 702 install-mmalloc \ 703 install-patch \ 704 install-perl \ 705 install-prms \ 706 install-rcs \ 707 install-readline \ 708 install-recode \ 709 install-sed \ 710 install-send-pr \ 711 install-shellutils \ 712 install-sim \ 713 install-tar \ 714 install-textutils \ 715 install-tgas \ 716 install-time \ 717 install-uudecode \ 718 install-wdiff \ 719 install-zip \ 720 $(EXTRA_TARGET_HOST_INSTALL_MODULES) 721 722# This is a list of the targets for all of the modules which are compiled 723# using $(X11_FLAGS_TO_PASS). 724ALL_X11_MODULES = \ 725 all-emacs \ 726 all-emacs19 \ 727 all-gdb \ 728 all-expect \ 729 all-gash \ 730 all-guile \ 731 all-tclX \ 732 all-tk \ 733 all-tk8.1 \ 734 all-tix 735 736# This is a list of the check targets for all of the modules which are 737# compiled using $(X11_FLAGS_TO_PASS). 738CHECK_X11_MODULES = \ 739 check-emacs \ 740 check-gdb \ 741 check-guile \ 742 check-expect \ 743 check-gash \ 744 check-tclX \ 745 check-tk \ 746 check-tix 747 748# This is a list of the install targets for all the modules which are 749# compiled using $(X11_FLAGS_TO_PASS). 750INSTALL_X11_MODULES = \ 751 install-emacs \ 752 install-emacs19 \ 753 install-gdb \ 754 install-guile \ 755 install-expect \ 756 install-gash \ 757 install-tclX \ 758 install-tk \ 759 install-tk8.1 \ 760 install-tix 761 762# This is a list of the targets for all of the modules which are compiled 763# using $(TARGET_FLAGS_TO_PASS). 764ALL_TARGET_MODULES = \ 765 all-target-libio \ 766 all-target-libstdc++ \ 767 all-target-librx \ 768 all-target-libg++ \ 769 all-target-newlib \ 770 all-target-libtermcap \ 771 all-target-winsup \ 772 all-target-libgloss \ 773 all-target-libiberty \ 774 all-target-gperf \ 775 all-target-examples \ 776 all-target-libstub \ 777 all-target-bsp \ 778 all-target-cygmon 779 780# This is a list of the configure targets for all of the modules which 781# are compiled using the target tools. 782CONFIGURE_TARGET_MODULES = \ 783 configure-target-libio \ 784 configure-target-libstdc++ \ 785 configure-target-librx \ 786 configure-target-libg++ \ 787 configure-target-newlib \ 788 configure-target-libtermcap \ 789 configure-target-winsup \ 790 configure-target-libgloss \ 791 configure-target-libiberty \ 792 configure-target-gperf \ 793 configure-target-examples \ 794 configure-target-libstub \ 795 configure-target-bsp \ 796 configure-target-cygmon 797 798# This is a list of the check targets for all of the modules which are 799# compiled using $(TARGET_FLAGS_TO_PASS). 800CHECK_TARGET_MODULES = \ 801 check-target-libio \ 802 check-target-libstdc++ \ 803 check-target-libg++ \ 804 check-target-newlib \ 805 check-target-winsup \ 806 check-target-libiberty \ 807 check-target-gperf 808 809# This is a list of the install targets for all of the modules which are 810# compiled using $(TARGET_FLAGS_TO_PASS). 811INSTALL_TARGET_MODULES = \ 812 install-target-libio \ 813 install-target-libstdc++ \ 814 install-target-libg++ \ 815 install-target-newlib \ 816 install-target-libtermcap \ 817 install-target-winsup \ 818 install-target-libgloss \ 819 install-target-libiberty \ 820 install-target-bsp \ 821 install-target-gperf 822 823# This is a list of the targets for which we can do a clean-{target}. 824CLEAN_MODULES = \ 825 clean-apache \ 826 clean-ash \ 827 clean-autoconf \ 828 clean-automake \ 829 clean-bash \ 830 clean-bfd \ 831 clean-binutils \ 832 clean-bison \ 833 clean-byacc \ 834 clean-bzip2 \ 835 clean-cvssrc \ 836 clean-db \ 837 clean-dejagnu \ 838 clean-diff \ 839 clean-dosutils \ 840 clean-etc \ 841 clean-fileutils \ 842 clean-findutils \ 843 clean-find \ 844 clean-flex \ 845 clean-gas \ 846 clean-gawk \ 847 clean-gettext \ 848 clean-gnuserv \ 849 clean-gprof \ 850 clean-grep \ 851 clean-grez \ 852 clean-gzip \ 853 clean-hello \ 854 clean-indent \ 855 clean-inet \ 856 clean-intl \ 857 clean-ispell \ 858 clean-itcl \ 859 clean-ld \ 860 clean-libgui \ 861 clean-libiberty \ 862 clean-libtool \ 863 clean-m4 \ 864 clean-make \ 865 clean-mmalloc \ 866 clean-opcodes \ 867 clean-patch \ 868 clean-perl \ 869 clean-prms \ 870 clean-rcs \ 871 clean-readline \ 872 clean-release \ 873 clean-recode \ 874 clean-sed \ 875 clean-send-pr \ 876 clean-shellutils \ 877 clean-sim \ 878 clean-tar \ 879 clean-tcl \ 880 clean-texinfo \ 881 clean-textutils \ 882 clean-tgas \ 883 clean-time \ 884 clean-uudecode \ 885 clean-wdiff \ 886 clean-zip 887 888# All of the target modules that can be cleaned 889CLEAN_TARGET_MODULES = \ 890 clean-target-libio \ 891 clean-target-libstdc++ \ 892 clean-target-librx \ 893 clean-target-libg++ \ 894 clean-target-newlib \ 895 clean-target-winsup \ 896 clean-target-libgloss \ 897 clean-target-libiberty \ 898 clean-target-gperf \ 899 clean-target-examples \ 900 clean-target-libstub \ 901 clean-target-bsp \ 902 clean-target-cygmon 903 904# All of the x11 modules that can be cleaned 905CLEAN_X11_MODULES = \ 906 clean-emacs \ 907 clean-emacs19 \ 908 clean-gdb \ 909 clean-expect \ 910 clean-gash \ 911 clean-guile \ 912 clean-tclX \ 913 clean-tk \ 914 clean-tix 915 916# The target built for a native build. 917.PHONY: all.normal 918all.normal: \ 919 $(ALL_MODULES) \ 920 $(ALL_X11_MODULES) \ 921 $(ALL_TARGET_MODULES) \ 922 all-gcc 923 924# Do a target for all the subdirectories. A ``make do-X'' will do a 925# ``make X'' in all subdirectories (because, in general, there is a 926# dependency (below) of X upon do-X, a ``make X'' will also do this, 927# but it may do additional work as well). 928# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, 929# because it is so large that it can easily overflow the command line 930# length limit on some systems. 931DO_X = \ 932 do-clean \ 933 do-distclean \ 934 do-dvi \ 935 do-info \ 936 do-install-info \ 937 do-installcheck \ 938 do-mostlyclean \ 939 do-maintainer-clean \ 940 do-TAGS 941.PHONY: $(DO_X) 942$(DO_X): 943 @target=`echo $@ | sed -e 's/^do-//'`; \ 944 r=`pwd`; export r; \ 945 s=`cd $(srcdir); pwd`; export s; \ 946 $(SET_LIB_PATH) \ 947 for i in $(SUBDIRS) -dummy-; do \ 948 if [ -f ./$$i/Makefile ]; then \ 949 case $$i in \ 950 gcc) \ 951 for flag in $(EXTRA_GCC_FLAGS); do \ 952 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ 953 done; \ 954 ;; \ 955 *) \ 956 for flag in $(EXTRA_HOST_FLAGS); do \ 957 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ 958 done; \ 959 ;; \ 960 esac ; \ 961 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ 962 if (cd ./$$i; \ 963 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ 964 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ 965 "RANLIB=$${RANLIB}" \ 966 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ 967 $${target}); \ 968 then true; else exit 1; fi; \ 969 else true; fi; \ 970 done 971 @target=`echo $@ | sed -e 's/^do-//'`; \ 972 r=`pwd`; export r; \ 973 s=`cd $(srcdir); pwd`; export s; \ 974 $(SET_LIB_PATH) \ 975 for i in $(TARGET_CONFIGDIRS) -dummy-; do \ 976 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ 977 for flag in $(EXTRA_TARGET_FLAGS); do \ 978 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ 979 done; \ 980 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ 981 if (cd $(TARGET_SUBDIR)/$$i; \ 982 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ 983 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ 984 "RANLIB=$${RANLIB}" \ 985 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ 986 $${target}); \ 987 then true; else exit 1; fi; \ 988 else true; fi; \ 989 done 990 991# Here are the targets which correspond to the do-X targets. 992 993.PHONY: info installcheck dvi install-info 994.PHONY: clean distclean mostlyclean maintainer-clean realclean 995.PHONY: local-clean local-distclean local-maintainer-clean 996info: do-info 997installcheck: do-installcheck 998dvi: do-dvi 999 1000# Make sure makeinfo is built before we do a `make info'. 1001do-info: all-texinfo 1002 1003install-info: do-install-info dir.info 1004 s=`cd $(srcdir); pwd`; export s; \ 1005 if [ -f dir.info ] ; then \ 1006 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ 1007 else true ; fi 1008 1009local-clean: 1010 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log 1011 1012local-distclean: 1013 -rm -f Makefile config.status config.cache mh-frag mt-frag 1014 -if [ "$(TARGET_SUBDIR)" != "." ]; then \ 1015 rm -rf $(TARGET_SUBDIR); \ 1016 else true; fi 1017 1018local-maintainer-clean: 1019 @echo "This command is intended for maintainers to use;" 1020 @echo "it deletes files that may require special tools to rebuild." 1021 1022clean: do-clean local-clean 1023mostlyclean: do-mostlyclean local-clean 1024distclean: do-distclean local-clean local-distclean 1025maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean 1026maintainer-clean: local-distclean 1027realclean: maintainer-clean 1028 1029# This rule is used to clean specific modules. 1030.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc 1031$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc: 1032 @dir=`echo $@ | sed -e 's/clean-//'`; \ 1033 if [ -f ./$${dir}/Makefile ] ; then \ 1034 r=`pwd`; export r; \ 1035 s=`cd $(srcdir); pwd`; export s; \ 1036 $(SET_LIB_PATH) \ 1037 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \ 1038 else \ 1039 true; \ 1040 fi 1041 1042.PHONY: $(CLEAN_TARGET_MODULES) 1043$(CLEAN_TARGET_MODULES): 1044 @dir=`echo $@ | sed -e 's/clean-target-//'`; \ 1045 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ 1046 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ 1047 r=`pwd`; export r; \ 1048 s=`cd $(srcdir); pwd`; export s; \ 1049 $(SET_LIB_PATH) \ 1050 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \ 1051 else \ 1052 true; \ 1053 fi 1054 1055clean-target: $(CLEAN_TARGET_MODULES) 1056 1057# Check target. 1058 1059.PHONY: check 1060check: $(CHECK_MODULES) \ 1061 $(CHECK_TARGET_MODULES) \ 1062 $(CHECK_X11_MODULES) \ 1063 check-gcc 1064 1065# Automated reporting of test results. 1066 1067warning.log: build.log 1068 $(srcdir)/contrib/warn_summary build.log > $@ 1069 1070mail-report.log: 1071 if test x'$(BOOT_CFLAGS)' != x''; then \ 1072 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ 1073 fi; \ 1074 $(srcdir)/contrib/test_summary -t >$@ 1075 chmod +x $@ 1076 echo If you really want to send e-mail, run ./$@ now 1077 1078mail-report-with-warnings.log: warning.log 1079 if test x'$(BOOT_CFLAGS)' != x''; then \ 1080 BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ 1081 fi; \ 1082 $(srcdir)/contrib/test_summary -t -i warning.log >$@ 1083 chmod +x $@ 1084 echo If you really want to send e-mail, run ./$@ now 1085 1086# Installation targets. 1087 1088.PHONY: install install-cross uninstall source-vault binary-vault vault-install 1089install: $(INSTALL_TARGET) 1090install-cross: $(INSTALL_TARGET_CROSS) 1091 1092uninstall: 1093 @echo "the uninstall target is not supported in this tree" 1094 1095source-vault: 1096 $(MAKE) -f ./release/Build-A-Release \ 1097 host=$(host_alias) source-vault 1098 1099binary-vault: 1100 $(MAKE) -f ./release/Build-A-Release \ 1101 host=$(host_alias) target=$(target_alias) 1102 1103vault-install: 1104 @if [ -f ./release/vault-install ] ; then \ 1105 ./release/vault-install $(host_alias) $(target_alias) ; \ 1106 else \ 1107 true ; \ 1108 fi 1109 1110.PHONY: install.all 1111install.all: install-no-fixedincludes 1112 @if [ -f ./gcc/Makefile ] ; then \ 1113 r=`pwd` ; export r ; \ 1114 $(SET_LIB_PATH) \ 1115 (cd ./gcc; \ 1116 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ 1117 else \ 1118 true ; \ 1119 fi 1120 1121# inet-install is used because the I*Net wants DejaGNU installed but 1122# not built. Similarly, gzip is built but not installed. 1123inet-install: 1124 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install 1125 1126# install-no-fixedincludes is used because Cygnus can not distribute 1127# the fixed header files. 1128.PHONY: install-no-fixedincludes 1129install-no-fixedincludes: \ 1130 installdirs \ 1131 $(INSTALL_MODULES) \ 1132 $(INSTALL_TARGET_MODULES) \ 1133 $(INSTALL_X11_MODULES) \ 1134 gcc-no-fixedincludes 1135 1136# Install the gcc headers files, but not the fixed include files, 1137# which Cygnus is not allowed to distribute. This rule is very 1138# dependent on the workings of the gcc Makefile.in. 1139.PHONY: gcc-no-fixedincludes 1140gcc-no-fixedincludes: 1141 @if [ -f ./gcc/Makefile ]; then \ 1142 rm -rf gcc/tmp-include; \ 1143 mv gcc/include gcc/tmp-include 2>/dev/null; \ 1144 mkdir gcc/include; \ 1145 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ 1146 touch gcc/stmp-fixinc gcc/include/fixed; \ 1147 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ 1148 r=`pwd`; export r; \ 1149 s=`cd $(srcdir); pwd` ; export s; \ 1150 $(SET_LIB_PATH) \ 1151 (cd ./gcc; \ 1152 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ 1153 rm -rf gcc/include; \ 1154 mv gcc/tmp-include gcc/include 2>/dev/null; \ 1155 else true; fi 1156 1157 1158# This rule is used to build the modules which use FLAGS_TO_PASS. To 1159# build a target all-X means to cd to X and make all. 1160# 1161# all-gui, and all-libproc are handled specially because 1162# they are still experimental, and if they fail to build, that 1163# shouldn't stop "make all". 1164.PHONY: $(ALL_MODULES) all-gui all-libproc 1165$(ALL_MODULES) all-gui all-libproc: 1166 @dir=`echo $@ | sed -e 's/all-//'`; \ 1167 if [ -f ./$${dir}/Makefile ] ; then \ 1168 r=`pwd`; export r; \ 1169 s=`cd $(srcdir); pwd`; export s; \ 1170 $(SET_LIB_PATH) \ 1171 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ 1172 else \ 1173 true; \ 1174 fi 1175 1176# These rules are used to check the modules which use FLAGS_TO_PASS. 1177# To build a target check-X means to cd to X and make check. Some 1178# modules are only tested in a native toolchain. 1179 1180.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) 1181$(NATIVE_CHECK_MODULES): 1182 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ 1183 dir=`echo $@ | sed -e 's/check-//'`; \ 1184 if [ -f ./$${dir}/Makefile ] ; then \ 1185 r=`pwd`; export r; \ 1186 s=`cd $(srcdir); pwd`; export s; \ 1187 $(SET_LIB_PATH) \ 1188 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ 1189 else \ 1190 true; \ 1191 fi; \ 1192 fi 1193 1194$(CROSS_CHECK_MODULES): 1195 @dir=`echo $@ | sed -e 's/check-//'`; \ 1196 if [ -f ./$${dir}/Makefile ] ; then \ 1197 r=`pwd`; export r; \ 1198 s=`cd $(srcdir); pwd`; export s; \ 1199 $(SET_LIB_PATH) \ 1200 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ 1201 else \ 1202 true; \ 1203 fi 1204 1205# This rule is used to install the modules which use FLAGS_TO_PASS. 1206# To build a target install-X means to cd to X and make install. 1207.PHONY: $(INSTALL_MODULES) 1208$(INSTALL_MODULES): installdirs 1209 @dir=`echo $@ | sed -e 's/install-//'`; \ 1210 if [ -f ./$${dir}/Makefile ] ; then \ 1211 r=`pwd`; export r; \ 1212 s=`cd $(srcdir); pwd`; export s; \ 1213 $(SET_LIB_PATH) \ 1214 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ 1215 else \ 1216 true; \ 1217 fi 1218 1219# This rule is used to configure the modules which are built with the 1220# target tools. 1221.PHONY: $(CONFIGURE_TARGET_MODULES) 1222$(CONFIGURE_TARGET_MODULES): 1223 @dir=`echo $@ | sed -e 's/configure-target-//'`; \ 1224 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \ 1225 r=`pwd`; export r; \ 1226 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \ 1227 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \ 1228 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \ 1229 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \ 1230 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ 1231 else \ 1232 echo "Multilibs changed for $${dir}, reconfiguring"; \ 1233 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \ 1234 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ 1235 fi; \ 1236 else \ 1237 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ 1238 fi; \ 1239 fi; \ 1240 fi; exit 0 # break command into two pieces 1241 @dir=`echo $@ | sed -e 's/configure-target-//'`; \ 1242 if [ ! -d $(TARGET_SUBDIR) ]; then \ 1243 true; \ 1244 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ 1245 true; \ 1246 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ 1247 if [ -d $(srcdir)/$${dir} ]; then \ 1248 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\ 1249 r=`pwd`; export r; \ 1250 s=`cd $(srcdir); pwd`; export s; \ 1251 $(SET_LIB_PATH) \ 1252 AR="$(AR_FOR_TARGET)"; export AR; \ 1253 AS="$(AS_FOR_TARGET)"; export AS; \ 1254 CC="$(CC_FOR_TARGET)"; export CC; \ 1255 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ 1256 CXX="$(CXX_FOR_TARGET)"; export CXX; \ 1257 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ 1258 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ 1259 LD="$(LD_FOR_TARGET)"; export LD; \ 1260 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ 1261 NM="$(NM_FOR_TARGET)"; export NM; \ 1262 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ 1263 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ 1264 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \ 1265 cd $(TARGET_SUBDIR)/$${dir}; \ 1266 case $(srcdir) in \ 1267 /*) \ 1268 topdir=$(srcdir) ;; \ 1269 *) \ 1270 case "$(TARGET_SUBDIR)" in \ 1271 .) topdir="../$(srcdir)" ;; \ 1272 *) topdir="../../$(srcdir)" ;; \ 1273 esac ;; \ 1274 esac; \ 1275 if [ "$(srcdir)" = "." ] ; then \ 1276 if [ "$(TARGET_SUBDIR)" != "." ] ; then \ 1277 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \ 1278 if [ -f Makefile ]; then \ 1279 if $(MAKE) distclean; then \ 1280 true; \ 1281 else \ 1282 exit 1; \ 1283 fi; \ 1284 else \ 1285 true; \ 1286 fi; \ 1287 else \ 1288 exit 1; \ 1289 fi; \ 1290 else \ 1291 true; \ 1292 fi; \ 1293 srcdiroption="--srcdir=."; \ 1294 libsrcdir="."; \ 1295 else \ 1296 srcdiroption="--srcdir=$${topdir}/$${dir}"; \ 1297 libsrcdir="$$s/$${dir}"; \ 1298 fi; \ 1299 if [ -f $${libsrcdir}/configure ] ; then \ 1300 rm -f no-such-file skip-this-dir; \ 1301 CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ 1302 $(CONFIG_ARGUMENTS) $${srcdiroption} \ 1303 --with-target-subdir="$(TARGET_SUBDIR)"; \ 1304 else \ 1305 rm -f no-such-file skip-this-dir; \ 1306 CONFIG_SITE=no-such-file $(SHELL) $$s/configure \ 1307 $(CONFIG_ARGUMENTS) $${srcdiroption} \ 1308 --with-target-subdir="$(TARGET_SUBDIR)"; \ 1309 fi; \ 1310 if [ -f skip-this-dir ] ; then \ 1311 sh skip-this-dir; \ 1312 rm -f skip-this-dir; \ 1313 cd ..; rmdir $${dir} || true; \ 1314 else \ 1315 true; \ 1316 fi; \ 1317 else \ 1318 true; \ 1319 fi; \ 1320 else \ 1321 true; \ 1322 fi 1323 1324# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. 1325# To build a target all-X means to cd to X and make all. 1326.PHONY: $(ALL_TARGET_MODULES) 1327$(ALL_TARGET_MODULES): 1328 @dir=`echo $@ | sed -e 's/all-target-//'`; \ 1329 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ 1330 r=`pwd`; export r; \ 1331 s=`cd $(srcdir); pwd`; export s; \ 1332 $(SET_LIB_PATH) \ 1333 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ 1334 else \ 1335 true; \ 1336 fi 1337 1338# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS. 1339# To build a target install-X means to cd to X and make install. 1340.PHONY: $(CHECK_TARGET_MODULES) 1341$(CHECK_TARGET_MODULES): 1342 @dir=`echo $@ | sed -e 's/check-target-//'`; \ 1343 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ 1344 r=`pwd`; export r; \ 1345 s=`cd $(srcdir); pwd`; export s; \ 1346 $(SET_LIB_PATH) \ 1347 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\ 1348 else \ 1349 true; \ 1350 fi 1351 1352# This rule is used to install the modules which use 1353# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X 1354# and make install. 1355.PHONY: $(INSTALL_TARGET_MODULES) 1356$(INSTALL_TARGET_MODULES): installdirs 1357 @dir=`echo $@ | sed -e 's/install-target-//'`; \ 1358 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ 1359 r=`pwd`; export r; \ 1360 s=`cd $(srcdir); pwd`; export s; \ 1361 $(SET_LIB_PATH) \ 1362 (cd $(TARGET_SUBDIR)/$${dir}; \ 1363 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ 1364 else \ 1365 true; \ 1366 fi 1367 1368# This rule is used to build the modules which use X11_FLAGS_TO_PASS. 1369# To build a target all-X means to cd to X and make all. 1370.PHONY: $(ALL_X11_MODULES) 1371$(ALL_X11_MODULES): 1372 @dir=`echo $@ | sed -e 's/all-//'`; \ 1373 if [ -f ./$${dir}/Makefile ] ; then \ 1374 r=`pwd`; export r; \ 1375 s=`cd $(srcdir); pwd`; export s; \ 1376 $(SET_LIB_PATH) \ 1377 (cd $${dir}; \ 1378 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ 1379 else \ 1380 true; \ 1381 fi 1382 1383# This rule is used to check the modules which use X11_FLAGS_TO_PASS. 1384# To build a target check-X means to cd to X and make all. 1385.PHONY: $(CHECK_X11_MODULES) 1386$(CHECK_X11_MODULES): 1387 @dir=`echo $@ | sed -e 's/check-//'`; \ 1388 if [ -f ./$${dir}/Makefile ] ; then \ 1389 r=`pwd`; export r; \ 1390 s=`cd $(srcdir); pwd`; export s; \ 1391 $(SET_LIB_PATH) \ 1392 (cd $${dir}; \ 1393 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ 1394 else \ 1395 true; \ 1396 fi 1397 1398# This rule is used to install the modules which use X11_FLAGS_TO_PASS. 1399# To build a target install-X means to cd to X and make install. 1400.PHONY: $(INSTALL_X11_MODULES) 1401$(INSTALL_X11_MODULES): installdirs 1402 @dir=`echo $@ | sed -e 's/install-//'`; \ 1403 if [ -f ./$${dir}/Makefile ] ; then \ 1404 r=`pwd`; export r; \ 1405 s=`cd $(srcdir); pwd`; export s; \ 1406 $(SET_LIB_PATH) \ 1407 (cd $${dir}; \ 1408 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ 1409 else \ 1410 true; \ 1411 fi 1412 1413# gcc is the only module which uses GCC_FLAGS_TO_PASS. 1414.PHONY: all-gcc 1415all-gcc: 1416 @if [ -f ./gcc/Makefile ] ; then \ 1417 r=`pwd`; export r; \ 1418 s=`cd $(srcdir); pwd`; export s; \ 1419 $(SET_LIB_PATH) \ 1420 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ 1421 else \ 1422 true; \ 1423 fi 1424 1425# Building GCC uses some tools for rebuilding "source" files 1426# like texinfo, bison/byacc, etc. So we must depend on those. 1427# 1428# While building GCC, it may be necessary to run various target 1429# programs like the assembler, linker, etc. So we depend on 1430# those too. 1431# 1432# In theory, on an SMP all those dependencies can be resolved 1433# in parallel. 1434# 1435.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean 1436bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld 1437 @r=`pwd`; export r; \ 1438 s=`cd $(srcdir); pwd`; export s; \ 1439 $(SET_LIB_PATH) \ 1440 echo "Bootstrapping the compiler"; \ 1441 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@ 1442 @r=`pwd`; export r; \ 1443 s=`cd $(srcdir); pwd`; export s; \ 1444 case "$@" in \ 1445 *bootstrap4-lean ) \ 1446 msg="Comparing stage3 and stage4 of the compiler"; \ 1447 compare=compare3-lean ;; \ 1448 *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \ 1449 compare=compare3 ;; \ 1450 *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \ 1451 compare=compare-lean ;; \ 1452 * ) msg="Comparing stage2 and stage3 of the compiler"; \ 1453 compare=compare ;; \ 1454 esac; \ 1455 $(SET_LIB_PATH) \ 1456 echo "$$msg"; \ 1457 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare 1458 @r=`pwd`; export r; \ 1459 s=`cd $(srcdir); pwd` ; export s; \ 1460 $(SET_LIB_PATH) \ 1461 echo "Building runtime libraries"; \ 1462 $(MAKE) $(BASE_FLAGS_TO_PASS) all 1463 1464.PHONY: cross 1465cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld 1466 @r=`pwd`; export r; \ 1467 s=`cd $(srcdir); pwd`; export s; \ 1468 $(SET_LIB_PATH) \ 1469 echo "Building the C and C++ compiler"; \ 1470 cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" 1471 @r=`pwd`; export r; \ 1472 s=`cd $(srcdir); pwd` ; export s; \ 1473 $(SET_LIB_PATH) \ 1474 echo "Building runtime libraries"; \ 1475 $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++" 1476 1477.PHONY: check-gcc 1478check-gcc: 1479 @if [ -f ./gcc/Makefile ] ; then \ 1480 r=`pwd`; export r; \ 1481 s=`cd $(srcdir); pwd`; export s; \ 1482 $(SET_LIB_PATH) \ 1483 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ 1484 else \ 1485 true; \ 1486 fi 1487 1488.PHONY: install-gcc 1489install-gcc: 1490 @if [ -f ./gcc/Makefile ] ; then \ 1491 r=`pwd`; export r; \ 1492 s=`cd $(srcdir); pwd`; export s; \ 1493 $(SET_LIB_PATH) \ 1494 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ 1495 else \ 1496 true; \ 1497 fi 1498 1499.PHONY: install-gcc-cross 1500install-gcc-cross: 1501 @if [ -f ./gcc/Makefile ] ; then \ 1502 r=`pwd`; export r; \ 1503 s=`cd $(srcdir); pwd`; export s; \ 1504 $(SET_LIB_PATH) \ 1505 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \ 1506 else \ 1507 true; \ 1508 fi 1509# EXPERIMENTAL STUFF 1510# This rule is used to install the modules which use FLAGS_TO_PASS. 1511# To build a target install-X means to cd to X and make install. 1512.PHONY: install-dosrel 1513install-dosrel: installdirs info 1514 @dir=`echo $@ | sed -e 's/install-//'`; \ 1515 if [ -f ./$${dir}/Makefile ] ; then \ 1516 r=`pwd`; export r; \ 1517 s=`cd $(srcdir); pwd`; export s; \ 1518 $(SET_LIB_PATH) \ 1519 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ 1520 else \ 1521 true; \ 1522 fi 1523 1524install-dosrel-fake: 1525 1526 1527# This is a list of inter-dependencies among modules. 1528all-apache: 1529all-ash: 1530all-autoconf: all-m4 all-texinfo 1531all-automake: all-m4 all-texinfo 1532all-bash: 1533all-bfd: all-libiberty all-intl 1534all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl 1535all-bison: all-texinfo 1536configure-target-bsp: $(ALL_GCC) 1537all-target-bsp: configure-target-bsp all-gcc all-binutils all-target-newlib 1538all-byacc: 1539all-bzip2: 1540all-cvssrc: 1541configure-target-cygmon: $(ALL_GCC) 1542all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub all-target-bsp 1543all-db: 1544all-dejagnu: all-tcl all-expect all-tk 1545all-diff: all-libiberty 1546all-emacs: 1547all-emacs19: all-bison all-byacc 1548all-etc: 1549configure-target-examples: $(ALL_GCC) 1550all-target-examples: configure-target-examples 1551all-expect: all-tcl all-tk 1552all-fileutils: all-libiberty 1553all-findutils: 1554all-find: 1555all-flex: all-libiberty all-bison all-byacc 1556all-gas: all-libiberty all-opcodes all-bfd all-intl 1557all-gash: all-tcl 1558all-gawk: 1559ALL_GCC = all-gcc 1560all-gcc: all-bison all-byacc all-binutils all-gas all-ld 1561all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld 1562GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui 1563all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK) 1564all-gettext: 1565all-gnuserv: 1566configure-target-gperf: $(ALL_GCC) 1567all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++ 1568all-gprof: all-libiberty all-bfd all-opcodes all-intl 1569all-grez: all-libiberty all-bfd all-opcodes 1570all-gui: all-gdb all-libproc all-target-librx 1571all-guile: 1572all-gzip: all-libiberty 1573all-hello: all-libiberty 1574all-indent: 1575all-inet: all-tcl all-send-pr all-perl 1576all-intl: 1577all-ispell: all-emacs19 1578all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1 1579all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl 1580configure-target-libg++: $(ALL_GCC) configure-target-librx 1581all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++ 1582configure-target-libgloss: $(ALL_GCC) 1583all-target-libgloss: configure-target-libgloss configure-target-newlib 1584configure-target-libio: $(ALL_GCC) 1585all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib 1586check-target-libio: 1587all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl 1588all-libiberty: 1589configure-target-librx: $(ALL_GCC) configure-target-newlib 1590all-target-librx: configure-target-librx 1591configure-target-libstdc++: $(ALL_GCC) 1592all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio 1593configure-target-libstub: $(ALL_GCC) 1594all-target-libstub: configure-target-libstub 1595all-libtool: 1596all-m4: all-libiberty 1597all-make: all-libiberty 1598all-mmalloc: 1599configure-target-newlib: $(ALL_GCC) 1600configure-target-libtermcap: $(ALL_GCC) 1601all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc 1602all-target-libtermcap: configure-target-libtermcap all-binutils all-gas all-gcc 1603all-opcodes: all-bfd all-libiberty 1604all-patch: all-libiberty 1605all-perl: 1606all-prms: all-libiberty 1607all-rcs: 1608all-readline: 1609all-recode: all-libiberty 1610all-sed: all-libiberty 1611all-send-pr: all-prms 1612all-shellutils: 1613all-sim: all-libiberty all-bfd all-opcodes all-readline 1614all-tar: all-libiberty 1615all-tcl: 1616all-tcl8.1: 1617all-tclX: all-tcl all-tk 1618all-tk: all-tcl 1619all-tk8.1: all-tcl8.1 1620all-texinfo: all-libiberty 1621all-textutils: 1622all-tgas: all-libiberty all-bfd all-opcodes 1623all-time: 1624all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1 1625all-wdiff: 1626all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup 1627configure-target-winsup: configure-target-newlib 1628all-uudecode: all-libiberty 1629all-zip: 1630configure-target-libiberty: $(ALL_GCC) 1631all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib 1632all-target: $(ALL_TARGET_MODULES) 1633install-target: $(INSTALL_TARGET_MODULES) 1634install-gdb: install-tcl install-tk install-itcl install-tix install-libgui 1635### other supporting targets 1636 1637MAKEDIRS= \ 1638 $(prefix) \ 1639 $(exec_prefix) 1640.PHONY: installdirs 1641installdirs: mkinstalldirs 1642 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) 1643 1644dir.info: do-install-info 1645 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ 1646 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ 1647 mv -f dir.info.new dir.info ; \ 1648 else true ; \ 1649 fi 1650 1651dist: 1652 @echo "Building a full distribution of this tree isn't done" 1653 @echo "via 'make dist'. Check out the etc/ subdirectory" 1654 1655etags tags: TAGS 1656 1657# Right now this just builds TAGS in each subdirectory. emacs19 has the 1658# ability to use several tags files at once, so there is probably no need 1659# to combine them into one big TAGS file (like CVS 1.3 does). We could 1660# (if we felt like it) have this Makefile write a piece of elisp which 1661# the user could load to tell emacs19 where all the TAGS files we just 1662# built are. 1663TAGS: do-TAGS 1664 1665# with the gnu make, this is done automatically. 1666 1667Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger) 1668 $(SHELL) ./config.status 1669 1670# 1671# Support for building net releases 1672 1673# Files in devo used in any net release. 1674# ChangeLog omitted because it may refer to files which are not in this 1675# distribution (perhaps it would be better to include it anyway). 1676DEVO_SUPPORT= README Makefile.in configure configure.in \ 1677 config.guess config.if config.sub config move-if-change \ 1678 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ 1679 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ 1680 mkinstalldirs ltconfig ltmain.sh missing ylwrap 1681 1682# Files in devo/etc used in any net release. 1683# ChangeLog omitted because it may refer to files which are not in this 1684# distribution (perhaps it would be better to include it anyway). 1685ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ 1686 make-stds.texi standards.info* 1687 1688# When you use `make setup-dirs' or `make taz' you should always redefine 1689# this macro. 1690SUPPORT_FILES = list-of-support-files-for-tool-in-question 1691 1692.PHONY: taz 1693 1694taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex 1695 # Take out texinfo from a few places. 1696 sed -e '/^all\.normal: /s/\all-texinfo //' \ 1697 -e '/^ install-texinfo /d' \ 1698 <Makefile.in >tmp 1699 mv -f tmp Makefile.in 1700 # 1701 ./configure sun4 1702 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \ 1703 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \ 1704 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)" 1705 # Make links, and run "make diststuff" or "make info" when needed. 1706 rm -rf proto-toplev ; mkdir proto-toplev 1707 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ 1708 for d in $$dirs ; do \ 1709 if [ -d $$d ]; then \ 1710 if [ ! -f $$d/Makefile ] ; then true ; \ 1711 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \ 1712 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \ 1713 elif grep '^info:' $$d/Makefile >/dev/null ; then \ 1714 (cd $$d ; $(MAKE) info ) || exit 1 ; \ 1715 fi ; \ 1716 if [ -d $$d/proto-$$d.dir ]; then \ 1717 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ 1718 else \ 1719 ln -s ../$$d proto-toplev/$$d ; \ 1720 fi ; \ 1721 else ln -s ../$$d proto-toplev/$$d ; fi ; \ 1722 done 1723 cd etc ; $(MAKE) info 1724 $(MAKE) distclean 1725 # 1726 mkdir proto-toplev/etc 1727 (cd proto-toplev/etc; \ 1728 for i in $(ETC_SUPPORT); do \ 1729 ln -s ../../etc/$$i . ; \ 1730 done) 1731 # 1732 # Take out texinfo from configurable dirs 1733 rm proto-toplev/configure.in 1734 sed -e '/^host_tools=/s/texinfo //' \ 1735 <configure.in >proto-toplev/configure.in 1736 # 1737 mkdir proto-toplev/texinfo 1738 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ 1739 if test -r texinfo/util/tex3patch ; then \ 1740 mkdir proto-toplev/texinfo/util && \ 1741 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \ 1742 else true; fi 1743 chmod -R og=u . || chmod og=u `find . -print` 1744 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ 1745 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \ 1746 else \ 1747 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \ 1748 fi; \ 1749 if test x"$(PACKAGE)" = x; then \ 1750 package="$(TOOL)"; \ 1751 else \ 1752 package="$(PACKAGE)"; \ 1753 fi; \ 1754 $(MAKE) -f Makefile.in do-tar-bz2 TOOL=$(TOOL) VER=$$ver PACKAGE=$$package 1755 1756do-tar-bz2: 1757 echo "==> Making $(PACKAGE)-$(VER).tar.bz2" 1758 -rm -f $(PACKAGE)-$(VER) 1759 ln -s proto-toplev $(PACKAGE)-$(VER) 1760 tar cfh $(PACKAGE)-$(VER).tar $(PACKAGE)-$(VER) 1761 $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar 1762 1763TEXINFO_SUPPORT= texinfo/texinfo.tex 1764DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) 1765 1766.PHONY: gas.tar.bz2 1767GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep 1768gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas 1769 $(MAKE) -f Makefile.in taz TOOL=gas \ 1770 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" 1771 1772# The FSF "binutils" release includes gprof and ld. 1773.PHONY: binutils.tar.bz2 1774BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep 1775binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils 1776 $(MAKE) -f Makefile.in taz TOOL=binutils \ 1777 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)" 1778 1779.PHONY: gas+binutils.tar.bz2 1780GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof 1781gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas 1782 $(MAKE) -f Makefile.in taz TOOL=gas \ 1783 SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" 1784 1785.PHONY: libg++.tar.bz2 1786LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty 1787libg++.tar.bz2: $(DIST_SUPPORT) libg++ 1788 $(MAKE) -f Makefile.in taz TOOL=libg++ \ 1789 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" 1790 1791GNATS_SUPPORT_DIRS=include libiberty send-pr 1792gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats 1793 $(MAKE) -f Makefile.in taz TOOL=gnats \ 1794 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" 1795 1796.PHONY: gdb.tar.bz2 1797GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl 1798gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb 1799 $(MAKE) -f Makefile.in taz TOOL=gdb \ 1800 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" 1801 1802.PHONY: dejagnu.tar.bz2 1803DEJAGNU_SUPPORT_DIRS= tcl expect libiberty 1804dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu 1805 $(MAKE) -f Makefile.in taz TOOL=dejagnu \ 1806 SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)" 1807 1808.PHONY: gdb+dejagnu.tar.bz2 1809GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu 1810gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb 1811 $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=gdb+dejagnu \ 1812 SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" 1813 1814.PHONY: insight.tar.bz2 1815INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui 1816insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb 1817 $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=insight \ 1818 SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" 1819 1820.PHONY: insight+dejagnu.tar.bz2 1821INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu 1822insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb 1823 $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE="insight+dejagnu" \ 1824 SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" 1825 1826.PHONY: newlib.tar.bz2 1827NEWLIB_SUPPORT_DIRS=libgloss 1828# taz configures for the sun4 target which won't configure newlib. 1829# We need newlib configured so that the .info files are made. 1830# Unfortunately, it is not enough to just configure newlib separately: 1831# taz will build the .info files but since SUBDIRS won't contain newlib, 1832# distclean won't be run (leaving Makefile, config.status, and the tmp files 1833# used in building the .info files, eg: *.def, *.ref). 1834# The problem isn't solvable however without a lot of extra work because 1835# target libraries are built in subdir $(target_alias) which gets nuked during 1836# the make distclean. For now punt on the issue of shipping newlib info files 1837# with newlib net releases and wait for a day when some native target (sun4?) 1838# supports newlib (if only minimally). 1839newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib 1840 $(MAKE) -f Makefile.in taz TOOL=newlib \ 1841 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ 1842 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib 1843 1844.NOEXPORT: 1845MAKEOVERRIDES= 1846 1847# end of Makefile.in 1848