Commit 732b3dbb authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

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: default avatarSergei Trofimovich <slyfox@gentoo.org>
parent 59c925e8
......@@ -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...
......
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment