diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2006-11-22 16:57:35 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2006-11-22 16:57:35 +0000 |
| commit | d46ac2955c4871c9f22067f47490095e2c5f1806 (patch) | |
| tree | 7e76ef7e4ca47e4cc57c83f7950bf97c3eceb210 /cpp/Makefile | |
| parent | 018723f3889e9a1f63585dddba8eecff1d168501 (diff) | |
| download | qpid-python-d46ac2955c4871c9f22067f47490095e2c5f1806.tar.gz | |
Merged AMQP version-sensitive generated files with C++ trunk. Phase 1 of merge complete - all locations where version info is required in the framing, broker and client code, the version has been hard-coded to mahor=8, minor=0. Next step: make broker and client version-aware.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@478237 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/Makefile')
| -rw-r--r-- | cpp/Makefile | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/cpp/Makefile b/cpp/Makefile index d9ffb9919d..dd7551a648 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -22,7 +22,7 @@ include options.mk -.PHONY: test all all-nogen generate unittest pythontest doxygen +.PHONY: test all all-nogen generate unittest pythontest doxygen build-gentools test: unittest pythontest @@ -41,15 +41,25 @@ all: ## Generaged code -SPEC := $(CURDIR)/../specs/amqp-8.0.xml -XSL := code_gen.xsl framing.xsl -STYLESHEETS := $(XSL:%=$(CURDIR)/etc/stylesheets/%) -TRANSFORM := java -jar $(CURDIR)/tools/saxon8.jar -o results.out $(SPEC) -generate: $(GENDIR)/timestamp -$(GENDIR)/timestamp: $(wildcard etc/stylesheets/*.xsl) $(SPEC) - rm -rf $(GENDIR) - mkdir -p $(GENDIR)/qpid/framing - ( cd $(GENDIR)/qpid/framing && for s in $(STYLESHEETS) ; do $(TRANSFORM) $$s ; done ) && echo > $(GENDIR)/timestamp +# Add all XML specs to be generated onto the following line +SPECS := $(SPEC_DIR)/amqp-8.0.xml # $(SPEC_DIR)/amqp-0.9.test.xml $(SPEC_DIR)/cluster-0.9.test.xml $(SPEC_DIR)/amqp-0.10.test.xml +GENERATE := java -cp $(GENTOOLS_DIR)/src org.apache.qpid.gentools.Main -c -o $(GENDIR)/qpid/framing -t $(GENTOOLS_DIR)/templ.cpp $(SPECS) +generate: build-gentools $(GENDIR)/timestamp + +$(GENDIR)/timestamp: $(wildcard) $(SPECS) + @echo "---------- Generating code from $(SPECS) ----------" + @rm -rf $(GENDIR) + @mkdir -p $(GENDIR)/qpid/framing + @$(GENERATE) + @touch $(GENDIR)/timestamp + @echo "---------- Code generation complete ----------" + +#Build the code generator +build-gentools: $(GENTOOLS_DIR)/src/org/apache/qpid/gentools/Main.class + +$(GENTOOLS_DIR)/src/org/apache/qpid/gentools/Main.class: + @echo "Gentools not built; building..." + @( cd $(GENTOOLS_DIR) && ./build ) # Dependencies for existing generated files. GENFILES:=$(wildcard $(GENDIR)/qpid/*/*.cpp $(GENDIR)/qpid/*/*.h) @@ -147,4 +157,5 @@ clean: # Clean all builds spotless: rm -rf build + -rm $(GENTOOLS_DIR)/src/org/apache/qpid/gentools/*.class |
