Re: nhc98 1.16 make install fails on Cygwin

Malcolm Wallace <[email protected]> Mon, 28 Apr 2003 12:02:39 +0100
Newsgroups gmane.comp.lang.haskell.nhc.bugs
Organization Dept of Computer Science, University of York
Message-ID <[email protected]>
"Mike Thomas" <[email protected]> writes:

> "make install" under Cygwin and W2000 on the nhc98 v 1.16 tarball gives:
>
>  Adjusting... hmakerc
> I/O error:
>   action :  openFile ReadMode
>   on file:  /c/DOCUME~1/mike/LOCALS~1/Temp\hmakeconfig.tmp
>   gave   :  ENOENT (No such file or directory)
> 
> The file exists - I suspect that nhc98 is choking on the backslash:

I think you are right.  After applying the following patch, you need to do
    ./configure
again before
    make install
and I think that will fix it.

Regards,
    Malcolm
patch-3.07-cygwin (text/plain, 636 B)
Index: script/hmake-config.inst
===================================================================
RCS file: /home/cvs/root/nhc98/script/hmake-config.inst,v
retrieving revision 1.3
diff -u -r1.3 hmake-config.inst
--- script/hmake-config.inst	18 Jan 2002 11:54:23 -0000	1.3
+++ script/hmake-config.inst	28 Apr 2003 10:58:03 -0000
@@ -16,4 +16,12 @@
   exit 1
 fi
 
-exec $HMAKEDIR/$MACHINE/MkConfig "$@"
+map() { f=$1; shift; for item in $*; do $f $item; done; }
+cygfix() { cygpath -w $1 | tr '\\' '/'; }
+
+case $MACHINE in
+  ix86-CYGWIN*) ARGS=`map cygfix "$@"` ;;
+  *) ARGS="$@" ;;
+esac
+
+exec $HMAKEDIR/$MACHINE/MkConfig $ARGS