[Git][ghc/ghc][master] testsuite/mk/boilerplate.mk: rename 'ghc-config-mk' to 'ghc_config_mk'

Marge Bot gitlab at gitlab.haskell.org
Tue Jun 11 22:44:28 UTC 2019



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
aad6115a by Alp Mestanogullari at 2019-06-11T22:44:20Z
testsuite/mk/boilerplate.mk: rename 'ghc-config-mk' to 'ghc_config_mk'

Make/shell variable names which contain dashes can cause problems under
some conditions. The 'ghc-config-mk' variable from testsuite/mk/boilerplate.mk
that I made overridable (by Hadrian) in ba0aed2e was working as expected when
our Hadrian/Linux job was based off the deb8 Docker image, but broke when
I switched the job to use our deb9-based image, in 3d97bad6. The exact
circumstances/tool versions that trigger this problem are unknown, but
changing the variable's name to 'ghc_config_mk' lets us work around the issue.

This fixes the annth_compunits and annth_make test failures that showed up
when we switched the Hadrian/Linux job to use the deb9 environment.

- - - - -


2 changed files:

- hadrian/src/Rules/Test.hs
- testsuite/mk/boilerplate.mk


Changes:

=====================================
hadrian/src/Rules/Test.hs
=====================================
@@ -122,7 +122,7 @@ testRules = do
             -- This lets us bypass the need to generate a config
             -- through Make, which happens in testsuite/mk/boilerplate.mk
             -- which is in turn included by all test 'Makefile's.
-            setEnv "ghc-config-mk" (top -/- root -/- ghcConfigPath)
+            setEnv "ghc_config_mk" (top -/- root -/- ghcConfigPath)
 
         -- Execute the test target.
         -- We override the verbosity setting to make sure the user can see


=====================================
testsuite/mk/boilerplate.mk
=====================================
@@ -240,17 +240,17 @@ $(TOP)/mk/ghc-config : $(TOP)/mk/ghc-config.hs
 
 empty=
 space=$(empty) $(empty)
-ifeq "$(ghc-config-mk)" ""
-ghc-config-mk = $(TOP)/mk/ghcconfig$(subst $(space),_,$(subst :,_,$(subst /,_,$(subst \,_,$(TEST_HC))))).mk
+ifeq "$(ghc_config_mk)" ""
+ghc_config_mk = $(TOP)/mk/ghcconfig$(subst $(space),_,$(subst :,_,$(subst /,_,$(subst \,_,$(TEST_HC))))).mk
 
-$(ghc-config-mk) : $(TOP)/mk/ghc-config
+$(ghc_config_mk) : $(TOP)/mk/ghc-config
 	$(TOP)/mk/ghc-config "$(TEST_HC)" >"$@"; if [ $$? != 0 ]; then $(RM) "$@"; exit 1; fi
 # If the ghc-config fails, remove $@, and fail
 endif
 
 # Note: $(CLEANING) is not defined in the testsuite.
 ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
--include $(ghc-config-mk)
+-include $(ghc_config_mk)
 endif
 
 # Note [WayFlags]



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/aad6115aed884db9ed47ac602ca1bd3b953ea089

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/aad6115aed884db9ed47ac602ca1bd3b953ea089
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190611/b117298e/attachment-0001.html>


More information about the ghc-commits mailing list