[project @ 1998-03-30 08:34:50 by sof]
[ghc-hetmet.git] / ghc / driver / ghc-consist.lprl
index 22abeca..535e7ec 100644 (file)
@@ -7,14 +7,21 @@
 \begin{code}
 sub chk_consistency_info {
     local($executable) = @_;
-
+    
     local($major_version, $minor_version);
     local($phase, $infile, $opts);
 
+    # append .exe if it's not there under cygwin32
+    $executable = "${executable}.exe" if $TargetPlatform eq 'i386-unknown-cygwin32' &&
+                                        $executable !~ /\...*$/ ; 
+
     print STDERR "Checking consistency of: $executable\n" if $Verbose;
 
     &tidy_up_and_die(1, "Panic: no such executable: $executable\n")
-       if ! -x $executable;
+       if ( ! -x $executable ) && ( ! -B $executable );
+    # perl apparently determines whether something is executable
+    # by looking at the file suffix under win32/cygwin32 !?!
+    # Hence, we try binary files if (! -x) fails.
 
     # by this point, consistency strings (with commas) have become
     # local symbols (with .'s)
@@ -38,7 +45,7 @@ sub chk_consistency_info {
                print STDERR "$Pgm: consistency warning: minor version not $HsC_minor_version:\n$_\n"
                    if $minor_version != $HsC_minor_version;
                $Status++,
-               print STDERR "$Pgm: consistency error: not options $HsC_consist_options:\n$_\n"
+               print STDERR "$Pgm: consistency error: not options $opts -- $HsC_consist_options:\n$_\n"
                    if $opts ne $HsC_consist_options;
 
            } else { # phase is cc ...