diff options
author | Alan Conway <aconway@apache.org> | 2008-05-27 17:20:37 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-05-27 17:20:37 +0000 |
commit | f77ccb30e8552944614525526bcad5e1187aed6c (patch) | |
tree | ea994db6662b143d2684803ef9c6c9bd02177805 /qpid/cpp | |
parent | 5107e09fed3c384d21ed9c8918bbb12726c810bd (diff) | |
download | qpid-python-f77ccb30e8552944614525526bcad5e1187aed6c.tar.gz |
Generate code in $builddir to allow multiple VPATH builds.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@660616 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rwxr-xr-x | qpid/cpp/rubygen/generate | 11 | ||||
-rw-r--r-- | qpid/cpp/src/Makefile.am | 16 |
2 files changed, 14 insertions, 13 deletions
diff --git a/qpid/cpp/rubygen/generate b/qpid/cpp/rubygen/generate index c025c946c7..9acbd4fe83 100755 --- a/qpid/cpp/rubygen/generate +++ b/qpid/cpp/rubygen/generate @@ -71,7 +71,7 @@ if makefile rgen_srcs=GenFiles.get.map{ |f| "#{$outdir}/#{f}" } rgen_subdirs={} rgen_srcs.each { |src| - if src.match(%r{./gen/qpid/([^/]+)/}) + if src.match(%r{#{$outdir}/qpid/([^/]+)/}) subdir=$1 rgen_subdirs[subdir] ||= [] rgen_subdirs[subdir] << src @@ -102,15 +102,6 @@ dist_#{dir_}_HEADERS = #{make_continue rgen_srcs.grep(regex)} EOS } - out << <<EOS -if GENERATE -$(srcdir)/#{File.basename makefile}: $(rgen_generator) $(specs) - $(rgen_cmd) - -# Empty rule in case a generator file is renamed/removed. -$(rgen_generator): -endif -EOS } end diff --git a/qpid/cpp/src/Makefile.am b/qpid/cpp/src/Makefile.am index 0bd04ec6cb..a76224e9d6 100644 --- a/qpid/cpp/src/Makefile.am +++ b/qpid/cpp/src/Makefile.am @@ -19,16 +19,26 @@ specs=$(amqp_0_10_xml) # Ruby generator. rgen_dir=$(top_srcdir)/rubygen -rgen_cmd=ruby -I $(rgen_dir) $(rgen_dir)/generate $(srcdir)/gen $(specs) all $(srcdir)/rubygen.mk +rgen_cmd=ruby -I $(rgen_dir) $(rgen_dir)/generate gen $(specs) all $(srcdir)/rubygen.mk + +$(rgen_srcs) $(srcdir)/rubygen.mk: rgen.timestamp +rgen.timestamp: $(rgen_generator) $(specs) + $(rgen_cmd); touch $@ +$(rgen_generator): # Management generator. mgen_dir=$(top_srcdir)/managementgen mgen_cmd=$(mgen_dir)/main.py -m $(srcdir)/managementgen.mk \ $(top_srcdir)/../specs/management-schema.xml \ $(top_srcdir)/../specs/management-types.xml \ - $(mgen_dir)/templates $(srcdir)/gen/qpid/management + $(mgen_dir)/templates gen/qpid/management + +$(srcdir)/managementgen.mk $(mgen_broker_cpp) $(dist_qpid_management_HEADERS): mgen.timestamp +mgen.timestamp: $(mgen_generator) + $(mgen_cmd); touch $@ +$(mgen_generator): -endif # GENERATE +endif # GENERATE include $(srcdir)/rubygen.mk include $(srcdir)/managementgen.mk |