Skip to content

Commit

Permalink
THRIFT-647. php: PHP library is missing install target
Browse files Browse the repository at this point in the history
This patch adds a 'make install' target to a new PHP makefile. 

Patch: Anthony Molinaro

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940325 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Bryan Duxbury committed May 2, 2010
1 parent 06491d7 commit 6a68187
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/cpp/src/generate/t_java_generator.cc
Expand Up @@ -1899,7 +1899,11 @@ void t_java_generator::generate_java_bean_boilerplate(ofstream& out,
indent(out) << "public boolean is" << get_cap_name("set") << cap_name << "() {" << endl;
indent_up();
if (type_can_be_null(type)) {
indent(out) << "return this." << field_name << " != null;" << endl;
indent(out) << "return this." << field_name << " != null";
if (type->is_struct() && ((t_struct*)type)->is_union()) {
out << " && this." << field_name << ".isSet()";
}
out << ";" << endl;
} else {
indent(out) << "return __isset_bit_vector.get(" << isset_field_id(field) << ");" << endl;
}
Expand Down
13 changes: 13 additions & 0 deletions configure.ac
Expand Up @@ -37,6 +37,12 @@ AC_ARG_VAR([JAVA_PREFIX], [Prefix for installing the Java lib jar.
Default = "/usr/local/lib"])
AS_IF([test "x$JAVA_PREFIX" = x], [JAVA_PREFIX="/usr/local/lib"])

AC_ARG_VAR([PHP_PREFIX], [Prefix for installing PHP modules.
(Normal --prefix is ignored for PHP because
PHP has different conventions.)
Default = "/usr/lib/php"])
AS_IF([test "x$PHP_PREFIX" = x], [PHP_PREFIX="/usr/lib/php"])

AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
Expand Down Expand Up @@ -103,6 +109,12 @@ if test "$with_perl" = "yes"; then
fi
AM_CONDITIONAL(WITH_PERL, [test -n "$PERL"])

AX_THRIFT_LIB(php, [PHP], yes)
if test "$with_php" = "yes"; then
AC_PATH_PROG([PHP], [php])
fi
AM_CONDITIONAL(WITH_PHP, [test -n "$PHP"])

AX_THRIFT_LIB(ruby, [Ruby], yes)
if test "$with_ruby" = "yes"; then
AC_PATH_PROG([RUBY], [ruby])
Expand Down Expand Up @@ -250,6 +262,7 @@ AC_CONFIG_FILES([
lib/java/Makefile
lib/perl/Makefile
lib/perl/test/Makefile
lib/php/Makefile
lib/py/Makefile
lib/rb/Makefile
test/Makefile
Expand Down
4 changes: 4 additions & 0 deletions lib/Makefile.am
Expand Up @@ -44,6 +44,10 @@ if WITH_PERL
SUBDIRS += perl
endif

if WITH_PHP
SUBDIRS += php
endif

# All of the libs that don't use Automake need to go in here
# so they will end up in our release tarballs.
EXTRA_DIST = \
Expand Down
29 changes: 29 additions & 0 deletions lib/php/Makefile.am
@@ -0,0 +1,29 @@
phpdir = ${PHP_PREFIX}
php_DATA = \
src/autoload.php \
src/Thrift.php

phpextdir = ${phpdir}/ext/thrift_protocol
phpext_DATA = \
src/ext/thrift_protocol/config.m4 \
src/ext/thrift_protocol/php_thrift_protocol.cpp \
src/ext/thrift_protocol/php_thrift_protocol.h

phpprotocoldir = ${phpdir}/protocol
phpprotocol_DATA = \
src/protocol/TBinaryProtocol.php \
src/protocol/TProtocol.php

phptransportdir = ${phpdir}/transport
phptransport_DATA = \
src/transport/TBufferedTransport.php \
src/transport/TFramedTransport.php \
src/transport/THttpClient.php \
src/transport/TMemoryBuffer.php \
src/transport/TNullTransport.php \
src/transport/TPhpStream.php \
src/transport/TSocket.php \
src/transport/TSocketPool.php \
src/transport/TTransport.php

MAINTAINERCLEANFILES = Makefile Makefile.in

0 comments on commit 6a68187

Please sign in to comment.