Thrift build cleanup stuff

Summary: Get rid of autoconf stuff for lib/php, it doesn't do anything


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Slee 2007-03-05 22:18:18 +00:00
parent 3303f36081
commit 5d06feab21
12 changed files with 52 additions and 165 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
subdirs="compiler/cpp lib/cpp lib/php lib/py"
subdirs="compiler/cpp lib/cpp lib/py"
./cleanup.sh
echo "SUBDIRS = ${subdirs}" > Makefile.am

View File

@ -1,6 +1,6 @@
#!/bin/sh
subdirs="compiler/cpp lib/cpp lib/php lib/py"
subdirs="compiler/cpp lib/cpp lib/py"
rm -rf \
AUTHORS \

View File

@ -8,6 +8,6 @@ AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_CONFIG_SUBDIRS([compiler/cpp lib/cpp lib/php lib/py])
AC_CONFIG_SUBDIRS([compiler/cpp lib/cpp lib/py])
AC_OUTPUT

View File

@ -1,91 +0,0 @@
# Makefile for Thrift C++ library. Generates a shared object that can be
# installed to /usr/local/lib
#
# TODO(mcslee): Add the ability to compile separate statis modules that can
# be compiled directly into Thrift applications instead of dynamic runtime
# loading of the full libs
#
# Author:
# Mark Slee <mcslee@facebook.com>
target: libthrift.so libconcurrency.so
# Tools
LD = g++
CPP = g++
CC_COMMON_FLAGS = -g -c -Wall -Isrc -fPIC -fno-common
LD_COMMON_FLAGS=
LD_APP_FLAGS= $(LD_COMMON_FLAGS)
LD_LIB_FLAGS= -dynamiclib $(LD_COMMON_FLAGS)
# Source files
SRCS = src/protocol/TBinaryProtocol.cc \
src/transport/TBufferedTransport.cc \
src/transport/TChunkedTransport.cc \
src/transport/TSocket.cc \
src/transport/TServerSocket.cc \
src/server/TSimpleServer.cc
# Concurreny Utility Source files
CONCURRENCY_SRCS = src/concurrency/Monitor.cc \
src/concurrency/Mutex.cc \
src/concurrency/PosixThreadFactory.cc \
src/concurrency/ThreadManager.cc \
src/concurrency/TimerManager.cc
CONCURRENCY_OBJS = $(patsubst %.cc,%.o,$(CONCURRENCY_SRCS))
$(CONCURRENCY_OBJS): %.o : %.cc
$(CC) $(CC_COMMON_FLAGS) $< -o $@
CONCURRENCY_TEST_SRCS = src/concurrency/test/TimerManagerTests.cc
CONCURRENCY_TEST_OBJS = $(patsubst %.cc,%.o,$(CONCURRENCY_TEST_SRCS))
$(CONCURRENCY_TEST_OBJS): %.o : %.cc
$(CC) $(CC_COMMON_FLAGS) -I src/concurrency $< -o $@
# Linked libraries
# thrift library
THRIFT_OBJS = $(patsubst %.cc,%.o, $(SRCS))
$(THRIFT_OBJS): %.o : %.cc
$(CC) $(CC_COMMON_FLAGS) $< -o $@
libthrift.so: $(THRIFT_OBJS)
$(LD) -o $@ $(LD_LIB_FLAGS) $(THRIFT_OBJS)
# concurrency util library
libconcurrency.so: $(CONCURRENCY_OBJS)
$(LD) -o $@ $(LD_LIB_FLAGS) $(CONCURRENCY_OBJS)
concurrency_tests: libconcurrency.so $(CONCURRENCY_TEST_OBJS)
$(LD) -o $@ $(LD_APP_FLAGS) -L. $(CONCURRENCY_TEST_OBJS) libconcurrency.so
tests: concurrency_tests
clean_libthrift:
rm -f libthrift.so
rm -f $(THRIFT_OBJS)
clean_libconcurrency:
rm -f libconcurrency.so
rm -f $(CONCURRENCY_OBJS)
clean_tests:
rm -f concurrency_tests
rm -f $(CONCURRENTY_TEST_OBJS)
# Clean it up
clean: clean_libthrift clean_libconcurrency clean_tests
# Install
install: libthrift
sudo install libthrift.so /usr/local/lib

