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 --- scripts/build/companion_libs/200-libelf.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts') diff --git a/scripts/build/companion_libs/200-libelf.sh b/scripts/build/companion_libs/200-libelf.sh index 58aa3155..529bba22 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 v1.2.3