1 HPROGS = hbal hn1 hscan hail hspace
2 HALLPROGS = $(HPROGS) test
3 HSRCS := $(wildcard Ganeti/HTools/*.hs)
6 DOCS = README.html NEWS.html
8 HFLAGS = -O2 -W -fwarn-monomorphism-restriction -fwarn-tabs
11 HPCEXCL = --exclude Main --exclude Ganeti.HTools.QC
17 $(HALLPROGS): %: %.hs Ganeti/HTools/Version.hs $(HSRCS) Makefile
18 ghc --make $(HFLAGS) $(HEXTRA) $@
25 doc: $(DOCS) Ganeti/HTools/Version.hs
27 mkdir -p $(HDDIR)/Ganeti/HTools
28 cp hscolour.css $(HDDIR)/Ganeti/HTools
29 for file in $(HSRCS); do \
30 HsColour -css -anchor \
31 $$file > $(HDDIR)/Ganeti/HTools/`basename $$file .hs`.html ; \
33 haddock --odir $(HDDIR) --html --ignore-all-exports \
34 -t ganeti-htools -p haddock-prologue \
35 --source-module="%{MODULE/.//}.html" \
36 --source-entity="%{MODULE/.//}.html#%{NAME}" \
41 rm -f $(DOCS) TAGS version Ganeti/HTools/Version.hs
45 rm -f *.o *.prof *.ps *.stat *.aux *.hi
46 cd Ganeti/HTools && rm -f *.o *.prof *.ps *.stat *.aux *.hi
51 Ganeti/HTools/Version.hs: Ganeti/HTools/Version.hs.in version
52 sed -e "s/%ver%/$$(cat version)/" < $< > $@
54 dist: Ganeti/HTools/Version.hs version doc
55 VN=$$(cat version|sed 's/^v//') ; \
56 PFX="ganeti-htools-$$VN" ; \
58 rm -f $$ANAME $$ANAME.gz ; \
59 git archive --format=tar --prefix=$$PFX/ HEAD > $$ANAME ; \
60 tar -r -f $$ANAME --owner root --group root \
61 --transform="s,^,$$PFX/," version apidoc $(DOCS) ; \
70 hpc markup --destdir=coverage test $(HPCEXCL)
72 hpc report test $(HPCEXCL)
75 .PHONY : all doc maintainer-clean clean dist check