Abstract instance running states into a list
[ganeti-local] / Makefile
index 044bd5f..8874706 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@ HPROGS = hbal hscan hail hspace
 HALLPROGS = $(HPROGS) test
 HSRCS := $(wildcard Ganeti/HTools/*.hs) $(wildcard Ganeti/*.hs)
 HDDIR = apidoc
+GHC := ghc
 
 DOCS = README.html NEWS.html
 
@@ -15,7 +16,7 @@ HPCEXCL = --exclude Main --exclude Ganeti.HTools.QC
 all: $(HPROGS)
 
 $(HALLPROGS): %: %.hs Ganeti/HTools/Version.hs $(HSRCS) Makefile
-       ghc --make $(HFLAGS) $(HEXTRA) $@
+       $(GHC) --make $(HFLAGS) $(HEXTRA) $@
 
 test: HEXTRA=-fhpc -Wwarn
 
@@ -63,7 +64,7 @@ Ganeti/HTools/Version.hs: Ganeti/HTools/Version.hs.in version
 
 dist: regen-version Ganeti/HTools/Version.hs doc
        set -e ; \
-       VN=$$(cat version|sed 's/^v//') ; \
+       VN=$$(sed 's/^v//' < version) ; \
        PFX="ganeti-htools-$$VN" ; \
        ANAME="$$PFX.tar" ; \
        rm -f $$ANAME $$ANAME.gz ; \
@@ -94,4 +95,7 @@ endif
 tags:
        find -name '*.hs' | xargs hasktags -e
 
+lint:
+       hlint -r -u .
+
 .PHONY : all doc maintainer-clean clean dist check tags regen-version