[commit: ghc] master: add $(CrossCompilePrefix) to 'runghc' and 'ghci' (732b3db)

git at git.haskell.org git at git.haskell.org
Thu Apr 6 22:05:05 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/732b3dbbff194eb8650c75afd79d892801afa0dc/ghc

>---------------------------------------------------------------

commit 732b3dbbff194eb8650c75afd79d892801afa0dc
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Thu Apr 6 22:48:13 2017 +0100

    add $(CrossCompilePrefix) to 'runghc' and 'ghci'
    
    When Stage1Only=YES install mode is used one of rare tools
    that lack $(CrossCompilePrefix) prefix are 'runghc' and 'ghci'.
    
    This causes file collisions when multiple GHC crosscompilers
    are installed in system.
    
    Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>


>---------------------------------------------------------------

732b3dbbff194eb8650c75afd79d892801afa0dc
 driver/ghci/ghc.mk  |  8 ++++----
 utils/runghc/ghc.mk | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/driver/ghci/ghc.mk b/driver/ghci/ghc.mk
index 41d1f15..0f31884 100644
--- a/driver/ghci/ghc.mk
+++ b/driver/ghci/ghc.mk
@@ -16,16 +16,16 @@ ifneq "$(Windows_Host)" "YES"
 install: install_driver_ghci
 
 .PHONY: install_driver_ghci
-install_driver_ghci: WRAPPER=$(DESTDIR)$(bindir)/ghci-$(ProjectVersion)
+install_driver_ghci: WRAPPER=$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghci-$(ProjectVersion)
 install_driver_ghci:
 	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
 	$(call removeFiles,                                "$(WRAPPER)")
 	$(CREATE_SCRIPT)                                   "$(WRAPPER)"
 	echo '#!$(SHELL)'                               >> "$(WRAPPER)"
-	echo 'exec "$(bindir)/ghc-$(ProjectVersion)" --interactive "$$@"' >> "$(WRAPPER)"
+	echo 'exec "$(bindir)/$(CrossCompilePrefix)ghc-$(ProjectVersion)" --interactive "$$@"' >> "$(WRAPPER)"
 	$(EXECUTABLE_FILE)                                 "$(WRAPPER)"
-	$(call removeFiles,"$(DESTDIR)$(bindir)/ghci")
-	$(LN_S) ghci-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghci"
+	$(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghci")
+	$(LN_S) $(CrossCompilePrefix)ghci-$(ProjectVersion) "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghci"
 
 else # Windows_Host...
 
diff --git a/utils/runghc/ghc.mk b/utils/runghc/ghc.mk
index 9169ca2..50b11a6 100644
--- a/utils/runghc/ghc.mk
+++ b/utils/runghc/ghc.mk
@@ -34,11 +34,11 @@ install: install_runhaskell
 .PHONY: install_runhaskell
 ifeq "$(Windows_Host)" "YES"
 install_runhaskell: install_bins
-	"$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext1) $(DESTDIR)$(bindir)/runhaskell$(exeext1)
+	"$(CP)" $(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc$(exeext1) $(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell$(exeext1)
 else
 install_runhaskell:
-	$(call removeFiles,"$(DESTDIR)$(bindir)/runhaskell")
-	$(LN_S) runghc "$(DESTDIR)$(bindir)/runhaskell"
-	$(call removeFiles,"$(DESTDIR)$(bindir)/runghc")
-	$(LN_S) runghc-$(ProjectVersion) "$(DESTDIR)$(bindir)/runghc"
+	$(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell")
+	$(LN_S) $(CrossCompilePrefix)runghc "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell"
+	$(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc")
+	$(LN_S) $(CrossCompilePrefix)runghc-$(ProjectVersion) "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc"
 endif



More information about the ghc-commits mailing list