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
9BENCHARGS?="--timeout=6 +RTS -T -RTS"
12 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)'
15 cabal new-configure . --ghc-options '$(GHCOPTS)' --disable-optimization --enable-tests
16 cabal new-build . --disable-optimization
17 cabal new-run test-pandoc --disable-optimization -- --hide-successes $(TESTARGS)
20 cabal new-configure . --ghc-options '$(GHCOPTS)' --flags '+embed_data_files +trypandoc' --enable-tests --enable-benchmarks
21 cabal new-build . --disable-optimization
22 cabal new-run test-pandoc --disable-optimization -- --hide-successes $(TESTARGS)
25 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)'
28 stack ghci --flag 'pandoc:embed_data_files'
33# Note: to accept current results of golden tests,
34# make test TESTARGS='--accept'
36 stack test --flag 'pandoc:embed_data_files' --fast --test-arguments='-j4 --hide-successes $(TESTARGS)' --ghc-options '$(GHCOPTS)'
39 ghcid -c "stack repl --flag 'pandoc:embed_data_files'"
42 stack bench --benchmark-arguments=$(BENCHARGS) --ghc-options '$(GHCOPTS)'
45 stack build --ghc-options '$(GHCOPTS)' pandoc:weigh-pandoc && stack exec weigh-pandoc
48 for f in $(SOURCEFILES); do echo $$f; stylish-haskell -i $$f ; done
50lint: hlint fix_spacing
53 for f in $(SOURCEFILES); do echo $$f; hlint --verbose --refactor --refactor-options='-s -o -' $$f; done
56 # Fix trailing newlines and spaces at ends of lines
57 for f in $(SOURCEFILES); do printf '%s\n' "`cat $$f`" | sed -e 's/ *$$//' > $$f.tmp; mv $$f.tmp $$f; done
60 pandoc --filter tools/extract-changes.hs changelog.md -t gfm --wrap=none --template tools/changes_template.html | sed -e 's/\\#/#/g' | pbcopy
64 rm -rf "pandoc-${version}"
65 tar xvzf dist/pandoc-${version}.tar.gz
67 stack setup && stack test && cd .. && rm -rf "pandoc-${version}"
69check: checkdocs check-cabal
72 ! grep -q -n -e "\t" MANUAL.txt changelog.md
75 docker run -v `pwd`:/mnt \
76 -v `pwd`/linux/artifacts:/artifacts \
77 -e REVISION=$(REVISION) \
79 utdemir/ghc-musl:v12-libgmp-ghc8101 bash \
80 /mnt/linux/make_artifacts.sh
82man/pandoc.1: MANUAL.txt man/pandoc.1.before man/pandoc.1.after
83 pandoc $< -f markdown -t man -s \
84 --lua-filter man/manfilter.lua \
85 --include-before-body man/pandoc.1.before \
86 --include-after-body man/pandoc.1.after \
87 --metadata author="" \
88 --variable footer="pandoc $(version)" \
91README.md: README.template MANUAL.txt tools/update-readme.lua
92 pandoc --lua-filter tools/update-readme.lua \
93 --reference-location=section -t gfm $< -o $@
96 curl https://api.github.com/repos/jgm/pandoc/releases | \
97 jq -r '.[] | .assets | .[] | "\(.download_count)\t\(.name)"'
100 rm ../pandoc-templates/default.* ; \
101 cp data/templates/* ../pandoc-templates/ ; \
102 pushd ../pandoc-templates/ && \
104 git commit -m "Updated templates for pandoc $(version)" && \
108 ssh -t macfarlane 'cd src/pandoc && git pull && stack install --flag pandoc:trypandoc --flag pandoc:embed_data_files && cd trypandoc && sudo make install'
111 make -C $(WEBSITE) update
113 make -C $(WEBSITE) upload
118check-cabal: git-files.txt sdist-files.txt
119 echo "Checking to see if all committed test/data files are in sdist."
122sdist-files.txt: .FORCE
123 cabal sdist --list-only | sed 's/\.\///' | grep '^\(test\|data\)\/' | sort > $@
126 git ls-tree -r --name-only HEAD | grep '^\(test\|data\)\/' | sort > $@
128.PHONY: .FORCE deps quick full haddock install clean test bench changes_github dist prof download_stats reformat lint weigh doc/lua-filters.md pandoc-templates trypandoc update-website debpkg checkdocs ghcid ghci fix_spacing hlint check check-cabal
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