Makefile revision 4480
4416N/A#
4416N/A# CDDL HEADER START
4416N/A#
4416N/A# The contents of this file are subject to the terms of the
4416N/A# Common Development and Distribution License (the "License").
4416N/A# You may not use this file except in compliance with the License.
4416N/A#
4416N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4416N/A# or http://www.opensolaris.org/os/licensing.
4416N/A# See the License for the specific language governing permissions
4416N/A# and limitations under the License.
4416N/A#
4416N/A# When distributing Covered Code, include this CDDL HEADER in each
4416N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4416N/A# If applicable, add the following below this CDDL HEADER, with the
4416N/A# fields enclosed by brackets "[]" replaced with your own identifying
4416N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4416N/A#
4416N/A# CDDL HEADER END
4416N/A#
4416N/A
4416N/A#
4416N/A# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4416N/A#
4416N/A
4416N/Ainclude ../../../make-rules/shared-macros.mk
4416N/A
4416N/Ainclude $(WS_COMPONENTS)/php/php-metadata.mk
4416N/A
4416N/ACOMPONENT_NAME= php
4416N/ACOMPONENT_VERSION= $(UL_PHP_VERSION)
4416N/ACOMPONENT_PROJECT_URL= http://php.net/
4416N/ACOMPONENT_SRC= $(PHP_COMPONENT_SRC)
4416N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
4416N/ACOMPONENT_ARCHIVE_HASH=\
4416N/A sha256:0af0045745d61eeb74a3ea744529a2481b27cb689da720e6c0250675043724e4
4416N/ACOMPONENT_ARCHIVE_URL= http://php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
4416N/ACOMPONENT_BUGDB= utility/php
4416N/ATPNO= 22435
4416N/A
4416N/Ainclude $(WS_MAKE_RULES)/prep.mk
4416N/Ainclude $(WS_MAKE_RULES)/configure.mk
4416N/Ainclude $(WS_MAKE_RULES)/ips.mk
4416N/A
4416N/Ainclude $(PHP_TOP_DIR)/php.mk
4416N/A
4416N/A# Use GCC on S11 to work around build issues with Studio 12.1
4416N/ACOMPILER=gcc
4416N/ACFLAGS += -std=gnu99
4416N/A
4416N/A# We patch configure.in to allow building just modules (no SAPI's), e.g. intl.
4416N/A# Since we are sharing the source, regenerate configure here.
4416N/ACOMPONENT_PREP_ACTION += (cd $(SOURCE_DIR) ; autoconf) ;
4416N/A
4416N/AASLR_MODE = $(ASLR_ENABLE)
4416N/A
4416N/Ainclude enable-extensions.mk
4416N/A
4416N/ACONFIGURE_OPTIONS += --enable-dtrace
4416N/AREQUIRED_PACKAGES += system/dtrace
4416N/ACOMPONENT_BUILD_ENV += PATH="$$PATH:/usr/sbin"
4416N/A
4416N/A# .conf files go under /etc, not /usr
4416N/ACONFIGURE_OPTIONS += --sysconfdir=/etc/php/$(UL_PHP_MINOR_VERSION)
4416N/A# var doesn't go under /usr either!
4416N/ACONFIGURE_OPTIONS += --localstatedir=/var/php/$(UL_PHP_MINOR_VERSION)
4416N/A# Nor does php.ini and its friends.
4416N/ACONFIGURE_OPTIONS += --with-config-file-path=/etc/php/$(UL_PHP_MINOR_VERSION)
4416N/ACONFIGURE_OPTIONS += --with-config-file-scan-dir=/etc/php/$(UL_PHP_MINOR_VERSION)/conf.d
4416N/A# Nor does PEAR (default: $PREFIX/lib/php)
4416N/ACONFIGURE_OPTIONS += --with-pear=/var/php/$(UL_PHP_MINOR_VERSION)/pear
4416N/A
4480N/A# Disable SSLv2 and SSLv3 for security reasons
4480N/ACFLAGS += -DOPENSSL_NO_SSL2
4480N/ACFLAGS += -DOPENSSL_NO_SSL3
4480N/A
4416N/APROTOUSRPHPVERDIR = $(PROTO_DIR)/$(CONFIGURE_PREFIX)
4416N/A# Adapted from PHP 5.3 Makefile.
4416N/A# Creates alternate versions of the scripts needed for building extensions
4416N/A# separately, since the generated versions of these scripts hardcode configuring
4416N/A# for a PHP that is installed on the system.
4416N/ACOMPONENT_POST_INSTALL_ACTION += \
4416N/A ( set -e; \
4416N/A mkdir -p proto-scripts; \
4416N/A cat $(BUILD_DIR_64)/scripts/phpize | \
4416N/A sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \
4416N/A sed -e "s%^prefix=.*%prefix=$(PROTOUSRPHPVERDIR)%" | \
4416N/A sed -e "s%^includedir=.*%includedir=$(PROTOUSRPHPVERDIR)/include/php%" | \
4416N/A sed -e "s%^phpdir=.*%phpdir=$(SOURCE_DIR)%" | \
4416N/A sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \
4416N/A sed -e "s%$PHP_AUTOCONF || exit 1%$PHP_AUTOCONF -f || exit 1%" | \
4416N/A sed -e "s%$PHP_AUTOHEADER || exit 1%$PHP_AUTOHEADER -f || exit 1%" | \
4416N/A sed -e 's%(cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build)%(cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build)%' | \
4416N/A sed -e "s%^builddir=.*%builddir=$(BUILD_DIR_64)%" \
4416N/A > proto-scripts/phpize-proto ; \
4416N/A chmod 755 proto-scripts/phpize-proto ) ; \
4416N/A ( set -e; \
4416N/A cat $(BUILD_DIR_64)/scripts/php-config | \
4416N/A sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
4416N/A sed -e "s%^prefix=.*%prefix=$(PROTOUSRPHPVERDIR)%" | \
4416N/A sed -e "s%^include_dir=.*%include_dir=$(PROTOUSRPHPVERDIR)/include/php%" \
4416N/A > proto-scripts/php-config-proto ; \
4416N/A chmod 755 proto-scripts/php-config-proto ) ;
4416N/A
4416N/ACLEAN_PATHS += intl/build
4416N/ACLEAN_PATHS += proto-scripts
4416N/A
4416N/A# For picking up php.ini-development and -production
4416N/APKG_PROTO_DIRS += $(COMPONENT_SRC)
4416N/A
4416N/Aconfigure: $(CONFIGURE_64)
4416N/Abuild: $(BUILD_64)
4416N/Ainstall: $(INSTALL_64)
4416N/A cd intl ; $(GMAKE) install
4416N/A cp intl/build/prototype/$(MACH)/$(CONFIGURE_PREFIX)/lib/extensions/no-debug-zts-20131226/intl.so $(PROTOUSRPHPVERDIR)/lib/extensions/no-debug-zts-20131226/
4416N/A# requirement from intl
4416N/AREQUIRED_PACKAGES += library/icu
4416N/A
4416N/A# The test results are unstable between runs
4416N/A$(SKIP_TEST_AT_TOP_LEVEL)
4416N/Atest: $(TEST_64)
4416N/A
4416N/AREQUIRED_PACKAGES += system/library
4416N/AREQUIRED_PACKAGES += system/library/math
4416N/AREQUIRED_PACKAGES += library/security/openssl
4416N/AREQUIRED_PACKAGES += library/libxml2