summaryrefslogtreecommitdiff
path: root/testsuite/tests/count-deps/Makefile
blob: 41911c47df05800d731e07dbc959079e00f8da41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
TOP=../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk

LIBDIR := "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`"

# Calculate the number of module dependencies of 'Parser.' If that
# number exceeds a threshold, that indicates that the dependencies
# have significantly gone up via the commit under test (and the test
# is deemed to fail). In that case, this most likely means a cycle
# has arisen that pulls in modules for Core generation. The
# motivation for not allowing that to happen is so that the
# 'ghc-lib-parser' package subset of the GHC API can continue to be
# provided with as small a number of modules as possible for when the
# need exists to produce ASTs and nothing more.

.PHONY: count-deps-parser
count-deps-parser:
	$(COUNT_DEPS) $(LIBDIR) "GHC.Parser"

.PHONY: count-deps-ast
count-deps-ast:
	$(COUNT_DEPS) $(LIBDIR) "Language.Haskell.Syntax"