Commit 807930f1 authored by Oleg Grenrus's avatar Oleg Grenrus

Build nofib-analyse with cabal v2-build

parent 7a702cc1
......@@ -8,6 +8,8 @@ cachegrind.out.*
# Specific generated files
......@@ -12,13 +12,6 @@ pick `$(which ghc)` or whatever the `HC` environment variable is set to.
Additional information can also be found on
[NoFib's wiki page](
## Package Depedencies
Please make sure you have the following packages installed for your
system GHC:
* html
* regex-compat (will install: mtl, regex-base, regex-posix)
## Using
......@@ -34,11 +27,7 @@ system GHC:
`git clone -c core.symlinks=true <URL>`.
Install the [package dependencies](#package-dependencies):
$ cabal install html regex-compat
Install [`cabal-install-2.4`]( or later.
Then, to run the tests, execute:
......@@ -61,7 +50,7 @@ $ make EXTRA_HC_OPTS="-fllvm"
To compare the results of multiple runs, save the output in a logfile
and use the program in `../utils/nofib-analyse`, for example:
and use the program in `./nofib-analyse/nofib-analyse`, for example:
......@@ -115,6 +104,19 @@ This is the default of its `-i` option, which is of course incompatible with
`mode=fast`. In that case, you should just set `-i` as appropriate, even
deactivate it with `-i 0`.
## Boot vs. benchmarked GHC
The `nofib-analyse` utility is compiled with `BOOT_HC` compiler,
which may be different then the GHC under the benchmark.
You can control which GHC you benchmark with `HC` variable
$ make clean
$ make boot HC=ghc-head
$ make HC=ghc-head 2>&1 | tee nofib-log-ghc-head
## Configuration
There are some options you might want to tweak; search for nofib in
......@@ -37,7 +37,6 @@ STDIN_FILE = $(wildcard $(NOFIB_PROG).stdin)
# Bogosity needed here to cope with .exe suffix for strip & size files.
# (shouldn't have to be our problem.)
ifneq "$(HC_FAIL)" "YES"
......@@ -4,7 +4,8 @@ include $(TOP)/mk/
PROG = nofib-analyse
$(PROG): *.hs
$(BOOT_HC) -O -cpp --make Main -o $(PROG)
cabal v2-build -w $(BOOT_HC)
cp $$(cabal v2-exec -w $(BOOT_HC) -- which $(PROG)) $(PROG)
all :: $(PROG)
......@@ -16,8 +17,7 @@ boot :: $(PROG)
.PHONY: mostlyclean clean distclean maintainer-clean
rm -f CmdLine.hi GenUtils.hi Main.hi Slurp.hi
rm -f CmdLine.o GenUtils.o Main.o Slurp.o
rm -rf dist-newstyle
clean:: mostlyclean
rm -f $(PROG)
-- project file for "boot" utilities
packages: .
cabal-version: 2.4
name: nofib-analyse
version: 0
executable nofib-analyse
default-language: Haskell2010
main-is: Main.hs
, array
, base
, containers
, regex-compat
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment