summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-11-25 12:26:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-11-25 12:26:01 +0100
commit71103fd8d95e67e13652b13a7d58c6d70b6ad593 (patch)
treec906fba79432f418ccf1fd902af667abd5c49d65 /solenv/gbuild
parent2d7eaeb6322864eb68b765c9c71d60532cba479f (diff)
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
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/CppunitTest.mk24
-rw-r--r--solenv/gbuild/TargetLocations.mk3
2 files changed, 19 insertions, 8 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index fcb259501468..0fa1aba7ec19 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 f1f88bf0608f..069295495610 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 \