phpize.mk revision 4416
306N/A#
306N/A# CDDL HEADER START
306N/A#
306N/A# The contents of this file are subject to the terms of the
306N/A# Common Development and Distribution License (the "License").
306N/A# You may not use this file except in compliance with the License.
306N/A#
306N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
306N/A# or http://www.opensolaris.org/os/licensing.
306N/A# See the License for the specific language governing permissions
306N/A# and limitations under the License.
306N/A#
306N/A# When distributing Covered Code, include this CDDL HEADER in each
306N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
306N/A# If applicable, add the following below this CDDL HEADER, with the
306N/A# fields enclosed by brackets "[]" replaced with your own identifying
306N/A# information: Portions Copyright [yyyy] [name of copyright owner]
306N/A#
306N/A# CDDL HEADER END
306N/A#
306N/A
306N/A#
844N/A# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
306N/A#
306N/A
306N/A# This is a collection of Makefile lines needed for building PHP extensions
306N/A# outside of the PHP source tree. It is named for the "phpize" script, which
306N/A# is the main deviation from the standard configure-make-install cycle.
306N/A# This file should handle everything necessary for an extension whose upstream
306N/A# expects the user to run "phpize" in order to create ./configure.
306N/A
306N/A# It relies on the Userland makefile for PHP creating modified versions of
844N/A# phpize and php-config for use during Userland builds, and placing them under
844N/A# $(PHP_BUNDLE_DIR)/proto-scripts. Therefore, it depends on gmake install of PHP
306N/A
1273N/A# Usage:
306N/A# include ../../../make-rules/shared-macros.mk [appropriate path]
306N/A# include $(WS_COMPONENTS)/php/php-metadata.mk
306N/A# [COMPONENT_* lines]
306N/A# include $(WS_MAKE_RULES)/prep.mk
306N/A# include $(WS_MAKE_RULES)/configure.mk
306N/A# include $(PHP_TOP_DIR)/phpize.mk
306N/A
306N/A# Depends on having a built and intalled (prototype) version of PHP available
306N/A$(BUILD_DIR_64)/.configured: $(PHP_BUILD_DIR_64)/.installed
306N/A$(PHP_BUILD_DIR_64)/.installed:
306N/A cd $(PHP_BUNDLE_DIR) ; $(GMAKE) install ;
306N/A
306N/Ainclude $(PHP_TOP_DIR)/php.mk
306N/A
306N/ACOMPONENT_PRE_CONFIGURE_ACTION += \
306N/A $(GSED) -e "s|^builddir=.*|builddir=$(@D)|" \
306N/A < $(PHP_BUNDLE_DIR)/proto-scripts/phpize-proto \
306N/A > $(@D)/phpize-proto; \
306N/A chmod +x $(@D)/phpize-proto;
306N/A
306N/A# .tgz files from pecl contain this file
306N/ACLEAN_PATHS += package.xml
306N/A
306N/A# The phpize script tries to copy some files into here, failing if the directory
306N/A# doesn't exist.
306N/ACOMPONENT_PRE_CONFIGURE_ACTION += mkdir $(@D)/build;
306N/A
306N/A# phpize generates configure where it is run.
306N/ACOMPONENT_PRE_CONFIGURE_ACTION += $(CLONEY) $(SOURCE_DIR) $(@D) ;
306N/ACONFIGURE_SCRIPT = $(@D)/configure
306N/ACOMPONENT_PRE_CONFIGURE_ACTION += cd $(@D) ; $(@D)/phpize-proto;
306N/A
306N/A# Change PHP_EXECUTABLE so that tests can run.
306N/APROTOUSRPHPVERDIR = $(PHP_PROTO_DIR)/$(CONFIGURE_PREFIX)
COMPONENT_PRE_CONFIGURE_ACTION += \
$(GSED) -i -e "s@^PHP_EXECUTABLE=.*@PHP_EXECUTABLE=$(PROTOUSRPHPVERDIR)/bin/php@" \
$(CONFIGURE_SCRIPT) ;
COMPONENT_PRE_CONFIGURE_ACTION += \
cp $(PHP_BUNDLE_DIR)/proto-scripts/php-config-proto $(@D) ;
CONFIGURE_OPTIONS += --with-php-config=$(@D)/php-config-proto