building hat with ghc 6.4.2 under debian testing/unstable

[email protected] Sat, 9 Sep 2006 12:30:42 +0100 (BST)
Newsgroups gmane.comp.lang.haskell.hat
Message-ID <[email protected]>
hello,

cpp from gcc 4.1.2 appears to output more whitespace than expected when
generating ghcsym.out. this results in the following error during build:

~/src/other/hat-2.04.orig$ make
src/other/hat-2.04.orig/lib/ix86-Linux/config:11: *** missing separator. 
Stop.

the attached patch appears to fix this.

_______________________________________________
Hat mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/hat
hat-conf-ghc6.4.2.patch (text/x-patch, 1 KB)
diff -Naur hat-2.04.orig/script/confhat hat-2.04/script/confhat
--- hat-2.04.orig/script/confhat	2005-05-17 10:03:27.000000000 +0100
+++ hat-2.04/script/confhat	2006-09-09 12:00:34.000000000 +0100
@@ -23,7 +23,7 @@
   # discover ghc version (technique courtesy of Simon Marlow)
   echo __GLASGOW_HASKELL__ >ghcsym.hs;
   $COMP -E -cpp -optP-P ghcsym.hs -o ghcsym.out;
-  GHCSYM=`grep -v '^#' ghcsym.out | grep -v '^$'`
+  GHCSYM=`grep -v '^#' ghcsym.out | tr -d '[:space:]' | grep -e '^[0-9]*$'`
   rm -f ghcsym.hs ghcsym.out;
 
   # discover ghc location
diff -Naur hat-2.04.orig/script/confhc-hat hat-2.04/script/confhc-hat
--- hat-2.04.orig/script/confhc-hat	2005-02-14 13:08:00.000000000 +0000
+++ hat-2.04/script/confhc-hat	2006-09-09 12:00:13.000000000 +0100
@@ -56,7 +56,7 @@
 ghcsym () {
   echo __GLASGOW_HASKELL__ >ghcsym.hs;
   $1 -E -cpp -optP-P ghcsym.hs -o ghcsym.out;
-  grep -e '^[0-9]*$' ghcsym.out > $2
+  grep -v '^#' ghcsym.out | tr -d '[:space:]' | grep -e '^[0-9]*$' > $2
   rm -f ghcsym.hs ghcsym.out;
 }