Author: aconway
Date: Mon Jul 27 21:32:16 2009
New Revision: 798291

URL: http://svn.apache.org/viewvc?rev=798291&view=rev
Log:
Separate generated public header files from non-public headers, generated code 
re-organization.

The gen/ directory has been removed, code is now generated into:
 $(builddir)/src - all .cpp files and non-public .h files.
 $(builddir)/include - all public .h files.

The gen/ directory was originally intended to separate generated code
from hand-written code.  However both automake and cmake allow you to
direct all build output, including generated code, into a separate
build directory. In fact both recommend you build this way. 

Keeping the gen/ directory meant there would have been a total of 8
places to look for header files, all the combinations of
builddir/srcdir, src/include and gen/no-gen. This was a mess, 4 is bad
enough.

Modified:
    qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am
    qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am
    qpid/trunk/qpid/cpp/configure.ac
    qpid/trunk/qpid/cpp/docs/api/developer.doxygen.in
    qpid/trunk/qpid/cpp/docs/api/user.doxygen.in
    qpid/trunk/qpid/cpp/examples/CMakeLists.txt
    qpid/trunk/qpid/cpp/examples/makedist.mk
    qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py
    qpid/trunk/qpid/cpp/rubygen/amqpgen.rb
    qpid/trunk/qpid/cpp/rubygen/framing.0-10/Operations.rb
    qpid/trunk/qpid/cpp/rubygen/framing.0-10/OperationsInvoker.rb
    qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb
    qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb
    qpid/trunk/qpid/cpp/rubygen/framing.0-10/frame_body_lists.rb
    qpid/trunk/qpid/cpp/rubygen/framing.0-10/structs.rb
    qpid/trunk/qpid/cpp/rubygen/generate
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/Makefile.am
    qpid/trunk/qpid/cpp/src/tests/Makefile.am

Modified: qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am Mon Jul 27 21:32:16 2009
@@ -19,7 +19,7 @@
 
 if HAVE_PYTHON_DEVEL
 
-INCLUDES = -I$(top_srcdir)/src/qmf -I$(top_srcdir)/src 
-I$(top_builddir)/src/gen
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 
-I$(top_srcdir)/src/qmf -I$(top_srcdir)/src -I$(top_builddir)/src
 
 EXTRA_DIST = python.i
 

Modified: qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/ruby/Makefile.am Mon Jul 27 21:32:16 2009
@@ -19,7 +19,7 @@
 
 if HAVE_RUBY_DEVEL
 
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/qmf -I$(top_srcdir)/src 
-I$(top_builddir)/src/gen -I$(top_srcdir)/src/gen
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 
-I$(top_srcdir)/src/qmf -I$(top_srcdir)/src -I$(top_builddir)/src
 
 EXTRA_DIST = ruby.i
 BUILT_SOURCES = qmfengine.cpp

Modified: qpid/trunk/qpid/cpp/configure.ac
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/configure.ac?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/configure.ac (original)
+++ qpid/trunk/qpid/cpp/configure.ac Mon Jul 27 21:32:16 2009
@@ -237,7 +237,6 @@
 
 specdir=`pwd`/$srcdir/../specs  
 AMQP_FINAL_XML=$specdir/amqp.0-10-qpid-errata.xml
-test -f $AMQP_FINAL_XML || test -d $srcdir/src/gen || AC_MSG_ERROR([Neither 
AMQP specs nor spec-generated code present; cannot build.])
 AC_SUBST(AMQP_FINAL_XML)
 AM_CONDITIONAL([GENERATE], [test -f $AMQP_FINAL_XML])
 

Modified: qpid/trunk/qpid/cpp/docs/api/developer.doxygen.in
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/docs/api/developer.doxygen.in?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/docs/api/developer.doxygen.in (original)
+++ qpid/trunk/qpid/cpp/docs/api/developer.doxygen.in Mon Jul 27 21:32:16 2009
@@ -464,7 +464,7 @@
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT                  = @top_srcdir@/include @top_srcdir@/src 
@top_builddir@/src/gen
+INPUT                  = @top_srcdir@/include @top_srcdir@/src 
@top_builddir@/include @top_builddir@/src
 
 # If the value of the INPUT tag contains directories, you can use the 
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 

