[Libreoffice-commits] .: liblangtag/ExternalPackage_langtag_data.mk shell/CustomTarget_shlxthdl_res.mk solenv/gbuild

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Nov 25 03:31:45 PST 2012


 liblangtag/ExternalPackage_langtag_data.mk |    6 +++---
 shell/CustomTarget_shlxthdl_res.mk         |    2 +-
 solenv/gbuild/CppunitTest.mk               |   24 ++++++++++++++++--------
 solenv/gbuild/TargetLocations.mk           |    3 +++
 4 files changed, 23 insertions(+), 12 deletions(-)

New commits:
commit 71103fd8d95e67e13652b13a7d58c6d70b6ad593
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Nov 25 12:26:01 2012 +0100

    Work around Windows' missing symlinks
    
    Instead of creating a single solver/*/installation/program -> ../../bin symlink
    used by all gb_CppunitTest_use_executable together, individually copy each
    gb_CppunitTest_use_executable into a true solver/*/install/program/ diretory.
    (Renamed solver/*/installation/ to solver/*/install/ so that old existing
    solver/*/installation/program symlinks on non-Windows platforms would not
    interfere with the new cp rule.)
    
    Change-Id: I4ce82b41856056669ad074ff2ef8004fdc6533c1

diff --git a/liblangtag/ExternalPackage_langtag_data.mk b/liblangtag/ExternalPackage_langtag_data.mk
index f238a24..b2fbb09 100644
--- a/liblangtag/ExternalPackage_langtag_data.mk
+++ b/liblangtag/ExternalPackage_langtag_data.mk
@@ -27,8 +27,8 @@
 
 $(eval $(call gb_ExternalPackage_ExternalPackage,langtag_data,langtag))
 
-$(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/installation/share/liblangtag,data/language-subtag-registry.xml))
-$(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/installation/share/liblangtag/common/bcp47,\
+$(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/install/share/liblangtag,data/language-subtag-registry.xml))
+$(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/install/share/liblangtag/common/bcp47,\
 	data/common/bcp47/calendar.xml \
 	data/common/bcp47/collation.xml \
 	data/common/bcp47/currency.xml \
@@ -41,6 +41,6 @@ $(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/installation/sh
 	data/common/bcp47/transform_private_use.xml \
 	data/common/bcp47/variant.xml \
 ))
-$(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/installation/share/liblangtag/common/supplemental,data/common/supplemental/likelySubtags.xml))
+$(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/install/share/liblangtag/common/supplemental,data/common/supplemental/likelySubtags.xml))
 
 # vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/shell/CustomTarget_shlxthdl_res.mk b/shell/CustomTarget_shlxthdl_res.mk
index 92b6185..77a3358 100644
--- a/shell/CustomTarget_shlxthdl_res.mk
+++ b/shell/CustomTarget_shlxthdl_res.mk
@@ -42,7 +42,7 @@ $(call gb_CustomTarget_get_workdir,shell/source/win32/shlxthandler/res)/shlxthdl
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),LCX,1)
 	$(call gb_Helper_abbreviate_dirs,\
 		cd $(SRCDIR)/shell/source/win32/shlxthandler/res && \
-		BRAND_BASE_DIR=$(call gb_Helper_make_url,$(OUTDIR)/unittest/installation) \
+		BRAND_BASE_DIR=$(call gb_Helper_make_url,$(OUTDIR)/unittest/install) \
 		$(call gb_Executable_get_target_for_build,lngconvex) \
 			-ulf shlxthdl.ulf \
 			-rc $@ \
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index fcb2595..0fa1aba 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -59,7 +59,7 @@ gb_CppunitTest__get_linktargetname = CppunitTest/$(call gb_CppunitTest_get_filen
 
 define gb_CppunitTest__make_args
 --headless \
-"-env:BRAND_BASE_DIR=$(call gb_Helper_make_url,$(OUTDIR)/unittest/installation)" \
+"-env:BRAND_BASE_DIR=$(call gb_Helper_make_url,$(OUTDIR)/unittest/install)" \
 $(if $(URE),\
     $(if $(strip $(CONFIGURATION_LAYERS)),\
 	    "-env:CONFIGURATION_LAYERS=$(strip $(CONFIGURATION_LAYERS))") \
@@ -305,16 +305,24 @@ $(call gb_CppunitTest__use_configuration,$(1),xcsxcu,$(OUTDIR)/unittest/registry
 
 endef
 
-gb_CppunitTest__program_symlink = $(OUTDIR)/unittest/installation/program
-$(gb_CppunitTest__program_symlink) :
-	mkdir -p $(dir $@)
-	ln -s ../../bin $@
-
 define gb_CppunitTest_use_executable
-$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Executable_get_target,$(2))
-$(call gb_CppunitTest_get_target,$(1)) :| $(gb_CppunitTest__program_symlink)
+$(call gb_CppunitTest_get_target,$(1)) : \
+        $(call gb_CppunitTestFakeExecutable_get_target,$(2))
+
+$(call gb_CppunitTest_get_clean_target,$(1)) : \
+        $(call gb_CppunitTestFakeExecutable_get_clean_target,$(2))
+
 endef
 
+$(call gb_CppunitTestFakeExecutable_get_target,%) : \
+        $(call gb_Executable_get_target,%)
+	$(call gb_Helper_abbreviate_dirs,mkdir -p $(dir $@) && cp $< $@)
+
+.PHONY : $(call gb_CppunitTestFakeExecutable_get_clean_target,%)
+$(call gb_CppunitTestFakeExecutable_get_clean_target,%) :
+	$(call gb_Helper_abbreviate_dirs, \
+        rm -f $(call gb_CppunitTestFakeExecutable_get_target,$*))
+
 define gb_CppunitTest__forward_to_Linktarget
 gb_CppunitTest_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_CppunitTest__get_linktargetname,$$(1)),$$(2),$$(3),CppunitTest_$$(1))
 
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index f1f88bf..0692954 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -95,6 +95,8 @@ gb_ComponentTarget_get_target = $(WORKDIR)/ComponentTarget/$(1).component
 gb_ComponentsTarget_get_target = $(WORKDIR)/ComponentsTarget/$(1).components
 gb_Configuration_get_preparation_target = $(WORKDIR)/Configuration/$(1).prepared
 gb_CppunitTest_get_target = $(WORKDIR)/CppunitTest/$(1).test
+gb_CppunitTestFakeExecutable_get_target = \
+    $(OUTDIR)/unittest/install/program/$(1)
 gb_CustomTarget_get_repo_target = $(WORKDIR)/CustomTarget/$(2)_$(1).done
 gb_CustomTarget_get_target = $(WORKDIR)/CustomTarget/$(1).done
 gb_CustomTarget_get_workdir = $(WORKDIR)/CustomTarget/$(1)
@@ -259,6 +261,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
 	SrsTemplateTarget \
 	ThesaurusIndexTarget \
 	CppunitTest \
+	CppunitTestFakeExecutable \
 	CustomTarget \
 	ExternalProject \
 	UI \


More information about the Libreoffice-commits mailing list