testsuite: make CHECK_API_ANNOTATIONS and CHECK_PPR overridable
authorAlp Mestanogullari <alp@well-typed.com>
Tue, 4 Sep 2018 17:09:06 +0000 (19:09 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Tue, 4 Sep 2018 17:10:07 +0000 (19:10 +0200)
Summary:
Without this patch, boilerplate.mk (which is included by a lot of Makefiles from
our testsuite) just assumes they reside in the usual inplace directory, which is
not friendly to hadrian and this makes a lot of tests (e.g T10255) fail when
building GHC and running the testsuite with hadrian.

With this patch, the said tests pass.

Test Plan: api annotation tests (with hadrian)

Reviewers: bgamari, monoidal

Reviewed By: monoidal

Subscribers: rwbarton, carter

Differential Revision: https://phabricator.haskell.org/D5127

testsuite/mk/boilerplate.mk

index c38bf85..4c32f30 100644 (file)
@@ -219,8 +219,14 @@ CP = cp
 RM = rm -f
 PYTHON = python3
 
+ifeq "$(CHECK_API_ANNOTATIONS)" ""
 CHECK_API_ANNOTATIONS := $(abspath $(TOP)/../inplace/bin/check-api-annotations)
-CHECK_PPR             := $(abspath $(TOP)/../inplace/bin/check-ppr)
+endif
+
+ifeq "$(CHECK_PPR)" ""
+CHECK_PPR := $(abspath $(TOP)/../inplace/bin/check-ppr)
+endif
+
 
 # -----------------------------------------------------------------------------
 # configuration of TEST_HC