Modified: qpid/trunk/qpid/cpp/docs/api/user.doxygen.in
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/docs/api/user.doxygen.in?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/docs/api/user.doxygen.in (original)
+++ qpid/trunk/qpid/cpp/docs/api/user.doxygen.in Mon Jul 27 21:32:16 2009
@@ -456,7 +456,7 @@
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT = @top_srcdir@/include @top_builddir@/src/gen/qpid/client 
@top_builddir@/src/gen/qpid/framing
+INPUT = @top_srcdir@/include @top_builddir@/include
 
 
 # If the value of the INPUT tag contains directories, you can use the 

Modified: qpid/trunk/qpid/cpp/examples/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/CMakeLists.txt?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/examples/CMakeLists.txt Mon Jul 27 21:32:16 2009
@@ -24,7 +24,8 @@
 
 # This will probably need some fiddling to get right for installed kits.
 get_directory_property(QPIDC_TOP PARENT_DIRECTORY)
-include_directories(${QPIDC_TOP}/include 
${CMAKE_CURRENT_BINARY_DIR}/../src/gen)
+include_directories(${CMAKE_BINARY_DIR}/include)
+include_directories(${CMAKE_SOURCE_DIR}/include)
 
 # Shouldn't need this... but there are still client header inclusions of Boost.
 include_directories( ${Boost_INCLUDE_DIR} )

Modified: qpid/trunk/qpid/cpp/examples/makedist.mk
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/makedist.mk?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/makedist.mk (original)
+++ qpid/trunk/qpid/cpp/examples/makedist.mk Mon Jul 27 21:32:16 2009
@@ -1,6 +1,6 @@
 # Settings to build the examples in automake
 AM_CXXFLAGS = $(WARNING_CFLAGS)
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/gen 
-I$(top_builddir)/src/gen
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
 CLIENT_LIB=$(top_builddir)/src/libqpidclient.la
 CONSOLE_LIB=$(top_builddir)/src/libqmfconsole.la
 CLIENTFLAGS=-lqpidclient

Modified: qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py (original)
+++ qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py Mon Jul 27 21:32:16 
2009
@@ -163,7 +163,7 @@
       stream.write("dist_" + name + "_HEADERS = ")
       first = True
       for file in self.filelists["h"]:
-        if file.find("gen/qmf/" + package) == 0:
+        if file.find("qmf/" + package) == 0:
           if first:
             first = False
           else:
@@ -243,7 +243,7 @@
       first = True
       for file in self.filelists["h"]:
         file = self.unNormCase(file)
-        if file.find("gen/qmf/" + package) == 0:
+        if file.find("qmf/" + package) == 0:
           if first:
             first = False
           else:

Modified: qpid/trunk/qpid/cpp/rubygen/amqpgen.rb
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/amqpgen.rb?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/amqpgen.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/amqpgen.rb Mon Jul 27 21:32:16 2009
@@ -318,7 +318,7 @@
   def content() return "1" if @action.is_a? AmqpCommand and @action.segments 
end
   def index() @action.code end
   def code() @action.code end
-  def synchronous() end         # FIXME aconway 2008-04-10: ???
+  def synchronous() end     
   def on_chassis?(chassis)
     @action.received_by?(chassis)
   end
@@ -464,9 +464,12 @@
 
 # Collect information about generated files.
 class GenFiles
-  @@files = Set.new 
-  def GenFiles.add(f) @@files.add f; end
+  @@files = Set.new
+  @@public_api = []
+  def GenFiles.add(f) @@files.add(f); end
   def GenFiles.get() @@files; end
+  def GenFiles.public_api(file) @@public_api << file; end
+  def GenFiles.public_api?(file) @@public_api.find { |f| f == file }; end
 end
 
 # Base class for code generators.
