aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-10-01 18:09:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-10-01 18:09:05 +0200
commit29b1ccc58e002fbcb0da30cc16ec9e676d7bfb80 (patch)
tree1925106d461f4921ef8877abb72630f287717a0a /build
parent4a2834255dc48166afc537e9e9dce80be457fa14 (diff)
Optimize build rules for the out_base == src_base case
Diffstat (limited to 'build')
-rw-r--r--build/xsd/parser/xsd-cxx.make9
-rw-r--r--build/xsd/tree/xsd-cxx.make9
2 files changed, 14 insertions, 4 deletions
diff --git a/build/xsd/parser/xsd-cxx.make b/build/xsd/parser/xsd-cxx.make
index b31568a..0c05508 100644
--- a/build/xsd/parser/xsd-cxx.make
+++ b/build/xsd/parser/xsd-cxx.make
@@ -39,14 +39,19 @@ $(xsd_parser_pattern): xsd_options := $(ops)
.PRECIOUS: $(xsd_parser_pattern)
-$(xsd_parser_pattern): $(out_base)/%.xsd | $$(dir $$@).
+ifeq ($(out_base),$(src_base))
+
+$(xsd_parser_pattern): $(src_base)/%.xsd
$(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
-ifneq ($(out_base),$(src_base))
+else
$(xsd_parser_pattern): $(src_base)/%.xsd | $$(dir $$@).
$(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
+$(xsd_parser_pattern): $(out_base)/%.xsd | $$(dir $$@).
+ $(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
+
endif
diff --git a/build/xsd/tree/xsd-cxx.make b/build/xsd/tree/xsd-cxx.make
index 55136db..16cc8d9 100644
--- a/build/xsd/tree/xsd-cxx.make
+++ b/build/xsd/tree/xsd-cxx.make
@@ -20,14 +20,19 @@ $(xsd_tree_pattern): xsd_options :=
.PRECIOUS: $(xsd_tree_pattern)
-$(xsd_tree_pattern): $(out_base)/%.xsd | $$(dir $$@).
+ifeq ($(out_base),$(src_base))
+
+$(xsd_tree_pattern): $(src_base)/%.xsd
$(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
-ifneq ($(out_base),$(src_base))
+else
$(xsd_tree_pattern): $(src_base)/%.xsd | $$(dir $$@).
$(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
+$(xsd_tree_pattern): $(out_base)/%.xsd | $$(dir $$@).
+ $(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
+
endif
.PHONY: $(out_base)/%$(xsd_tree_suffix).cxx.xsd.clean