Author: steshaw
Date: Thu Dec  7 12:07:19 2006
New Revision: 483638

URL: http://svn.apache.org/viewvc?view=rev&rev=483638
Log:
New make-dist script and related files. Just a hack for now to build a binary 
dev release. Also updated README-dev with correct automake version and note 
about configuring cppunit

Added:
    incubator/qpid/trunk/qpid/cpp/make-dist   (with props)
    incubator/qpid/trunk/qpid/cpp/tests/examples.Makefile
    incubator/qpid/trunk/qpid/cpp/tests/examples.README
Removed:
    incubator/qpid/trunk/qpid/cpp/build.rhel3
    incubator/qpid/trunk/qpid/cpp/options-rhel3.mk
    incubator/qpid/trunk/qpid/cpp/options.mk
    incubator/qpid/trunk/qpid/cpp/release.client.rhel3
Modified:
    incubator/qpid/trunk/qpid/cpp/README-dev

Modified: incubator/qpid/trunk/qpid/cpp/README-dev
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/README-dev?view=diff&rev=483638&r1=483637&r2=483638
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/README-dev (original)
+++ incubator/qpid/trunk/qpid/cpp/README-dev Thu Dec  7 12:07:19 2006
@@ -4,9 +4,10 @@
 
 As per README-dist plus:
  * autoconf 2.59: http://www.gnu.org/software/autoconf
- * automake 1.9.6: http://www.gnu.org/software/automake
+ * automake 1.9.2: http://www.gnu.org/software/automake
  * libtool 1.5: http://www.gnu.org/software/libtool
  * CppUnit 1.10.2: http://cppunit.sourceforge.net
+   Note: Ensure cppunit-config is in your PATH.
 
 Optional: to re-generated generated code from the XML specification:
  * java 5

