From 24d17220a1a11410c980c784b729f4466ab11f3b Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 8 Dec 2015 23:17:06 +0000 Subject: libelf: Cygwin fix for UNC paths If destdir was / and prefix began with / then we would attempt to install libelf to a path beginning with // which is a UNC path on Cygwin. This is generally incorrect. Signed-off-by: Ray Donnelly diff --git a/scripts/build/companion_libs/200-libelf.sh b/scripts/build/companion_libs/200-libelf.sh index 58aa315..529bba2 100644 --- a/scripts/build/companion_libs/200-libelf.sh +++ b/scripts/build/companion_libs/200-libelf.sh @@ -135,6 +135,13 @@ do_libelf_backend() { CT_DoExecLog ALL ${make} CT_DoLog EXTRA "Installing libelf" + + # Guard against $destdir$prefix == // + # which is a UNC path on Cygwin/MSYS2 + if [[ ${destdir} == / ]] && [[ ${prefix} == /* ]]; then + destdir= + fi + CT_DoExecLog ALL ${make} instroot="${destdir}" install } -- cgit v0.10.2-6-g49f6