git.iko.soy/typeable/pandoc
on master help sign in
Added 'dist' target to Makefile that does a sanity check on tarball.
c8fa545John MacFarlane
Makefile+9−1
@@ -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:
27haddock:
28haddock:
28 cabal haddock
29 cabal haddock
29
30
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
33
34
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+
34man: ${MANPAGES}
42man: ${MANPAGES}
35
43
36%.1: %.1.template
44%.1: %.1.template