components/php-5_2/extensions.mk
changeset 4073 4f086b95f18c
parent 4071 4b68c2b0134b
child 4074 3b59c13ef5ec
equal deleted inserted replaced
4071:4b68c2b0134b 4073:4f086b95f18c
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
       
    22 #
       
    23 
       
    24 include $(WS_MAKE_RULES)/prep.mk
       
    25 include $(WS_MAKE_RULES)/configure.mk
       
    26 include $(WS_MAKE_RULES)/ips.mk
       
    27 
       
    28 include ../common.mk
       
    29 
       
    30 #
       
    31 # phpize-proto runs autoconf
       
    32 #
       
    33 # Patching PHP_EXECUTABLE will enable extensions to run the test target
       
    34 #
       
    35 COMPONENT_PRE_CONFIGURE_ACTION = ( \
       
    36 	set -e; \
       
    37 	($(CLONEY) $(SOURCE_DIR) $(@D)); \
       
    38 	$(GSED) -e "s@^builddir=.*@builddir=$(BUILD_DIR_32)@" \
       
    39 		< $(COMPONENT_DIR)/../php-sapi/phpize-proto \
       
    40 		> $(COMPONENT_DIR)/phpize-proto; \
       
    41 	cd $(BUILD_DIR_32); \
       
    42 	$(ENV) -i $(ENVLINE) $(CONFIG_SHELL) $(COMPONENT_DIR)/phpize-proto; \
       
    43 	$(GSED) -i -e "s@^PHP_EXECUTABLE=.*@PHP_EXECUTABLE=$(COMPONENT_DIR)/../php-sapi/build/$(MACH32)/sapi/cli/php@" \
       
    44 		configure )
       
    45 
       
    46 
       
    47 CONFIGURE_OPTIONS  += \
       
    48 	--with-php-config=$(COMPONENT_DIR)/../php-sapi/php-config-proto
       
    49 
       
    50 CONFIGURE_ENV += $(ENVLINE)
       
    51 CONFIGURE_SCRIPT = $(BUILD_DIR_32)/configure
       
    52 CPPFLAGS += -I$(PHP_SAPI_BUILD)/Zend
       
    53 CPPFLAGS += -I$(PHP_SAPI_BUILD)/TSRM
       
    54 CPPFLAGS += -I$(PHP_SAPI_BUILD)/main
       
    55 
       
    56 CLEAN_PATHS += $(COMPONENT_DIR)/phpize-proto package.xml package2.xml tmp
       
    57 
       
    58 # common targets
       
    59 build:		$(BUILD_32)
       
    60 
       
    61 install:	$(INSTALL_32)
       
    62 
       
    63 test:		$(TEST_32)
       
    64 
       
    65 # Manual dependency - to build any extension requires php-sapi to be installed
       
    66 ../php-sapi/build/$(MACH32)/.installed:
       
    67 	(cd ../php-sapi ; $(MAKE) install)
       
    68 
       
    69 $(BUILD_DIR_32)/.configured:	../php-sapi/build/$(MACH32)/.installed
       
    70 
       
    71 # Manual dependency
       
    72 # Need $(COMPONENT_NAME)-zts installed before $(COMPONENT_NAME) publish
       
    73 ../$(COMPONENT_NAME)-zts/build/$(MACH32)/.installed:
       
    74 	( set -e; \
       
    75 	cd ../$(COMPONENT_NAME)-zts; \
       
    76 	$(MAKE) install )
       
    77 
       
    78 $(INSTALL_32):	../$(COMPONENT_NAME)-zts/build/$(MACH32)/.installed