@@ -476,27 +479,27 @@
   # Takes directory for output or "-", meaning print file names that
   # would be generated.
   def initialize (outdir, amqp)
+    @outdir=outdir[0]
+    @apidir=outdir[1]
     @amqp=amqp
-    @outdir=outdir
+    raise "outdir is not an array" unless outdir.class == Array
     @prefix=['']                # For indentation or comments.
     @indentstr='    '           # One indent level.
     @outdent=2
-    Pathname.new(@outdir).mkpath unless @outdir=="-"
   end
 
+  # Declare next file to be public API
+  def public_api(file) GenFiles.public_api(file); end
+  
   # Create a new file, set @out. 
   def file(file, &block)
-    GenFiles.add file
-    if (@outdir != "-")         
-      @path=Pathname.new "#...@outdir}/#{file}"
+    GenFiles.add(file)
+    dir = GenFiles.public_api?(file) ? @apidir : @outdir
+    if (dir != "-")         
+      @path=Pathname.new "#{dir}/#{file}"
       @path.parent.mkpath
       @out=String.new           # Generate in memory first
-      if block then yield; endfile; end
-    end
-  end
-
-  def endfile()
-    if @outdir != "-"
+      yield if block
       if @path.exist? and @path.read == @out  
         puts "Skipped #...@path} - unchanged" # Dont generate if unchanged
       else

Modified: qpid/trunk/qpid/cpp/rubygen/framing.0-10/Operations.rb
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/framing.0-10/Operations.rb?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/framing.0-10/Operations.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/framing.0-10/Operations.rb Mon Jul 27 21:32:16 
2009
@@ -115,7 +115,7 @@
   end
 end
 
-OperationsGen.new("client",ARGV[0], $amqp).generate()
-OperationsGen.new("server",ARGV[0], $amqp).generate()
-OperationsGen.new("all",ARGV[0], $amqp).generate()
+OperationsGen.new("client",$outdir, $amqp).generate()
+OperationsGen.new("server",$outdir, $amqp).generate()
+OperationsGen.new("all",$outdir, $amqp).generate()
 

Modified: qpid/trunk/qpid/cpp/rubygen/framing.0-10/OperationsInvoker.rb
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/framing.0-10/OperationsInvoker.rb?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/framing.0-10/OperationsInvoker.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/framing.0-10/OperationsInvoker.rb Mon Jul 27 
21:32:16 2009
@@ -112,6 +112,6 @@
   end
 end
 
-OperationsInvokerGen.new("client",ARGV[0], $amqp).generate()
-OperationsInvokerGen.new("server",ARGV[0], $amqp).generate()
-OperationsInvokerGen.new("all",ARGV[0], $amqp).generate()
+OperationsInvokerGen.new("client",$outdir, $amqp).generate()
+OperationsInvokerGen.new("server",$outdir, $amqp).generate()
+OperationsInvokerGen.new("all",$outdir, $amqp).generate()

Modified: qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/framing.0-10/Session.rb Mon Jul 27 21:32:16 2009
@@ -136,6 +136,7 @@
   end
 
   def generate()
+    public_api("#...@file}.h")
     h_file(@file) {
       include "qpid/client/#...@version_base}.h"
       include "qpid/client/ClientImportExport.h"
@@ -222,6 +223,7 @@
     keyword_methods=session_methods(sync_default).reject { |m| 
m.fields_c.empty? }
     max_arity = keyword_methods.map{ |m| m.fields_c.size }.max
 
+    public_api("qpid/client/arg.h")
     h_file("qpid/client/arg.h") {
       # Generate keyword tag declarations.
       genl "#define BOOST_PARAMETER_MAX_ARITY #{max_arity}"
@@ -231,7 +233,7 @@
           genl "BOOST_PARAMETER_KEYWORD(keyword_tags, #{k})"
         }}
     }    
