blob: 443be34fa0c0133fb596ff44f5c84b34b3142c9f [file] [log] [blame]
Craig Tillerf1973b02015-01-16 12:32:13 -08001#!/bin/bash
Jan Tattermusch7897ae92017-06-07 22:57:36 +02002# Copyright 2015 gRPC authors.
Craig Tiller83428812015-02-16 12:13:57 -08003#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02004# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
Craig Tiller83428812015-02-16 12:13:57 -08007#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02008# http://www.apache.org/licenses/LICENSE-2.0
Craig Tiller83428812015-02-16 12:13:57 -08009#
Jan Tattermusch7897ae92017-06-07 22:57:36 +020010# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Craig Tilleraac57fd2015-01-16 12:54:26 -080015
16set -ex
17
murgatroid99564b9442015-01-26 11:07:59 -080018CONFIG=${CONFIG:-opt}
19
Craig Tilleraac57fd2015-01-16 12:54:26 -080020# change to grpc repo root
Mehrdad Afshari009941e2017-06-27 12:39:29 -070021cd "$(dirname "$0")/../../.."
Craig Tilleraac57fd2015-01-16 12:54:26 -080022
Mehrdad Afshari009941e2017-06-27 12:39:29 -070023root=$(pwd)
murgatroid99564b9442015-01-26 11:07:59 -080024export GRPC_LIB_SUBDIR=libs/$CONFIG
Stanley Cheungd0532652015-08-26 14:02:33 -070025export CFLAGS="-Wno-parentheses-equality"
Craig Tilleraac57fd2015-01-16 12:54:26 -080026
27# build php
28cd src/php
29
30cd ext/grpc
31phpize
Stanley Cheunga6b95482016-01-13 16:10:48 -080032if [ "$CONFIG" != "gcov" ] ; then
Mehrdad Afshari009941e2017-06-27 12:39:29 -070033 ./configure --enable-grpc="$root"
Stanley Cheunga6b95482016-01-13 16:10:48 -080034else
Mehrdad Afshari009941e2017-06-27 12:39:29 -070035 ./configure --enable-grpc="$root" --enable-coverage
Stanley Cheunga6b95482016-01-13 16:10:48 -080036fi
Craig Tillerce5021b2015-02-18 09:25:21 -080037make