diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/Makefile.am | 2 | ||||
-rw-r--r-- | cpp/README-dev | 8 | ||||
-rw-r--r-- | cpp/configure.ac | 10 | ||||
-rw-r--r-- | cpp/docs/api/Makefile.am | 11 | ||||
-rw-r--r-- | cpp/docs/api/user.doxygen (renamed from cpp/docs/api/Doxyfile) | 24 | ||||
-rw-r--r-- | cpp/docs/man/Makefile.am (renamed from cpp/man/Makefile.am) | 2 | ||||
-rw-r--r-- | cpp/docs/man/qpidd.x (renamed from cpp/man/qpidd.x) | 0 | ||||
-rwxr-xr-x | cpp/etc/init.d/qpidd | 83 | ||||
-rw-r--r-- | cpp/gen/Makefile.am | 23 | ||||
-rw-r--r-- | cpp/lib/broker/Makefile.am | 6 | ||||
-rw-r--r-- | cpp/lib/client/Makefile.am | 25 | ||||
-rw-r--r-- | cpp/lib/common/Makefile.am | 88 | ||||
-rw-r--r-- | cpp/src/Makefile.am | 6 | ||||
-rw-r--r-- | cpp/tests/Makefile.am | 6 |
14 files changed, 195 insertions, 99 deletions
diff --git a/cpp/Makefile.am b/cpp/Makefile.am index c3636e5683..d577f590cb 100644 --- a/cpp/Makefile.am +++ b/cpp/Makefile.am @@ -3,7 +3,7 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = README-dist DESIGN LICENSE.txt NOTICE.txt README.rhel3 -SUBDIRS = gen lib tests src docs/api man +SUBDIRS = gen lib tests src docs/api docs/man # Update libtool, if needed. libtool: $(LIBTOOL_DEPS) diff --git a/cpp/README-dev b/cpp/README-dev index b0324ad32d..eca566919b 100644 --- a/cpp/README-dev +++ b/cpp/README-dev @@ -15,7 +15,6 @@ that you have the latest stable version. * libtool <http://www.gnu.org/software/libtool/> * pkgconfig <http://pkgconfig.freedesktop.org/wiki/> (aka pkg-config) - Optional: to re-generated generated code from the XML specification: * java 5 @@ -28,7 +27,7 @@ Optional: to generate documentation you need: If you use yum to install packages, do the command from the README-dist then: -# yum install apr-devel cppunit-devel pkgconfig boost-devel doxygen graphviz +# yum install apr-devel cppunit-devel pkgconfig boost-devel doxygen graphviz help2man pkgconfig == Recent changes == @@ -68,6 +67,7 @@ simplified and this README will be updated accordingly. Before building a fresh checkout do: ./bootstrap + ./configure This generates config, makefiles and the like - check the script for details. You only need to do this once, "make" will keep everything up @@ -86,9 +86,9 @@ optimization: make distclean mkdir .build-dbg .build-opt (cd .build-opt - ../configure --enable-warnings --prefix=/tmp/x && make && make check) + ../configure --prefix=/tmp/x && make && make check) (cd .build-dbg - ../configure --enable-warnings CXXFLAGS=-g --prefix=/tmp/x \ + ../configure CXXFLAGS=-g --prefix=/tmp/x \ && make && make check) === Portability === diff --git a/cpp/configure.ac b/cpp/configure.ac index 3ee1a9b1de..7f4a313201 100644 --- a/cpp/configure.ac +++ b/cpp/configure.ac @@ -41,12 +41,8 @@ AC_ARG_ENABLE(warnings, build=yes AC_CHECK_PROGS([JAVA], [java], [no]) AC_CHECK_PROGS([JAVAC], [javac], [no]) -build=yes -test x$JAVA = xno && build=no -test x$JAVAC = xno && build=no -test -d $srcdir/../gentools || build=no -test -d $srcdir/../specs || build=no -AM_CONDITIONAL([BUILD_IN_MESSAGE_TREE], [test x$build = xyes]) +AM_CONDITIONAL([CAN_GENERATE_CODE], + [test x$JAVA = xyes -a x$JAVAC = xyes -a -d $srcdir/../gentools -a -d $srcdir/../specs ]) # Warnings: Enable as many as possible, keep the code clean. Please # do not disable warnings or remove -Werror without discussing on @@ -130,8 +126,8 @@ AC_CONFIG_FILES([ lib/client/Makefile lib/broker/Makefile src/Makefile - man/Makefile tests/Makefile + docs/man/Makefile docs/api/Makefile ]) diff --git a/cpp/docs/api/Makefile.am b/cpp/docs/api/Makefile.am index 22a2efe8b3..7e2f2e811d 100644 --- a/cpp/docs/api/Makefile.am +++ b/cpp/docs/api/Makefile.am @@ -1,8 +1,9 @@ -html: Doxyfile doxygen.tstamp +html: user.doxygen doxygen.tstamp -# TODO aconway 2006-12-07: devdoc target to generate doc for all -# headers, with private/protected functions. +dist-hook: html + +EXTRA_DIST=html SOURCES = \ $(wildcard $(topsrcdir)/gen/*.h) \ @@ -12,7 +13,7 @@ SOURCES = \ $(wildcard $(topsrcdir)/lib/client/*.h) doxygen.tstamp: $(SOURCES) - doxygen + doxygen user.doxygen touch $@ clean-local: @@ -20,7 +21,7 @@ clean-local: HTML_TARGET_DIR=$(pkgdatadir)/api/html -install-data-local: +install-data-local: installfiles=`echo html/*`; \ if test "$$installfiles" = 'html/*'; \ then echo '-- Nothing to install' ; \ diff --git a/cpp/docs/api/Doxyfile b/cpp/docs/api/user.doxygen index 4e8afcad60..d2f47be9b4 100644 --- a/cpp/docs/api/Doxyfile +++ b/cpp/docs/api/user.doxygen @@ -1,4 +1,10 @@ -# NB: requires doxygen and graphviz - install with yum. +# ---------------------------------------------------------------- +# Doxygen settings for Qpid user documentation. +# +# Note: Only public members of classes that are part of the public API +# should be documented here. For complete developer documentation use +# the developer.doxygen configuration. +# ---------------------------------------------------------------- # Doxyfile 1.4.6 @@ -230,12 +236,12 @@ SUBGROUPING = YES # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES -EXTRACT_ALL = YES +EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. -EXTRACT_PRIVATE = YES +EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. @@ -246,7 +252,7 @@ EXTRACT_STATIC = YES # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. -EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_CLASSES = NO # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in @@ -282,7 +288,7 @@ HIDE_FRIEND_COMPOUNDS = YES # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. -HIDE_IN_BODY_DOCS = NO +HIDE_IN_BODY_DOCS = YES # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set @@ -557,7 +563,7 @@ FILTER_SOURCE_FILES = NO # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. -SOURCE_BROWSER = YES +SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. @@ -723,7 +729,7 @@ ENUM_VALUES_PER_LINE = 4 # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree @@ -1115,12 +1121,12 @@ GROUP_GRAPHS = YES # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. -UML_LOOK = NO +UML_LOOK = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. -TEMPLATE_RELATIONS = NO +TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented diff --git a/cpp/man/Makefile.am b/cpp/docs/man/Makefile.am index 392633251e..1edfdd55d2 100644 --- a/cpp/man/Makefile.am +++ b/cpp/docs/man/Makefile.am @@ -13,6 +13,6 @@ SUFFIXES = .x .1 .x.1: @rm -f $@ @echo "Updating man page $@" - $(HELP2MAN) --no-info --include=$(srcdir)/$*.x --output=$@-t ../src/$* + $(HELP2MAN) --no-info --include=$(srcdir)/$*.x --output=$@-t ../../src/$* @chmod a-w $@-t @mv $@-t $@ diff --git a/cpp/man/qpidd.x b/cpp/docs/man/qpidd.x index e60505cc9c..e60505cc9c 100644 --- a/cpp/man/qpidd.x +++ b/cpp/docs/man/qpidd.x diff --git a/cpp/etc/init.d/qpidd b/cpp/etc/init.d/qpidd new file mode 100755 index 0000000000..0c6041b063 --- /dev/null +++ b/cpp/etc/init.d/qpidd @@ -0,0 +1,83 @@ +#!/bin/bash +# +# qpidd Startup script for the Qpid messaging daemon. +# +# chkconfig: - 85 15 +# description: Qpidd is an AMQP broker. It receives, stores and routes +# messages sent using the AMQP protcol. +# processname: qpidd +# pidfile: /var/run/qpidd.pid +# +# NB: add config: entries here when qpidd gets a config file. + +# Source function library. +. /etc/rc.d/init.d/functions + +if [ -f /etc/sysconfig/qpidd ]; then + . /etc/sysconfig/qpidd +fi + +# Start qpidd in the C locale by default. +QPIDD_LANG=${QPIDD_LANG-"C"} + +qpidd=${QPIDD-/usr/sbin/qpidd} +prog=qpidd +pidfile=${PIDFILE-/var/run/qpidd.pid} +lockfile=${LOCKFILE-/var/lock/subsys/qpidd} +RETVAL=0 + +start() { + echo -n $"Starting $prog: " + LANG=$QPIDD_LANG daemon $qpidd $OPTIONS + RETVAL=$? + echo + [ $RETVAL = 0 ] && touch ${lockfile} + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc 2 $qpidd + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile} +} + +reload() { + echo -n $"Reloading $prog: " + killproc $qpidd -HUP + RETVAL=$? + echo +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status $qpidd + RETVAL=$? + ;; + restart) + stop + start + ;; + condrestart) + if [ -f ${pidfile} ] ; then + stop + start + fi + ;; + reload) + reload + ;; + *) + echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}" + exit 1 +esac + +exit $RETVAL diff --git a/cpp/gen/Makefile.am b/cpp/gen/Makefile.am index eea08c9570..55f55821a6 100644 --- a/cpp/gen/Makefile.am +++ b/cpp/gen/Makefile.am @@ -1,38 +1,41 @@ include gen-src.mk BUILT_SOURCES = $(generated_sources) +pkginclude_HEADERS=$(generated_headers) # Distribute the generated sources, at least for now, since # the generator code is in java. EXTRA_DIST = $(BUILT_SOURCES) MAINTAINERCLEANFILES = $(BUILT_SOURCES) +# Don't attempt to run the code generator unless configure has set +# CAN_GENERATE_CODE, indicating that the amqp.xml and tools needed +# to run the code generator are available. +# +if CAN_GENERATE_CODE + gentools_dir = $(srcdir)/../../gentools spec_dir = $(srcdir)/../../specs spec = $(spec_dir)/amqp-8.0.xml gentools_srcdir = $(gentools_dir)/src/org/apache/qpid/gentools timestamp: $(spec) $(java_sources) $(cxx_templates) -if BUILD_IN_MESSAGE_TREE rm -f $(generated_sources) cd $(gentools_srcdir) && rm -f *.class && $(JAVAC) *.java $(JAVA) -cp $(gentools_dir)/src org.apache.qpid.gentools.Main \ -c -o . -t $(gentools_dir)/templ.cpp $(spec) -else - echo "warning: failed to regenerate gen/*.{cpp,h}" 1>&2 -endif touch timestamp -EXTRA_DIST += timestamp $(generated_sources): timestamp DISTCLEANFILES = gen-src.mk gen-src.mk: timestamp - ( echo 'generated_sources = '\\ \ - && ls *.cpp *.h | sort -u | sed 's/.*/ & \\/;$$s/ \\//' \ + ( echo 'generated_sources = '\\ \ + && ls *.cpp | sort -u | sed 's/.*/ & \\/;$$s/ \\//'; \ + echo 'generated_headers = '\\ \ + && ls *.h | sort -u | sed 's/.*/ & \\/;$$s/ \\//'; \ ) > $@-t -if BUILD_IN_MESSAGE_TREE - ( echo if BUILD_IN_MESSAGE_TREE; \ + ( echo if CAN_GENERATE_CODE; \ echo 'java_sources = '\\ \ && find $(gentools_srcdir) -name '*.java' \ | sort -u | sed 's/.*/ & \\/;$$s/ \\//'; \ @@ -41,5 +44,5 @@ if BUILD_IN_MESSAGE_TREE | sort -u | sed 's/.*/ & \\/;$$s/ \\//'; \ echo endif \ ) >> $@-t -endif mv $@-t $@ +endif diff --git a/cpp/lib/broker/Makefile.am b/cpp/lib/broker/Makefile.am index f02dc4f545..036efe3955 100644 --- a/cpp/lib/broker/Makefile.am +++ b/cpp/lib/broker/Makefile.am @@ -6,9 +6,9 @@ INCLUDES = \ -I$(top_srcdir)/lib/common/framing \ $(APR_CXXFLAGS) -lib_LTLIBRARIES = libbroker.la -libbroker_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO_ARG) -libbroker_la_SOURCES = \ +lib_LTLIBRARIES = libqpidbroker.la +libqpidbroker_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO_ARG) +libqpidbroker_la_SOURCES = \ AccumulatedAck.cpp \ AccumulatedAck.h \ AutoDelete.cpp \ diff --git a/cpp/lib/client/Makefile.am b/cpp/lib/client/Makefile.am index 28b96d7844..e4bd5a1151 100644 --- a/cpp/lib/client/Makefile.am +++ b/cpp/lib/client/Makefile.am @@ -6,27 +6,28 @@ INCLUDES = \ -I$(top_srcdir)/lib/common/framing \ $(APR_CXXFLAGS) -lib_LTLIBRARIES = libclient.la -libclient_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO_ARG) -libclient_la_SOURCES = \ +lib_LTLIBRARIES = libqpidclient.la +libqpidclient_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO_ARG) +libqpidclient_la_SOURCES = \ ClientChannel.cpp \ - ClientChannel.h \ ClientExchange.cpp \ - ClientExchange.h \ ClientMessage.cpp \ - ClientMessage.h \ ClientQueue.cpp \ - ClientQueue.h \ Connection.cpp \ - Connection.h \ Connector.cpp \ - Connector.h \ IncomingMessage.cpp \ - IncomingMessage.h \ MessageListener.cpp \ + ResponseHandler.cpp \ + ReturnedMessageHandler.cpp +pkginclude_HEADERS = \ + ClientChannel.h \ + ClientExchange.h \ + ClientMessage.h \ + ClientQueue.h \ + Connection.h \ + Connector.h \ + IncomingMessage.h \ MessageListener.h \ MethodBodyInstances.h \ - ResponseHandler.cpp \ ResponseHandler.h \ - ReturnedMessageHandler.cpp \ ReturnedMessageHandler.h diff --git a/cpp/lib/common/Makefile.am b/cpp/lib/common/Makefile.am index 6f21a332d4..bd9f3f422e 100644 --- a/cpp/lib/common/Makefile.am +++ b/cpp/lib/common/Makefile.am @@ -10,94 +10,102 @@ apr = sys/apr apr_src = \ $(apr)/APRAcceptor.cpp \ $(apr)/APRBase.cpp \ - $(apr)/APRBase.h \ $(apr)/APRPool.cpp \ - $(apr)/APRPool.h \ $(apr)/APRSocket.cpp \ - $(apr)/APRSocket.h \ $(apr)/LFProcessor.cpp \ - $(apr)/LFProcessor.h \ $(apr)/LFSessionContext.cpp \ - $(apr)/LFSessionContext.h \ $(apr)/Socket.cpp \ $(apr)/Thread.cpp +apr_hdr = \ + $(apr)/APRBase.h \ + $(apr)/APRPool.h \ + $(apr)/APRSocket.h \ + $(apr)/LFProcessor.h \ + $(apr)/LFSessionContext.h posix = sys/posix -posix_src = \ - $(posix)/PosixAcceptor.cpp \ - $(posix)/Socket.cpp \ - $(posix)/Thread.cpp \ - $(posix)/check.cpp \ - $(posix)/check.h \ - $(posix)/EventChannel.cpp \ - $(posix)/EventChannel.h \ - $(posix)/EventChannelThreads.cpp \ +posix_src = \ + $(posix)/PosixAcceptor.cpp \ + $(posix)/Socket.cpp \ + $(posix)/Thread.cpp \ + $(posix)/check.cpp \ + $(posix)/EventChannel.cpp \ + $(posix)/EventChannelThreads.cpp +posix_hdr = \ + $(posix)/check.h \ + $(posix)/EventChannel.h \ $(posix)/EventChannelThreads.h -EXTRA_DIST=$(posix_src) +EXTRA_DIST=$(posix_src) $(posix_hdr) platform_src = $(apr_src) +platform_hdr = $(apr_hdr) framing = framing gen = $(srcdir)/../../gen -lib_LTLIBRARIES = libcommon.la -libcommon_la_LIBADD = \ +lib_LTLIBRARIES = libqpidcommon.la +libqpidcommon_la_LIBADD = \ $(APR_LIBS) \ $(LIB_DLOPEN) \ $(LIB_CLOCK_GETTIME) -libcommon_la_LDFLAGS = \ +libqpidcommon_la_LDFLAGS = \ -version-info \ $(LIBTOOL_VERSION_INFO_ARG) -libcommon_la_SOURCES = \ +libqpidcommon_la_SOURCES = \ $(platform_src) \ $(framing)/AMQBody.cpp \ - $(framing)/AMQBody.h \ $(framing)/AMQContentBody.cpp \ + $(framing)/AMQFrame.cpp \ + $(framing)/AMQHeaderBody.cpp \ + $(framing)/AMQHeartbeatBody.cpp \ + $(framing)/AMQMethodBody.cpp \ + $(framing)/BasicHeaderProperties.cpp \ + $(framing)/BodyHandler.cpp \ + $(framing)/Buffer.cpp \ + $(framing)/FieldTable.cpp \ + $(framing)/InitiationHandler.cpp \ + $(framing)/ProtocolInitiation.cpp \ + $(framing)/ProtocolVersion.cpp \ + $(framing)/ProtocolVersionException.cpp \ + $(framing)/Value.cpp \ + $(gen)/AMQP_ClientProxy.cpp \ + $(gen)/AMQP_MethodVersionMap.cpp \ + $(gen)/AMQP_ServerProxy.cpp \ + Exception.cpp \ + ExceptionHolder.cpp \ + QpidError.cpp \ + sys/Runnable.cpp \ + sys/Time.cpp + +nobase_pkginclude_HEADERS = \ + $(platform_hdr) \ + $(framing)/AMQBody.h \ $(framing)/AMQContentBody.h \ $(framing)/AMQDataBlock.h \ - $(framing)/AMQFrame.cpp \ $(framing)/AMQFrame.h \ - $(framing)/AMQHeaderBody.cpp \ $(framing)/AMQHeaderBody.h \ - $(framing)/AMQHeartbeatBody.cpp \ $(framing)/AMQHeartbeatBody.h \ - $(framing)/AMQMethodBody.cpp \ $(framing)/AMQMethodBody.h \ - $(framing)/BasicHeaderProperties.cpp \ $(framing)/BasicHeaderProperties.h \ - $(framing)/BodyHandler.cpp \ $(framing)/BodyHandler.h \ - $(framing)/Buffer.cpp \ $(framing)/Buffer.h \ - $(framing)/FieldTable.cpp \ $(framing)/FieldTable.h \ $(framing)/FramingContent.cpp \ $(framing)/FramingContent.h \ $(framing)/HeaderProperties.h \ - $(framing)/InitiationHandler.cpp \ $(framing)/InitiationHandler.h \ $(framing)/InputHandler.h \ $(framing)/OutputHandler.h \ - $(framing)/ProtocolInitiation.cpp \ $(framing)/ProtocolInitiation.h \ - $(framing)/ProtocolVersion.cpp \ $(framing)/ProtocolVersion.h \ - $(framing)/ProtocolVersionException.cpp \ $(framing)/ProtocolVersionException.h \ - $(framing)/Value.cpp \ $(framing)/Value.h \ $(framing)/amqp_framing.h \ $(framing)/amqp_types.h \ - $(gen)/AMQP_ClientProxy.cpp \ - $(gen)/AMQP_MethodVersionMap.cpp \ - $(gen)/AMQP_ServerProxy.cpp \ - Exception.cpp \ Exception.h \ - ExceptionHolder.cpp \ ExceptionHolder.h \ - QpidError.cpp \ QpidError.h \ SharedObject.h \ sys/Acceptor.h \ @@ -105,7 +113,6 @@ libcommon_la_SOURCES = \ sys/Module.h \ sys/Monitor.h \ sys/Mutex.h \ - sys/Runnable.cpp \ sys/Runnable.h \ sys/SessionContext.h \ sys/SessionHandler.h \ @@ -113,6 +120,5 @@ libcommon_la_SOURCES = \ sys/ShutdownHandler.h \ sys/Socket.h \ sys/Thread.h \ - sys/Time.cpp \ sys/Time.h \ sys/TimeoutHandler.h diff --git a/cpp/src/Makefile.am b/cpp/src/Makefile.am index 61f721dc1a..2d5c83ba61 100644 --- a/cpp/src/Makefile.am +++ b/cpp/src/Makefile.am @@ -7,8 +7,8 @@ INCLUDES = \ -I$(top_srcdir)/lib/common/sys LDADD = \ - ../lib/broker/libbroker.la \ - ../lib/common/libcommon.la + ../lib/broker/libqpidbroker.la \ + ../lib/common/libqpidcommon.la -bin_PROGRAMS = qpidd +sbin_PROGRAMS = qpidd qpidd_SOURCES = qpidd.cpp diff --git a/cpp/tests/Makefile.am b/cpp/tests/Makefile.am index 76a3cab946..900bf47960 100644 --- a/cpp/tests/Makefile.am +++ b/cpp/tests/Makefile.am @@ -71,9 +71,9 @@ include gen.mk abs_builddir = @abs_builddir@ extra_libs = $(CPPUNIT_LIBS) -lib_client = $(abs_builddir)/../lib/client/libclient.la -lib_common = $(abs_builddir)/../lib/common/libcommon.la -lib_broker = $(abs_builddir)/../lib/broker/libbroker.la +lib_client = $(abs_builddir)/../lib/client/libqpidclient.la +lib_common = $(abs_builddir)/../lib/common/libqpidcommon.la +lib_broker = $(abs_builddir)/../lib/broker/libqpidbroker.la gen.mk: Makefile.am ( \ |