Makefile revision 2429
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# CDDL HEADER START
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# The contents of this file are subject to the terms of the
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# Common Development and Distribution License (the "License").
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# You may not use this file except in compliance with the License.
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d6ac1282b7aebe50016ff2242315c34ac60422c8Jeff Conniff# See the License for the specific language governing permissions
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# and limitations under the License.
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# When distributing Covered Code, include this CDDL HEADER in each
ce93c9e30dd338180488beb781d0cb1b0473654aLuke Smith# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# If applicable, add the following below this CDDL HEADER, with the
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# fields enclosed by brackets "[]" replaced with your own identifying
6797a96aa17cfbc2eb9b3f90f564a29c01519324Satyen Desai# information: Portions Copyright [yyyy] [name of copyright owner]
d3b7b73e5ca50ba0821b439d4f9a12cfaaf38870Jeff Conniff# CDDL HEADER END
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
9c46bf9bc0ac9bab8d409ae4ab6d2a2ddc4dc55bJeff Conniff## This Makefile for local usage only.
80ea28fae9dc032e5b99c726c41e492cd59bf49dJeff Conniff## The full build will NOT execute this Makefile.
6340fd3eeb615e0720d218535598b6627a3d4c71Jeff Conniff# Build ordering:
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# 1) imap -> install
6340fd3eeb615e0720d218535598b6627a3d4c71Jeff Conniff# 2) php-sapi -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 3) php-nsapi -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 3) php-cgi -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 4) php-sapi -> publish (packages sapi, nsapi, cgi in 1 package)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 5) APC-zts -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 6) APC -> publish (packages APC-zts, APC in 1 package)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 5) idn-zts -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 6) idn -> publish (packages idn-zts, idn in 1 package)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 5) memcache-zts -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 6) memcache -> publish (packages memcache-zts, memcache in 1 pack)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 5) suhosin-zts -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 6) suhosin -> publish (packages suhosin-zts, suhosin in 1 package)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 5) tcpwrap-zts -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 6) tcpwrap -> publish (packages tcpwrap-zts, tcpwrap in 1 package)
b4f14fb8425b05925652295a6e65a98b2448f70fJeff Conniff# 5) xdebug-zts -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 6) xdebug -> publish (packages xdebug-zts, xdebug in 1 package)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# The numbers indicate parallelism possible in the build.
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# The other way to build this would be:
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 1) imap -> build
07ad9ab2be0e01d9fe09926c37a65a867aa6f401Jeff Conniff# 2) php-sapi -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 3) php-nsapi -> install
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 4) all others -> install (in parallel)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 5) all -> publish (in parallel)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# So after imap, php-sapi, php-nsapi build serially in that order
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# then it doesn't matter.
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# PHP is built 3 ways:
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# php-sapi - Server API
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# php-cgi - CGI
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# php-nsapi - Netscape Server API
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# This is the Netscape group (aka webstack group)
dba22eabcfca7e9fe626abbad1494c3a0200dde0Matt Sweeney# that Sun purchased from AOL long ago.
dba22eabcfca7e9fe626abbad1494c3a0200dde0Matt Sweeney# I believe this Netscape server is still alive
dba22eabcfca7e9fe626abbad1494c3a0200dde0Matt Sweeney# and offered by Oracle.
dba22eabcfca7e9fe626abbad1494c3a0200dde0Matt Sweeney# These PHP's are built from the same source, patched the same way,
dba22eabcfca7e9fe626abbad1494c3a0200dde0Matt Sweeney# but configured differently.
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# More relevant to the full USERLAND build is the dependency tree
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# for say starting the build down in an extension module:
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# To publish the APC extension:
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 1) build imap
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 2) install php-sapi
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 3) install APC
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 4) install php-nsapi
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 5) install APC-zts
ce93c9e30dd338180488beb781d0cb1b0473654aLuke Smith# 6) publish APC
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# SFW build of php
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 1) build_imap - Because php needs headers and libc-client.a
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# Must be built first.
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# 2) build_modphp5 - php SAPI
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# $(PHP_DIR)/configure
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# unroll php archive
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# ./buildconf
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# edit configure
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# copy php source tree for php_fast/cgi build
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# unroll webserver7-spi
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# [Sun Java System Web Server 7 (formerly known
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# as Sun ONE/iPlanet Enterprise Server)]
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# [now Oracle iPlanet Web Server 7]
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# copy php source tree for php_nsapi build
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# $(PHP_NSAPI)/configure
6340fd3eeb615e0720d218535598b6627a3d4c71Jeff Conniff# ./configure
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# 3) build_cgi - php cgi/fastcgi
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# 4) build_nsapi - php nsapi (netscape SAPI - old sun webserver product)
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# (still applicable)
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# I think so - http://blogs.oracle.com/natarajan/entry/php_plug_in_for_oracle
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# (now known as Oracle iPlanet Web Server 7)
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# 5) install_php - this is called AFTER php builds and installs
6340fd3eeb615e0720d218535598b6627a3d4c71Jeff Conniff# cd $(PHP_DIR); make install
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# cd $(PHP_NSAPI); make libphp5.la install-modules
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# ./install-php5
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# don't need fix_bin_scripts()
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# [paths already correct and some things don't exist.]
433c6e4d8b64100e84f0a4d37768706d5951994fJeff Conniff# looks like i DO NEED the pear patches
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += APC-zts/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += idn-zts/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += memcache/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += memcache-zts/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += php-cgi/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += php-nsapi/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += php-sapi/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += suhosin/build/prototype/$(MACH)
07ad9ab2be0e01d9fe09926c37a65a867aa6f401Jeff ConniffPKG_PROTO_DIRS += suhosin-zts/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += tcpwrap/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += tcpwrap-zts/build/prototype/$(MACH)
07ad9ab2be0e01d9fe09926c37a65a867aa6f401Jeff ConniffPKG_PROTO_DIRS += xdebug/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += xdebug-zts/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneyPKG_PROTO_DIRS += zendopcache/build/prototype/$(MACH)
07ad9ab2be0e01d9fe09926c37a65a867aa6f401Jeff ConniffPKG_PROTO_DIRS += zendopcache-zts/build/prototype/$(MACH)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# for now, everything with a Makefile should be built
57944bee374767ef401f984a0136afb3822f22f7Matt SweeneySUBDIRS = $(shell echo */Makefile | sed -e 's;/Makefile;;g')
07ad9ab2be0e01d9fe09926c37a65a867aa6f401Jeff Conniff @cd $@ && echo "$(TARGET) $@" && $(MAKE) $(TARGET)
57944bee374767ef401f984a0136afb3822f22f7Matt Sweeney# declare module dependencies