1 HPROGS = hbal hn1 hscan
2 HSRCS := $(wildcard Ganeti/HTools/*.hs)
5 DOCS = README.html NEWS.html
11 $(HPROGS): %: %.hs Ganeti/HTools/Version.hs $(HSRCS) Makefile
19 mkdir -p $(HDDIR)/Ganeti/HTools
20 cp hscolour.css $(HDDIR)/Ganeti/HTools
21 for file in $(HSRCS); do \
22 HsColour -css -anchor \
23 $$file > $(HDDIR)/Ganeti/HTools/`basename $$file .hs`.html ; \
25 haddock --odir $(HDDIR) --html --ignore-all-exports \
26 -t htools -p haddock-prologue \
27 --source-module="%{MODULE/.//}.html" \
28 --source-entity="%{MODULE/.//}.html#%{NAME}" \
33 rm -f *.o *.prof *.ps *.stat *.aux *.hi
34 cd Ganeti/HTools && rm -f *.o *.prof *.ps *.stat *.aux *.hi
35 rm -f $(DOCS) TAGS Ganeti/HTools/Version.hs
36 git describe >/dev/null 2>&1 && rm -f version || true
41 Ganeti/HTools/Version.hs: Ganeti/HTools/Version.hs.in version
42 sed -e "s/%ver%/$$(cat version)/" < $< > $@
44 dist: Ganeti/HTools/Version.hs version doc
45 VN=$$(cat version|sed 's/^v//') ; \
46 ANAME="htools-$$VN.tar" ; \
47 rm -f $$ANAME $$ANAME.gz ; \
48 git archive --format=tar --prefix=htools-$$VN/ HEAD > $$ANAME ; \
49 tar -r -f $$ANAME --owner root --group root \
50 --transform="s,^,htools-$$VN/," version apidoc $(DOCS) ; \
54 .PHONY : all doc clean dist