From 92e116af190731642eece075b91982e6af83d422 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 1 Oct 2022 17:52:03 -0700 Subject: [PATCH] Make modules.dot target more robust. Only include source-controlled files under src. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4d58079bc..f46ff4090 100644 --- a/Makefile +++ b/Makefile @@ -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 \