From 223d2a6bcd05038382e5fca6ca90be2828a56e7c Mon Sep 17 00:00:00 2001
From: sof <unknown>
Date: Thu, 20 Mar 1997 22:40:41 +0000
Subject: [PATCH] [project @ 1997-03-20 22:40:41 by sof] Use eval exec ...
 trick instead of #! (cygwin32 cannot grok)

---
 ghc/driver/ghc.lprl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl
index 8294675cd68b..0962efbd50d4 100644
--- a/ghc/driver/ghc.lprl
+++ b/ghc/driver/ghc.lprl
@@ -113,7 +113,7 @@ GHC_OPT_HILEV_ASM GhcWithNativeCodeGen
 
 GHC_UNLIT GHC_HSCPP GHC_HSC GHC_SYSMAN
 
-CP RM PERL CONTEXT_DIFF
+CP RM CONTEXT_DIFF
 
 WAY_*_NAME WAY_*_HC_OPTS
 
@@ -1444,7 +1444,8 @@ if ($Do_lnkr) {
 	# OK, now create the magic script for "$executable"
 	open(EXEC, "> $executable") || &tidy_up_and_die(1,"$Pgm: couldn't open $executable to write!\n");
 	print EXEC <<EOSCRIPT1;
-#!${PERL}
+eval 'exec perl -S \$0 \${1+"\$@"}'
+  if \$running_under_some_shell;
 # =!=!=!=!=!=!=!=!=!=!=!
 # This script is automatically generated: DO NOT EDIT!!!
 # Generated by Glasgow Haskell, version ${PROJECTVERSION} ${PROJECTPATCHLEVEL}
-- 
GitLab