diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2011-11-11 12:44:28 -0500 |
---|---|---|
committer | Stephen Paul Weber <singpolyma@singpolyma.net> | 2011-11-11 12:44:28 -0500 |
commit | b2801f2d422047a39a26e67fb218fe109c96dd9d (patch) | |
tree | 66710f5f0245e0666c53cbdd0ebcbbc29c595774 | |
parent | cc93a189cf7e788065b6f8c03ec20988b5420006 (diff) |
Build cleanup
-rw-r--r-- | Makefile | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -1,11 +1,12 @@ | |||
1 | GHCFLAGS=-Wall -XNoCPP -fno-warn-name-shadowing -XHaskell98 | 1 | GHCFLAGS=-Wall -XNoCPP -fno-warn-name-shadowing -XHaskell98 |
2 | HLINTFLAGS=-XHaskell98 -XNoCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8 | 2 | HLINTFLAGS=-XHaskell98 -XNoCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8 |
3 | VERSION=0.3 | ||
3 | 4 | ||
4 | .PHONY: all clean doc install | 5 | .PHONY: all clean doc install |
5 | 6 | ||
6 | all: sign verify keygen report.html doc dist/build/libHSopenpgp-0.3.a dist/openpgp-0.3.tar.gz | 7 | all: sign verify keygen report.html doc dist/build/libHSopenpgp-$(VERSION).a dist/openpgp-$(VERSION).tar.gz |
7 | 8 | ||
8 | install: dist/build/libHSopenpgp-0.3.a | 9 | install: dist/build/libHSopenpgp-$(VERSION).a |
9 | cabal install | 10 | cabal install |
10 | 11 | ||
11 | sign: examples/sign.hs Data/*.hs Data/OpenPGP/*.hs | 12 | sign: 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 | ||
20 | report.html: examples/*.hs Data/*.hs Data/OpenPGP/*.hs | 21 | report.html: examples/*.hs Data/*.hs Data/OpenPGP/*.hs |
21 | hlint $(HLINTFLAGS) --report Data examples || true | 22 | -hlint $(HLINTFLAGS) --report Data examples |
22 | 23 | ||
23 | doc: dist/doc/html/openpgp/index.html README | 24 | doc: dist/doc/html/openpgp/index.html README |
24 | 25 | ||
25 | README: openpgp.cabal | 26 | README: 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 | ||
31 | dist/doc/html/openpgp/index.html: dist/setup-config Data/OpenPGP.hs Data/OpenPGP/Crypto.hs | 32 | dist/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 | 43 | dist/build/libHSopenpgp-$(VERSION).a: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs |
43 | |||
44 | dist/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 | ||
47 | dist/openpgp-0.3.tar.gz: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs README | 46 | dist/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 |