-HPROGS = hbal hn1
+HPROGS = hbal hn1 hscan hail
HSRCS := $(wildcard Ganeti/HTools/*.hs)
HDDIR = apidoc
all: $(HPROGS)
-hn1 hbal: Ganeti/HTools/Version.hs
+$(HPROGS): %: %.hs Ganeti/HTools/Version.hs $(HSRCS) Makefile
ghc --make -O2 -W $@
$(DOCS) : %.html : %
done
haddock --odir $(HDDIR) --html --ignore-all-exports \
-t htools -p haddock-prologue \
- --source-module="Ganeti/HTools/%{MODULE/.//}.html" \
- --source-entity="Ganeti/HTools/%{MODULE/.//}.html#%{NAME}" \
+ --source-module="%{MODULE/.//}.html" \
+ --source-entity="%{MODULE/.//}.html#%{NAME}" \
$(HSRCS)
clean:
- rm -f hbal hn1
+ rm -rf $(HDDIR)
+ rm -f $(HPROGS)
rm -f *.o *.prof *.ps *.stat *.aux *.hi
cd Ganeti/HTools && rm -f *.o *.prof *.ps *.stat *.aux *.hi
rm -f $(DOCS) TAGS Ganeti/HTools/Version.hs
Ganeti/HTools/Version.hs: Ganeti/HTools/Version.hs.in version
sed -e "s/%ver%/$$(cat version)/" < $< > $@
-dist: version doc
+dist: Ganeti/HTools/Version.hs version doc
VN=$$(cat version|sed 's/^v//') ; \
ANAME="htools-$$VN.tar" ; \
rm -f $$ANAME $$ANAME.gz ; \
git archive --format=tar --prefix=htools-$$VN/ HEAD > $$ANAME ; \
tar -r -f $$ANAME --owner root --group root \
- --transform="s,^,htools-$$VN/," version ; \
+ --transform="s,^,htools-$$VN/," version apidoc $(DOCS) ; \
gzip -v9 $$ANAME ; \
tar tzvf $$ANAME.gz