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