Kaydet (Commit) 88085a5b authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

Reduce the amount of calls of mkdir -p.

Change-Id: Ib4762f5a260035f00b5e68cf45b687fdf02e9c02
üst f9610ed6
...@@ -102,7 +102,6 @@ endef ...@@ -102,7 +102,6 @@ endef
# It is used on first build and in case the user deletes the object dep file. # It is used on first build and in case the user deletes the object dep file.
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
define gb_Object__command_dep define gb_Object__command_dep
mkdir -p $(dir $(1)) && \
echo "$(2) : $(gb_Helper_PHONY)" > $(1) echo "$(2) : $(gb_Helper_PHONY)" > $(1)
endef endef
...@@ -184,6 +183,12 @@ $(call gb_CxxObject_get_target,%) : $(call gb_CxxObject_get_source,$(SRCDIR),%) ...@@ -184,6 +183,12 @@ $(call gb_CxxObject_get_target,%) : $(call gb_CxxObject_get_source,$(SRCDIR),%)
endif endif
ifeq ($(gb_FULLDEPS),$(true)) 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,%) : $(call gb_CxxObject_get_dep_target,%) :
$(if $(wildcard $@),touch $@,\ $(if $(wildcard $@),touch $@,\
$(eval $(gb_CxxObject__set_pchflags))\ $(eval $(gb_CxxObject__set_pchflags))\
...@@ -919,6 +924,7 @@ $(call gb_CObject_get_target,$(2)) : \ ...@@ -919,6 +924,7 @@ $(call gb_CObject_get_target,$(2)) : \
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : COBJECTS += $(2) $(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_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 endif
endef endef
...@@ -940,6 +946,7 @@ endif ...@@ -940,6 +946,7 @@ endif
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : CXXOBJECTS += $(2) $(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_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 endif
endef endef
...@@ -1015,6 +1022,7 @@ $(call gb_GenCObject_get_target,$(2)) : \ ...@@ -1015,6 +1022,7 @@ $(call gb_GenCObject_get_target,$(2)) : \
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : GENCOBJECTS += $(2) $(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_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 endif
endef endef
...@@ -1041,6 +1049,7 @@ endif ...@@ -1041,6 +1049,7 @@ endif
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS += $(2) $(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_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 endif
endef endef
......
...@@ -28,7 +28,7 @@ gb_SdiTarget_SVIDLCOMMAND := $(call gb_Executable_get_command,svidl) ...@@ -28,7 +28,7 @@ gb_SdiTarget_SVIDLCOMMAND := $(call gb_Executable_get_command,svidl)
$(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi $(gb_SdiTarget_SVIDLDEPS) $(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi $(gb_SdiTarget_SVIDLDEPS)
$(call gb_Output_announce,$*,$(true),SDI,1) $(call gb_Output_announce,$*,$(true),SDI,1)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) $(dir $(call gb_SdiTarget_get_dep_target,$*))) mkdir -p $(dir $@))
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
cd $(dir $<) && \ cd $(dir $<) && \
$(gb_SdiTarget_SVIDLCOMMAND) -quiet \ $(gb_SdiTarget_SVIDLCOMMAND) -quiet \
...@@ -39,7 +39,7 @@ $(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi $(gb_SdiTarget_SVIDLDEPS) ...@@ -39,7 +39,7 @@ $(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi $(gb_SdiTarget_SVIDLDEPS)
-fz$@.sid \ -fz$@.sid \
-fx$(EXPORTS) \ -fx$(EXPORTS) \
-fm$@ \ -fm$@ \
-fM$(call gb_SdiTarget_get_dep_target,$*) \ $(if $(gb_FULLDEPS),-fM$(call gb_SdiTarget_get_dep_target,$*)) \
$<) $<)
# rule necessary to rebuild cxx files that include the header # rule necessary to rebuild cxx files that include the header
...@@ -47,6 +47,12 @@ $(call gb_SdiTarget_get_target,%.hxx) : $(call gb_SdiTarget_get_target,%) ...@@ -47,6 +47,12 @@ $(call gb_SdiTarget_get_target,%.hxx) : $(call gb_SdiTarget_get_target,%)
@true @true
ifeq ($(gb_FULLDEPS),$(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,%) : $(call gb_SdiTarget_get_dep_target,%) :
$(if $(wildcard $@),touch $@,\ $(if $(wildcard $@),touch $@,\
$(call gb_Object__command_dep,$@,$(call gb_SdiTarget_get_target,$*))) $(call gb_Object__command_dep,$@,$(call gb_SdiTarget_get_target,$*)))
...@@ -66,6 +72,7 @@ $(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $$(subst -I. ,-I$$(dir $(SRCDI ...@@ -66,6 +72,7 @@ $(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $$(subst -I. ,-I$$(dir $(SRCDI
$(call gb_SdiTarget_get_target,$(1)) : EXPORTS := $(SRCDIR)/$(2).sdi $(call gb_SdiTarget_get_target,$(1)) : EXPORTS := $(SRCDIR)/$(2).sdi
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
-include $(call gb_SdiTarget_get_dep_target,$(1)) -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 endif
endef endef
......
...@@ -65,6 +65,11 @@ $(call gb_UnoApiPartTarget_get_target,%.done) : $(gb_UnoApiPartTarget_IDLCDEPS) ...@@ -65,6 +65,11 @@ $(call gb_UnoApiPartTarget_get_target,%.done) : $(gb_UnoApiPartTarget_IDLCDEPS)
$(call gb_UnoApiPartTarget__command,$@,$*,$(filter-out $(gb_UnoApiPartTarget_IDLCDEPS),$(if $(filter $(gb_UnoApiPartTarget_IDLCDEPS),$?),$^,$?))) $(call gb_UnoApiPartTarget__command,$@,$*,$(filter-out $(gb_UnoApiPartTarget_IDLCDEPS),$(if $(filter $(gb_UnoApiPartTarget_IDLCDEPS),$?),$^,$?)))
ifeq ($(gb_FULLDEPS),$(true)) 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,%) : $(call gb_UnoApiPartTarget_get_dep_target,%) :
$(if $(wildcard $@),touch $@,\ $(if $(wildcard $@),touch $@,\
...@@ -137,6 +142,11 @@ $(call gb_Helper_abbreviate_dirs,\ ...@@ -137,6 +142,11 @@ $(call gb_Helper_abbreviate_dirs,\
endef endef
ifeq ($(gb_FULLDEPS),$(true)) 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_get_dep_target,%) : $(call gb_Executable_get_runtime_dependencies,concat-deps)
$(call gb_UnoApiTarget__command_dep,$@,$*,$(UNOAPI_IDLFILES)) $(call gb_UnoApiTarget__command_dep,$@,$*,$(UNOAPI_IDLFILES))
...@@ -153,6 +163,7 @@ $(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_DEPRDBS := ...@@ -153,6 +163,7 @@ $(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_DEPRDBS :=
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES := $(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES :=
-include $(call gb_UnoApiTarget_get_dep_target,$(1)) -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 endif
endef endef
...@@ -175,6 +186,7 @@ ifeq ($(gb_FULLDEPS),$(true)) ...@@ -175,6 +186,7 @@ ifeq ($(gb_FULLDEPS),$(true))
$(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES += $(2)/$(3).idl $(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES += $(2)/$(3).idl
$(call gb_UnoApiTarget_get_dep_target,$(1)) : \ $(call gb_UnoApiTarget_get_dep_target,$(1)) : \
$(call gb_UnoApiPartTarget_get_dep_target,$(2)/$(3)) $(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 endif
endef endef
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment