@@ -1,3 +1,4 @@
1+version=$(shell grep '^Version:' pandoc.cabal | awk '{print $$2;}')
12makemanpages=$(shell find dist -type f -name make-pandoc-man-pages)
23ifeq "${makemanpages}" ""
34 makemanpages=@echo "You need to 'cabal configure -fmake-pandoc-man-pages && cabal build'" && exit 1
@@ -27,10 +28,17 @@ install:
2728haddock:
2829 cabal haddock
2930
30−sdist: build test man haddock
31+sdist: man haddock
3132 # note: cabal sdist doesn't work well with preprocessors for some cabal versions
3233 ${setup} sdist
3334
35+# sanity check on sdist
36+dist: sdist
37+ rm -rf "pandoc-${version}"
38+ tar xvzf dist/pandoc-${version}.tar.gz
39+ cd pandoc-${version}
40+ cabal configure ${CABALARGS} && cabal build && cabal test && cd .. && rm -rf "pandoc-${version}"
41+
3442man: ${MANPAGES}
3543
3644%.1: %.1.template