Statistics
| Branch: | Tag: | Revision:

root / Makefile @ 8df5db55

History | View | Annotate | Download (743 Bytes)

1
HPROGS = hbal hn1
2
HSRCS := $(filter-out $(HPROGS), $(wildcard src/*.hs))
3
HDDIR = apidoc
4

    
5
# Haskell rules
6

    
7
all:
8
	$(MAKE) -C src
9

    
10
README.html: README
11
	rst2html $< $@
12

    
13
doc: README.html
14
	rm -rf $(HDDIR)
15
	mkdir -p $(HDDIR)/src
16
	cp hscolour.css $(HDDIR)/src
17
	for file in $(HSRCS); do \
18
        HsColour -css -anchor \
19
        $$file > $(HDDIR)/src/`basename $$file .hs`.html ; \
20
    done
21
	haddock --odir $(HDDIR) --html --ignore-all-exports \
22
	    -t htools -p haddock-prologue \
23
        --source-module="src/%{MODULE/.//}.html" \
24
        --source-entity="src/%{MODULE/.//}.html#%{NAME}" \
25
	    $(HSRCS)
26

    
27
clean:
28
	rm -f *.o *.cmi *.cmo *.cmx *.old hn1 zn1 *.prof *.ps *.stat *.aux \
29
        gmon.out *.hi README.html TAGS
30

    
31
.PHONY : all doc clean hn1