Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4297

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/97/4297/1

Reduce the amount of calls of mkdir -p.

Change-Id: Ib4762f5a260035f00b5e68cf45b687fdf02e9c02
---
M solenv/gbuild/LinkTarget.mk
M solenv/gbuild/SdiTarget.mk
M solenv/gbuild/UnoApiTarget.mk
3 files changed, 30 insertions(+), 2 deletions(-)



diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index ef79709..63f0f11 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -102,7 +102,6 @@
 # It is used on first build and in case the user deletes the object dep file.
 ifeq ($(gb_FULLDEPS),$(true))
 define gb_Object__command_dep
-mkdir -p $(dir $(1)) && \
        echo "$(2) : $(gb_Helper_PHONY)" > $(1)
 
 endef
@@ -184,6 +183,12 @@
 endif
 
 ifeq ($(gb_FULLDEPS),$(true))
+$(dir $(call gb_CxxObject_get_dep_target,%)).dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(dir $(call gb_CxxObject_get_dep_target,%))%/.dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
 $(call gb_CxxObject_get_dep_target,%) :
        $(if $(wildcard $@),touch $@,\
          $(eval $(gb_CxxObject__set_pchflags))\
@@ -919,6 +924,7 @@
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_LinkTarget_get_dep_target,$(1)) : COBJECTS += $(2)
 $(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_CObject_get_dep_target,$(2))
+$(call gb_CObject_get_dep_target,$(2)) :| $(dir $(call gb_CObject_get_dep_target,$(2))).dir
 endif
 
 endef
@@ -940,6 +946,7 @@
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_LinkTarget_get_dep_target,$(1)) : CXXOBJECTS += $(2)
 $(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_CxxObject_get_dep_target,$(2))
+$(call gb_CxxObject_get_dep_target,$(2)) :| $(dir $(call gb_CxxObject_get_dep_target,$(2))).dir
 endif
 
 endef
@@ -1015,6 +1022,7 @@
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_LinkTarget_get_dep_target,$(1)) : GENCOBJECTS += $(2)
 $(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_GenCObject_get_dep_target,$(2))
+$(call gb_GenCObject_get_dep_target,$(2)) :| $(dir $(call gb_GenCObject_get_dep_target,$(2))).dir
 endif
 
 endef
@@ -1041,6 +1049,7 @@
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS += $(2)
 $(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_GenCxxObject_get_dep_target,$(2))
+$(call gb_GenCxxObject_get_dep_target,$(2)) :| $(dir $(call 
gb_GenCxxObject_get_dep_target,$(2))).dir
 endif
 
 endef
diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk
index 2fbe2e7..c4cf2ed 100644
--- a/solenv/gbuild/SdiTarget.mk
+++ b/solenv/gbuild/SdiTarget.mk
@@ -28,7 +28,7 @@
 $(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi $(gb_SdiTarget_SVIDLDEPS)
        $(call gb_Output_announce,$*,$(true),SDI,1)
        $(call gb_Helper_abbreviate_dirs,\
-               mkdir -p $(dir $@) $(dir $(call gb_SdiTarget_get_dep_target,$*)))
+               mkdir -p $(dir $@))
        $(call gb_Helper_abbreviate_dirs,\
                cd $(dir $<) && \
                $(gb_SdiTarget_SVIDLCOMMAND) -quiet \
@@ -47,6 +47,12 @@
        @true
 
 ifeq ($(gb_FULLDEPS),$(true))
+$(dir $(call gb_SdiObject_get_dep_target,%)).dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(dir $(call gb_SdiObject_get_dep_target,%))%/.dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
 $(call gb_SdiTarget_get_dep_target,%) :
        $(if $(wildcard $@),touch $@,\
          $(call gb_Object__command_dep,$@,$(call gb_SdiTarget_get_target,$*)))
@@ -66,6 +72,7 @@
 $(call gb_SdiTarget_get_target,$(1)) : EXPORTS := $(SRCDIR)/$(2).sdi
 ifeq ($(gb_FULLDEPS),$(true))
 -include $(call gb_SdiTarget_get_dep_target,$(1))
+$(call gb_SdiTarget_get_dep_target,$(1)) :| $(dir $(call gb_SdiTarget_get_dep_target,$(1))).dir
 endif
 endef
 
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 703d6b1..45096b3 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -65,6 +65,11 @@
        $(call gb_UnoApiPartTarget__command,$@,$*,$(filter-out $(gb_UnoApiPartTarget_IDLCDEPS),$(if 
$(filter $(gb_UnoApiPartTarget_IDLCDEPS),$?),$^,$?)))
 
 ifeq ($(gb_FULLDEPS),$(true))
+$(dir $(call gb_UnoApiPartTarget_get_dep_target,%)).dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(dir $(call gb_UnoApiPartTarget_get_dep_target,%))%/.dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
 
 $(call gb_UnoApiPartTarget_get_dep_target,%) :
        $(if $(wildcard $@),touch $@,\
@@ -137,6 +142,11 @@
 endef
 
 ifeq ($(gb_FULLDEPS),$(true))
+$(dir $(call gb_UnoApiTarget_get_dep_target,%)).dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(dir $(call gb_UnoApiTarget_get_dep_target,%))%/.dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
 
 $(call gb_UnoApiTarget_get_dep_target,%) : $(call 
gb_Executable_get_runtime_dependencies,concat-deps)
        $(call gb_UnoApiTarget__command_dep,$@,$*,$(UNOAPI_IDLFILES))
@@ -153,6 +163,7 @@
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES :=
 -include $(call gb_UnoApiTarget_get_dep_target,$(1))
+$(call gb_UnoApiTarget_get_dep_target,$(1)) :| $(dir $(call 
gb_UnoApiTarget_get_dep_target,$(1))).dir
 endif
 
 endef
@@ -175,6 +186,7 @@
 $(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES += $(2)/$(3).idl
 $(call gb_UnoApiTarget_get_dep_target,$(1)) : \
        $(call gb_UnoApiPartTarget_get_dep_target,$(2)/$(3))
+$(call gb_UnoApiPartTarget_get_dep_target,$(2)/$(3)) :| $(dir $(call 
gb_UnoApiPartTarget_get_dep_target,$(2)/$(3))).dir
 endif
 
 endef

-- 
To view, visit https://gerrit.libreoffice.org/4297
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4762f5a260035f00b5e68cf45b687fdf02e9c02
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Jan Holesovsky <kendy@suse.cz>
Gerrit-Reviewer: Björn Michaelsen <bjoern.michaelsen@canonical.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.