summaryrefslogtreecommitdiffstats
path: root/solenv
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-04-21 18:07:43 +0200
committerMichael Stahl <mstahl@redhat.com>2013-04-21 23:36:35 +0200
commitd5e5de641cef7664a605f474bf7c18a70008806b (patch)
tree3fa95f61b2f1808e112f4dc36286dddfd9393adb /solenv
parentgbuild: fix spurious delivering of import libs (MSVC) (diff)
downloadcore-d5e5de641cef7664a605f474bf7c18a70008806b.tar.gz
core-d5e5de641cef7664a605f474bf7c18a70008806b.zip
gbuild: work around problems with aux-targets and DLL renames (MSVC)
When renaming a DLL but not the import lib it can happen that the "touch" rule creates the DLL file which is not helpful. Since there is no easy way to fix this properly, and DLLs are not renamed often, put in a lame hack to detect the situtation and delete the import lib, which will get it re-linked on the next make invocation. Change-Id: I3909cf7d377433d263e517719cca07005bade512
Diffstat (limited to 'solenv')
-rwxr-xr-x[-rw-r--r--]solenv/gbuild/LinkTarget.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 720a23d8c61a..da0018f768f5 100644..100755
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -1230,9 +1230,13 @@ endef
# Add a file that is built by the LinkTarget command and define
# a dummy touch rule for it so it can be tracked via dependencies.
# gb_LinkTarget_add_auxtarget linktarget auxtarget
+# The assumption is that the file is created by linking; in case it does not
+# exist there is some problem. This can be caused on WNT by re-naming DLL
+# files (which are aux-targets) but not the import .lib files (which
+# are the LinkTargets) and doing an incremental build.
define gb_LinkTarget_add_auxtarget
$(2) : $(call gb_LinkTarget_get_target,$(1))
- touch $$@
+ $$(if $$(wildcard $$@),touch -r $$< $$@,rm -f $$<; echo "ERROR: aux-target missing, library deleted, please try again"; false)
$(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS += $(2)