[project @ 1997-03-24 04:33:27 by sof]
authorsof <unknown>
Mon, 24 Mar 1997 04:33:30 +0000 (04:33 +0000)
committersof <unknown>
Mon, 24 Mar 1997 04:33:30 +0000 (04:33 +0000)
Final changes for 2.02

ghc/driver/Makefile
ghc/driver/ghc.lprl
ghc/driver/prefix.txt

index 0cb2cc8..f10f13f 100644 (file)
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.4 1997/03/20 22:31:03 sof Exp $
+# $Id: Makefile,v 1.5 1997/03/24 04:33:30 sof Exp $
 
 TOP=..
 CURRENT_DIR=ghc/driver
@@ -8,13 +8,12 @@ include $(TOP)/mk/boilerplate.mk
 #
 # The ways setup doesn't apply to the driver
 #
-WAYS=
+override WAYS=
 
 INSTALLING=0
 
 DYN_LOADABLE_BITS = \
        ghc-asm.prl \
-       ghc-recomp.prl \
        ghc-iface.prl \
        ghc-consist.prl \
        ghc-split.prl
@@ -46,7 +45,7 @@ SCRIPT_SUBST_VARS := \
   GHC_LIB_DIR GHC_RUNTIME_DIR GHC_UTILS_DIR GHC_INCLUDE_DIR \
   GHC_OPT_HILEV_ASM GhcWithNativeCodeGen LeadingUnderscore\
   GHC_UNLIT GHC_HSCPP GHC_HSC GHC_SYSMAN \
-  CP RM PERL CONTEXT_DIFF \
+  CP RM CONTEXT_DIFF \
   $(WAY_NAMES) $(WAY_OPTS)
 
 #
@@ -58,7 +57,7 @@ SCRIPT_SUBST_VARS := \
 ifeq "$(BIN_DIST)" "1"
 SCRIPT_PREFIX_FILES=prefix.txt
 else
-SCRIPT_SUBST_VARS += TOP_PWD INSTLIBDIR_GHC INSTDATADIR_GHC PERL
+SCRIPT_SUBST_VARS += libdir datadir bindir TOP_PWD
 endif
 
 all :: $(DYN_LOADABLE_BITS)
@@ -70,7 +69,7 @@ all :: $(DYN_LOADABLE_BITS)
 #
 # ToDo: allow different install name for driver?
 #
-INSTALL_PROGS += $(SCRIPT_PROG)
+INSTALL_SCRIPTS += $(SCRIPT_PROG)
 INSTALL_LIBS  += $(DYN_LOADABLE_BITS)
 
 #
@@ -108,7 +107,7 @@ install ::
 
 
 #
-# Option vars for the special ways
+# Option vars for the special ways (that the driver has special pleading for).
 #
 
 # Way p:
index 0962efb..7799001 100644 (file)
@@ -103,7 +103,7 @@ PROJECTNAME PROJECTVERSION PROJECTPATCHLEVEL
 
 TOP_PWD
 
-INSTLIBDIR_GHC INSTDATADIR_GHC
+bindir libdir datadir
 
 CURRENT_DIR TMPDIR
 
@@ -129,41 +129,11 @@ select(STDERR); $| = 1; select(STDOUT); # no STDERR buffering, please.
 
 $TargetPlatform = $TARGETPLATFORM;
 
-#------------------------------------------------------------------------
-# If you are adjusting paths by hand for a binary GHC distribution,
-# de-commenting the line to set GLASGOW_HASKELL_ROOT should do.
-# Or you can leave it as is, and set the environment variable externally.
-#------------------------------------------------------------------------
-# $ENV{'GLASGOW_HASKELL_ROOT'} = '/some/absolute/path/name';
-
-if (! $ENV{'GLASGOW_HASKELL_ROOT'}) { # good -- death to environment variables
-    $TopPwd        = ${TOP_PWD};
-    $InstLibDirGhc  = ${INSTLIBDIR_GHC};
-    $InstDataDirGhc = ${INSTDATADIR_GHC};
-} else {
-    $TopPwd = $ENV{'GLASGOW_HASKELL_ROOT'};
-
-    if (${INSTLIBDIR_GHC} =~ /.*(\/lib\/ghc\/\d\.\d\d\/[^-]+-[^-]+-[^-]+\/.*)/) {
-       $InstLibDirGhc  = $ENV{'GLASGOW_HASKELL_ROOT'} . $1;
-    } else {
-       print STDERR "GLASGOW_HASKELL_ROOT environment variable is set;\nBut can't untangle $INSTLIBDIR_GHC.\n(Installation error)\n";
-       exit(1);
-    }
-
-    if (${INSTDATADIR_GHC} =~ /.*(\/lib\/ghc\/\d\.\d\d\/.*)/) {
-       $InstDataDirGhc = $ENV{'GLASGOW_HASKELL_ROOT'} . $2;
-    } else {
-       print STDERR "GLASGOW_HASKELL_ROOT environment variable is set;\nBut can't untangle $INSTDATADIR_GHC.\n(Installation error)\n";
-       exit(1);
-    }
-}
-
-if ( $INSTALLING ) {
-    $InstSysLibDir  = $InstDataDirGhc;
-    $InstSysLibDir  =~ s/\/ghc\//\/hslibs\//;
-} else {
-    $InstSysLibDir  = "$TopPwd/hslibs";
-}
+$TopPwd                = "${TOP_PWD}";
+$InstBinDirGhc  = "${bindir}";
+$InstLibDirGhc  = "${libdir}";
+$InstDataDirGhc = "${datadir}";
+$InstSysLibDir  = ( $INSTALLING ) ? "${InstLibDirGhc}/hslibs" : "$TopPwd/hslibs";
 
 $Status  = 0; # just used for exit() status
 $Verbose = '';
