[project @ 2003-05-01 10:46:19 by ross]
authorross <unknown>
Thu, 1 May 2003 10:46:19 +0000 (10:46 +0000)
committerross <unknown>
Thu, 1 May 2003 10:46:19 +0000 (10:46 +0000)
Make -t option to the script override the template file, just as -c
overrides the compiler, as the the documentation implies.  (Formerly -t
added an extra template file, which is not so useful.)

ghc/utils/hsc2hs/hsc2hs.sh

index 4b16563..fe00d45 100644 (file)
@@ -1,10 +1,13 @@
 
+tflag="--template=$HSC2HS_DIR/template-hsc.h"
 for arg do
     case "$arg" in
         -c*)    HSC2HS_EXTRA=;;
         --cc=*) HSC2HS_EXTRA=;;
+       -t*)    tflag=;;
+       --template=*) tflag=;;
         --)     break;;
     esac
 done
 
-$HSC2HS_BINDIR/$HS_PROG -t $HSC2HS_DIR/template-hsc.h $HSC2HS_EXTRA "$@" 
+$HSC2HS_BINDIR/$HS_PROG $tflag $HSC2HS_EXTRA "$@"