build nhc98


Posted:

On an old backup I found a patch for nhc98 version 1.20 to restore nhc98s long lost ability to be built without an existing Haskell compiler. Be careful: This patch was never really tested (the project was canceled immediately after the start, so there are just some morsels); there was also the respective patch for version 1.22 with a basic lib for QNX; will look for this in the other backups.

These are the steps to build nhc98-1.20 from scratch:

# script to build a fresh nhc98-1.20 from scratch without nhc98 or ghc
# pfitzen So 13. Jan 21:56:46 CET 2008

export PREFIX=/usr/local
found=`echo $PATH | grep -e "$PREFIX/bin:" -e "$PREFIX/bin\$"`
if [ -z "$found" ]; then export PATH=$PREFIX/bin:$PATH ; fi

tar xvzf nhc98src-1.20.tgz > tar.log 2>&1
cd nhc98-1.20
patch -p 1 < ../nhc98-1.20.diff > patch.log 2>&1
./configure --prefix=$PREFIX --buildwith=gcc > configure-pref.log 2>&1
make basic   > make-basic.log 2>&1
make install > make-install.log 2>&1
make clean   > make-clean.log 2>&1
cp -f  $PREFIX/lib/nhc98/ix86-Linux/hsc2hs $PREFIX/bin
cp -f  src/hsc2hs/template-hsc.h    src/libraries/base
cp -f  src/hsc2hs/template-hsc.h    src/libraries/old-time
./configure --prefix=$PREFIX --buildwith=nhc98 > configure-pref_build.log 2>&1
mv  src/libraries/haskell-src/Language/Haskell/Parser.ly  src/libraries/haskell-src/Language/Haskell/Parser.ly.unused
make > make.log 2>&1
make install > make-install2.log 2>&1

and here ist the patch.