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) 2012, 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 CONFIGURE_OPTIONS += \ |
|
47 --with-php-config=$(COMPONENT_DIR)/../php-sapi/php-config-proto |
|
48 |
|
49 CONFIGURE_ENV += $(ENVLINE) |
|
50 CONFIGURE_SCRIPT = $(BUILD_DIR_32)/configure |
|
51 CPPFLAGS += -I$(PHP_SAPI_BUILD) |
|
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 build: $(BUILD_32) |
|
59 |
|
60 install: $(INSTALL_32) |
|
61 |
|
62 test: $(TEST_32) |
|
63 |
|
64 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
|
65 |
|
66 # Manual dependency - to build any extension requires php-sapi to be installed |
|
67 ../php-sapi/build/$(MACH32)/.installed: |
|
68 (cd ../php-sapi ; $(MAKE) install) |
|
69 |
|
70 $(BUILD_DIR_32)/.configured: ../php-sapi/build/$(MACH32)/.installed |
|
71 |
|
72 # Manual dependency |
|
73 # Need $(COMPONENT_NAME)-zts installed before $(COMPONENT_NAME) publish |
|
74 ../$(COMPONENT_NAME)-zts/build/$(MACH32)/.installed: |
|
75 ( set -e; \ |
|
76 cd ../$(COMPONENT_NAME)-zts; \ |
|
77 $(MAKE) install ) |
|
78 |
|
79 $(INSTALL_32): ../$(COMPONENT_NAME)-zts/build/$(MACH32)/.installed |
|