From 301f9058397e8a8e255cd1ca390bc0f9e97a08f7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 27 Sep 2022 12:52:07 -0700 Subject: Makefile: add transitive-deps target. --- Makefile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bde2baef1..94e8621e4 100644 --- a/Makefile +++ b/Makefile @@ -68,14 +68,11 @@ reformat: ## reformat with stylish-haskell for f in $(SOURCEFILES); do echo $$f; stylish-haskell -i $$f ; done .PHONY: reformat -lint: hlint fix_spacing ## run linters -.PHONY: lint - -hlint: ## run hlint +lint: ## run hlint for f in $(SOURCEFILES); do echo $$f; hlint --refactor --refactor-options='-s -o -' $$f; done -.PHONY: hlint +.PHONY: lint -fix_spacing: ## Fix trailing newlines and spaces +fix_spacing: ## fix trailing newlines and spaces for f in $(SOURCEFILES); do printf '%s\n' "`cat $$f`" | sed -e 's/ *$$//' > $$f.tmp; mv $$f.tmp $$f; done .PHONY: fix_spacing @@ -83,7 +80,7 @@ changes_github: ## copy this release's changes in gfm pandoc --lua-filter tools/extract-changes.lua changelog.md -t gfm --wrap=none --template tools/changes_template.html | sed -e 's/\\#/#/g' | pbcopy .PHONY: changes_github -man: man/pandoc.1 man/pandoc-server.1 man/pandoc-lua.1 +man: man/pandoc.1 man/pandoc-server.1 man/pandoc-lua.1 ## build man pages .PHONY: man coverage: ## code coverage information @@ -95,6 +92,10 @@ coverage: ## code coverage information open coverage/hpc_index.html .PHONY: coverage +transitive-deps: ## print transitive dependencies + cabal-plan topo | sort | sed -e 's/-[0-9]\..*//' +.PHONY: transitive-deps + debpkg: ## create linux package docker run -v `pwd`:/mnt \ -v `pwd`/linux/artifacts:/artifacts \ @@ -127,7 +128,7 @@ README.md: README.template MANUAL.txt tools/update-readme.lua pandoc --lua-filter tools/update-readme.lua \ --reference-location=section -t gfm $< -o $@ -doc/lua-filters.md: tools/update-lua-module-docs.lua +doc/lua-filters.md: tools/update-lua-module-docs.lua ## update lua-filters.md module docs cabal run pandoc -- --standalone \ --reference-links \ --lua-filter=$< \ @@ -167,7 +168,7 @@ sdist-files.txt: .FORCE git-files.txt: .FORCE git ls-tree -r --name-only HEAD | grep '^\(test\|data\)\/' | sort > $@ -help: ## Display this help +help: ## display this help @grep -E '^[ a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%-30s %s\n", $$1, $$2}' .PHONY: help -- cgit v1.2.3