View File

@ -1,5 +1,6 @@
#!/bin/sh
make clean 1>/dev/null 2>/dev/null
rm -rf \
AUTHORS \
ChangeLog \
@ -8,7 +9,6 @@ Makefile \
Makefile.in \
Makefile.orig \
NEWS \
README \
aclocal.m4 \
autom4te.cache \
autoscan.log \

View File

@ -106,4 +106,6 @@ AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_OUTPUT(Makefile)

View File

@ -71,11 +71,14 @@ enum TMessageType {
* Abstract class for a thrift protocol driver. These are all the methods that
* a protocol must implement. Essentially, there must be some way of reading
* and writing all the base types, plus a mechanism for writing out structs
* with indexed fields. Also notice that all methods are strictly const. This
* is by design. Protcol impelementations may NOT keep state, because the
* same TProtocol object may be used simultaneously by multiple threads. This
* theoretically introduces some limititations into the possible protocol
* formats, but with the benefit of performance, clarity, and simplicity.
* with indexed fields.
*
* TProtocol objects should not be shared across multiple encoding contexts,
* as they may need to maintain internal state in some protocols (i.e. XML).
* Note that is is acceptable for the TProtocol module to do its own internal
* buffered reads/writes to the underlying TTransport where appropriate (i.e.
* when parsing an input XML stream, reading should be batched rather than
* looking ahead character by character for a close tag).
*
* @author Mark Slee <mcslee@facebook.com>
*/

View File

@ -1,17 +0,0 @@
thrift_SCRIPTS = src/Thrift.php
protocol_SCRIPTS = src/protocol/TProtocol.php \
src/protocol/TBinaryProtocol.php
transport_SCRIPTS = src/transport/TTransport.php \
src/transport/TBufferedTransport.php \
src/transport/TFramedTransport.php \
src/transport/TSocket.php \
src/transport/TSocketPool.php
thriftdir = $(prefix)/php/thrift
protocoldir = $(thriftdir)/protocol
transportdir = $(thriftdir)/transport

38
lib/php/README Normal file
View File

@ -0,0 +1,38 @@
Thrift PHP Software Library
Mark Slee (mcslee@facebook.com)
Thrift is distributed under the Thrift open source software license.
Please see the included LICENSE file.
Using Thrift with PHP
=====================
Thrift requires PHP 5. Thrift makes as few assumptions about your PHP
environment as possible while trying to make some more advanced PHP
features (i.e. APC cacheing using asbolute path URLs) as simple as possible.
To use Thrift in your PHP codebase, take the following steps:
#1) Copy all of thrift/lib/php/src into your PHP codebase
#2) Set $GLOBALS['THRIFT_ROOT'] to the path you installed Thrift
#3) include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
Note that #3 must be done before including any other Thrift files.
If you do not do #2, Thrift.php will set this global for you, but it will be
done using dirname(__FILE__), which is less efficient than providing the static
string yourself.
Dependencies
============
PHP_INT_SIZE
This built-in signals whether your architecture is 32 or 64 bit and is
used by the TBinaryProtocol to properly use pack() and unpack() to
serialize data.
apc_fetch(), apc_store()
APC cache is used by the TSocketPool class. If you do not have APC installed,
Thrift will fill in null stub function definitions.

View File

@ -1,7 +0,0 @@
#!/bin/sh
./cleanup.sh
aclocal
touch NEWS README AUTHORS ChangeLog
autoconf
automake -ac

View File

@ -1,30 +0,0 @@
#!/bin/sh
rm -rf \
AUTHORS \
ChangeLog \
INSTALL \
Makefile \
Makefile.in \
Makefile.orig \
NEWS \
README \
aclocal.m4 \
autom4te.cache \
autoscan.log \
config.guess \
config.h \
config.hin \
config.log \
config.status \
config.sub \
configure \
configure.scan \
depcomp \
.deps \
install-sh \
.libs \
libtool \
ltmain.sh \
Makefile.in \
missing

View File

@ -1,11 +0,0 @@
AC_PREREQ(2.59)
AC_INIT([thriftphp], [1.0])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT