summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2016-01-08 20:59:28 +0100
committerThomas Miedema <thomasmiedema@gmail.com>2016-01-08 23:46:36 +0100
commitf7b45c31f07daa4c3dca39f6ccc1a52c86900b7c (patch)
tree208a16b18369b65ee6f9725cf69ace50b5777a82 /aclocal.m4
parent2bd05b889f39e5ddf43a723b817b92fc6f4fc6d4 (diff)
downloadhaskell-f7b45c31f07daa4c3dca39f6ccc1a52c86900b7c.tar.gz
Build system: fix `pwd` issues on Windows
Some parts of the build system require that paths are what msys2 calls "mixed style": * forwards slashes * absolute paths starting with a drive letter followed by a colon (e.g. "C:") The removal of ghc-pwd in 4c56ad3 changed $(TOP) from mixed style to unix style, resulting in a broken Windows build for some. Differential Revision: https://phabricator.haskell.org/D1752
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m410
1 files changed, 9 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 0c93de4cc4..933aee9be2 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1739,7 +1739,15 @@ AC_DEFUN([FP_CURSES],
AC_DEFUN([FP_FIND_ROOT],[
AC_MSG_CHECKING(for path to top of build tree)
- hardtop=`pwd`
+ if test "$windows" = YES
+ then
+ dnl Make sure this is a c:/foo/bar (mixed) style path. Some parts of
+ dnl the build system might depend on it (such as the sed expression
+ dnl `"s|$(TOP)/||i"` in addCFileDeps in rules/build-dependencies.mk).
+ hardtop=$(cygpath -m "$(pwd)")
+ else
+ hardtop=$(pwd)
+ fi
dnl Remove common automounter nonsense
hardtop=`echo $hardtop | sed 's|^/tmp_mnt.*\(/local/.*\)$|\1|' | sed 's|^/tmp_mnt/|/|'`