|
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, Oracle and/or its affiliates. All rights reserved. |
|
22 # |
|
23 |
|
24 include $(WS_TOP)/make-rules/prep.mk |
|
25 include $(WS_TOP)/make-rules/configure.mk |
|
26 include $(WS_TOP)/make-rules/ips.mk |
|
27 |
|
28 include ../common.mk |
|
29 |
|
30 # NOTE: this phpize-proto comes from nsapi while |
|
31 # php-config-proto comes from sapi |
|
32 # |
|
33 # phpize-proto.zts runs autoconf |
|
34 # |
|
35 # Patching PHP_EXECUTABLE will enable extensions to run the test target |
|
36 # |
|
37 COMPONENT_PRE_CONFIGURE_ACTION = ( \ |
|
38 ($(CLONEY) $(SOURCE_DIR) $(@D)); \ |
|
39 $(GSED) -e "s@^builddir=.*@builddir=$(BUILD_DIR_32)@" \ |
|
40 < $(COMPONENT_DIR)/../php-nsapi/phpize-proto.zts \ |
|
41 > $(COMPONENT_DIR)/phpize-proto.zts; \ |
|
42 cd $(BUILD_DIR_32); \ |
|
43 $(ENV) -i $(ZTS_ENVLINE) $(CONFIG_SHELL) \ |
|
44 $(COMPONENT_DIR)/phpize-proto.zts; \ |
|
45 $(GSED) -i -e "s@^PHP_EXECUTABLE=.*@PHP_EXECUTABLE=$(COMPONENT_DIR)/../php-sapi/build/$(MACH32)/sapi/cli/php@" \ |
|
46 configure ) |
|
47 |
|
48 |
|
49 CONFIGURE_OPTIONS += \ |
|
50 --with-php-config=$(COMPONENT_DIR)/../php-sapi/php-config-proto.zts |
|
51 |
|
52 CONFIGURE_ENV += $(ZTS_ENVLINE) |
|
53 CONFIGURE_SCRIPT = $(BUILD_DIR_32)/configure |
|
54 CPPFLAGS += -I$(PHP_SAPI_BUILD)/Zend |
|
55 CPPFLAGS += -I$(PHP_SAPI_BUILD)/TSRM |
|
56 CPPFLAGS += -I$(PHP_SAPI_BUILD)/main |
|
57 |
|
58 CLEAN_PATHS += $(COMPONENT_DIR)/phpize-proto.zts package.xml package2.xml |
|
59 |
|
60 # common targets |
|
61 build: $(BUILD_32) |
|
62 |
|
63 install: $(INSTALL_32) |
|
64 |
|
65 test: $(TEST_32) |
|
66 |
|
67 publish: install |
|
68 |
|
69 # Manual dependency - need both php-sapi and php-nsapi installed |
|
70 # before building a -zts extension. |
|
71 ../php-sapi/build/$(MACH32)/.installed: |
|
72 (cd ../php-sapi ; $(MAKE) install) |
|
73 |
|
74 ../php-nsapi/build/$(MACH32)/.installed: |
|
75 (cd ../php-nsapi ; $(MAKE) install) |
|
76 |
|
77 $(BUILD_DIR_32)/.configured: ../php-sapi/build/$(MACH32)/.installed |
|
78 $(BUILD_DIR_32)/.configured: ../php-nsapi/build/$(MACH32)/.installed |
|
79 |
|
80 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
81 |
|
82 include $(WS_TOP)/make-rules/depend.mk |