summaryrefslogtreecommitdiff
path: root/cpp/gen
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2006-12-12 16:05:01 +0000
committerAlan Conway <aconway@apache.org>2006-12-12 16:05:01 +0000
commit7d0a7581134379324b36d78f8c49dcd793d1ab1e (patch)
treea49ba6cc757891a7ff4cd5fb8e6188ea046840ce /cpp/gen
parentba98deefab7bfd076a8fc1ff55eed42c3cf5efbe (diff)
downloadqpid-python-7d0a7581134379324b36d78f8c49dcd793d1ab1e.tar.gz
2006-12-11 Alan Conway <aconway@redhat.com>
* SPECS/qpid-cpp.spec: Draft RPM spec file for C++. Based on initial draft provided by David Lutterkort <dlutter@redhat.com> * cpp Makefiles: Renamed libraries with qpid prefix: libqpidclient etc. * cpp/man/: moved to docs/man/ * docs/api/usr.doxygen: more restricted, user-oriented doc settings. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@486207 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/gen')
-rw-r--r--cpp/gen/Makefile.am23
1 files changed, 13 insertions, 10 deletions
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