summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-06-26 11:44:43 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-26 12:20:35 +0200
commit1d179e2ccfd93c711386007e24828959d38c9c22 (patch)
tree183a77ff2e90682e7ae71995adc13c704af04f51 /solenv
parenta57a3587250eb7219391ad858fcb8a2141bf075d (diff)
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@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/Extension.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/solenv/gbuild/Extension.mk b/solenv/gbuild/Extension.mk
index 86c1366d93a9..be486bed02b6 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