summaryrefslogtreecommitdiff
path: root/testsuite/tests/haddock/haddock_testsuite/Makefile
blob: 241371f71b9578cd3ace9b51c23b7e9be019b18c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk

# Remark: these should be synced up with the testsuites listed in `utils/haddock/haddock.cabal`
# See #16206


# Corresponds to files in the `haddock-test` package
haddockTest=$(TOP)/../utils/haddock/haddock-test/src/Test/Haddock.hs \
						$(TOP)/../utils/haddock/haddock-test/src/Test/Haddock/Config.hs \
						$(TOP)/../utils/haddock/haddock-test/src/Test/Haddock/Utils.hs \
						$(TOP)/../utils/haddock/haddock-test/src/Test/Haddock/Xhtml.hs \
						$(TOP)/../utils/haddock/haddock-test/src/Test/Haddock/Process.hs

# Corresponds to the `html-test` testsuite
.PHONY: htmlTest
htmlTest:
	'$(TEST_HC)' \
		-odir . \
		-hidir . \
		-package Cabal \
		-o html-test \
		$(haddockTest) \
		$(TOP)/../utils/haddock/html-test/Main.hs
	./html-test \
		$(ACCEPT) \
		--ghc-path='$(TEST_HC)' \
		--haddock-path=$(HADDOCK) \
		--haddock-stdout=haddock-out.log

# Corresponds to the `latex-test` testsuite
.PHONY: latexTest
latexTest:
	'$(TEST_HC)' \
		-odir . \
		-hidir . \
		-package Cabal \
		-o latex-test \
		$(haddockTest) \
		$(TOP)/../utils/haddock/latex-test/Main.hs
	./latex-test \
		$(ACCEPT) \
		--ghc-path='$(TEST_HC)' \
		--haddock-path=$(HADDOCK) \
		--haddock-stdout=haddock-out.log

# Corresponds to the `hoogle-test` testsuite
.PHONY: hoogleTest
hoogleTest:
	'$(TEST_HC)' \
		-odir . \
		-hidir . \
		-package Cabal \
		-o hoogle-test \
		$(haddockTest) \
		$(TOP)/../utils/haddock/hoogle-test/Main.hs
	./hoogle-test \
		$(ACCEPT) \
		--ghc-path='$(TEST_HC)' \
		--haddock-path=$(HADDOCK) \
		--haddock-stdout=haddock-out.log

# Corresponds to the `hypsrc-test` testsuite
.PHONY: hypsrcTest
hypsrcTest:
	'$(TEST_HC)' \
		-odir . \
		-hidir . \
		-package Cabal \
		-o hypsrc-test \
		$(haddockTest) \
		$(TOP)/../utils/haddock/hypsrc-test/Main.hs
	./hypsrc-test \
		$(ACCEPT) \
		--ghc-path='$(TEST_HC)' \
		--haddock-path=$(HADDOCK) \
		--haddock-stdout=haddock-out.log