Makefile revision 5516
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# CDDL HEADER START
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# The contents of this file are subject to the terms of the
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Common Development and Distribution License (the "License").
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# You may not use this file except in compliance with the License.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# or http://www.opensolaris.org/os/licensing.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# See the License for the specific language governing permissions
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# and limitations under the License.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# When distributing Covered Code, include this CDDL HEADER in each
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# If applicable, add the following below this CDDL HEADER, with the
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# fields enclosed by brackets "[]" replaced with your own identifying
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# information: Portions Copyright [yyyy] [name of copyright owner]
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# CDDL HEADER END
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnninclude ../../make-rules/shared-macros.mk
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnCOMPONENT_NAME= bash
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnCOMPONENT_VERSION= 4.3
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnCOMPONENT_PROJECT_URL= http://www.gnu.org/software/bash/
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnCOMPONENT_ARCHIVE_HASH = \
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn sha256:afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/bash/$(COMPONENT_ARCHIVE)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnCOMPONENT_BUGDB= utility/bash
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnTPNO= 21712
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnninclude $(WS_MAKE_RULES)/prep.mk
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnninclude $(WS_MAKE_RULES)/configure.mk
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnninclude $(WS_MAKE_RULES)/ips.mk
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweBASH_PATCHLEVEL=$(shell grep -h "define PATCHLEVEL" $(COMPONENT_DIR)/patches/bash* | nawk '{print $$NF}' | sort -n | tail -1)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnIPS_COMPONENT_VERSION = $(COMPONENT_VERSION).$(BASH_PATCHLEVEL)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnPATCH_LEVEL = 0
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnPKG_PROTO_DIRS += $(COMPONENT_DIR)/Solaris
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn# Enable C99 mode + -Xc for it's additional warnings.
studio_C99MODE = -Xc $(studio_C99_ENABLE)
# Use the maximum number of registers on sparc since we have no libraries
studio_XREGS.sparc = -xregs=appl
# 8 byte memory alignment + interpretation of non-alignment instead of SIGBUS
studio_ALIGN.sparc.32 = -xmemalign=8i
studio_ALIGN.sparc.64 = -xmemalign=16i
# -xinline=%auto -- we like inlining where appropriate
CFLAGS += -xinline=%auto
# -xbuiltin=%none -- builtins have been known to be buggy
CFLAGS += -xbuiltin=%none
CFLAGS += $(XPG6MODE)
CFLAGS += $(CPP_C99_EXTENDED_MATH)
CFLAGS += -I/usr/include/ncurses
# configure checks for some functions, but doesn't seem to want to link in
# the required libraries for them. We avoid linking with libthread.so.1
# just because we pass -mt, by explicitly passing -lc.
LIBS = -lc -lsocket -lgen
# -z redlocsym -- let's shrink the SHT_SYMTAB as much as we can
LDFLAGS = $(LD_Z_REDLOCSYM)
# Results output is slightly different on Intel vs. SPARC.
COMPONENT_TEST_MASTER = \
$(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
# Do not change the order of these regexp transforms.
COMPONENT_TEST_TRANSFORMS += \
'-e "/^</d"' \
'-e "/^>/d"' \
'-e "/^---/d"' \
'-e "/^Testing/d"' \
'-e "/m64/d"' \
'-e "/DPROGRAM/d"' \
'-e "/^rm -f/d"' \
'-e "/^ls -l/d"' \
'-e "/text/d"' \
'-e "/size/d"' \
'-e "/bash$$/d"' \
'-e "/warning/d"' \
'-e "s/^[0-9]\{1,\}[a-z]\{1,\}[0-9]\{1,\}//g"' \
'-e "s/^[0-9]\{1,\},[0-9]\{1,\}[a-z]\{1,\}[0-9]\{1,\},[0-9]\{1,\}//g"' \
'-e "/^$$/d"'
# The bash test harness needs the GNU userland utilities
TEST_PATH = "PATH=$(BUILD_DIR_64):$(GNUBIN):$(USRBINDIR)"
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
CONFIGURE_ENV += LIBS="$(LIBS)"
CONFIGURE_OPTIONS += --localstatedir=/var
CONFIGURE_OPTIONS += --enable-alias
CONFIGURE_OPTIONS += --enable-arith-for-command
CONFIGURE_OPTIONS += --enable-array-variables
CONFIGURE_OPTIONS += --enable-bang-history
CONFIGURE_OPTIONS += --enable-brace-expansion
CONFIGURE_OPTIONS += --enable-casemod-attributes
CONFIGURE_OPTIONS += --enable-casemod-expansions
CONFIGURE_OPTIONS += --enable-command-timing
CONFIGURE_OPTIONS += --enable-cond-command
CONFIGURE_OPTIONS += --enable-cond-regexp
CONFIGURE_OPTIONS += --enable-coprocesses
CONFIGURE_OPTIONS += --enable-debugger
CONFIGURE_OPTIONS += --enable-directory-stack
CONFIGURE_OPTIONS += --enable-disabled-builtins
CONFIGURE_OPTIONS += --enable-dparen-arithmetic
CONFIGURE_OPTIONS += --enable-extended-glob
CONFIGURE_OPTIONS += --enable-help-builtin
CONFIGURE_OPTIONS += --enable-history
CONFIGURE_OPTIONS += --enable-job-control
CONFIGURE_OPTIONS += --enable-multibyte
CONFIGURE_OPTIONS += --enable-net-redirections
CONFIGURE_OPTIONS += --enable-process-substitution
CONFIGURE_OPTIONS += --enable-progcomp
CONFIGURE_OPTIONS += --enable-prompt-string-decoding
CONFIGURE_OPTIONS += --enable-readline
CONFIGURE_OPTIONS += --enable-restricted
CONFIGURE_OPTIONS += --enable-select
CONFIGURE_OPTIONS += --enable-separate-helpfiles
CONFIGURE_OPTIONS += --enable-single-help-strings
CONFIGURE_OPTIONS += --disable-strict-posix-default
CONFIGURE_OPTIONS += --enable-usg-echo-default=yes
CONFIGURE_OPTIONS += --enable-xpg-echo-default=yes
CONFIGURE_OPTIONS += --enable-mem-scramble
CONFIGURE_OPTIONS += --disable-profiling
CONFIGURE_OPTIONS += --enable-static-link
CONFIGURE_OPTIONS += --enable-largefile
CONFIGURE_OPTIONS += --enable-nls
CONFIGURE_OPTIONS += --with-bash-malloc=yes
CONFIGURE_OPTIONS += --with-curses
CONFIGURE_OPTIONS += --with-installed-readline=no
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
COMPONENT_TEST_DIR = $(BUILD_DIR_64)
COMPONENT_TEST_ENV = - $(TEST_PATH)
# The tests use /tmp/xx, and there can only be one user running
# the them at a time. Need to remove /tmp/xx after testing to
# avoid permission issues for other users running these tests
COMPONENT_POST_TEST_ACTION = rm -f /tmp/xx
ASLR_MODE=$(ASLR_ENABLE)
configure: $(CONFIGURE_64)
build: $(BUILD_64)
install: $(INSTALL_64)
( cd $(PROTOUSRSHAREDIR)/locale ; \
cp -Rp "en@boldquot" en ; \
cp -Rp "en@boldquot" en_CA ; \
cp -Rp "en@boldquot" en_GB )
test: $(TEST_64)
system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
REQUIRED_PACKAGES += library/ncurses
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library