diff options
Diffstat (limited to 'qpid/cpp/examples/Makefile.am')
-rw-r--r-- | qpid/cpp/examples/Makefile.am | 69 |
1 files changed, 45 insertions, 24 deletions
diff --git a/qpid/cpp/examples/Makefile.am b/qpid/cpp/examples/Makefile.am index fdbea3b878..92625550e2 100644 --- a/qpid/cpp/examples/Makefile.am +++ b/qpid/cpp/examples/Makefile.am @@ -17,7 +17,36 @@ nobase_pkgdata_DATA= \ examples/direct/listener.cpp \ examples/direct/declare_queues.cpp -EXTRA_DIST=$(nobase_pkgdata_DATA) +VERIFY_FILES= verify verify_all \ + examples/request-response/verify \ + examples/request-response/verify.in \ + examples/request-response/verify_cpp_python \ + examples/request-response/verify_cpp_python.in \ + examples/request-response/verify_python_cpp \ + examples/request-response/verify_python_cpp.in \ + examples/fanout/verify \ + examples/fanout/verify.in \ + examples/fanout/verify_cpp_python \ + examples/fanout/verify_cpp_python.in \ + examples/fanout/verify_python_cpp \ + examples/fanout/verify_python_cpp.in \ + examples/pub-sub/verify \ + examples/pub-sub/verify.in \ + examples/pub-sub/verify_cpp_python \ + examples/pub-sub/verify_cpp_python.in \ + examples/pub-sub/verify_python_cpp \ + examples/pub-sub/verify_python_cpp.in \ + examples/direct/verify \ + examples/direct/verify.in \ + examples/direct/verify_cpp_python \ + examples/direct/verify_cpp_python.in \ + examples/direct/verify_python_cpp \ + examples/direct/verify_python_cpp.in + +EXTRA_DIST=$(nobase_pkgdata_DATA) $(VERIFY_FILES) + +verify: + cp $(top_srcdir)/../bin/verify $@ # Note: we don't use normal automake SUBDIRS because the example # makefiles don't understand all the recursive automake targets. @@ -29,31 +58,23 @@ clean-local: abs_top_builddir=@abs_top_builddir@ abs_top_srcdir=@abs_top_srcdir@ -VERIFY=$(top_srcdir)/../bin/verify -PYTHON_EXAMPLES=$(top_srcdir)/../python/examples -EXAMPLES= \ - examples/pub-sub \ - examples/fanout \ - examples/direct \ - examples/request-response \ - $(PYTHON_EXAMPLES)/pubsub \ - $(PYTHON_EXAMPLES)/fanout \ - $(PYTHON_EXAMPLES)/direct \ - $(PYTHON_EXAMPLES)/request-response - -# Build the examples in the source tree. +# Build the examples - copy sources to the build tree in VPATH build. all-local: + test -d examples || cp -R $(srcdir)/examples . cd examples && $(MAKE) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) -I../../$(top_srcdir)/src -I../../$(top_srcdir)/src/gen -I../../$(top_builddir)/src/gen -L../../$(top_builddir)/src/.libs -Wl,-rpath,$(abs_top_builddir)/src/.libs" all # Verify the examples in the buid tree. -check-local: all-local - QPID_DATA_DIR= QPIDD=$(top_builddir)/src/qpidd $(VERIFY) $(EXAMPLES) - -# Build and verify the installed examples, then clean up to avoid rpmbuild warnings. -EXAMPLE_FLAGS=-I$(DESTDIR)$(includedir) -L$(DESTDIR)$(libdir) -Wl,-rpath,$(DESTDIR)$(libdir) -EXAMPLE_DIR=$(DESTDIR)$(pkgdatadir)/examples -installcheck-local: - cd $(EXAMPLE_DIR) && $(MAKE) CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" all - cd $(EXAMPLE_DIR) && QPIDD=$(sbindir)/qpidd $(VERIFY) - cd $(EXAMPLE_DIR) && $(MAKE) clean +check-local: all-local verify + $(srcdir)/verify_all $(abs_top_srcdir) $(abs_top_builddir) + +# TODO: +# create a tarball for testing installed examples. +# installcheck-local to use the tarball on installed example and clean up after. +# Build and verify installed C++ examples, clean up to avoid rpmbuild warnings. +# EXAMPLE_FLAGS=-I$(DESTDIR)$(includedir) -L$(DESTDIR)$(libdir) -Wl,-rpath,$(DESTDIR)$(libdir) +# EXAMPLE_DIR=$(DESTDIR)$(pkgdatadir)/examples/cpp +# installcheck-local: +# cd $(EXAMPLE_DIR) && $(MAKE) CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" all +# cd $(EXAMPLE_DIR) && QPIDD=$(sbindir)/qpidd $(srcdir)/verify * +# cd $(EXAMPLE_DIR) && $(MAKE) clean |