X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=makefile;h=0ffe8d38935eadc61681a673500d0b98e1419508;hb=a615055dd6d6a0bd59aa7ba03305388f786306cb;hp=8b9c250c4dcb7f623801e1f1543c2f697fab3d98;hpb=898622d362b9dad42296af6298e20bc9f8410b63;p=numerical-analysis.git diff --git a/makefile b/makefile index 8b9c250..0ffe8d3 100644 --- a/makefile +++ b/makefile @@ -1,23 +1,27 @@ -BIN = dist/build/numerical-analysis/numerical-analysis +# There's only one '$' in the awk script, but we have to double-money +# it for make. +PN = $(shell grep 'name:' *.cabal | awk '{ print $$2 }') +BIN = dist/build/$(PN)/$(PN) DOCTESTS_BIN = dist/build/doctests/doctests +SRCS = $(shell find src/ -name '*.hs') .PHONY : test publish_doc doc dist hlint -$(BIN): src/*.hs +$(BIN): $(SRCS) runghc Setup.hs clean runghc Setup.hs configure --user --flags=${FLAGS} runghc Setup.hs build -$(DOCTESTS_BIN): src/*.hs test/Doctests.hs +$(DOCTESTS_BIN): $(SRCS) test/Doctests.hs runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests runghc Setup.hs build -profile: src/*.hs +profile: $(SRCS) runghc Setup.hs configure --user --enable-executable-profiling runghc Setup.hs build -hpc: src/*.hs +hpc: $(SRCS) FLAGS="hpc" make clean: @@ -34,8 +38,8 @@ dist: runghc Setup.hs configure runghc Setup.hs sdist -# Neither 'haddock' nor 'hscolour' seem to work properly. -doc: src/*.hs + +doc: $(SRCS) runghc Setup.hs configure --user --flags=${FLAGS} runghc Setup.hs hscolour --executables runghc Setup.hs haddock --internal \