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/A# This is a collection of Makefile lines needed for building PHP extensions
4416N/A# outside of the PHP source tree. It is named for the "phpize" script, which
4416N/A# is the main deviation from the standard configure-make-install cycle.
4416N/A# This file should handle everything necessary for an extension whose upstream
4416N/A# expects the user to run "phpize" in order to create ./configure.
4416N/A
4416N/A# It relies on the Userland makefile for PHP creating modified versions of
4416N/A# phpize and php-config for use during Userland builds, and placing them under
4416N/A# $(PHP_BUNDLE_DIR)/proto-scripts. Therefore, it depends on gmake install of PHP
4416N/A
4416N/A# Usage:
4416N/A# include ../../../make-rules/shared-macros.mk [appropriate path]
4416N/A# include $(WS_COMPONENTS)/php/php-metadata.mk
4416N/A# [COMPONENT_* lines]
4416N/A# include $(WS_MAKE_RULES)/prep.mk
4416N/A# include $(WS_MAKE_RULES)/configure.mk
4416N/A# include $(PHP_TOP_DIR)/phpize.mk
4416N/A
4416N/A# Depends on having a built and intalled (prototype) version of PHP available
4416N/A$(BUILD_DIR_64)/.configured: $(PHP_BUILD_DIR_64)/.installed
4416N/A$(PHP_BUILD_DIR_64)/.installed:
4416N/A cd $(PHP_BUNDLE_DIR) ; $(GMAKE) install ;
4416N/A
4416N/Ainclude $(PHP_TOP_DIR)/php.mk
4416N/A
4416N/ACOMPONENT_PRE_CONFIGURE_ACTION += \
4416N/A $(GSED) -e "s|^builddir=.*|builddir=$(@D)|" \
4416N/A < $(PHP_BUNDLE_DIR)/proto-scripts/phpize-proto \
4416N/A > $(@D)/phpize-proto; \
4416N/A chmod +x $(@D)/phpize-proto;
4416N/A
4416N/A# .tgz files from pecl contain this file
4416N/ACLEAN_PATHS += package.xml
4416N/A
4416N/A# The phpize script tries to copy some files into here, failing if the directory
4416N/A# doesn't exist.
4416N/ACOMPONENT_PRE_CONFIGURE_ACTION += mkdir $(@D)/build;
4416N/A
4416N/A# phpize generates configure where it is run.
4416N/ACOMPONENT_PRE_CONFIGURE_ACTION += $(CLONEY) $(SOURCE_DIR) $(@D) ;
4416N/ACONFIGURE_SCRIPT = $(@D)/configure
4416N/ACOMPONENT_PRE_CONFIGURE_ACTION += cd $(@D) ; $(@D)/phpize-proto;
4416N/A
4416N/A# Change PHP_EXECUTABLE so that tests can run.
4416N/APROTOUSRPHPVERDIR = $(PHP_PROTO_DIR)/$(CONFIGURE_PREFIX)
4416N/ACOMPONENT_PRE_CONFIGURE_ACTION += \
4416N/A $(GSED) -i -e "s@^PHP_EXECUTABLE=.*@PHP_EXECUTABLE=$(PROTOUSRPHPVERDIR)/bin/php@" \
4416N/A $(CONFIGURE_SCRIPT) ;
4416N/A
4416N/ACOMPONENT_PRE_CONFIGURE_ACTION += \
4416N/A cp $(PHP_BUNDLE_DIR)/proto-scripts/php-config-proto $(@D) ;
4416N/ACONFIGURE_OPTIONS += --with-php-config=$(@D)/php-config-proto
4416N/A