From b78af32f2bb9c725bacec590dbdeecaec9b2906c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 9 Nov 2007 19:59:54 +0000 Subject: Package examples in rpm %doc directory. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@593638 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/examples/Makefile.am | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'cpp/examples/Makefile.am') diff --git a/cpp/examples/Makefile.am b/cpp/examples/Makefile.am index 3836665c35..5915e0a282 100644 --- a/cpp/examples/Makefile.am +++ b/cpp/examples/Makefile.am @@ -1,18 +1,38 @@ -# Note: we don't use normal automake SUBDIRS because the example -# makefiles are don't understand all automake targets. -EXAMPLE_DIRS=direct fanout pub-sub request-response -src=../$(top_srcdir)/src -bld=../$(top_builddir)/src +nobase_pkgdata_DATA= \ + examples/Makefile \ + examples/request-response/client.cpp \ + examples/request-response/server.cpp \ + examples/request-response/Makefile \ + examples/fanout/Makefile \ + examples/fanout/fanout_config_queues.cpp \ + examples/fanout/listener.cpp \ + examples/fanout/fanout_consumer.cpp \ + examples/fanout/fanout_publisher.cpp \ + examples/pub-sub/Makefile \ + examples/pub-sub/topic_publisher.cpp \ + examples/pub-sub/topic_config_queues.cpp \ + examples/pub-sub/topic_listener.cpp \ + examples/direct/Makefile \ + examples/direct/direct_publisher.cpp \ + examples/direct/direct_persistent_config_queues.cpp \ + examples/direct/listener.cpp \ + examples/direct/direct_config_queues.cpp \ + examples/direct/direct_persistent_publisher.cpp + +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. +# +src=../../$(top_srcdir)/src +bld=../../$(top_builddir)/src EXAMPLE_FLAGS=-I$(src) -I$(src)/gen -I$(bld)/gen -L$(bld)/.libs all: - for d in $(EXAMPLE_DIRS); do ( cd $$d; make CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" $@; ) ; done + cd examples; $(MAKE) CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" all clean: - for d in $(EXAMPLE_DIRS); do ( cd $$d; make $@; ) ; done - -dist-hook: clean - cp --parents `find $(EXAMPLE_DIRS) -name Makefile -o -name '*.cpp'` $(distdir) + cd examples; $(MAKE) clean -- cgit v1.2.1