-    
+    public_api("#[email protected]}.h")
     h_file(@fqclass.file) {
       include @fqbase.file
       include "qpid/client/arg"
@@ -408,8 +410,8 @@
   end
 end
 
-SessionNoKeywordGen.new(ARGV[0], $amqp, true).generate()
-SessionNoKeywordGen.new(ARGV[0], $amqp, false).generate()
-SessionGen.new(ARGV[0], $amqp, true).generate()
-SessionGen.new(ARGV[0], $amqp, false).generate()
+SessionNoKeywordGen.new($outdir, $amqp, true).generate()
+SessionNoKeywordGen.new($outdir, $amqp, false).generate()
+SessionGen.new($outdir, $amqp, true).generate()
+SessionGen.new($outdir, $amqp, false).generate()
 

Modified: qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/framing.0-10/constants.rb Mon Jul 27 21:32:16 
2009
@@ -29,7 +29,8 @@
   end
 
   def constants_h()
-    h_file("#...@dir}/constants") {
+    public_api("#...@dir}/constants.h")
+    h_file("#...@dir}/constants.h") {
       namespace(@namespace) {
         # Constants for class/method names.
         scope("enum AmqpConstant {","};") {
@@ -50,6 +51,7 @@
 
   def typecode_h_cpp
     path="#...@dir}/TypeCode"
+    public_api(path+".h") 
     h_file(path) {
       include("<iosfwd>")
       include("\"qpid/sys/IntegerTypes.h\"")
@@ -104,7 +106,8 @@
   end
   
   def enum_h()
-    h_file("#...@dir}/enum") {
+    public_api("#...@dir}/enum.h")
+    h_file("#...@dir}/enum.h") {
       # Constants for enum domains.
       namespace(@namespace) {
         @amqp.domains.each { |d| declare_enum(d.enum) if d.enum }
@@ -161,7 +164,8 @@
   end
 
   def reply_exceptions_h()
-    h_file("#...@dir}/reply_exceptions") {
+    public_api("#...@dir}/reply_exceptions.h")
+    h_file("#...@dir}/reply_exceptions.h") {
       include "qpid/Exception"
       include "qpid/sys/ExceptionHolder"
       include "qpid/framing/enum"

Modified: qpid/trunk/qpid/cpp/rubygen/framing.0-10/frame_body_lists.rb
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/framing.0-10/frame_body_lists.rb?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/framing.0-10/frame_body_lists.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/framing.0-10/frame_body_lists.rb Mon Jul 27 
21:32:16 2009
@@ -44,6 +44,6 @@
   end
 end
 
-FrameBodyListsGen.new(ARGV[0], $amqp).generate;
+FrameBodyListsGen.new($outdir, $amqp).generate;
 
     

Modified: qpid/trunk/qpid/cpp/rubygen/framing.0-10/structs.rb
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/framing.0-10/structs.rb?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/framing.0-10/structs.rb (original)
+++ qpid/trunk/qpid/cpp/rubygen/framing.0-10/structs.rb Mon Jul 27 21:32:16 2009
@@ -383,7 +383,8 @@
       end
     end
 
-    h_file("qpid/framing/#{classname}.h") { 
+    public_api("qpid/framing/#{classname}.h")
+    h_file("qpid/framing/#{classname}.h") {       
       if (s.kind_of? AmqpMethod)
         gen <<EOS
 #include "qpid/framing/AMQMethodBody.h"
@@ -604,9 +605,10 @@
     structs.each { |s| define_struct(s) }
     @amqp.methods_.each { |m| define_struct(m) }
     #generate a single include file containing the list of structs for 
convenience
+    public_api("qpid/framing/amqp_structs.h")
     h_file("qpid/framing/amqp_structs.h") { structs.each { |s| genl "#include 
\"qpid/framing/#{s.cppname}.h\"" } }
   end
 end
 
-StructGen.new(ARGV[0], $amqp).generate()
+StructGen.new($outdir, $amqp).generate()
 

Modified: qpid/trunk/qpid/cpp/rubygen/generate
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/generate?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/generate (original)
+++ qpid/trunk/qpid/cpp/rubygen/generate Mon Jul 27 21:32:16 2009
@@ -25,15 +25,14 @@
 #
 if ARGV.size < 3
   puts <<EOS
-Usage: #{ARGV[0]} OUTDIR  SPEC.xml [ ... ] TEMPLATE.rb [ ... ]
-or:    #{ARGV[0]} OUTDIR  SPEC.xml [ ... ] all [ makefragment.mk |
-                                                 makefragment.cmake ]
+Usage: #{ARGV[0]} SRCDIR APIDIR SPEC.xml [ ... ] TEMPLATE.rb [ ... ]
+or:    #{ARGV[0]} SRCDIR APIDIR SPEC.xml [ ... ] all [ makefragment.mk | 
makefragment.cmake ]
 
 Parse all SPEC.xml files to create an AMQP model, run each TEMPLATE
-putting the resulting files under OUTDIR. Prints a list of files
-generated to standard output.
+putting the resulting files under SRCDIR, public API files in APIdir.
+Prints a list of files generated to standard output.
 
-If OUTDIR is '-'  then just prints file list without generating files.
+If SRCDIR and APIDIR are '-'  then just prints file list without generating 
files.
 EOS
   exit 1
 end
@@ -58,15 +57,16 @@
 if ARGV.any? { |arg| arg=="all" }
   templates=Dir["#{gendir}/*/*.rb"]
 else
-  templates=ARGV.grep(/\.rb$/)
+templates=ARGV.grep(/\.rb$/)
   ARGV.each { |arg|
     d=File.join gendir,arg
     templates += Dir["#{d}/*.rb"] if File.directory? d
   }
 end
 
-$outdir=ARGV[0]
+$outdir=[ ARGV[0], ARGV[1] ]
 $models=parse_specs(ARGV.grep(/\.xml$/))
+
 templates.each { |t|
   ver=Pathname.new(t).dirname.basename.to_s.split('.')[-1]
   $amqp=$models[ver]
@@ -84,17 +84,18 @@
 makefile=ARGV.grep(/.mk$/)[0]
 cmakefile=ARGV.grep(/.cmake$/)[0]
 if cmakefile || makefile
+  srcdir,apidir=$outdir
   dir=Dir.getwd
   Dir.chdir File.dirname(__FILE__)
   generator_files=Dir["**/*.rb"] << File.basename(__FILE__)
   Dir.chdir dir
   rgen_generator=generator_files.map{ |f| "$(rgen_dir)/#{f}" }
   cmake_rgen_generator=generator_files.map{ |f| "${rgen_dir}/#{f}" }
-  rgen_srcs=GenFiles.get.map{ |f| "#{$outdir}/#{f}" }
+  rgen_srcs=GenFiles.get.map{ |f| "#{GenFiles.public_api?(f) ? apidir : 
srcdir}/#{f}" }
   rgen_subdirs={}
   rgen_srcs.each { |src|
-    if src.match(%r{#{$outdir}/qpid/([^/]+)/})
-      subdir=$1
+    if src.match(%r{(#{srcdir}|#{apidir})/qpid/([^/]+)/})
+      subdir=$2
       rgen_subdirs[subdir] ||= []
       rgen_subdirs[subdir] << src
     end

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Mon Jul 27 21:32:16 2009
@@ -67,7 +67,7 @@
   endforeach (spec_file ${specs})
   if (regen_amqp)
     message(STATUS "Regenerating AMQP protocol sources")
-execute_process(COMMAND ${RUBY_EXECUTABLE} -I ${rgen_dir} ${rgen_dir}/generate 
${CMAKE_CURRENT_BINARY_DIR}/gen ${specs} all rubygen.cmake
+execute_process(COMMAND ${RUBY_EXECUTABLE} -I ${rgen_dir} ${rgen_dir}/generate 
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../include  ${specs} 
all rubygen.cmake
                     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
   else (regen_amqp)
     message(STATUS "No need to generate AMQP protocol sources")
@@ -86,7 +86,7 @@
   endforeach (spec_file ${mgmt_specs})
   if (regen_mgmt)
     message(STATUS "Regenerating Qpid Management Framework sources")
-execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c 
managementgen.cmake -b -q -o ${CMAKE_CURRENT_BINARY_DIR}/gen/qmf ${mgmt_specs}
+execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c 
managementgen.cmake -b -q -o ${CMAKE_CURRENT_BINARY_DIR}/qmf ${mgmt_specs}
                     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
   else (regen_mgmt)
     message(STATUS "No need to generate Qpid Management Framework sources")
@@ -194,9 +194,10 @@
 
 include_directories( ${Boost_INCLUDE_DIR} )
 
-include_directories( . )
-include_directories( ../include )
-include_directories( ${CMAKE_CURRENT_BINARY_DIR} 
${CMAKE_CURRENT_BINARY_DIR}/gen)
+include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
+include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../include )
+include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
+include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../include )
 
 link_directories( ${Boost_LIBRARY_DIRS} )
 

Modified: qpid/trunk/qpid/cpp/src/Makefile.am
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/Makefile.am?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/src/Makefile.am Mon Jul 27 21:32:16 2009
@@ -82,7 +82,7 @@
 
 # Ruby generator.
 rgen_dir=$(top_srcdir)/rubygen
-rgen_cmd=ruby -I $(rgen_dir) $(rgen_dir)/generate gen $(specs) all 
$(srcdir)/rubygen.mk
+rgen_cmd=ruby -I $(rgen_dir) $(rgen_dir)/generate . ../include $(specs) all 
$(srcdir)/rubygen.mk
 
 $(rgen_srcs) $(srcdir)/rubygen.mk: rgen.timestamp
 rgen.timestamp: $(rgen_generator) $(specs)
@@ -91,7 +91,7 @@
 
 # Management generator.
 mgen_dir=$(top_srcdir)/managementgen
-mgen_cmd=$(mgen_dir)/qmf-gen -m $(srcdir)/managementgen.mk -q -b -o gen/qmf \
+mgen_cmd=$(mgen_dir)/qmf-gen -m $(srcdir)/managementgen.mk -q -b -o qmf \
        $(top_srcdir)/../specs/management-schema.xml \
        $(srcdir)/qpid/acl/management-schema.xml \
        $(srcdir)/qpid/cluster/management-schema.xml
@@ -109,7 +109,7 @@
 ## Compiler flags
 AM_CXXFLAGS = $(WARNING_CFLAGS)
 AM_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO_ARG)
-INCLUDES = -Igen -I$(srcdir)/gen -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(srcdir) 
-I=$(builddir)
 
 #
 # Destination for intalled programs and tests defined here

Modified: qpid/trunk/qpid/cpp/src/tests/Makefile.am
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/Makefile.am?rev=798291&r1=798290&r2=798291&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/src/tests/Makefile.am Mon Jul 27 21:32:16 2009
@@ -18,7 +18,8 @@
 #
 
 AM_CXXFLAGS = $(WARNING_CFLAGS) -DBOOST_TEST_DYN_LINK
-INCLUDES =  -I$(top_srcdir)/include -I$(srcdir)/.. -I$(srcdir)/../gen 
-I$(top_builddir)/src/gen
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include 
-I$(top_srcdir)/src -I$(top_builddir)/src
+PUBLIC_INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include # Use 
public API only
 
 abs_buildd...@abs_builddir@
 extra_libs = 
@@ -160,65 +161,81 @@
 #
 check_PROGRAMS+=perftest
 perftest_SOURCES=perftest.cpp test_tools.h TestOptions.h ConnectionOptions.h
+perftest_INCLUDES=$(PUBLIC_INCLUDES)
 perftest_LDADD=$(lib_client) 
 
 check_PROGRAMS+=txtest
+txtest_INCLUDES=$(PUBLIC_INCLUDES)
 txtest_SOURCES=txtest.cpp  TestOptions.h ConnectionOptions.h
 txtest_LDADD=$(lib_client) 
 
 check_PROGRAMS+=latencytest
+latencytest_INCLUDES=$(PUBLIC_INCLUDES)
 latencytest_SOURCES=latencytest.cpp TestOptions.h ConnectionOptions.h
 latencytest_LDADD=$(lib_client) 
 
 check_PROGRAMS+=echotest
+echotest_INCLUDES=$(PUBLIC_INCLUDES)
 echotest_SOURCES=echotest.cpp TestOptions.h ConnectionOptions.h
 echotest_LDADD=$(lib_client) 
 
 check_PROGRAMS+=client_test
+client_test_INCLUDES=$(PUBLIC_INCLUDES)
 client_test_SOURCES=client_test.cpp TestOptions.h ConnectionOptions.h
 client_test_LDADD=$(lib_client) 
 
 check_PROGRAMS+=topic_listener
+topic_listener_INCLUDES=$(PUBLIC_INCLUDES)
 topic_listener_SOURCES=topic_listener.cpp TestOptions.h ConnectionOptions.h
 topic_listener_LDADD=$(lib_client) 
 
 check_PROGRAMS+=topic_publisher
+topic_publisher_INCLUDES=$(PUBLIC_INCLUDES)
 topic_publisher_SOURCES=topic_publisher.cpp TestOptions.h ConnectionOptions.h
 topic_publisher_LDADD=$(lib_client) 
 
 check_PROGRAMS+=publish
+publish_INCLUDES=$(PUBLIC_INCLUDES)
 publish_SOURCES=publish.cpp TestOptions.h ConnectionOptions.h
 publish_LDADD=$(lib_client) 
 
 check_PROGRAMS+=consume
+consume_INCLUDES=$(PUBLIC_INCLUDES)
 consume_SOURCES=consume.cpp  TestOptions.h ConnectionOptions.h
 consume_LDADD=$(lib_client) 
 
 check_PROGRAMS+=header_test
+header_test_INCLUDES=$(PUBLIC_INCLUDES)
 header_test_SOURCES=header_test.cpp TestOptions.h ConnectionOptions.h
 header_test_LDADD=$(lib_client) 
 
 check_PROGRAMS+=failover_soak
+failover_soak_INCLUDES=$(PUBLIC_INCLUDES)
 failover_soak_SOURCES=failover_soak.cpp  ForkedBroker.h ForkedBroker.cpp
 failover_soak_LDADD=$(lib_client) $(lib_broker)
 
 check_PROGRAMS+=declare_queues
+declare_queues_INCLUDES=$(PUBLIC_INCLUDES)
 declare_queues_SOURCES=declare_queues.cpp  
 declare_queues_LDADD=$(lib_client) 
 
 check_PROGRAMS+=replaying_sender
+replaying_sender_INCLUDES=$(PUBLIC_INCLUDES)
 replaying_sender_SOURCES=replaying_sender.cpp  
 replaying_sender_LDADD=$(lib_client) 
 
 check_PROGRAMS+=resuming_receiver
+resuming_receiver_INCLUDES=$(PUBLIC_INCLUDES)
 resuming_receiver_SOURCES=resuming_receiver.cpp  
 resuming_receiver_LDADD=$(lib_client) 
 
 check_PROGRAMS+=txshift
+txshift_INCLUDES=$(PUBLIC_INCLUDES)
 txshift_SOURCES=txshift.cpp  TestOptions.h ConnectionOptions.h
 txshift_LDADD=$(lib_client) 
 
 check_PROGRAMS+=txjob
+txjob_INCLUDES=$(PUBLIC_INCLUDES)
 txjob_SOURCES=txjob.cpp  TestOptions.h ConnectionOptions.h
 txjob_LDADD=$(lib_client) 
 
@@ -231,6 +248,7 @@
 DispatcherTest_LDADD=$(lib_common) $(SOCKLIBS)
 
 check_PROGRAMS+=qpid_ping
+qpid_ping_INCLUDES=$(PUBLIC_INCLUDES)
 qpid_ping_SOURCES=qpid_ping.cpp test_tools.h TestOptions.h ConnectionOptions.h
 qpid_ping_LDADD=$(lib_client) 
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to