You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2008/06/11 03:16:46 UTC

svn commit: r666489 - in /incubator/thrift/trunk: lib/cpp/Makefile.am test/Makefile.am

Author: dreiss
Date: Tue Jun 10 18:16:45 2008
New Revision: 666489

URL: http://svn.apache.org/viewvc?rev=666489&view=rev
Log:
Allow out-of-source builds.

- Clean up lib/cpp/Makefile.am to use AM_CXXFLAGS etc instead of
  target-specific so we can take advantage of default flags.
- Use top_builddir in a few places instead of top_srcdir.

Modified:
    incubator/thrift/trunk/lib/cpp/Makefile.am
    incubator/thrift/trunk/test/Makefile.am

Modified: incubator/thrift/trunk/lib/cpp/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/Makefile.am?rev=666489&r1=666488&r2=666489&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/Makefile.am (original)
+++ incubator/thrift/trunk/lib/cpp/Makefile.am Tue Jun 10 18:16:45 2008
@@ -16,8 +16,8 @@
 pkgconfig_DATA += thrift-z.pc
 endif
 
-common_cxxflags = -Wall -Isrc $(BOOST_CPPFLAGS)
-common_ldflags = -Wall $(BOOST_LDFLAGS)
+AM_CXXFLAGS = -Wall
+AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(srcdir)/src
 
 # Define the source files for the module
 
@@ -54,19 +54,13 @@
 
 
 # Flags for the various libraries
-
-libthrift_la_CXXFLAGS =  $(common_cxxflags)
-
-libthriftnb_la_CXXFLAGS =  $(common_cxxflags)
-libthriftnb_la_CPPFLAGS =  $(LIBEVENT_CPPFLAGS)
-
-libthriftz_la_CXXFLAGS =  $(common_cxxflags)
-libthriftz_la_CPPFLAGS =  $(ZLIB_CPPFLAGS)
+libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
+libthriftz_la_CPPFLAGS  = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
 
 
 include_thriftdir = $(includedir)/thrift
 include_thrift_HEADERS = \
-                         $(top_srcdir)/config.h \
+                         $(top_builddir)/config.h \
                          src/Thrift.h \
                          src/TReflectionLocal.h \
                          src/reflection_limited_types.h \
@@ -133,9 +127,6 @@
 
 concurrency_test_LDADD = libthrift.la
 
-concurrency_test_CXXFLAGS =  $(common_cxxflags)
-concurrency_test_LDFLAGS =  $(common_ldflags)
-
 EXTRA_DIST = \
              README \
              thrift-nb.pc.in \

Modified: incubator/thrift/trunk/test/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/Makefile.am?rev=666489&r1=666488&r2=666489&view=diff
==============================================================================
--- incubator/thrift/trunk/test/Makefile.am (original)
+++ incubator/thrift/trunk/test/Makefile.am Tue Jun 10 18:16:45 2008
@@ -21,7 +21,7 @@
 	gen-cpp/ThriftTest.cpp \
 	gen-cpp/ThriftTest_types.cpp
 
-libtestgencpp_la_LIBADD = $(top_srcdir)/lib/cpp/libthrift.la
+libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
 
 noinst_PROGRAMS = Benchmark
 
@@ -56,7 +56,7 @@
 	TFDTransportTest.cpp
 
 TFDTransportTest_LDADD = \
-	$(top_srcdir)/lib/cpp/libthrift.la
+	$(top_builddir)/lib/cpp/libthrift.la
 
 
 #
@@ -66,7 +66,7 @@
 	TPipedTransportTest.cpp
 
 TPipedTransportTest_LDADD = \
-	$(top_srcdir)/lib/cpp/libthrift.la
+	$(top_builddir)/lib/cpp/libthrift.la
 
 #
 # DebugProtoTest
@@ -105,7 +105,7 @@
 #
 # Common thrift code generation rules
 #
-THRIFT = $(top_srcdir)/compiler/cpp/thrift
+THRIFT = $(top_builddir)/compiler/cpp/thrift
 
 gen-cpp/DebugProtoTest_types.cpp gen-cpp/PartiallyReflectable.cpp: DebugProtoTest.thrift
 	$(THRIFT) --gen cpp:dense,reflection_limited $<