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