From b2801f2d422047a39a26e67fb218fe109c96dd9d Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Fri, 11 Nov 2011 12:44:28 -0500 Subject: Build cleanup --- Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7fbf4f6..b9bb082 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,12 @@ GHCFLAGS=-Wall -XNoCPP -fno-warn-name-shadowing -XHaskell98 HLINTFLAGS=-XHaskell98 -XNoCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8 +VERSION=0.3 .PHONY: all clean doc install -all: sign verify keygen report.html doc dist/build/libHSopenpgp-0.3.a dist/openpgp-0.3.tar.gz +all: sign verify keygen report.html doc dist/build/libHSopenpgp-$(VERSION).a dist/openpgp-$(VERSION).tar.gz -install: dist/build/libHSopenpgp-0.3.a +install: dist/build/libHSopenpgp-$(VERSION).a cabal install sign: examples/sign.hs Data/*.hs Data/OpenPGP/*.hs @@ -18,14 +19,14 @@ keygen: examples/keygen.hs Data/*.hs Data/OpenPGP/*.hs ghc --make $(GHCFLAGS) -o $@ $^ report.html: examples/*.hs Data/*.hs Data/OpenPGP/*.hs - hlint $(HLINTFLAGS) --report Data examples || true + -hlint $(HLINTFLAGS) --report Data examples doc: dist/doc/html/openpgp/index.html README README: openpgp.cabal tail -n+$$(( `grep -n ^description: $^ | head -n1 | cut -d: -f1` + 1 )) $^ > .$@ head -n+$$(( `grep -n ^$$ .$@ | head -n1 | cut -d: -f1` - 1 )) .$@ > $@ - printf ',s/ //g\n,s/^.$$//g\nw\nq\n' | ed $@ + -printf ',s/ //g\n,s/^.$$//g\nw\nq\n' | ed $@ $(RM) .$@ dist/doc/html/openpgp/index.html: dist/setup-config Data/OpenPGP.hs Data/OpenPGP/Crypto.hs @@ -39,11 +40,9 @@ clean: $(RM) sign verify $(RM) -r dist -# The following need to be changed on version change - -dist/build/libHSopenpgp-0.3.a: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs +dist/build/libHSopenpgp-$(VERSION).a: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs cabal build -dist/openpgp-0.3.tar.gz: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs README +dist/openpgp-$(VERSION).tar.gz: openpgp.cabal dist/setup-config Data/BaseConvert.hs Data/OpenPGP.hs Data/OpenPGP/Crypto.hs README cabal check cabal sdist -- cgit v1.2.3