diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1af4949 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +*.hi +flobnar \ No newline at end of file diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..e797781 --- /dev/null +++ b/.hgignore @@ -0,0 +1,5 @@ +syntax: glob + +*.o +*.hi +flobnar diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..124eff2 --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +PROG=flobnar + +if [ x`which ghc` = x -a x`which runhugs` = x ]; then + echo "Neither ghc nor runhugs found on search path." + exit 1 +fi + +mkdir -p bin + +if [ x`which ghc` = x -o ! x$USE_HUGS = x ]; then + # create script to run with Hugs + cat >bin/$PROG <<'EOF' +#!/bin/sh +THIS=`realpath $0` +DIR=`dirname $THIS`/../src +runhugs $DIR/Main.hs $* +EOF + chmod 755 bin/$PROG +else + cd src && ghc --make Main.hs -o ../bin/$PROG +fi