diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-26 22:04:18 -0500 |
---|---|---|
committer | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-26 22:04:18 -0500 |
commit | 913c09eb763e35bfba79f655c3fe3a6cec593a56 (patch) | |
tree | 1b34c03e44da37c919605b67e9e84ad4af17d2a6 /Makefile | |
parent | a68241e614534c252fad871a32ac8296727ee7bf (diff) |
Second openpgp-cereal package using CPP
When you compile with make CEREAL=1
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -1,5 +1,10 @@ | |||
1 | GHCFLAGS=-Wall -XNoCPP -fno-warn-name-shadowing -XHaskell98 | 1 | ifdef CEREAL |
2 | HLINTFLAGS=-XHaskell98 -XNoCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8 | 2 | GHCFLAGS=-Wall -DCEREAL -fno-warn-name-shadowing -XHaskell98 |
3 | else | ||
4 | GHCFLAGS=-Wall -fno-warn-name-shadowing -XHaskell98 | ||
5 | endif | ||
6 | |||
7 | HLINTFLAGS=-XHaskell98 -XCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8 | ||
3 | VERSION=0.3 | 8 | VERSION=0.3 |
4 | 9 | ||
5 | .PHONY: all clean doc install debian test | 10 | .PHONY: all clean doc install debian test |
@@ -28,13 +33,26 @@ README: openpgp.cabal | |||
28 | -printf ',s/ //g\n,s/^.$$//g\nw\nq\n' | ed $@ | 33 | -printf ',s/ //g\n,s/^.$$//g\nw\nq\n' | ed $@ |
29 | $(RM) .$@ | 34 | $(RM) .$@ |
30 | 35 | ||
36 | # XXX: Is there a way to make this just pass through $(GHCFLAGS) | ||
37 | ifdef CEREAL | ||
38 | dist/doc/html/openpgp/index.html: dist/setup-config Data/OpenPGP.hs | ||
39 | cabal haddock --hyperlink-source --haddock-options="--optghc=-DCEREAL" | ||
40 | else | ||
31 | dist/doc/html/openpgp/index.html: dist/setup-config Data/OpenPGP.hs | 41 | dist/doc/html/openpgp/index.html: dist/setup-config Data/OpenPGP.hs |
32 | cabal haddock --hyperlink-source | 42 | cabal haddock --hyperlink-source |
43 | endif | ||
33 | 44 | ||
45 | ifdef CEREAL | ||
46 | dist/setup-config: openpgp.cabal | ||
47 | -printf '1c\nname: openpgp-cereal\n.\n,s/binary,$$/cereal,/g\nw\nq\n' | ed openpgp.cabal | ||
48 | cabal configure | ||
49 | else | ||
34 | dist/setup-config: openpgp.cabal | 50 | dist/setup-config: openpgp.cabal |
35 | cabal configure | 51 | cabal configure |
52 | endif | ||
36 | 53 | ||
37 | clean: | 54 | clean: |
55 | -printf '1c\nname: openpgp\n.\n,s/cereal,$$/binary,/g\nw\nq\n' | ed openpgp.cabal | ||
38 | find -name '*.o' -o -name '*.hi' | xargs $(RM) | 56 | find -name '*.o' -o -name '*.hi' | xargs $(RM) |
39 | $(RM) sign verify keygen tests/suite | 57 | $(RM) sign verify keygen tests/suite |
40 | $(RM) -r dist dist-ghc | 58 | $(RM) -r dist dist-ghc |