diff options
author | Alan Conway <aconway@apache.org> | 2006-10-16 19:13:35 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2006-10-16 19:13:35 +0000 |
commit | cb10f35247b2986d709673e3d934766f2eae06fa (patch) | |
tree | 518f7b61a21f31ce1209888ed1016b0b537686e2 /cpp | |
parent | 3e71c160a163e82aa6858e28ac06953495e7e6d8 (diff) | |
download | qpid-python-cb10f35247b2986d709673e3d934766f2eae06fa.tar.gz |
Fix problem with generated code re-starting makefile.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@464629 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/Makefile | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/cpp/Makefile b/cpp/Makefile index 59a2c3b3be..54014202b1 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -42,9 +42,14 @@ include options.mk -.PHONY: test all unittest pythontest +.PHONY: test all all-nogen generate unittest pythontest -test: all unittest pythontest +test: all unittest # pythontest + +# Must run this as two separate make processes to pick up generated files. +all: + $(MAKE) generate + $(MAKE) all-nogen ## Generaged code @@ -52,17 +57,11 @@ 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) - -# Restart make if code is re-generated to get proper dependencies. -# Remove "clean" to avoid infinite loop. -REMAKE := exec $(MAKE) $(MAKECMDGOALS:clean=) +generate: gen/timestamp gen/timestamp: $(wildcard etc/stylesheets/*.xsl) $(SPEC) mkdir -p gen/qpid/framing echo > gen/timestamp cd gen/qpid/framing && for s in $(STYLESHEETS) ; do $(TRANSFORM) $$s ; done - @echo "*** Re-generated code, re-starting make ***" - $(REMAKE) - gen $(wildcard gen/qpid/framing/*.cpp): gen/timestamp ## Libraries @@ -76,7 +75,7 @@ COMMON_DIRS := qpid/concurrent qpid/framing qpid/io qpid COMMON_SRC := $(wildcard gen/qpid/framing/*.cpp $(COMMON_DIRS:%=src/%/*.cpp)) $(COMMON_LIB): gen/timestamp $(COMMON_SRC:.cpp=.o) $(LIB_CMD) $(COMMON_SRC:.cpp=.o) -all: $(COMMON_LIB) +all-nogen: $(COMMON_LIB) UNITTESTS := $(UNITTESTS) $(wildcard $(COMMON_DIRS:%=test/unit/%/*Test.cpp)) # Client library. @@ -84,7 +83,7 @@ CLIENT_LIB := lib/libqpid_client.so.1.0 CLIENT_SRC := $(wildcard src/qpid/client/*.cpp) $(CLIENT_LIB): $(CLIENT_SRC:.cpp=.o) $(CURDIR)/$(COMMON_LIB) $(LIB_CMD) $^ -all: $(CLIENT_LIB) +all-nogen: $(CLIENT_LIB) UNITTESTS := $(UNITTESTS) $(wildcard $(COMMON_DIRS:%=test/unit/%/*Test.cpp)) # Broker library. @@ -92,7 +91,7 @@ BROKER_LIB := lib/libqpid_broker.so.1.0 BROKER_SRC := $(wildcard src/qpid/broker/*.cpp) $(BROKER_LIB): $(BROKER_SRC:.cpp=.o) $(CURDIR)/$(COMMON_LIB) $(LIB_CMD) $^ -all: $(BROKER_LIB) +all-nogen: $(BROKER_LIB) UNITTESTS := $(UNITTESTS) $(wildcard test/unit/qpid/broker/*Test.cpp) # Implicit rule for unit test plugin libraries. @@ -101,7 +100,7 @@ UNITTESTS := $(UNITTESTS) $(wildcard test/unit/qpid/broker/*Test.cpp) ## Client tests -all: $(wildcard test/client/*.cpp:.cpp=) +all-nogen: $(wildcard test/client/*.cpp:.cpp=) test/client/%: test/client/%.cpp $(CXX) -o $@ $< $($(LIB)_FLAGS) -Itest/include $(CXXFLAGS) $(LDFLAGS) -lapr-1 $(LINK_WITH_$(LIB)) $(LINK_WITH_$(LIB)_DEPS) @@ -109,7 +108,7 @@ test/client/%: test/client/%.cpp bin/qpidd: src/qpidd.o $(CURDIR)/$(COMMON_LIB) $(CURDIR)/$(BROKER_LIB) $(CXX) -o $@ $(LDFLAGS) -lapr-1 $^ -all: bin/qpidd +all-nogen: bin/qpidd ## Run unit tests. unittest: $(UNITTESTS:.cpp=.so) |