[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 2 commits - sdext/CppunitTest_pdfimport.mk solenv/gbuild
Michael Stahl
mst at kemper.freedesktop.org
Tue Jun 26 03:22:08 PDT 2012
sdext/CppunitTest_pdfimport.mk | 2 ++
solenv/gbuild/CppunitTest.mk | 4 ++++
solenv/gbuild/Extension.mk | 7 ++++++-
3 files changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 1d179e2ccfd93c711386007e24828959d38c9c22
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jun 26 11:44:43 2012 +0200
fdo#51115: gb_Extension_add_file: fix Windows build:
The DLL is not actually a make target, but is handled via the AUXTARGETS
mechanism in LinkTarget.mk; add an ugly hack here to hopefully make
adding libraries to extensions work.
Change-Id: I85ee891fe8b7d470e09d9cb1d5a48d8b11b50d6e
(cherry picked from commit e818f8fa1f79c2eb2d647678333b8d12599dda69)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/solenv/gbuild/Extension.mk b/solenv/gbuild/Extension.mk
index 86c1366..be486be 100644
--- a/solenv/gbuild/Extension.mk
+++ b/solenv/gbuild/Extension.mk
@@ -136,12 +136,15 @@ endef
# adding a file creates a dependency to it
# file is copied to $(WORKDIR)
+# $(3) is the target of the copied file, and $(4) can be used to override that
+# with a different actual file, which is needed in gb_Extension_add_library
+# to make it work on Windows where the DLL doesn't have a gbuild target...
define gb_Extension_add_file
$(call gb_Extension_get_target,$(1)) : FILES += $(2)
$(call gb_Extension_get_target,$(1)) : $(call gb_Extension_get_rootdir,$(1))/$(2)
$(call gb_Extension_get_rootdir,$(1))/$(2) : $(3)
mkdir -p $$(dir $$@) && \
- cp -f $$< $$@
+ cp -f $(if $(4),$(4),$(3)) $$@
endef
@@ -159,6 +162,7 @@ endef
# add a library from the solver; DO NOT use gb_Library_get_target
define gb_Extension_add_library
$(call gb_Extension_add_file,$(1),$(call gb_Library_get_runtime_filename,$(2)),\
+ $(call gb_Library_get_target,$(2)),\
$(gb_Helper_OUTDIRLIBDIR)/$(call gb_Library_get_runtime_filename,$(2)))
endef
@@ -169,6 +173,7 @@ endef
# add an executable from the solver
define gb_Extension_add_executable
$(call gb_Extension_add_file,$(1),$(notdir $(call gb_Executable_get_target,$(2))),\
+ $(call gb_Executable_get_target,$(2)),\
$(call gb_Executable_get_target,$(2)))
endef
commit a57a3587250eb7219391ad858fcb8a2141bf075d
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jun 26 12:01:09 2012 +0200
gbuild: add gb_CppunitTest_use_executable
and use it in sdext/CppunitTest_pdfimport.mk, which could fail
previously in a parallel build.
Change-Id: I3f251c945f5841c277a71a19fd411ecd77dec3b5
(cherry picked from commit 0d4cd11c74cf90cd3b987f628031d02fe3af47b4)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sdext/CppunitTest_pdfimport.mk b/sdext/CppunitTest_pdfimport.mk
index fd0ebda..5dca559 100644
--- a/sdext/CppunitTest_pdfimport.mk
+++ b/sdext/CppunitTest_pdfimport.mk
@@ -65,6 +65,8 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sdext_pdfimport,\
sdext/source/pdfimport/test/tests \
))
+$(eval $(call gb_CppunitTest_use_executable,sdext_pdfimport,xpdfimport))
+
$(eval $(call gb_CppunitTest_use_ure,sdext_pdfimport))
$(eval $(call gb_CppunitTest_use_components,sdext_pdfimport,\
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index b8b8672..bc522be 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -307,6 +307,10 @@ $(foreach extra,$(2),$(call gb_CppunitTest__use_configuration,$(1),xcsxcu,$(extr
endef
+define gb_CppunitTest_use_executable
+$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Executable_get_target,$(2))
+endef
+
define gb_CppunitTest__forward_to_Linktarget
gb_CppunitTest_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_CppunitTest__get_linktargetname,$$(1)),$$(2),$$(3),CppunitTest_$$(1))
More information about the Libreoffice-commits
mailing list