Ensure Makefile.config gets Windows-style prefix

Prefix may be passed to configure using a Cygwin-style PATH (e.g.
`./configure --prefix ~/local`). Use cygpath to ensure that the correct
version gets written to Makefile.config, or the resulting compiler has
an invalid default stdlib path.
master
David Allsopp 2019-11-24 11:03:33 +00:00 committed by Sébastien Hinderer
parent ec5a85c26f
commit 75983ab9b1
4 changed files with 21 additions and 7 deletions

View File

@ -71,6 +71,10 @@ Working version
### Build system:
- #9136: Don't propagate Cygwin-style prefix from configure to Makefile.config
on Windows ports.
(David Allsopp, review by Sébastien Hinderer)
### Bug fixes:
- #7683, #1499: Fixes one case where the evaluation order in native-code

View File

@ -202,9 +202,7 @@ for 32-bit, or:
./configure --build=x86_64-unknown-cygwin --host=x86_64-pc-windows
for 64-bit. Then, edit `Makefile.config` as needed, following the comments in
this file. Normally, the only variable that needs to be changed is `PREFIX`,
which indicates where to install everything.
for 64-bit.
Finally, use `make` to build the system, e.g.
@ -269,9 +267,7 @@ for 32-bit, or:
./configure --build=x86_64-unknown-cygwin --host=x86_64-w64-mingw32
for 64-bit. Then, edit `Makefile.config` as needed, following the comments in
this file. Normally, the only variable that needs to be changed is `PREFIX`,
which indicates where to install everything.
for 64-bit.
Finally, use `make` to build the system, e.g.

10
configure vendored
View File

@ -16832,6 +16832,16 @@ if test x"$prefix" = "xNONE"; then :
*) :
;;
esac
else
if test x"$unix_or_win32" = "xwin32" \
&& test "$host_vendor-$host_os" != "$build_vendor-$build_os" ; then :
case $build in #(
*-pc-cygwin) :
prefix=`cygpath -m "$prefix"` ;; #(
*) :
;;
esac
fi
fi
# Define a few macros that were defined in config/m-nt.h

View File

@ -1781,7 +1781,11 @@ AS_IF([test x"$prefix" = "xNONE"],
[i686-w64-mingw32], [prefix='C:/ocamlmgw'],
[x86_64-w64-mingw32], [prefix='C:/ocamlmgw64'],
[i686-pc-windows], [prefix='C:/ocamlms'],
[x86_64-pc-windows], [prefix='C:/ocamlms64'])])
[x86_64-pc-windows], [prefix='C:/ocamlms64'])],
[AS_IF([test x"$unix_or_win32" = "xwin32" \
&& test "$host_vendor-$host_os" != "$build_vendor-$build_os" ],
[AS_CASE([$build],
[*-pc-cygwin], [prefix=`cygpath -m "$prefix"`])])])
# Define a few macros that were defined in config/m-nt.h
# but whose value is not guessed properly by configure