@@ -427,7 +397,7 @@ require special handling.
 
 # where to look for interface files (system hi's, i.e., prelude and hslibs)
 @SysImport_dir = ( $INSTALLING )
-                   ? ( "$InstDataDirGhc/imports" )
+                   ? ( "$InstLibDirGhc/imports" )
                    : ( "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/required"
                      , "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/ghc"
                      , "$TopPwd/$CURRENT_DIR/$GHC_LIB_DIR/glaExts"
@@ -459,7 +429,7 @@ $TopClosureFile # defaults to 1.2 one; will be mangled later
 
 # make depend for Haskell
 $MkDependHS
-       = ( $INSTALLING ) ? "$InstLibDirGhc/mkdependHS"
+       = ( $INSTALLING ) ? "$InstBinDirGhc/mkdependHS"
                          : "$TopPwd/$CURRENT_DIR/$GHC_UTILS_DIR/mkdependHS/mkdependHS";
 # Fill in later
 @MkDependHS_flags = ( );
@@ -527,7 +497,8 @@ $PostprocessCcOutput = 0;
 $HaveNativeCodeGen = $GhcWithNativeCodeGen;
 $HscOut = '-C='; # '-C=' ==> .hc output; '-S=' ==> .s output; '-N=' ==> neither
 $HscOut = '-S='
-    if $HaveNativeCodeGen && $TargetPlatform =~ /^(i386|alpha|sparc)-/;
+    if $HaveNativeCodeGen && $TargetPlatform =~ /^(alpha|sparc)-/;
+# TEMP: disable x86  if $HaveNativeCodeGen && $TargetPlatform =~ /^(i386|alpha|sparc)-/;
 $ProduceHi   = '-hifile=';
 $HiOnStdout  = 0;
 $HiDiff_flag = '';
@@ -1256,7 +1227,7 @@ sub setupIncPaths {
       push (@Include_dir, "$TopPwd/${CURRENT_DIR}/${GHC_INCLUDE_DIR}");
   } else {
       push (@Include_dir, "$InstLibDirGhc/includes");
-      push (@Include_dir, "$InstDataDirGhc/includes");
+      push (@Include_dir, "$InstLibDirGhc/includes");
   }
 } # end of setupIncPaths
 \end{code}
@@ -1357,7 +1328,7 @@ if ($#Input_file < 0 && $#Link_file < 0) {
 
 Tell the world who we are, if they asked.
 \begin{code}
-print STDERR "${PROJECTNAME}, version ${PROJECTVERSION} ${PROJECTPATCHLEVEL}\n"
+print STDERR "${PROJECTNAME}, version ${PROJECTVERSION}, patchlevel ${PROJECTPATCHLEVEL}\n"
     if $Verbose;
 \end{code}
 
@@ -2515,7 +2486,7 @@ arg: while($_ = $Args[0]) {
     if (/^-\?$/ || /^--?help$/) { print $LongUsage; exit $Status; }
 
     #-----------version ----------------------------------------------------
-    /^--version$/   && do { print STDERR "${PROJECTNAME}, version ${PROJECTVERSION} ${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; };
@@ -2558,7 +2529,7 @@ arg: while($_ = $Args[0]) {
        
     /^-c$/         && do { $Do_lnkr = 0; next arg; };
     # stop after generating .o files
-       
+
     /^-link-chk$/    && do { $LinkChk = 1; next arg; };
     /^-no-link-chk$/ && do { $LinkChk = 0; next arg; };
     # don't do consistency-checking after a link
@@ -2733,7 +2704,7 @@ arg: while($_ = $Args[0]) {
 
                            if ( ${INSTALLING} ) {
                                push(@SysLibrary_dir,
-                                       ("$InstSysLibDir/$TargetPlatform"));
+                                       ("$InstSysLibDir"));
                            } else {
                                push(@SysLibrary_dir,
                                        ("$TopPwd/hslibs/$syslib"
index 2ca01d1..a63e8c9 100644 (file)
@@ -1,12 +1,16 @@
 #
-# This is the driver script for the Glasgow Haskell Compiler.
+# This is the driver script for the Glasgow Haskell Compiler!
 #
 # To configure this script to run on your system, you have
 # to set the following three variables (if they have not already
 # been set above):
 #
-#$TOP_PWD='/local/fp/';
-#$INSTLIBDIR_GHC='/local/fp/bin/ghc-2.02';
-#$INSTDATADIR_GHC='/local/fp/lib/ghc-2.02/sparc-sun-sunos4';
-#$PERL='/usr/local/bin/perl';
+#$bindir='/usr/local/bin'; 
+#   -- where you have installed the binaries
+#$libdir='/local/fp/lib/sparc-sun-sunos4/ghc-2.02'; 
+#   -- where you have installed the prelude libraries for this release.
+#$datadir='/local/fp/share0/ghc-2.02';
+#   -- where you have installed the arch-independent miscellania (if any).
+#
+# We sincerly apologise for the gumpf that follows, please look away.
 #