Makefile revision 3661
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# CDDL HEADER START
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# or http://www.opensolaris.org/os/licensing.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# See the License for the specific language governing permissions
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# and limitations under the License.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# information: Portions Copyright [yyyy] [name of copyright owner]
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# CDDL HEADER END
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halleyinclude ../../make-rules/shared-macros.mk
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCOMPONENT_NAME= bash
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCOMPONENT_VERSION= 4.1
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCOMPONENT_PROJECT_URL= http://www.gnu.org/software/bash/
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_ARCHIVE_HASH= \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sha256:3f627124a83c6d34db503a923e20710d370573a29dd5d11d6f116d1aee7be1da
704e6c8876907aac0bf7380effca8bca400d4acdMark AndrewsCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/bash/$(COMPONENT_ARCHIVE)
704e6c8876907aac0bf7380effca8bca400d4acdMark AndrewsCOMPONENT_BUGDB= utility/bash
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark AndrewsTPNO= 7265
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews
3398334b3acda24b086957286288ca9852662b12Automatic Updaterinclude ../../make-rules/prep.mk
d60212e03fbef1d3dd7f7eb05c0545cc373cb9fcAutomatic Updaterinclude ../../make-rules/configure.mk
938440694b33cd752e9e4b71a526368b4811c177Tinderbox Userinclude ../../make-rules/ips.mk
0e9b328d62f6b051113287e6bade704bff66a009Tinderbox User
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsBASH_PATCHLEVEL=$(shell grep -h "define PATCHLEVEL" $(COMPONENT_DIR)/patches/bash* | nawk '{print $$NF}' | sort -n | tail -1)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinIPS_COMPONENT_VERSION = $(COMPONENT_VERSION).$(BASH_PATCHLEVEL)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinPATCH_LEVEL = 0
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinPKG_PROTO_DIRS += $(COMPONENT_DIR)/Solaris
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Enable C99 mode + -Xc for it's additional warnings.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halleystudio_C99MODE = -Xc $(studio_C99_ENABLE)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Use the maximum number of registers on sparc since we have no libraries
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntstudio_XREGS.sparc = -xregs=appl
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# 8 byte memory alignment + interpretation of non-alignment instead of SIGBUS
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntstudio_ALIGN.sparc.32 = -xmemalign=8i
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# -xinline=%auto -- we like inlining where appropriate
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -xinline=%auto
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# -xbuiltin=%none -- builtins have been known to be buggy
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -xbuiltin=%none
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += $(XPG6MODE)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += $(CPP_POSIX)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += $(CPP_C99_EXTENDED_MATH)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# configure checks for some functions, but doesn't seem to want to link in
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# the required libraries for them. We avoid linking with libthread.so.1
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# just because we pass -mt, by explicitly passing -lc.
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark AndrewsLIBS = -lc -lsocket -lgen
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# -z redlocsym -- let's shrink the SHT_SYMTAB as much as we can
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinLDFLAGS = $(LD_Z_REDLOCSYM)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# The bash test harness needs the GNU userland utilities
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinTEST_PATH = "PATH=$(BUILD_DIR_64):$(GNUBIN):$(USRBINDIR)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinTEST_OUTPUT = $(COMPONENT_DIR)/bash_test_results_$(MACH).out
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark AndrewsCONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV += LIBS="$(LIBS)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --localstatedir=/var
f9f11eb54be19b7deedf3978496f71d81432a5eeJeremy ReedCONFIGURE_OPTIONS += --enable-alias
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-arith-for-command
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-array-variables
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCONFIGURE_OPTIONS += --enable-bang-history
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCONFIGURE_OPTIONS += --enable-brace-expansion
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-casemod-attributes
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-casemod-expansions
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-command-timing
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-cond-command
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-cond-regexp
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCONFIGURE_OPTIONS += --enable-coprocesses
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCONFIGURE_OPTIONS += --enable-debugger
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-directory-stack
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-disabled-builtins
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-dparen-arithmetic
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-extended-glob
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-help-builtin
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-history
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-job-control
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --enable-multibyte
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCONFIGURE_OPTIONS += --enable-net-redirections
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCONFIGURE_OPTIONS += --enable-process-substitution
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCONFIGURE_OPTIONS += --enable-progcomp
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCONFIGURE_OPTIONS += --enable-prompt-string-decoding
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark AndrewsCONFIGURE_OPTIONS += --enable-readline
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCONFIGURE_OPTIONS += --enable-restricted
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyCONFIGURE_OPTIONS += --enable-select
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --enable-separate-helpfiles
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --enable-single-help-strings
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --disable-strict-posix-default
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --enable-usg-echo-default
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --enable-xpg-echo-default
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --enable-mem-scramble
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --disable-profiling
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --enable-static-link
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --enable-largefile
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --enable-nls
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --with-bash-malloc
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --with-curses
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --with-installed-readline=no
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsTEST_ENV += -i
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsTEST_ENV += $(TEST_PATH)
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsTEST_ENV += $(TARGET_ENV)
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsASLR_MODE=$(ASLR_ENABLE)
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrewsbuild: $(BUILD_64)
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrewsinstall: $(INSTALL_64)
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews ( cd $(PROTOUSRSHAREDIR)/locale ; \
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews cp -Rp "en@boldquot" en ; \
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews cp -Rp "en@boldquot" en_CA ; \
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews cp -Rp "en@boldquot" en_GB )
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrewstest: $(TEST_64)
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark AndrewsBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
48a866144e3b14efa6c51af05ef7641b23c7516dJeremy Reed
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrewsinclude ../../make-rules/depend.mk
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews
0f78f780648806bcb3e374b7dafac73e6c558ea8Mark Andrews