Added: incubator/qpid/trunk/qpid/cpp/make-dist
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/make-dist?view=auto&rev=483638
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/make-dist (added)
+++ incubator/qpid/trunk/qpid/cpp/make-dist Thu Dec  7 12:07:19 2006
@@ -0,0 +1,83 @@
+#!/bin/bash
+#
+# Temporary hack for producing a binary dev distribution.
+# Includes regular stuff from 'make install' + examples and headers.
+#
+# TODO: Also include debug libraries.
+#
+
+Usage() {
+  echo "usage: $0 [release-version]
+   release-version   e.g. 1.0M1 (defaults to the svn revision)" >&2
+  exit 2
+}
+
+if [[ $# -eq 1 ]]; then
+  [[ $1 == "-?" ]] && Usage
+  version=$1
+elif [[ $# -ne 0 ]]; then
+  Usage
+else
+  # Default the version to the svn revision
+  if which svn >/dev/null 2>&1; then
+    svnRevision=$(svn info | grep ^Revision: | awk '{print $2}')
+    version=r${svnRevision}
+  else
+    echo "You need to have svn in your PATH or specify a release-version"
+    exit 2
+  fi
+fi
+
+releaseName=qpid-cpp-dev-${version}
+releaseDir=release/$releaseName
+
+if [[ -d $releaseDir ]]; then
+  echo "$releaseDir already exists"
+  exit 2
+fi
+
+# Copy bin.
+mkdir -p $releaseDir/bin
+cp -r src/.libs/* ${releaseDir}/bin
+
+# Copy libs.
+mkdir -p $releaseDir/lib
+cp lib/broker/.libs/lib* lib/common/.libs/lib* lib/client/.libs/lib* \
+    $releaseDir/lib
+
+# Copy gen include files.
+find gen -name \*.h | while read file; do
+  destFile=${releaseDir}/include/$file
+  baseDir=$(dirname $destFile)
+  mkdir -p $baseDir
+  cp $file $destFile
+done
+
+# Copy in lib include files.
+(
+  cd lib; find . -name \*.h | while read file; do
+    destFile=../${releaseDir}/include/$file
+    baseDir=$(dirname $destFile)
+    mkdir -p $baseDir
+    cp $file $destFile
+  done
+)
+
+# Copy non-cppunit tests as examples.
+mkdir -p $releaseDir/examples
+for file in tests/*.cpp; do
+  if grep CppUnit $file >/dev/null; then
+     echo Skipping cppunit file $file
+  else
+     cp $file $releaseDir/examples
+  fi
+done
+
+# Copy Makefile and README for examples.
+cp tests/examples.Makefile $releaseDir/examples/Makefile
+cp tests/examples.README $releaseDir/examples/README
+
+cd release
+tar=$releaseName.tar
+tar cvf $tar $releaseName
+bzip2 $tar

Propchange: incubator/qpid/trunk/qpid/cpp/make-dist
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/qpid/trunk/qpid/cpp/tests/examples.Makefile
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/tests/examples.Makefile?view=auto&rev=483638
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/tests/examples.Makefile (added)
+++ incubator/qpid/trunk/qpid/cpp/tests/examples.Makefile Thu Dec  7 12:07:19 
2006
@@ -0,0 +1,66 @@
+#
+# XXX: Edit these locations to suit.
+#
+BOOST_LOCATION := $(HOME)/local/boost-1.33.1
+APR_LOCATION := $(HOME)/local/apr-1.2.7
+
+CXXFLAGS := -DNDEBUG -DUSE_APR -MMD -fpic
+
+#
+# Configure Boost.
+#
+BOOST_CFLAGS := -I$(BOOST_LOCATION)/include/boost-1_33_1
+CXXFLAGS := $(CXXFLAGS) $(BOOST_CFLAGS)
+
+#
+# Configure APR.
+#
+APR_CFLAGS := -I$(APR_LOCATION)/include/apr-1
+APR_LDFLAGS := $(shell $(APR_LOCATION)/bin/apr-1-config --libs) 
-L$(APR_LOCATION)/lib -lapr-1
+CXXFLAGS := $(CXXFLAGS) $(APR_CFLAGS)
+LDFLAGS := $(LDFLAGS) $(APR_LDFLAGS)
+
+#
+# Configure Qpid cpp client.
+#
+QPID_CLIENT_LDFLAGS := ../lib/libcommon.so ../lib/libclient.so
+includeDir := ../include
+QPID_CLIENT_CFLAGS := \
+  -I$(includeDir)/gen               \
+  -I$(includeDir)/client            \
+  -I$(includeDir)/broker            \
+  -I$(includeDir)/common            \
+  -I$(includeDir)/common/sys        \
+  -I$(includeDir)/common/framing
+
+CXXFLAGS := $(CXXFLAGS) $(QPID_CLIENT_CFLAGS)
+LDFLAGS := $(LDFLAGS) $(QPID_CLIENT_LDFLAGS)
+
+CXX := g++
+
+#
+# Add rule to build examples.
+#
+.SUFFIX: .cpp
+%: %.cpp
+       $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@
+
+#
+# Define targets.
+#
+
+EXAMPLES := client_test topic_listener topic_publisher echo_service
+
+cppFiles := $(wildcard *.cpp)
+programs = $(foreach cppFile, $(cppFiles), $(subst .cpp, ,$(cppFile)))
+
+.PHONY:
+all: $(programs)
+
+debug:
+       @echo cppFiles = $(cppFiles)
+       @echo programs = $(programs)
+
+.PHONY:
+clean:
+       -rm $(EXAMPLES)

Added: incubator/qpid/trunk/qpid/cpp/tests/examples.README
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/tests/examples.README?view=auto&rev=483638
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/tests/examples.README (added)
+++ incubator/qpid/trunk/qpid/cpp/tests/examples.README Thu Dec  7 12:07:19 2006
@@ -0,0 +1,18 @@
+Building the examples
+---------------------
+
+You had better edit the Makefile and provide the locations for APR and boost.
+
+Then just type 'make'.
+
+
+Running the examples
+--------------------
+
+Before running the examples ensure that you have setup your LD_LIBRARY_PATH.
+
+Most of the examples take the following connection parameters for your 
+AMQP broker:
+
+    -host host
+    -port port


Reply via email to