[project @ 1998-02-25 14:35:37 by simonm]
[ghc-hetmet.git] / ghc / driver / ghc.lprl
index cadc1a6..d01f71f 100644 (file)
@@ -99,7 +99,7 @@ INSTALLING
 
 HOSTPLATFORM TARGETPLATFORM
 
-PROJECTNAME PROJECTVERSION PROJECTPATCHLEVEL
+ProjectName ProjectVersion ProjectVersionInt ProjectPatchLevel 
 
 TOP_PWD
 
@@ -379,7 +379,7 @@ require special handling.
 # We need to look in ghc/ and glaExts/ when searching for implicitly needed .hi files, but 
 # we should really *not* look there for explicitly imported modules.
 
-$GhcVersionInfo  = int($PROJECTVERSION * 100  + .5); # i.e., round (X.Y * 100)
+$GhcVersionInfo  = $ProjectVersionInt;
 $Haskell1Version = 4; # i.e., Haskell 1.4
 @Cpp_define     = ();
 
@@ -1337,7 +1337,7 @@ if ($#Input_file < 0 && $#Link_file < 0) {
 
 Tell the world who we are, if they asked.
 \begin{code}
-print STDERR "${PROJECTNAME}, version ${PROJECTVERSION}, patchlevel ${PROJECTPATCHLEVEL}\n"
+print STDERR "${ProjectName}, version ${ProjectVersion}, patchlevel ${ProjectPatchLevel}\n"
     if $Verbose;
 \end{code}
 
@@ -1380,11 +1380,14 @@ if ($Do_lnkr) {
     # for a linker, use an explicitly given one, or the going C compiler ...
     local($lnkr) = ( $Lnkr ) ? $Lnkr : $CcRegd;
 
+    if ( ($Specific_output_file eq '') && 
+         ($TargetPlatform eq 'i386-unknown-cygwin32') ) {
+         $Specific_output_file = 'main.exe';
+         print STDERR "Output file not specified, defaulting to \"main.exe\"\n";
+    }
+
     local($output) = ($Specific_output_file ne '') ? "-o $Specific_output_file" : '';
-    @Files_to_tidy = ($Specific_output_file ne '') ? 
-                     $Specific_output_file : 
-                     ( ($TargetPlatform eq 'i386-unknown-cygwin32') ? 'main.exe' : 'a.out');
-    print STDERR "Output file not specified, defaulting to \"main.exe\"\n" if ($Specific_output_file eq '' && $TargetPlatform eq 'i386-unknown-cygwin32');
+    @Files_to_tidy = ($Specific_output_file ne '') ? $Specific_output_file : 'a.out'; 
 
     local($to_do) = "$lnkr $Verbose @Ld_flags $output @Link_file $TopClosureFile $libdirs @UserLibrary @SysLibrary";
     &run_something($to_do, 'Linker');
@@ -1431,7 +1434,7 @@ 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}
+# Generated by Glasgow Haskell, version ${ProjectVersion} ${ProjectPatchLevel}
 #
 \$pvm_executable      = '$pvm_executable';
 \$pvm_executable_base = '$pvm_executable_base';
@@ -1963,18 +1966,18 @@ sub makeHiMap {
     
     foreach $d ( @Import_dir ) {
        if ($HiIncludeString) { 
-          $HiIncludeString = "$HiIncludeString:${d}%.${HiSuffix}";
+          $HiIncludeString = "$HiIncludeString:${d}/%.${HiSuffix}";
        } else { 
-          $HiIncludeString = "$d%.${HiSuffix}"; 
+          $HiIncludeString = "$d/%.${HiSuffix}"; 
        }
 
     }
 
     foreach $d ( @SysImport_dir ) {
        if ($HiIncludeString) { 
-           $HiIncludeString = "$HiIncludeString:${d}%.${HiSuffix_prelude}";
+           $HiIncludeString = "$HiIncludeString:${d}/%.${HiSuffix_prelude}";
        } else { 
-           $HiIncludeString = "${d}%.${HiSuffix_prelude}";
+           $HiIncludeString = "${d}/%.${HiSuffix_prelude}";
         }
     }
 
@@ -2434,17 +2437,17 @@ sub add_syslib {
     local($syslib) = @_;
     
     unshift(@SysImport_dir,
-           ${INSTALLING} ? "$InstLibDir/imports/$syslib"
+           $INSTALLING ? "$InstLibDirGhc/imports/$syslib"
                          : "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib");
 
     push(@SysLibrary_dir,
-        ${INSTALLING} ? ("$InstLibDir")
+        $INSTALLING ? ("$InstLibDirGhc")
                        : ("$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib",
                          "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/$syslib/cbits"));
 
     push(@SysLibrary, "-lHS$syslib");
     push(@SysLibrary, "-lHS${syslib}_cbits")
-          unless $syslib eq 'contrib' || $syslib eq 'exts' || $syslib eg 'conc';
+          unless $syslib eq 'contrib' || $syslib eq 'exts' || $syslib eq 'conc';
          #HACK! they have no cbits
 }
 \end{code}
@@ -2579,7 +2582,7 @@ arg: while($_ = $Args[0]) {
     if (/^-\?$/ || /^--?help$/) { print $LongUsage; exit $Status; }
 
     #-----------version ----------------------------------------------------
-    /^--version$/   && do { print STDERR "${PROJECTNAME}, version ${PROJECTVERSION}, patchlevel ${PROJECTPATCHLEVEL}\n"; exit $Status; };
+    /^--version$/   && do { print STDERR "${ProjectName}, version ${ProjectVersion}, patchlevel ${ProjectPatchLevel}\n"; exit $Status; };
 
     #---------- verbosity and such -----------------------------------------
     /^-v$/         && do { $Verbose = '-v'; $Time = 'time'; next arg; };
@@ -2802,8 +2805,8 @@ arg: while($_ = $Args[0]) {
                            #
                            &add_syslib($syslib);
                            if ( $syslib eq 'posix' ) {
-                               &add_syslib('ghc');
-                           } elsif ( $syslib eq 'ghc' && 
+                               &add_syslib('misc');
+                           } elsif ( $syslib eq 'misc' && 
                                      $TargetName =~ /-solaris2$/ ) {
                                # needed for Berkeley socket/nwork stuff.
                                push(@SysLibrary, '-lnsl');