summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2011-09-01 18:37:08 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2011-09-02 11:48:12 +0200
commit4453178694db4bbc6d110035865fa7cc4a209b13 (patch)
tree8a9db3f87f5f30823abaef01a1ce79e7dafc55bd /solenv/gbuild
parent5f000fdf8667a345e17ceb1ee435b2d1df2f6949 (diff)
process more idl files at once - first part: gbuild
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/UnoApiTarget.mk66
1 files changed, 34 insertions, 32 deletions
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 935c5eab105f..061c2b70c6bc 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -60,46 +60,55 @@ gb_UnoApiTarget_IDLFILES_$(1) :=
endef
define gb_UnoApiTarget_add_idlfiles
-$(foreach idl,$(2),$(call gb_UnoApiTarget_add_idlfile,$(1),$(idl)))
+$(foreach idl,$(3),$(call gb_UnoApiTarget_add_idlfile,$(1),$(2),$(idl)))
+
+$(call gb_UnoApiPartTarget_get_target,$(2)/idl.done) : $(foreach repo,$(gb_REPOS),$(foreach idl,$(3),$(realpath $(repo)/$(2)/$(idl).idl)))
+ $(gb_UnoApiPartTarget__command)
endef
define gb_UnoApiTarget_add_idlfile
-$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiPartTarget_get_target,$(2).urd)
-$(call gb_UnoApiPartTarget_get_target,$(2).urd) : $(foreach repo,$(gb_REPOS),$(realpath $(repo)/$(2).idl))
-gb_UnoApiTarget_HPPFILES_$(1) += $(2).hdl
-gb_UnoApiTarget_HPPFILES_$(1) += $(2).hpp
-gb_UnoApiTarget_IDLFILES_$(1) += $(2).idl
+$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd)
+$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) : $(call gb_UnoApiPartTarget_get_target,$(2)/idl.done)
+gb_UnoApiTarget_HPPFILES_$(1) += $(2)/$(3).hdl
+gb_UnoApiTarget_HPPFILES_$(1) += $(2)/$(3).hpp
+gb_UnoApiTarget_IDLFILES_$(1) += $(2)/$(3).idl
-$(call gb_UnoApiTarget_get_header_target,)$(2).hpp :| $(call gb_UnoApiTarget_get_target,$(1))
-$(call gb_UnoApiTarget_get_header_target,)$(2).hdl :| $(call gb_UnoApiTarget_get_target,$(1))
+$(call gb_UnoApiTarget_get_header_target,)$(2)/$(3).hpp :| $(call gb_UnoApiTarget_get_target,$(1))
+$(call gb_UnoApiTarget_get_header_target,)$(2)/$(3).hdl :| $(call gb_UnoApiTarget_get_target,$(1))
endef
define gb_UnoApiTarget_add_idlfiles_noheader
-$(foreach idl,$(2),$(call gb_UnoApiTarget_add_idlfile_noheader,$(1),$(idl)))
+$(foreach idl,$(3),$(call gb_UnoApiTarget_add_idlfile_noheader,$(1),$(2),$(idl)))
+
+$(call gb_UnoApiPartTarget_get_target,$(2)/idl_noheader.done) : $(foreach repo,$(gb_REPOS),$(foreach idl,$(3),$(realpath $(repo)/$(2)/$(idl).idl)))
+ $(gb_UnoApiPartTarget__command)
endef
define gb_UnoApiTarget_add_idlfile_noheader
-$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiPartTarget_get_target,$(2).urd)
-$(call gb_UnoApiPartTarget_get_target,$(2).urd) : $(foreach repo,$(gb_REPOS),$(realpath $(repo)/$(2).idl))
-gb_UnoApiTarget_IDLFILES_$(1) += $(2).idl
+$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd)
+$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) : $(call gb_UnoApiPartTarget_get_target,$(2)/idl_noheader.done)
+gb_UnoApiTarget_IDLFILES_$(1) += $(2)/$(3).idl
endef
define gb_UnoApiTarget_add_idlfiles_nohdl
-$(foreach idl,$(2),$(call gb_UnoApiTarget_add_idlfile_nohdl,$(1),$(idl)))
+$(foreach idl,$(3),$(call gb_UnoApiTarget_add_idlfile_nohdl,$(1),$(2),$(idl)))
+
+$(call gb_UnoApiPartTarget_get_target,$(2)/idl_nohdl.done) : $(foreach repo,$(gb_REPOS),$(foreach idl,$(3),$(realpath $(repo)/$(2)/$(idl).idl)))
+ $(gb_UnoApiPartTarget__command)
endef
define gb_UnoApiTarget_add_idlfile_nohdl
-$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiPartTarget_get_target,$(2).urd)
-$(call gb_UnoApiPartTarget_get_target,$(2).urd) : $(foreach repo,$(gb_REPOS),$(realpath $(repo)/$(2).idl))
-gb_UnoApiTarget_HPPFILES_$(1) += $(2).hpp
-gb_UnoApiTarget_IDLFILES_$(1) += $(2).idl
+$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd)
+$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) : $(call gb_UnoApiPartTarget_get_target,$(2)/idl_nohdl.done)
+gb_UnoApiTarget_HPPFILES_$(1) += $(2)/$(3).hpp
+gb_UnoApiTarget_IDLFILES_$(1) += $(2)/$(3).idl
-$(call gb_UnoApiTarget_get_header_target,)$(2).hpp :| $(call gb_UnoApiTarget_get_target,$(1))
+$(call gb_UnoApiTarget_get_header_target,)$(2)/$(3).hpp :| $(call gb_UnoApiTarget_get_target,$(1))
endef
@@ -152,24 +161,17 @@ $(call gb_UnoApiTarget_get_clean_target,%) :
-rm -rf $(call gb_UnoApiTarget_get_header_target,$*)\
$(call gb_UnoApiPartTarget_get_target,$*)
-# idlc doesn't return error codes != 0 in case of an error, so
-# check self
define gb_UnoApiPartTarget__command
-mkdir -p $(dir $(1)) && \
- mkdir -p $(gb_Helper_MISC) && \
- RESPONSEFILE=`$(gb_MKTEMP)` && \
- echo "$(call gb_Helper_convert_native,$(5) $(6) -O $(call gb_UnoApiPartTarget_get_target,$(2)) -verbose -C $(4))" > $${RESPONSEFILE} && \
- $(gb_UnoApiTarget_IDLCCOMMAND) @$${RESPONSEFILE} > /dev/null && \
- rm -f $${RESPONSEFILE} && \
- test -f $(@)
+ $$(call gb_Output_announce,$(2),$(true),IDL,2)
+ mkdir -p $(call gb_UnoApiPartTarget_get_target,$(2)) && \
+ RESPONSEFILE=$$(call var2file,$(shell $(gb_MKTEMP)),500,\
+ $(call gb_Helper_convert_native,$$(INCLUDE) $$(DEFS) -O $(call gb_UnoApiPartTarget_get_target,$(2)) -verbose -C $$?)) && \
+ $(gb_UnoApiTarget_IDLCCOMMAND) @$$$${RESPONSEFILE} > /dev/null && \
+ rm -f $$$${RESPONSEFILE} && \
+ touch $$@
endef
-$(call gb_UnoApiPartTarget_get_target,%) :
- $(call gb_Output_announce,$*,$(true),IDL,2)
- $(call gb_UnoApiPartTarget__command,$@,$(dir $*),$<,$?,$(INCLUDE),$(DEFS))
-
-
define gb_UnoApiTarget__command
mkdir -p $(dir $(1)) && \
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,$(call gb_Helper_convert_native,$(1) $(4) $(5))) && \