don't create files in ghost mode (so -g -d/dev/null works)
[diohsc.git] / Makefile
blob3c274969e38de5705efb06f8108f004cbee84990
1 VERSION=0.1.3.1
3 GHCOPTS=-threaded -DICONV -DMAGIC -ignore-package regex-compat-tdfa
5 .PHONY: build install clean
6 build:
7 @echo "NOTE: All haskell dependencies must be installed for this to build." 1>&2
8 @echo "Probably you want to skip directly to \"make install\"" 1>&2
9 @echo "" 1>&2
10 cabal build
11 install:
12 cabal update && cabal install
14 diohsc: *.hs
15 ghc --make -Wall ${GHCOPTS} diohsc.hs
16 diohsc-O: *.hs
17 ghc -o $@ --make -O -Wall ${GHCOPTS} diohsc.hs
18 diohsc-dynamic: *.hs
19 ghc -o $@ --make -dynamic -Wall ${GHCOPTS} diohsc.hs
20 diohsc-static:
21 ghc -o $@ --make ${GHCOPTS} -optl-static -optl-pthread diohsc.hs
22 diohsc-prof: *.hs
23 ghc -o $@ --make ${GHCOPTS} -rtsopts -prof -fprof-auto diohsc.hs
24 clean:
25 rm diohsc *.hi *.o
27 dioshc.1: dioshc.1.md
28 pandoc --standalone -f markdown -t man < diohsc.1.md >| diohsc.1
30 dist-newstyle/sdist/diohsc-${VERSION}.tar.gz: *.hs README.md CHANGELOG.md COPYING *.cabal *.sample diohsc.1
31 cabal sdist
33 diohsc-${VERSION}-src.tgz: dist-newstyle/sdist/diohsc-${VERSION}.tar.gz
34 cp $< $@
36 index.gmi: index.gmi.in Makefile
37 cat $< | sed 's/\$$VERSION/${VERSION}/g' > $@
39 index.html: index.gmi
40 cat $< | sed s/\.gmi/.html/g | ./tools/gmi2html.sed > $@
42 index.md: index.gmi
43 cat $< | sed s/\.gmi/.md/g | ./tools/gmi2md.sed > $@
45 %.md: %.gmi
46 ./tools/gmi2md.sed < $< > $@
48 %.html: %.gmi
49 ./tools/gmi2html.sed < $< > $@
51 publish: diohsc-${VERSION}-src.tgz index.gmi index.html README.md README.gmi README.html CHANGELOG.gmi CHANGELOG.md CHANGELOG.html tutorial/diohsc-tutorial.cast tutorial/diohsc-tutorial.txt
52 cp $^ /var/gemini/gemini.thegonz.net/diohsc/
53 scp $^ sverige:html/diohsc/