diff options
author | Alan Conway <aconway@apache.org> | 2007-09-20 21:07:25 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-09-20 21:07:25 +0000 |
commit | ee644f8dcae4b0eea97751ab96ff29afc9c7879d (patch) | |
tree | 231683616d4d67e4846c99dbb9b99daf195e7a7f /cpp/rubygen | |
parent | ee78ed77df7b8b0209f7e4f5206ac2edfc2b23c2 (diff) | |
download | qpid-python-ee644f8dcae4b0eea97751ab96ff29afc9c7879d.tar.gz |
* cpp/bootstrap, cpp/rubygen/generate, cpp/src/Makefile.am:
Fixed generated headers to install properly.
* cpp/qpidc.spec.in: removed apr dependency.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@577916 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen')
-rwxr-xr-x | cpp/rubygen/generate | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/cpp/rubygen/generate b/cpp/rubygen/generate index e35a5458ea..dba3b81273 100755 --- a/cpp/rubygen/generate +++ b/cpp/rubygen/generate @@ -30,6 +30,8 @@ else end templates.each { |t| load t } +def make_continue(lines) lines.join(" \\\n "); end + # Generate makefile makefile=ARGV.grep(/.mk$/)[0] if makefile @@ -39,25 +41,33 @@ if makefile Dir.chdir dir rgen_generator=generator_files.map{ |f| "$(rgen_dir)/#{f}" } rgen_srcs=GenFiles.get.map{ |f| "#{Outdir}/#{f}" } - rgen_client_cpp = rgen_srcs.select { |f| f =~ /qpid\/client\/.+\.cpp$/ } - rgen_common_cpp = rgen_srcs.select { |f| f =~ /qpid\/framing\/.+\.cpp$/ } - rgen_h = rgen_srcs.select { |f| f =~ /.+\.h$/ } File.open(makefile, 'w') { |out| out << <<EOS # Generated makefile fragment. # Including makefile defines $(rgen_dir) $(rgen_cmd) and $(specs). -rgen_generator=#{rgen_generator.join(" \\\n ")} +rgen_generator=#{make_continue rgen_generator} -rgen_client_cpp=#{rgen_client_cpp.join(" \\\n ")} +rgen_client_cpp=#{make_continue(rgen_srcs.grep %r|/qpid/client/.+\.cpp$|)} -rgen_common_cpp=#{rgen_common_cpp.join(" \\\n ")} +rgen_common_cpp=#{make_continue(rgen_srcs.grep %r|qpid/framing/.+\.cpp$|)} -rgen_h=#{rgen_h.join(" \\\n ")} +rgen_srcs=#{make_continue rgen_srcs} -rgen_srcs=rgen_h rgen_client_cpp rgen_common_cpp +# Header file install rules. +EOS + ["framing", "client", "broker"].each { |ns| + dir="qpid/#{ns}" + dir_ = dir.tr("/", "_") + regex=%r|#{dir}/.+\.h$| + out << <<EOS +#{dir_}dir = $(includedir)/#{dir} +dist_#{dir_}_HEADERS = #{make_continue rgen_srcs.grep(regex)} +EOS + } + out << <<EOS if GENERATE $(rgen_srcs) $(srcdir)/#{File.basename makefile}: $(rgen_generator) $(specs) $(rgen_cmd) |