summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-04-14 16:38:02 +0000
committerAlan Conway <aconway@apache.org>2007-04-14 16:38:02 +0000
commite592f06a7e03c4fe15372171b871bcc207cc4089 (patch)
treec73fcc45594441f6d7767894b0229931111e1471 /cpp/src
parent7c48ed87f8fbf6557bfbcc9fc84e25b9f24189ac (diff)
downloadqpid-python-e592f06a7e03c4fe15372171b871bcc207cc4089.tar.gz
* Moved code generation into top-level gen/ dir with own Makefile.am
to correctly install generated headers. * Fixed gen-src.mk/Makefile dependency loop, bootstrap no longer needs to pre-create gen-src.mk. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@528835 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Makefile.am55
-rwxr-xr-xcpp/src/make-gen-src-mk.sh31
-rw-r--r--cpp/src/qpidd.cpp4
-rw-r--r--cpp/src/tests/Makefile.am2
4 files changed, 11 insertions, 81 deletions
diff --git a/cpp/src/Makefile.am b/cpp/src/Makefile.am
index 5e713425af..d6f0c387fd 100644
--- a/cpp/src/Makefile.am
+++ b/cpp/src/Makefile.am
@@ -1,21 +1,16 @@
-include gen/gen-src.mk
-
-BUILT_SOURCES = $(generated_sources) $(generated_headers)
-
SUBDIRS = . tests
AM_CXXFLAGS = $(WARNING_CFLAGS) $(APR_CXXFLAGS)
-gen = gen/qpid/framing
+gen_framing = $(top_builddir)/gen/qpid/framing
framing= qpid/framing
broker = qpid/broker
client = qpid/client
apr = qpid/sys/apr
posix = qpid/sys/posix
-
# -I top_builddir for config.h
-INCLUDES = -I$(top_builddir) -I$(srcdir)/qpid -Igen
+INCLUDES = -I$(top_builddir) -I$(top_builddir)/gen
qpidd_LDADD = \
libqpidbroker.la \
@@ -95,10 +90,10 @@ libqpidcommon_la_SOURCES = \
$(framing)/Correlator.cpp \
$(framing)/Value.cpp \
$(framing)/Proxy.cpp \
- $(gen)/AMQP_ClientProxy.cpp \
- $(gen)/AMQP_HighestVersion.h \
- $(gen)/AMQP_MethodVersionMap.cpp \
- $(gen)/AMQP_ServerProxy.cpp \
+ $(gen_framing)/AMQP_ClientProxy.cpp \
+ $(gen_framing)/AMQP_HighestVersion.h \
+ $(gen_framing)/AMQP_MethodVersionMap.cpp \
+ $(gen_framing)/AMQP_ServerProxy.cpp \
qpid/Exception.cpp \
qpid/ExceptionHolder.cpp \
qpid/QpidError.cpp \
@@ -158,7 +153,6 @@ libqpidclient_la_SOURCES = \
$(client)/ResponseHandler.cpp \
$(client)/ReturnedMessageHandler.cpp
-include_HEADERS = gen/qpid
nobase_include_HEADERS = \
$(platform_hdr) \
$(broker)/AccumulatedAck.h \
@@ -284,38 +278,5 @@ nobase_include_HEADERS = \
qpid/SharedObject.h \
qpid/shared_ptr.h
-# Distribute the generated sources, at least for now, since
-# the generator code is in java.
-EXTRA_DIST += $(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.0-9.xml $(spec_dir)/amqp-errata.0-9.xml
-gentools_srcdir = $(gentools_dir)/src/org/apache/qpid/gentools
-
-$(BUILT_SOURCES) $(gen): $(spec) $(java_sources) $(cxx_templates) Makefile.am
- rm -rf $(gen)
- mkdir -p $(gen)
- cd $(gentools_srcdir) && rm -f *.class && $(JAVAC) *.java
- $(JAVA) -cp $(gentools_dir)/src org.apache.qpid.gentools.Main \
- -c -o $(gen) -t $(gentools_dir)/templ.cpp $(spec)
- touch $(gen)
-
-gen/gen-src.mk: $(gen)
- ./make-gen-src-mk.sh $(gentools_dir) $(gentools_srcdir) $(gen) > $@-t
- mv $@-t $@
-
-endif
-
-maintainer-clean:
- rm -f $(gentools_srcdir)/*.class
- rm -f $(gen)
-
-# Force build during dist phase so help2man will work.
-dist-hook: $(lib_LTLIBRARIES) $(sbin_PROGRAMS)
+# Force build of qpidd during dist phase so help2man will work.
+dist-hook: qpidd
diff --git a/cpp/src/make-gen-src-mk.sh b/cpp/src/make-gen-src-mk.sh
deleted file mode 100755
index 21655e5512..0000000000
--- a/cpp/src/make-gen-src-mk.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-# Generates the gen-src.mk makefile fragment, to stdout.
-# Usage: <gentools_dir> <gentools_srcdir>
-
-gentools_dir=$1
-gentools_srcdir=$2
-gen=$3
-
-wildcard() { echo `ls $* 2>/dev/null` ; }
-
-cat <<EOF
-generated_sources = `wildcard $gen/*.cpp`
-
-generated_headers = `wildcard $gen/*.h`
-
-if CAN_GENERATE_CODE
-
-java_sources = `wildcard $gentools_srcdir/*.java`
-
-cxx_templates = `wildcard $gentools_dir/templ.cpp/*.tmpl`
-
-# Empty rules in case one of these files is removed,
-# renamed or no longer generated.
-\$(spec):
-\$(java_sources):
-\$(cxx_templates):
-endif
-
-EOF
-
-
diff --git a/cpp/src/qpidd.cpp b/cpp/src/qpidd.cpp
index c00b0e5351..855dbb1f2f 100644
--- a/cpp/src/qpidd.cpp
+++ b/cpp/src/qpidd.cpp
@@ -18,8 +18,8 @@
* under the License.
*
*/
-#include "broker/Broker.h"
-#include "broker/Configuration.h"
+#include "qpid/broker/Broker.h"
+#include "qpid/broker/Configuration.h"
#include <signal.h>
#include <iostream>
#include <memory>
diff --git a/cpp/src/tests/Makefile.am b/cpp/src/tests/Makefile.am
index 388da8e9a9..34a513d583 100644
--- a/cpp/src/tests/Makefile.am
+++ b/cpp/src/tests/Makefile.am
@@ -1,5 +1,5 @@
AM_CXXFLAGS = $(WARNING_CFLAGS) $(CPPUNIT_CXXFLAGS) $(APR_CXXFLAGS)
-INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../gen
+INCLUDES = -I$(srcdir)/.. -I$(top_builddir)/gen
# Unit tests
broker_unit_tests = \