components/php-5_2/extensions.mk
author Norm Jacobs <Norm.Jacobs@Sun.COM>
Sun, 15 Feb 2015 19:02:09 -0600
changeset 3817 30b42c38bbc4
parent 2211 a99bbd5139c0
permissions -rw-r--r--
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#

include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk

include ../common.mk

#
# phpize-proto runs autoconf
#
# Patching PHP_EXECUTABLE will enable extensions to run the test target
#
COMPONENT_PRE_CONFIGURE_ACTION = ( \
	set -e; \
	($(CLONEY) $(SOURCE_DIR) $(@D)); \
	$(GSED) -e "s@^builddir=.*@builddir=$(BUILD_DIR_32)@" \
		< $(COMPONENT_DIR)/../php-sapi/phpize-proto \
		> $(COMPONENT_DIR)/phpize-proto; \
	cd $(BUILD_DIR_32); \
	$(ENV) -i $(ENVLINE) $(CONFIG_SHELL) $(COMPONENT_DIR)/phpize-proto; \
	$(GSED) -i -e "s@^PHP_EXECUTABLE=.*@PHP_EXECUTABLE=$(COMPONENT_DIR)/../php-sapi/build/$(MACH32)/sapi/cli/php@" \
		configure )


CONFIGURE_OPTIONS  += \
	--with-php-config=$(COMPONENT_DIR)/../php-sapi/php-config-proto

CONFIGURE_ENV += $(ENVLINE)
CONFIGURE_SCRIPT = $(BUILD_DIR_32)/configure
CPPFLAGS += -I$(PHP_SAPI_BUILD)/Zend
CPPFLAGS += -I$(PHP_SAPI_BUILD)/TSRM
CPPFLAGS += -I$(PHP_SAPI_BUILD)/main

CLEAN_PATHS += $(COMPONENT_DIR)/phpize-proto package.xml package2.xml tmp

# common targets
build:		$(BUILD_32)

install:	$(INSTALL_32)

test:		$(TEST_32)

# Manual dependency - to build any extension requires php-sapi to be installed
../php-sapi/build/$(MACH32)/.installed:
	(cd ../php-sapi ; $(MAKE) install)

$(BUILD_DIR_32)/.configured:	../php-sapi/build/$(MACH32)/.installed

# Manual dependency
# Need $(COMPONENT_NAME)-zts installed before $(COMPONENT_NAME) publish
../$(COMPONENT_NAME)-zts/build/$(MACH32)/.installed:
	( set -e; \
	cd ../$(COMPONENT_NAME)-zts; \
	$(MAKE) install )

$(INSTALL_32):	../$(COMPONENT_NAME)-zts/build/$(MACH32)/.installed