git.iko.soy/typeable/pandoc
on e02cfcd help sign in
typeable/pandoc/Makefile
62 lines 2.0 kB history raw
1version?=$(shell grep '^Version:' pandoc.cabal | awk '{print $$2;}')
2pandoc=$(shell find dist -name pandoc -type f -exec ls -t {} \; | head -1)
3sourcefiles=$(shell find pandoc.hs src test -name '*.hs')
4BRANCH?=master
6quick:
7 stack install --flag 'pandoc:embed_data_files' --fast --test --test-arguments='-j4 --hide-successes $(TESTARGS)'
9full:
10 stack install --flag 'pandoc:embed_data_files' --test --test-arguments='-j4' --pedantic
11 stack haddock
13# Note: to accept current results of golden tests,
14# make test TESTARGS='--accept'
15test:
16 stack test --flag 'pandoc:embed_data_files' --fast --test-arguments='-j4 --hide-successes $(TESTARGS)'
18bench:
19 stack bench
21reformat:
22 for f in $(sourcefiles); do echo $$f; stylish-haskell -i $$f ; done
24changes_github:
25 pandoc --filter extract-changes.hs changelog -t markdown_github | sed -e 's/\\#/#/g' | pbcopy
27dist: man/pandoc.1
28 cabal sdist
29 rm -rf "pandoc-${version}"
30 tar xvzf dist/pandoc-${version}.tar.gz
31 cd pandoc-${version}
32 stack setup && stack test && cd .. && rm -rf "pandoc-${version}"
34debpkg: man/pandoc.1
35 make -C linux
37macospkg: man/pandoc.1
38 ./macos/make_macos_package.sh
40winpkg: pandoc-$(version)-windows.msi
42pandoc-$(version)-windows.msi:
43 wget 'https://ci.appveyor.com/api/projects/jgm/pandoc/artifacts/windows/pandoc.msi?branch=$(BRANCH)' -O pandoc.msi && \
44 osslsigncode sign -pkcs12 ~/Private/ComodoCodeSigning.exp2017.p12 -in pandoc.msi -i http://johnmacfarlane.net/ -t http://timestamp.comodoca.com/ -out $@ -askpass
45 rm pandoc.msi
47man/pandoc.1: MANUAL.txt man/pandoc.1.template
48 pandoc $< -t man -s --template man/pandoc.1.template \
49 --filter man/capitalizeHeaders.hs \
50 --filter man/removeNotes.hs \
51 --filter man/removeLinks.hs \
52 --variable version="pandoc $(version)" \
53 -o $@
55download_stats:
56 curl https://api.github.com/repos/jgm/pandoc/releases | \
57 jq -r '.[] | .assets | .[] | "\(.download_count)\t\(.name)"'
59clean:
60 stack clean
62.PHONY: deps quick full install clean test bench changes_github macospkg dist prof download_stats reformat