diff options
author | Kengo Seki <sekikn@apache.org> | 2019-10-18 22:09:01 +0900 |
---|---|---|
committer | Duru Can Celasun <dcelasun@apache.org> | 2019-10-18 14:09:01 +0100 |
commit | 538e36c645d6e56748c6af3ef80ef21b26646ed2 (patch) | |
tree | 22efe3c040c424418248a4ef67df9e61ead990ba /tutorial | |
parent | 9f0548e05f1b1383cc122148d60cc40383ce599e (diff) | |
download | thrift-538e36c645d6e56748c6af3ef80ef21b26646ed2.tar.gz |
THRIFT-4975: Add Makefile.am to the PHP tutorial
Client: php
This closes #1900.
Diffstat (limited to 'tutorial')
-rwxr-xr-x | tutorial/Makefile.am | 5 | ||||
-rwxr-xr-x | tutorial/php/Makefile.am | 36 | ||||
-rwxr-xr-x | tutorial/php/PhpClient.php | 2 | ||||
-rwxr-xr-x | tutorial/php/PhpServer.php | 2 |
4 files changed, 42 insertions, 3 deletions
diff --git a/tutorial/Makefile.am b/tutorial/Makefile.am index 9160ad08c..49d18fb26 100755 --- a/tutorial/Makefile.am +++ b/tutorial/Makefile.am @@ -87,6 +87,10 @@ if WITH_PERL SUBDIRS += perl endif +if WITH_PHP +SUBDIRS += php +endif + # # generate html for ThriftTest.thrift # @@ -108,7 +112,6 @@ EXTRA_DIST = \ erl \ hs \ ocaml \ - php \ shared.thrift \ tutorial.thrift \ README.md diff --git a/tutorial/php/Makefile.am b/tutorial/php/Makefile.am new file mode 100755 index 000000000..65f487951 --- /dev/null +++ b/tutorial/php/Makefile.am @@ -0,0 +1,36 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +gen-php/tutorial/Calculator.php gen-php/shared/SharedService.php: $(top_srcdir)/tutorial/tutorial.thrift + $(THRIFT) --gen php:server -r $< + +all-local: gen-php/tutorial/Calculator.php + +tutorialserver: all + ${PYTHON} runserver.py + +tutorialclient: all + ${PHP} PhpClient.php --http + +clean-local: + $(RM) -r gen-* + +EXTRA_DIST = \ + PhpServer.php \ + PhpClient.php diff --git a/tutorial/php/PhpClient.php b/tutorial/php/PhpClient.php index eb2c2e5ee..5ac154718 100755 --- a/tutorial/php/PhpClient.php +++ b/tutorial/php/PhpClient.php @@ -9,7 +9,7 @@ require_once __DIR__.'/../../vendor/autoload.php'; use Thrift\ClassLoader\ThriftClassLoader; -$GEN_DIR = realpath(dirname(__FILE__).'/..').'/gen-php'; +$GEN_DIR = realpath(dirname(__FILE__)).'/gen-php'; $loader = new ThriftClassLoader(); $loader->registerNamespace('Thrift', __DIR__ . '/../../lib/php/lib'); diff --git a/tutorial/php/PhpServer.php b/tutorial/php/PhpServer.php index 749da3a0b..f4b3b319f 100755 --- a/tutorial/php/PhpServer.php +++ b/tutorial/php/PhpServer.php @@ -9,7 +9,7 @@ require_once __DIR__.'/../../vendor/autoload.php'; use Thrift\ClassLoader\ThriftClassLoader; -$GEN_DIR = realpath(dirname(__FILE__).'/..').'/gen-php'; +$GEN_DIR = realpath(dirname(__FILE__)).'/gen-php'; $loader = new ThriftClassLoader(); $loader->registerNamespace('Thrift', __DIR__ . '/../../lib/php/lib'); |