#-----------------------------------------------------------------------------
-# $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
#
# 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
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)
#
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)
#
# ToDo: allow different install name for driver?
#
-INSTALL_PROGS += $(SCRIPT_PROG)
+INSTALL_SCRIPTS += $(SCRIPT_PROG)
INSTALL_LIBS += $(DYN_LOADABLE_BITS)
#
#
-# Option vars for the special ways
+# Option vars for the special ways (that the driver has special pleading for).
#
# Way p:
TOP_PWD
-INSTLIBDIR_GHC INSTDATADIR_GHC
+bindir libdir datadir
CURRENT_DIR TMPDIR
$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 = '';
# 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"
# make depend for Haskell
$MkDependHS
- = ( $INSTALLING ) ? "$InstLibDirGhc/mkdependHS"
+ = ( $INSTALLING ) ? "$InstBinDirGhc/mkdependHS"
: "$TopPwd/$CURRENT_DIR/$GHC_UTILS_DIR/mkdependHS/mkdependHS";
# Fill in later
@MkDependHS_flags = ( );
$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 = '';
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}
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}
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; };
/^-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
if ( ${INSTALLING} ) {
push(@SysLibrary_dir,
- ("$InstSysLibDir/$TargetPlatform"));
+ ("$InstSysLibDir"));
} else {
push(@SysLibrary_dir,
("$TopPwd/hslibs/$syslib"
#
-# 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.
#