Craig Tiller | f1973b0 | 2015-01-16 12:32:13 -0800 | [diff] [blame] | 1 | #!/bin/bash |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 2 | # Copyright 2015 gRPC authors. |
Craig Tiller | 8342881 | 2015-02-16 12:13:57 -0800 | [diff] [blame] | 3 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 4 | # 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 Tiller | 8342881 | 2015-02-16 12:13:57 -0800 | [diff] [blame] | 7 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
Craig Tiller | 8342881 | 2015-02-16 12:13:57 -0800 | [diff] [blame] | 9 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 10 | # 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 Tiller | aac57fd | 2015-01-16 12:54:26 -0800 | [diff] [blame] | 15 | |
| 16 | set -ex |
| 17 | |
murgatroid99 | 564b944 | 2015-01-26 11:07:59 -0800 | [diff] [blame] | 18 | CONFIG=${CONFIG:-opt} |
| 19 | |
Craig Tiller | aac57fd | 2015-01-16 12:54:26 -0800 | [diff] [blame] | 20 | # change to grpc repo root |
Mehrdad Afshari | 009941e | 2017-06-27 12:39:29 -0700 | [diff] [blame] | 21 | cd "$(dirname "$0")/../../.." |
Craig Tiller | aac57fd | 2015-01-16 12:54:26 -0800 | [diff] [blame] | 22 | |
Mehrdad Afshari | 009941e | 2017-06-27 12:39:29 -0700 | [diff] [blame] | 23 | root=$(pwd) |
murgatroid99 | 564b944 | 2015-01-26 11:07:59 -0800 | [diff] [blame] | 24 | export GRPC_LIB_SUBDIR=libs/$CONFIG |
Stanley Cheung | d053265 | 2015-08-26 14:02:33 -0700 | [diff] [blame] | 25 | export CFLAGS="-Wno-parentheses-equality" |
Craig Tiller | aac57fd | 2015-01-16 12:54:26 -0800 | [diff] [blame] | 26 | |
| 27 | # build php |
| 28 | cd src/php |
| 29 | |
| 30 | cd ext/grpc |
| 31 | phpize |
Stanley Cheung | a6b9548 | 2016-01-13 16:10:48 -0800 | [diff] [blame] | 32 | if [ "$CONFIG" != "gcov" ] ; then |
Mehrdad Afshari | 009941e | 2017-06-27 12:39:29 -0700 | [diff] [blame] | 33 | ./configure --enable-grpc="$root" |
Stanley Cheung | a6b9548 | 2016-01-13 16:10:48 -0800 | [diff] [blame] | 34 | else |
Mehrdad Afshari | 009941e | 2017-06-27 12:39:29 -0700 | [diff] [blame] | 35 | ./configure --enable-grpc="$root" --enable-coverage |
Stanley Cheung | a6b9548 | 2016-01-13 16:10:48 -0800 | [diff] [blame] | 36 | fi |
Craig Tiller | ce5021b | 2015-02-18 09:25:21 -0800 | [diff] [blame] | 37 | make |