summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStephen Paul Weber <singpolyma@singpolyma.net>2011-08-10 19:14:54 -0500
committerStephen Paul Weber <singpolyma@singpolyma.net>2011-08-10 19:14:54 -0500
commitd807b5d3368e6295e8c9a4bac8647d40c2933dd2 (patch)
treef69224eab323302e39a4e8df8537f3868d480469 /Makefile
parent2da339aed62d75647dc052e978b099ed2dac05ac (diff)
Build more stuff with make
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 29 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index b2e6829..8c5f9d5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,23 @@
1GHCFLAGS=-Wall -XNoCPP -fno-warn-name-shadowing -XHaskell98 1GHCFLAGS=-Wall -XNoCPP -fno-warn-name-shadowing -XHaskell98
2HLINTFLAGS=-XHaskell98 -XNoCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8 2HLINTFLAGS=-XHaskell98 -XNoCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8
3 3
4.PHONY: all cleas 4.PHONY: all clean doc install
5 5
6all: verify report.html README 6all: sign verify report.html doc dist/build/libHSopenpgp-0.1.a dist/openpgp-0.1.tar.gz
7
8install: dist/build/libHSopenpgp-0.1.a
9 cabal install
10
11sign: examples/sign.hs
12 ghc --make $(GHCFLAGS) -o $@ $^
7 13
8verify: examples/verify.hs 14verify: examples/verify.hs
9 ghc --make $(GHCFLAGS) -o $@ $^ 15 ghc --make $(GHCFLAGS) -o $@ $^
10 16
11report.html: 17report.html: examples/* Data/* Data/OpenPGP/*
12 hlint $(HLINTFLAGS) --report Data examples 18 hlint $(HLINTFLAGS) --report Data examples || true
19
20doc: dist/doc/html/openpgp/index.html README
13 21
14README: openpgp.cabal 22README: openpgp.cabal
15 tail -n+$$(( `grep -n ^description: $^ | head -n1 | cut -d: -f1` + 1 )) $^ > .$@ 23 tail -n+$$(( `grep -n ^description: $^ | head -n1 | cut -d: -f1` + 1 )) $^ > .$@
@@ -17,6 +25,22 @@ README: openpgp.cabal
17 printf ',s/ //g\n,s/^.$$//g\nw\nq\n' | ed $@ 25 printf ',s/ //g\n,s/^.$$//g\nw\nq\n' | ed $@
18 $(RM) .$@ 26 $(RM) .$@
19 27
28dist/doc/html/openpgp/index.html: dist/setup-config Data/OpenPGP.hs Data/OpenPGP/Crypto.hs
29 cabal haddock --hyperlink-source
30
31dist/setup-config:
32 cabal configure
33
20clean: 34clean:
21 find -name '*.o' -o -name '*.hi' | xargs $(RM) 35 find -name '*.o' -o -name '*.hi' | xargs $(RM)
22 $(RM) verify 36 $(RM) sign verify
37 $(RM) -r dist
38
39# The following need to be changed on version change
40
41dist/build/libHSopenpgp-0.1.a: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs
42 cabal build
43
44dist/openpgp-0.1.tar.gz: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs README
45 cabal check
46 cabal sdist