[project @ 1998-03-16 20:23:24 by sof]
[ghc-hetmet.git] / ghc / driver / ghc.lprl
index 0c0cb1e..d45062b 100644 (file)
@@ -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  = $ProjectVersionInt
+$GhcVersionInfo  = $ProjectVersionInt;
 $Haskell1Version = 4; # i.e., Haskell 1.4
 @Cpp_define     = ();
 
@@ -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');
@@ -2434,11 +2437,11 @@ 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"));
 
@@ -2831,6 +2834,7 @@ arg: while($_ = $Args[0]) {
     /^-optP(.*)$/   && do { push(@HsCpp_flags,      $1); next arg; };
     /^-optCrts(.*)$/&& do { push(@HsC_rts_flags,    $1); next arg; };
     /^-optC(.*)$/   && do { push(@HsC_flags,        $1); next arg; };
+    /^-optp(.*)$/   && do { push(@HsP_flags,        $1); next arg; };
     /^-optcpp(.*)$/ && do { push(@Cpp_define,       $1); $Only_preprocess_hc = ($1 eq "-E"); next arg; };
     /^-optc(.*)$/   && do { push(@CcBoth_flags,     $1); next arg; };
     /^-opta(.*)$/   && do { push(@As_flags,         $1); next arg; };