summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStephen Paul Weber <singpolyma@singpolyma.net>2011-11-11 12:44:28 -0500
committerStephen Paul Weber <singpolyma@singpolyma.net>2011-11-11 12:44:28 -0500
commitb2801f2d422047a39a26e67fb218fe109c96dd9d (patch)
tree66710f5f0245e0666c53cbdd0ebcbbc29c595774 /Makefile
parentcc93a189cf7e788065b6f8c03ec20988b5420006 (diff)
Build cleanup
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 7fbf4f6..b9bb082 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,12 @@
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
3VERSION=0.3
3 4
4.PHONY: all clean doc install 5.PHONY: all clean doc install
5 6
6all: sign verify keygen report.html doc dist/build/libHSopenpgp-0.3.a dist/openpgp-0.3.tar.gz 7all: sign verify keygen report.html doc dist/build/libHSopenpgp-$(VERSION).a dist/openpgp-$(VERSION).tar.gz
7 8
8install: dist/build/libHSopenpgp-0.3.a 9install: dist/build/libHSopenpgp-$(VERSION).a
9 cabal install 10 cabal install
10 11
11sign: examples/sign.hs Data/*.hs Data/OpenPGP/*.hs 12sign: examples/sign.hs Data/*.hs Data/OpenPGP/*.hs
@@ -18,14 +19,14 @@ keygen: examples/keygen.hs Data/*.hs Data/OpenPGP/*.hs
18 ghc --make $(GHCFLAGS) -o $@ $^ 19 ghc --make $(GHCFLAGS) -o $@ $^
19 20
20report.html: examples/*.hs Data/*.hs Data/OpenPGP/*.hs 21report.html: examples/*.hs Data/*.hs Data/OpenPGP/*.hs
21 hlint $(HLINTFLAGS) --report Data examples || true 22 -hlint $(HLINTFLAGS) --report Data examples
22 23
23doc: dist/doc/html/openpgp/index.html README 24doc: dist/doc/html/openpgp/index.html README
24 25
25README: openpgp.cabal 26README: openpgp.cabal
26 tail -n+$$(( `grep -n ^description: $^ | head -n1 | cut -d: -f1` + 1 )) $^ > .$@ 27 tail -n+$$(( `grep -n ^description: $^ | head -n1 | cut -d: -f1` + 1 )) $^ > .$@
27 head -n+$$(( `grep -n ^$$ .$@ | head -n1 | cut -d: -f1` - 1 )) .$@ > $@ 28 head -n+$$(( `grep -n ^$$ .$@ | head -n1 | cut -d: -f1` - 1 )) .$@ > $@
28 printf ',s/ //g\n,s/^.$$//g\nw\nq\n' | ed $@ 29 -printf ',s/ //g\n,s/^.$$//g\nw\nq\n' | ed $@
29 $(RM) .$@ 30 $(RM) .$@
30 31
31dist/doc/html/openpgp/index.html: dist/setup-config Data/OpenPGP.hs Data/OpenPGP/Crypto.hs 32dist/doc/html/openpgp/index.html: dist/setup-config Data/OpenPGP.hs Data/OpenPGP/Crypto.hs
@@ -39,11 +40,9 @@ clean:
39 $(RM) sign verify 40 $(RM) sign verify
40 $(RM) -r dist 41 $(RM) -r dist
41 42
42# The following need to be changed on version change 43dist/build/libHSopenpgp-$(VERSION).a: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs
43
44dist/build/libHSopenpgp-0.3.a: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs
45 cabal build 44 cabal build
46 45
47dist/openpgp-0.3.tar.gz: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs README 46dist/openpgp-$(VERSION).tar.gz: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs README
48 cabal check 47 cabal check
49 cabal sdist 48 cabal sdist