[Libreoffice-commits] .: 2 commits - solenv/gbuild
Matus Kukan
mkukan at kemper.freedesktop.org
Mon Mar 5 14:07:29 PST 2012
solenv/gbuild/AllLangResTarget.mk | 1 +
solenv/gbuild/ComponentTarget.mk | 6 +++++-
solenv/gbuild/Configuration.mk | 24 ++++++++++++++++++++----
solenv/gbuild/Deliver.mk | 4 ++--
solenv/gbuild/Executable.mk | 3 ++-
solenv/gbuild/Package.mk | 5 ++++-
solenv/gbuild/Rdb.mk | 6 +++++-
solenv/gbuild/UnoApiTarget.mk | 8 ++++++--
solenv/gbuild/Zip.mk | 3 ++-
9 files changed, 47 insertions(+), 13 deletions(-)
New commits:
commit 90491a073c5b5faee782ad5eab63276fda2342e6
Author: Matúš Kukan <matus.kukan at gmail.com>
Date: Sun Mar 4 18:59:59 2012 +0100
gbuild: do not call mkdir -p in gb_Deliver__deliver
Rather create new order-only dependencies on directories where
targets should be delivered.
On cygwin this is much faster.
diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
index 70151aa..344f6d8 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -356,6 +356,7 @@ $(call gb_ResTarget_get_imagelist_target,$(1)) : $(call gb_ResTarget_get_target,
$(call gb_ResTarget_get_outdir_target,$(1)) : $(call gb_ResTarget_get_target,$(1))
$(call gb_ResTarget_get_outdir_target,$(1)) : ILSTTARGET = $(call gb_ResTarget_get_outdir_imagelist_target,$(1))
+$(call gb_ResTarget_get_outdir_imagelist_target,$(1)) :| $(dir $(call gb_ResTarget_get_outdir_imagelist_target,$(1)))
$(call gb_Deliver_add_deliverable,$(call gb_ResTarget_get_outdir_target,$(1)),$(call gb_ResTarget_get_target,$(1)),$(1))
$(call gb_Deliver_add_deliverable,$(call gb_ResTarget_get_outdir_imagelist_target,$(1)),$(call gb_ResTarget_get_imagelist_target,$(1)),$(1))
diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
index efe4819..adec783 100644
--- a/solenv/gbuild/ComponentTarget.mk
+++ b/solenv/gbuild/ComponentTarget.mk
@@ -52,6 +52,9 @@ $(call gb_ComponentTarget_get_target,%) : $(call gb_ComponentTarget_get_source,$
$(call gb_ComponentTarget_get_target,%) :
$(eval $(call gb_Outpt_error,Unable to find component file $(call gb_ComponentTarget_get_source,,$*) in the repositories: $(gb_ComponentTarget_REPOS) or xsltproc is missing.))
+$(call gb_ComponentTarget_get_outdir_target,%/) :
+ mkdir -p $@
+
$(call gb_ComponentTarget_get_outdir_target,%) :
$(call gb_Deliver_deliver,$<,$@)
@@ -59,7 +62,8 @@ define gb_ComponentTarget_ComponentTarget
$(call gb_ComponentTarget_get_target,$(1)) : COMPONENTPREFIX := $(2)
$(call gb_ComponentTarget_get_target,$(1)) : LIBFILENAME := $(3)
$(call gb_ComponentTarget_get_outdir_target,$(1)) : \
- $(call gb_ComponentTarget_get_target,$(1))
+ $(call gb_ComponentTarget_get_target,$(1)) \
+ | $(dir $(call gb_ComponentTarget_get_outdir_target,$(1)))
$(call gb_Deliver_add_deliverable,$(call gb_ComponentTarget_get_outdir_target,$(1)),$(call gb_ComponentTarget_get_target,$(1)),$(1))
endef
diff --git a/solenv/gbuild/Configuration.mk b/solenv/gbuild/Configuration.mk
index 0a9c54c..c16bc13 100644
--- a/solenv/gbuild/Configuration.mk
+++ b/solenv/gbuild/Configuration.mk
@@ -101,6 +101,9 @@ $(call gb_XcsTarget_get_clean_target,%) :
rm -f $(call gb_XcsTarget_get_target,$*) \
$(call gb_XcsTarget_get_outdir_target,$(XCSFILE)))
+$(call gb_XcsTarget_get_outdir_target,%/) :
+ mkdir -p $@
+
$(call gb_XcsTarget_get_outdir_target,%) :
$(call gb_Helper_abbreviate_dirs,\
$(call gb_Deliver_deliver,$<,$@))
@@ -142,6 +145,9 @@ $(call gb_XcuDataTarget_get_clean_target,%) :
rm -f $(call gb_XcuDataTarget_get_target,$*) \
$(call gb_XcuDataTarget_get_outdir_target,$(XCUFILE)))
+$(call gb_XcuDataTarget_get_outdir_target,%/) :
+ mkdir -p $@
+
$(call gb_XcuDataTarget_get_outdir_target,%) :
$(call gb_Helper_abbreviate_dirs,\
$(call gb_Deliver_deliver,$<,$@))
@@ -179,6 +185,9 @@ $(call gb_XcuModuleTarget_get_clean_target,%) :
rm -f $(call gb_XcuModuleTarget_get_target,$*) \
$(call gb_XcuModuleTarget_get_outdir_target,$(XCUFILE)))
+$(call gb_XcuModuleTarget_get_outdir_target,%/) :
+ mkdir -p $@
+
$(call gb_XcuModuleTarget_get_outdir_target,%) :
$(call gb_Helper_abbreviate_dirs,\
$(call gb_Deliver_deliver,$<,$@))
@@ -214,6 +223,9 @@ $(call gb_XcuLangpackTarget_get_clean_target,%) :
$(call gb_XcuLangpackTarget__get_target_with_lang,$*,$(lang)) \
$(call gb_XcuLangpackTarget__get_outdir_target_with_lang,$(XCUFILE),$(lang))))
+$(call gb_XcuLangpackTarget_get_outdir_target,%/) :
+ mkdir -p $@
+
$(call gb_XcuLangpackTarget_get_outdir_target,%) :
$(call gb_Helper_abbreviate_dirs,\
$(call gb_Deliver_deliver,$<,$@))
@@ -343,7 +355,8 @@ $(call gb_XcsTarget_get_clean_target,$(2)/$(3)) : XCSFILE := $(3)
$(call gb_Configuration_get_target,$(1)) : \
$(call gb_XcsTarget_get_outdir_target,$(3))
$(call gb_XcsTarget_get_outdir_target,$(3)) : \
- $(call gb_XcsTarget_get_target,$(2)/$(3))
+ $(call gb_XcsTarget_get_target,$(2)/$(3)) \
+ | $(dir $(call gb_XcsTarget_get_outdir_target,$(3)))
$(call gb_Deliver_add_deliverable,$(call gb_XcsTarget_get_outdir_target,$(3)),\
$(call gb_XcsTarget_get_target,$(2)/$(3)),$(2)/$(3))
@@ -368,7 +381,8 @@ ifeq ($(strip $(gb_Configuration_NODELIVER_$(1))),)
$(call gb_Configuration_get_target,$(1)) : \
$(call gb_XcuDataTarget_get_outdir_target,$(3))
$(call gb_XcuDataTarget_get_outdir_target,$(3)) : \
- $(call gb_XcuDataTarget_get_target,$(2)/$(3))
+ $(call gb_XcuDataTarget_get_target,$(2)/$(3)) \
+ | $(dir $(call gb_XcuDataTarget_get_outdir_target,$(3)))
$(call gb_Deliver_add_deliverable,\
$(call gb_XcuDataTarget_get_outdir_target,$(3)),\
$(call gb_XcuDataTarget_get_target,$(2)/$(3)),\
@@ -398,7 +412,8 @@ ifeq ($(strip $(gb_Configuration_NODELIVER_$(1))),)
$(call gb_Configuration_get_target,$(1)) : \
$(call gb_XcuModuleTarget_get_outdir_target,$(3))
$(call gb_XcuModuleTarget_get_outdir_target,$(3)) : \
- $(call gb_XcuModuleTarget_get_target,$(2)/$(3))
+ $(call gb_XcuModuleTarget_get_target,$(2)/$(3)) \
+ | $(dir $(call gb_XcuModuleTarget_get_outdir_target,$(3)))
$(call gb_Deliver_add_deliverable,\
$(call gb_XcuModuleTarget_get_outdir_target,$(3)),\
$(call gb_XcuModuleTarget_get_target,$(2)/$(3)),\
@@ -428,7 +443,8 @@ $(call gb_XcuLangpackTarget__get_target_with_lang,$(2)/$(3),$(4)) : \
$(call gb_XcuLangpackTarget_get_clean_target,$(2)/$(3)) : XCUFILE := $(3)
$(call gb_XcuLangpackTarget__get_target_with_lang,$(2)/$(3),$(4)) : LANG := $(4)
$(call gb_XcuLangpackTarget__get_outdir_target_with_lang,$(3),$(4)) : \
- $(call gb_XcuLangpackTarget__get_target_with_lang,$(2)/$(3),$(4))
+ $(call gb_XcuLangpackTarget__get_target_with_lang,$(2)/$(3),$(4)) \
+ | $(dir $(call gb_XcuLangpackTarget__get_outdir_target_with_lang,$(3),$(4)))
$(call gb_Deliver_add_deliverable,\
$(call gb_XcuLangpackTarget__get_outdir_target_with_lang,$(3),$(4)),\
$(call gb_XcuLangpackTarget__get_target_with_lang,$(2)/$(3),$(4)),\
diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index 33ef182..79e4041 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -56,11 +56,11 @@ endef
ifeq ($(strip $(gb_Deliver_GNUCOPY)),)
define gb_Deliver__deliver
-mkdir -p $(dir $(2)) && $(if $(gb_Deliver_CLEARONDELIVER),rm -f $(2) &&) $(if $(gb_Deliver_HARDLINK),ln,cp -P -f) $(1) $(2) && touch -r $(1) $(2)
+$(if $(gb_Deliver_CLEARONDELIVER),rm -f $(2) &&) $(if $(gb_Deliver_HARDLINK),ln,cp -P -f) $(1) $(2) && touch -r $(1) $(2)
endef
else
define gb_Deliver__deliver
-mkdir -p $(dir $(2)) && $(gb_Deliver_GNUCOPY) $(if $(gb_Deliver_CLEARONDELIVER),--remove-destination) $(if $(gb_Deliver_HARDLINK),--link) --no-dereference --force --preserve=timestamps $(1) $(2)
+$(gb_Deliver_GNUCOPY) $(if $(gb_Deliver_CLEARONDELIVER),--remove-destination) $(if $(gb_Deliver_HARDLINK),--link) --no-dereference --force --preserve=timestamps $(1) $(2)
endef
endif
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 2d148a6..af24875 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -55,7 +55,8 @@ define gb_Executable__Executable_impl
$(call gb_Executable_set_targettype_gui,$(2))
$(call gb_LinkTarget_LinkTarget,$(2))
$(call gb_LinkTarget_set_targettype,$(2),Executable)
-$(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
+$(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \
+ | $(dir $(call gb_Executable_get_target,$(1)))
$(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
$(call gb_Executable_Executable_platform,$(1),$(2))
$$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1))))
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index 0179dd1..c8fd575 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -29,11 +29,14 @@
# PackagePart class
+$(foreach destination,$(call gb_PackagePart_get_destinations), $(destination)/%/) :
+ mkdir -p $@
+
$(foreach destination,$(call gb_PackagePart_get_destinations), $(destination)/%) :
$(call gb_Deliver_deliver,$<,$@)
define gb_PackagePart_PackagePart
-$(OUTDIR)/$(1) : $(2)
+$(OUTDIR)/$(1) : $(2) | $(dir $(OUTDIR)/$(1))
$(2) :| $(3)
$(call gb_Deliver_add_deliverable,$(OUTDIR)/$(1),$(2),$(3))
endef
diff --git a/solenv/gbuild/Rdb.mk b/solenv/gbuild/Rdb.mk
index bea289f..2aaca0a 100644
--- a/solenv/gbuild/Rdb.mk
+++ b/solenv/gbuild/Rdb.mk
@@ -59,13 +59,17 @@ $(call gb_Rdb_get_clean_target,%) :
$(call gb_Helper_abbreviate_dirs_native,\
rm -f $(call gb_Rdb_get_outdir_target,$*) $(call gb_Rdb_get_target,$*))
+$(call gb_Rdb_get_outdir_target,%/) :
+ mkdir -p $@
+
$(call gb_Rdb_get_outdir_target,%) :
$(call gb_Deliver_deliver,$<,$@)
define gb_Rdb_Rdb
$(call gb_Rdb_get_target,$(1)) : COMPONENTS :=
$(call gb_Rdb_get_clean_target,$(1)) : COMPONENTS :=
-$(call gb_Rdb_get_outdir_target,$(1)) : $(call gb_Rdb_get_target,$(1))
+$(call gb_Rdb_get_outdir_target,$(1)) : $(call gb_Rdb_get_target,$(1)) \
+ | $(dir $(call gb_Rdb_get_outdir_target,$(1)))
$(call gb_Deliver_add_deliverable,$(call gb_ResTarget_get_outdir_target,$(1)),$(call gb_Rdb_get_target,$(1)),$(1))
$$(eval $$(call gb_Module_register_target,$(call gb_Rdb_get_outdir_target,$(1)),$(call gb_Rdb_get_clean_target,$(1))))
diff --git a/solenv/gbuild/Zip.mk b/solenv/gbuild/Zip.mk
index f4f7b78..0ae4c26 100644
--- a/solenv/gbuild/Zip.mk
+++ b/solenv/gbuild/Zip.mk
@@ -76,7 +76,8 @@ $(call gb_Zip_get_clean_target,$(1)) : CLEAR_LOCATION :=
gb_Package_Location_$(1) := $(2)
$(eval $(call gb_Module_register_target,$(call gb_Zip_get_final_target,$(1)),$(call gb_Zip_get_clean_target,$(1))))
$(call gb_Deliver_add_deliverable,$(call gb_Zip_get_outdir_target,$(1)),$(call gb_Zip_get_target,$(1)),$(1))
-$(call gb_Zip_get_outdir_target,$(1)) : $(call gb_Zip_get_target,$(1))
+$(call gb_Zip_get_outdir_target,$(1)) : $(call gb_Zip_get_target,$(1)) \
+ | $(dir $(call gb_Zip_get_outdir_target,$(1)))
endef
commit 408822b54724f8170a1296ddd67e50d8291c8ee1
Author: Matúš Kukan <matus.kukan at gmail.com>
Date: Sun Mar 4 18:56:04 2012 +0100
UnoApiTarget: avoid calling mkdir -p when not necessary
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 4614fc6..faee295 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -72,6 +72,8 @@ endef
define gb_UnoApiTarget__add_idlfile
$(call gb_UnoApiPartTarget_get_target,$(2)/idl.done) : \
$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd)
+$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) :| \
+ $(call gb_UnoApiPartTarget_get_target,$(2)/)
gb_UnoApiTarget_IDLFILES_$(1) += $(2)/$(3).idl
ifeq ($(gb_FULLDEPS),$(true))
@@ -199,8 +201,11 @@ $(call gb_UnoApiTarget_get_clean_target,%) :
# invoked with the .idl file corresponding to the .urd in that case.
# Touch the .urd file, so it is newer than the .done file, causing that to
# be rebuilt and overwriting the .urd file again.
+$(call gb_UnoApiPartTarget_get_target,%/) :
+ mkdir -p $@
+
$(call gb_UnoApiPartTarget_get_target,%.urd) :
- mkdir -p $(dir $@) && touch $@
+ touch $@
$(call gb_UnoApiPartTarget_get_target,%.done) :
$(call gb_UnoApiPartTarget__command,$@,$*,$?)
@@ -208,7 +213,6 @@ $(call gb_UnoApiPartTarget_get_target,%.done) :
define gb_UnoApiPartTarget__command
$(call gb_Output_announce,$(2),$(true),IDL,2)
- mkdir -p $(call gb_UnoApiPartTarget_get_target,$(dir $(2))) && \
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\
$(call gb_Helper_convert_native,$(INCLUDE) $(DEFS) \
-M $(basename $(call gb_UnoApiPartTarget_get_dep_target,$(dir $(2)))) \
More information about the Libreoffice-commits
mailing list