[PATCH] very,very ugly hack to get the soffice.bin name

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Thu Oct 27 17:26:43 PDT 2011


the previous solution couldnt work:
- Packages are toplevel targets, so they need to be in a separate file
- However, Packages should not be used here as it interferes with the
  pattern rules on $(OUTDIR)/bin
- replacing those instead with explicit (non-pattern) rules for this
  exceptional case
- depending from the regular target in $(OUTDIR) on the special one
- depending from the special target on the $(WORKDIR) one
---
 desktop/Executable_soffice.bin.mk |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/desktop/Executable_soffice.bin.mk b/desktop/Executable_soffice.bin.mk
index 7731aef..9d75bb4 100644
--- a/desktop/Executable_soffice.bin.mk
+++ b/desktop/Executable_soffice.bin.mk
@@ -69,13 +69,25 @@ $(eval $(call gb_Executable_add_noexception_objects,$(sofficebin),\
     desktop/win32/source/extendloaderenvironment \
 ))
 
-# the resulting executable is called soffice_bin.exe, copy it to soffice.bin
-$(eval $(call gb_Package_Package,$(sofficebin),$(OUTDIR)/bin))
-$(eval $(call gb_Package_add_file,$(sofficebin),bin/soffice.bin,$(sofficebin).exe))
+$(call gb_Executable_get_target,$(sofficebin)) : $(OUTDIR)/bin/soffice.bin
+$(call gb_Executable_get_clean_target,$(sofficebin)) : $(WORKDIR)/Clean/OutDir/bin/soffice.bin
+$(OUTDIR)/bin/soffice.bin : $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktargetname,$(sofficebin)))
+	$(call gb_Deliver_deliver,$<,$@)
+
+.PHONY : $(WORKDIR)/Clean/OutDir/bin/soffice.bin
+$(WORKDIR)/Clean/OutDir/bin/soffice.bin :
+	rm $(OUTDIR)/bin/soffice.bin
 
 ifeq ($(COM),MSC)
-# also copy the manifest
-$(eval $(call gb_Package_add_file,$(sofficebin),bin/soffice.bin.manifest,$(sofficebin).exe.manifest))
+$(call gb_Executable_get_target,$(sofficebin)) : $(OUTDIR)/bin/soffice.bin.manifest
+$(call gb_Executable_get_clean_target,$(sofficebin)) : $(WORKDIR)/Clean/OutDir/bin/soffice.bin.manifest
+$(OUTDIR)/bin/soffice.bin.manifest : $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktargetname,$(sofficebin))).manifest $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktargetname,$(sofficebin)))
+	$(call gb_Deliver_deliver,$<,$@)
+	
+.PHONY : $(WORKDIR)/Clean/OutDir/bin/soffice.bin.manifest
+$(WORKDIR)/Clean/OutDir/bin/soffice.bin.manifest :
+	rm $(OUTDIR)/bin/soffice.bin.manifest
+
 endif
 
 endif
-- 
1.7.4


--+HP7ph2BbKc20aGI--


More information about the LibreOffice mailing list