1version?=$(shell grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
2pandoc=$(shell find dist -name pandoc -type f -exec ls -t {} \; | head -1)
3SOURCEFILES?=$(shell git ls-tree -r master --name-only | grep "\.hs$$")
6GHCOPTS=-fdiagnostics-color=always
7WEBSITE=../../web/pandoc.org
11 stack install --ghc-options='$(GHCOPTS)' --install-ghc --flag 'pandoc:embed_data_files' --fast --test --ghc-options='-j +RTS -A64m -RTS' --test-arguments='-j4 --hide-successes $(TESTARGS)'
14 cabal new-configure . --ghc-options '$(GHCOPTS)' --disable-optimization --enable-tests
15 cabal new-build . --disable-optimization
16 cabal new-run test-pandoc --disable-optimization -- --hide-successes $(TESTARGS)
19 cabal new-configure . --ghc-options '$(GHCOPTS)' --flags '+embed_data_files +trypandoc' --enable-tests --enable-benchmarks
20 cabal new-build . --disable-optimization
21 cabal new-run test-pandoc --disable-optimization -- --hide-successes $(TESTARGS)
24 stack install --flag 'pandoc:embed_data_files' --flag 'pandoc:trypandoc' --bench --no-run-benchmarks --test --test-arguments='-j4 --hide-successes' --ghc-options '-Wall -Werror -fno-warn-unused-do-bind -O0 -j4 $(GHCOPTS)'
27 stack ghci --flag 'pandoc:embed_data_files'
32# Note: to accept current results of golden tests,
33# make test TESTARGS='--accept'
35 stack test --flag 'pandoc:embed_data_files' --fast --test-arguments='-j4 --hide-successes $(TESTARGS)' --ghc-options '$(GHCOPTS)'
38 ghcid -c "stack repl --flag 'pandoc:embed_data_files'"
41 stack bench --benchmark-arguments='$(BENCHARGS)' --ghc-options '$(GHCOPTS)'
44 stack build --ghc-options '$(GHCOPTS)' pandoc:weigh-pandoc && stack exec weigh-pandoc
47 for f in $(SOURCEFILES); do echo $$f; stylish-haskell -i $$f ; done
49lint: hlint fix_spacing
52 for f in $(SOURCEFILES); do echo $$f; hlint --verbose --refactor --refactor-options='-s -o -' $$f; done
55 # Fix trailing newlines and spaces at ends of lines
56 for f in $(SOURCEFILES); do printf '%s\n' "`cat $$f`" | sed -e 's/ *$$//' > $$f.tmp; mv $$f.tmp $$f; done
59 pandoc --filter tools/extract-changes.hs changelog.md -t gfm --wrap=none --template tools/changes_template.html | sed -e 's/\\#/#/g' | pbcopy
63 rm -rf "pandoc-${version}"
64 tar xvzf dist/pandoc-${version}.tar.gz
66 stack setup && stack test && cd .. && rm -rf "pandoc-${version}"
69 ! grep -n -e "\t" MANUAL.txt changelog
72 docker run -v `pwd`:/mnt \
73 -v `pwd`/linux/artifacts:/artifacts \
74 -e REVISION=$(REVISION) \
76 utdemir/ghc-musl:v12-libgmp-ghc8101 bash \
77 /mnt/linux/make_artifacts.sh
80 rm -rf macos-release-candidate
81 aws s3 sync s3://travis-jgm-pandoc macos-release-candidate
82 make -C macos-release-candidate
84man/pandoc.1: MANUAL.txt man/pandoc.1.before man/pandoc.1.after
85 pandoc $< -f markdown -t man -s \
86 --lua-filter man/manfilter.lua \
87 --include-before-body man/pandoc.1.before \
88 --include-after-body man/pandoc.1.after \
89 --metadata author="" \
90 --variable footer="pandoc $(version)" \
93README.md: README.template MANUAL.txt tools/update-readme.lua
94 pandoc --lua-filter tools/update-readme.lua \
95 --reference-location=section -t gfm $< -o $@
98 curl https://api.github.com/repos/jgm/pandoc/releases | \
99 jq -r '.[] | .assets | .[] | "\(.download_count)\t\(.name)"'
102 rm ../pandoc-templates/default.* ; \
103 cp data/templates/* ../pandoc-templates/ ; \
104 pushd ../pandoc-templates/ && \
106 git commit -m "Updated templates for pandoc $(version)" && \
110 ssh -t macfarlane 'cd src/pandoc && git pull && stack install --flag pandoc:trypandoc --flag pandoc:embed_data_files && cd trypandoc && sudo make install'
113 make -C $(WEBSITE) update
115 make -C $(WEBSITE) upload
120.PHONY: deps quick full haddock install clean test bench changes_github macospkg dist prof download_stats reformat lint weigh doc/lua-filters.md pandoc-templates trypandoc update-website debpkg macospkg checkdocs ghcid ghci fix_spacing hlint
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list