diff options
-rw-r--r-- | solenv/gbuild/AllLangResTarget.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/ComponentTarget.mk | 7 | ||||
-rw-r--r-- | solenv/gbuild/Configuration.mk | 34 | ||||
-rw-r--r-- | solenv/gbuild/Executable.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/Package.mk | 19 | ||||
-rw-r--r-- | solenv/gbuild/Rdb.mk | 8 | ||||
-rw-r--r-- | solenv/gbuild/UnoApiTarget.mk | 9 | ||||
-rw-r--r-- | solenv/gbuild/Zip.mk | 2 |
8 files changed, 54 insertions, 30 deletions
diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk index 344f6d827a84..1df1fb1220ae 100644 --- a/solenv/gbuild/AllLangResTarget.mk +++ b/solenv/gbuild/AllLangResTarget.mk @@ -356,7 +356,8 @@ $(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_ResTarget_get_outdir_imagelist_target,$(1)) :| \ + $(dir $(call gb_ResTarget_get_outdir_imagelist_target,$(1))).dir $(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 adec783c7824..9eb0ea55a7d3 100644 --- a/solenv/gbuild/ComponentTarget.mk +++ b/solenv/gbuild/ComponentTarget.mk @@ -52,8 +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 $@ +# the .dir is for make 3.81, which ignores trailing / +$(dir $(call gb_ComponentTarget_get_outdir_target,))%/.dir : + mkdir -p $(dir $@) $(call gb_ComponentTarget_get_outdir_target,%) : $(call gb_Deliver_deliver,$<,$@) @@ -63,7 +64,7 @@ $(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)) \ - | $(dir $(call gb_ComponentTarget_get_outdir_target,$(1))) + | $(dir $(call gb_ComponentTarget_get_outdir_target,$(1))).dir $(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 c16bc1306d5e..ffced850a4e6 100644 --- a/solenv/gbuild/Configuration.mk +++ b/solenv/gbuild/Configuration.mk @@ -101,8 +101,11 @@ $(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 $@ +# the .dir is for make 3.81, which ignores trailing / +$(dir $(call gb_XcsTarget_get_outdir_target,%))%/.dir : + $(if $(realpath $(dir $@)),,mkdir -p $(dir $@)) +$(dir $(call gb_XcsTarget_get_outdir_target,%)).dir : + $(if $(realpath $(dir $@)),,mkdir -p $(dir $@)) $(call gb_XcsTarget_get_outdir_target,%) : $(call gb_Helper_abbreviate_dirs,\ @@ -145,8 +148,11 @@ $(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 $@ +# the .dir is for make 3.81, which ignores trailing / +$(dir $(call gb_XcuDataTarget_get_outdir_target,))%/.dir : + $(if $(realpath $(dir $@)),,mkdir -p $(dir $@)) +$(dir $(call gb_XcuDataTarget_get_outdir_target,)).dir : + $(if $(realpath $(dir $@)),,mkdir -p $(dir $@)) $(call gb_XcuDataTarget_get_outdir_target,%) : $(call gb_Helper_abbreviate_dirs,\ @@ -185,8 +191,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 $@ +# the .dir is for make 3.81, which ignores trailing / +$(dir $(call gb_XcuModuleTarget_get_outdir_target,))%/.dir : + $(if $(realpath $(dir $@)),,mkdir -p $(dir $@)) $(call gb_XcuModuleTarget_get_outdir_target,%) : $(call gb_Helper_abbreviate_dirs,\ @@ -223,8 +230,11 @@ $(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 $@ +# the .dir is for make 3.81, which ignores trailing / +$(dir $(call gb_XcuLangpackTarget_get_outdir_target,))%/.dir : + $(if $(realpath $(dir $@)),,mkdir -p $(dir $@)) +$(dir $(call gb_XcuLangpackTarget_get_outdir_target,)).dir : + $(if $(realpath $(dir $@)),,mkdir -p $(dir $@)) $(call gb_XcuLangpackTarget_get_outdir_target,%) : $(call gb_Helper_abbreviate_dirs,\ @@ -356,7 +366,7 @@ $(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)) \ - | $(dir $(call gb_XcsTarget_get_outdir_target,$(3))) + | $(dir $(call gb_XcsTarget_get_outdir_target,$(3))).dir $(call gb_Deliver_add_deliverable,$(call gb_XcsTarget_get_outdir_target,$(3)),\ $(call gb_XcsTarget_get_target,$(2)/$(3)),$(2)/$(3)) @@ -382,7 +392,7 @@ $(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)) \ - | $(dir $(call gb_XcuDataTarget_get_outdir_target,$(3))) + | $(dir $(call gb_XcuDataTarget_get_outdir_target,$(3))).dir $(call gb_Deliver_add_deliverable,\ $(call gb_XcuDataTarget_get_outdir_target,$(3)),\ $(call gb_XcuDataTarget_get_target,$(2)/$(3)),\ @@ -413,7 +423,7 @@ $(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)) \ - | $(dir $(call gb_XcuModuleTarget_get_outdir_target,$(3))) + | $(dir $(call gb_XcuModuleTarget_get_outdir_target,$(3))).dir $(call gb_Deliver_add_deliverable,\ $(call gb_XcuModuleTarget_get_outdir_target,$(3)),\ $(call gb_XcuModuleTarget_get_target,$(2)/$(3)),\ @@ -444,7 +454,7 @@ $(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)) \ - | $(dir $(call gb_XcuLangpackTarget__get_outdir_target_with_lang,$(3),$(4))) + | $(dir $(call gb_XcuLangpackTarget__get_outdir_target_with_lang,$(3),$(4))).dir $(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/Executable.mk b/solenv/gbuild/Executable.mk index af248758731b..90d1f09923a3 100644 --- a/solenv/gbuild/Executable.mk +++ b/solenv/gbuild/Executable.mk @@ -56,7 +56,7 @@ $(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)) \ - | $(dir $(call gb_Executable_get_target,$(1))) + | $(dir $(call gb_Executable_get_target,$(1))).dir $(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 c8fd57521f00..611373d81e6f 100644 --- a/solenv/gbuild/Package.mk +++ b/solenv/gbuild/Package.mk @@ -29,14 +29,23 @@ # PackagePart class -$(foreach destination,$(call gb_PackagePart_get_destinations), $(destination)/%/) : - mkdir -p $@ +# a pattern rule with multiple targets is actually executed only once for each +# match, so define only pattern rules with one target here +# the .dir is for make 3.81, which ignores trailing / +define gb_PackagePart__rule +$(1)/.dir : + $$(if $$(realpath $$(dir $$@)),,mkdir -p $$(dir $$@)) +$(1)/%/.dir : + $$(if $$(realpath $$(dir $$@)),,mkdir -p $$(dir $$@)) +$(1)/% : + $$(call gb_Deliver_deliver,$$<,$$@) +endef -$(foreach destination,$(call gb_PackagePart_get_destinations), $(destination)/%) : - $(call gb_Deliver_deliver,$<,$@) +$(foreach destination,$(call gb_PackagePart_get_destinations),$(eval \ + $(call gb_PackagePart__rule,$(destination)))) define gb_PackagePart_PackagePart -$(OUTDIR)/$(1) : $(2) | $(dir $(OUTDIR)/$(1)) +$(OUTDIR)/$(1) : $(2) | $(dir $(OUTDIR)/$(1)).dir $(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 2aaca0a37039..86aee2d532b9 100644 --- a/solenv/gbuild/Rdb.mk +++ b/solenv/gbuild/Rdb.mk @@ -59,8 +59,10 @@ $(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 $@ +# DO NOT DEFINE: it overwrites the definition from Package.mk for xml/ +# and doesn't work on 3.81 +#$(dir $(call gb_Rdb_get_outdir_target,))%/.dir : +# mkdir -p $(dir $@) $(call gb_Rdb_get_outdir_target,%) : $(call gb_Deliver_deliver,$<,$@) @@ -69,7 +71,7 @@ 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)) \ - | $(dir $(call gb_Rdb_get_outdir_target,$(1))) + | $(dir $(call gb_Rdb_get_outdir_target,$(1))).dir $(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/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk index 9d0cfc6faeb2..c751dd451a93 100644 --- a/solenv/gbuild/UnoApiTarget.mk +++ b/solenv/gbuild/UnoApiTarget.mk @@ -56,7 +56,7 @@ endef define gb_UnoApiTarget_UnoApiTarget $$(eval $$(call gb_Module_register_target,$(call gb_UnoApiOutTarget_get_target,$(1)),$(call gb_UnoApiOutTarget_get_clean_target,$(1)))) $(call gb_UnoApiOutTarget_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(1)) \ - | $(dir $(call gb_UnoApiOutTarget_get_target,$(1))) + | $(dir $(call gb_UnoApiOutTarget_get_target,$(1))).dir $(call gb_UnoApiOutTarget_get_clean_target,$(1)) : $(call gb_UnoApiTarget_get_clean_target,$(1)) $(call gb_UnoApiTarget_get_target,$(1)) : INCLUDE := $(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_DEPS := @@ -74,7 +74,7 @@ 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)/) + $(call gb_UnoApiPartTarget_get_target,$(2)/.dir) gb_UnoApiTarget_IDLFILES_$(1) += $(2)/$(3).idl ifeq ($(gb_FULLDEPS),$(true)) @@ -202,8 +202,9 @@ $(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 $@ +# the .dir is for make 3.81, which ignores trailing / +$(dir $(call gb_UnoApiPartTarget_get_target,))%/.dir : + $(if $(realpath $(dir $@)),,mkdir -p $(dir $@)) $(call gb_UnoApiPartTarget_get_target,%.urd) : touch $@ diff --git a/solenv/gbuild/Zip.mk b/solenv/gbuild/Zip.mk index 0ae4c26b8679..38f133536455 100644 --- a/solenv/gbuild/Zip.mk +++ b/solenv/gbuild/Zip.mk @@ -77,7 +77,7 @@ 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)) \ - | $(dir $(call gb_Zip_get_outdir_target,$(1))) + | $(dir $(call gb_Zip_get_outdir_target,$(1))).dir endef |