diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-03-04 18:59:59 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-03-05 23:02:41 +0100 |
commit | 90491a073c5b5faee782ad5eab63276fda2342e6 (patch) | |
tree | aace6f9174bc4653fca28b413fe4a85f33030f8a | |
parent | 408822b54724f8170a1296ddd67e50d8291c8ee1 (diff) |
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.
-rw-r--r-- | solenv/gbuild/AllLangResTarget.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/ComponentTarget.mk | 6 | ||||
-rw-r--r-- | solenv/gbuild/Configuration.mk | 24 | ||||
-rw-r--r-- | solenv/gbuild/Deliver.mk | 4 | ||||
-rw-r--r-- | solenv/gbuild/Executable.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/Package.mk | 5 | ||||
-rw-r--r-- | solenv/gbuild/Rdb.mk | 6 | ||||
-rw-r--r-- | solenv/gbuild/Zip.mk | 3 |
8 files changed, 41 insertions, 11 deletions
diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk index 70151aa2bc90..344f6d827a84 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 efe481991a19..adec783c7824 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 0a9c54c28aad..c16bc1306d5e 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 33ef1825a288..79e40414b516 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 2d148a60cdeb..af248758731b 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 0179dd147dd1..c8fd57521f00 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 bea289f41815..2aaca0a37039 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 f4f7b783b13b..0ae4c26b8679 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 |