aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-08-13 17:52:34 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-08-13 17:52:34 -0700
commitc8fa545ee470e42e1d170b3bf88d8e23b1186039 (patch)
tree70dc169ca16e5d50e9ec879c972c618bb88efb5e
parent6e4c60ea280f3583012447966b22ab50177fde55 (diff)
downloadpandoc-c8fa545ee470e42e1d170b3bf88d8e23b1186039.tar.gz
Added 'dist' target to Makefile that does a sanity check on tarball.
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5584fa322..0bfea6f7b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+version=$(shell grep '^Version:' pandoc.cabal | awk '{print $$2;}')
makemanpages=$(shell find dist -type f -name make-pandoc-man-pages)
ifeq "${makemanpages}" ""
makemanpages=@echo "You need to 'cabal configure -fmake-pandoc-man-pages && cabal build'" && exit 1
@@ -27,10 +28,17 @@ install:
haddock:
cabal haddock
-sdist: build test man haddock
+sdist: man haddock
# note: cabal sdist doesn't work well with preprocessors for some cabal versions
${setup} sdist
+# sanity check on sdist
+dist: sdist
+ rm -rf "pandoc-${version}"
+ tar xvzf dist/pandoc-${version}.tar.gz
+ cd pandoc-${version}
+ cabal configure ${CABALARGS} && cabal build && cabal test && cd .. && rm -rf "pandoc-${version}"
+
man: ${MANPAGES}
%.1: %.1.template