Statistics
| Branch: | Tag: | Revision:

root / Makefile @ 01f6a5d2

History | View | Annotate | Download (737 Bytes)

1 e4f08c46 Iustin Pop
HSRCS := $(wildcard src/*.hs)
2 e4f08c46 Iustin Pop
HDDIR = apidoc
3 e4f08c46 Iustin Pop
4 e4f08c46 Iustin Pop
# Haskell rules
5 e4f08c46 Iustin Pop
6 e4f08c46 Iustin Pop
all:
7 e4f08c46 Iustin Pop
	$(MAKE) -C src
8 e4f08c46 Iustin Pop
9 e4f08c46 Iustin Pop
README.html: README
10 e4f08c46 Iustin Pop
	rst2html $< $@
11 e4f08c46 Iustin Pop
12 e4f08c46 Iustin Pop
doc: README.html
13 e4f08c46 Iustin Pop
	rm -rf $(HDDIR)
14 e4f08c46 Iustin Pop
	mkdir -p $(HDDIR)/src
15 e4f08c46 Iustin Pop
	cp hscolour.css $(HDDIR)/src
16 e4f08c46 Iustin Pop
	for file in $(HSRCS); do \
17 e4f08c46 Iustin Pop
        HsColour -css -anchor \
18 e4f08c46 Iustin Pop
        $$file > $(HDDIR)/src/`basename $$file .hs`.html ; \
19 e4f08c46 Iustin Pop
    done
20 e4f08c46 Iustin Pop
	ln -sf hn1.html $(HDDIR)/src/Main.html
21 e4f08c46 Iustin Pop
	haddock --odir $(HDDIR) --html --ignore-all-exports \
22 e4f08c46 Iustin Pop
	    -t hn1 -p haddock-prologue \
23 e4f08c46 Iustin Pop
        --source-module="src/%{MODULE/.//}.html" \
24 e4f08c46 Iustin Pop
        --source-entity="src/%{MODULE/.//}.html#%{NAME}" \
25 e4f08c46 Iustin Pop
	    $(HSRCS)
26 e4f08c46 Iustin Pop
27 e4f08c46 Iustin Pop
clean:
28 e4f08c46 Iustin Pop
	rm -f *.o *.cmi *.cmo *.cmx *.old hn1 zn1 *.prof *.ps *.stat *.aux \
29 e4f08c46 Iustin Pop
        gmon.out *.hi README.html TAGS
30 e4f08c46 Iustin Pop
31 e4f08c46 Iustin Pop
.PHONY : all doc clean hn1