Re: "hmake +RTS" loops

Malcolm Wallace <[email protected]> Tue, 27 May 2003 09:55:21 +0100
Newsgroups gmane.comp.lang.haskell.nhc.bugs
Organization Dept of Computer Science, University of York
Message-ID <[email protected]>
Thomas Hallgren <[email protected]> writes:

> Today I accedentally typed
>     hmake +RTS -K5M Big.hs
> instead of
>     hmake -K5M Big.hs
> To my surprise, the mistake caused hmake to loop!

Here's a patch.
Regards,
    Malcolm


diff -u -r1.31 script/hmake.inst
--- script/hmake.inst	6 Mar 2003 10:32:51 -0000	1.31
+++ script/hmake.inst	27 May 2003 08:54:10 -0000
@@ -109,7 +109,7 @@
 
     # Run-time flags to hmake itself
     +RTS) shift
-          while [ "$1" != "-RTS" ]
+          while [ -n "$1" -a "$1" != "-RTS" ]
           do hmrtflags=$hmrtflags" $1"
              shift
           done ;;