diff options
Diffstat (limited to 'qpid/cpp/examples/Makefile.am')
| -rw-r--r-- | qpid/cpp/examples/Makefile.am | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/qpid/cpp/examples/Makefile.am b/qpid/cpp/examples/Makefile.am index 1e0693ef6e..02d5961fad 100644 --- a/qpid/cpp/examples/Makefile.am +++ b/qpid/cpp/examples/Makefile.am @@ -24,15 +24,26 @@ EXTRA_DIST=$(nobase_pkgdata_DATA) # Note: we don't use normal automake SUBDIRS because the example # makefiles don't understand all the recursive automake targets. -clean: +clean-local: cd examples; $(MAKE) clean + rm -f examples/*/*.out examples/*/*.wait abs_srcdir=@abs_srcdir@ +abs_top_builddir=@abs_top_builddir@ -# Build the installed examples, then clean up to avoid rpmbuild warnings. +# Build the examples in the source tree. +all-local: + cd examples && $(MAKE) CXX="$(CXX)" 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 source tree. +check-local: + cd examples && QPIDD=$(abs_top_builddir)/src/qpidd ../verify + +# 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) && $(abs_srcdir)/verify + cd $(EXAMPLE_DIR) && QPIDD=$(top_builddir)/src/qpidd $(abs_srcdir)/verify cd $(EXAMPLE_DIR) && $(MAKE) clean + |
