projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lots of documentation updates
[ganeti-local]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
11b44bf
..
ae50834
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,21
+1,29
@@
-HPROGS = hbal hn1 hscan
+HPROGS = hbal hn1 hscan hail
+HALLPROGS = $(HPROGS) test
HSRCS := $(wildcard Ganeti/HTools/*.hs)
HDDIR = apidoc
DOCS = README.html NEWS.html
HSRCS := $(wildcard Ganeti/HTools/*.hs)
HDDIR = apidoc
DOCS = README.html NEWS.html
+HFLAGS = -O2 -W -fwarn-monomorphism-restriction -fwarn-tabs
+HEXTRA =
+
+HPCEXCL = --exclude Main --exclude Ganeti.HTools.QC
+
# Haskell rules
all: $(HPROGS)
# Haskell rules
all: $(HPROGS)
-$(HPROGS): %: %.hs Ganeti/HTools/Version.hs $(HSRCS) Makefile
- ghc --make -O2 -W $@
+$(HALLPROGS): %: %.hs Ganeti/HTools/Version.hs $(HSRCS) Makefile
+ ghc --make $(HFLAGS) $(HEXTRA) $@
+
+test: HEXTRA=-fhpc
$(DOCS) : %.html : %
rst2html $< $@
$(DOCS) : %.html : %
rst2html $< $@
-doc: $(DOCS)
- rm -rf $(HDDIR)
+doc: $(DOCS) Ganeti/HTools/Version.hs
+ rm -rf $(HDDIR)/*
mkdir -p $(HDDIR)/Ganeti/HTools
cp hscolour.css $(HDDIR)/Ganeti/HTools
for file in $(HSRCS); do \
mkdir -p $(HDDIR)/Ganeti/HTools
cp hscolour.css $(HDDIR)/Ganeti/HTools
for file in $(HSRCS); do \
@@
-28,12
+36,14
@@
doc: $(DOCS)
--source-entity="%{MODULE/.//}.html#%{NAME}" \
$(HSRCS)
--source-entity="%{MODULE/.//}.html#%{NAME}" \
$(HSRCS)
+maintainer-clean:
+ rm -rf $(HDDIR)
+ rm -f $(DOCS) TAGS version Ganeti/HTools/Version.hs
+
clean:
clean:
- rm -f $(HPROGS)
+ rm -f $(HALLPROGS)
rm -f *.o *.prof *.ps *.stat *.aux *.hi
cd Ganeti/HTools && rm -f *.o *.prof *.ps *.stat *.aux *.hi
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
- git describe >/dev/null 2>&1 && rm -f version || true
version:
git describe > $@
version:
git describe > $@
@@
-41,7
+51,7
@@
version:
Ganeti/HTools/Version.hs: Ganeti/HTools/Version.hs.in version
sed -e "s/%ver%/$$(cat version)/" < $< > $@
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 ; \
VN=$$(cat version|sed 's/^v//') ; \
ANAME="htools-$$VN.tar" ; \
rm -f $$ANAME $$ANAME.gz ; \
@@
-51,4
+61,14
@@
dist: version doc
gzip -v9 $$ANAME ; \
tar tzvf $$ANAME.gz
gzip -v9 $$ANAME ; \
tar tzvf $$ANAME.gz
-.PHONY : all doc clean dist
+check: test
+ rm -f *.tix *.mix
+ ./test
+ifeq ($(T),markup)
+ mkdir -p coverage
+ hpc markup --destdir=coverage test $(HPCEXCL)
+else
+ hpc report test $(HPCEXCL)
+endif
+
+.PHONY : all doc maintainer-clean clean dist check