Hannes Siebenhandl pushed to branch wip/mangoiv/27672 at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • distrib/configure.ac.in
    ... ... @@ -103,7 +103,7 @@ AC_ARG_ENABLE(distro-toolchain,
    103 103
     AC_SUBST([EnableDistroToolchain])
    
    104 104
     
    
    105 105
     if test "$HostOS" = "mingw32" -a "$EnableDistroToolchain" = "NO"; then
    
    106
    -  FP_SETUP_WINDOWS_TOOLCHAIN([$hardtop/mingw/], [\$\$topdir/../mingw/])
    
    106
    +  FP_SETUP_WINDOWS_TOOLCHAIN([$hardtop/mingw/], [\$topdir/../mingw/])
    
    107 107
     fi
    
    108 108
     
    
    109 109
     
    

  • m4/subst_tooldir.m4
    ... ... @@ -41,5 +41,13 @@ dnl ghc-toolchain.
    41 41
     # See Note [How we configure the bundled windows toolchain]
    
    42 42
     AC_DEFUN([SUBST_TOOLDIR],
    
    43 43
     [
    
    44
    -    sed -i.bkp $1 's%'"$mingw_prefix"'%'"$mingw_install_prefix"'%g'
    
    44
    +    if ! grep -qF "$mingw_prefix" $1; then
    
    45
    +        AC_MSG_ERROR([SUBST_TOOLDIR: $1 does not refer to the bundled mingw toolchain at $mingw_prefix])
    
    46
    +    fi
    
    47
    +    if ! sed -i.bkp 's%'"$mingw_prefix"'%'"$mingw_install_prefix"'%g' $1; then
    
    48
    +        AC_MSG_ERROR([SUBST_TOOLDIR: failed to substitute $mingw_prefix in $1])
    
    49
    +    fi
    
    50
    +    if grep -qF "$mingw_prefix" $1; then
    
    51
    +        AC_MSG_ERROR([SUBST_TOOLDIR: $1 still refers to $mingw_prefix after substitution])
    
    52
    +    fi
    
    45 53
     ])