Make modules.dot target more robust.

Only include source-controlled files under src.
This commit is contained in:
John MacFarlane
2022-10-01 17:52:03 -07:00
parent dd07d8002f
commit 92e116af19
+3 -2
View File
@@ -1,6 +1,7 @@
version?=$(shell grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
pandoc=$(shell find dist -name pandoc -type f -exec ls -t {} \; | head -1)
SOURCEFILES?=$(shell git ls-tree -r master --name-only | grep "\.hs$$")
PANDOCSOURCEFILES?=$(shell git ls-tree -r master --name-only src | grep "\.hs$$")
BRANCH?=master
ARCH=$(shell uname -m)
DOCKERIMAGE=registry.gitlab.b-data.ch/ghc/ghc4pandoc:9.2.3
@@ -162,10 +163,10 @@ update-website: ## update website and upload
make -C $(WEBSITE) upload
.PHONY: update-website
modules.dot: $(SOURCEFILES)
modules.dot: $(PANDOCSOURCEFILES)
@echo "digraph G {" > $@
@echo "overlap=\"scale\"" >> $@
@rg '^import.*Text\.Pandoc\.' --with-filename src \
@rg '^import.*Text\.Pandoc\.' --with-filename $^ \
| rg -v 'Text\.Pandoc\.(Definition|Builder|Walk|Generic)' \
| sort \
| uniq \