# set:
#
# INSTALLING
-# TMPDIR
+# DEFAULT_TMPDIR
# TOP_PWD
-# INSTLIBDIR_GHC
-# INSTDATADIR_GHC
-# PROJECTVERSION
+# libdir
+# libexecdir
+# ProjectVersionInt
# HSP_IMPORTS
if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
$tmp = $ENV{'TMPDIR'} . "/$$.eht";
} else {
- $tmp ="${TMPDIR}/$$.eht";
- $ENV{'TMPDIR'} = ${TMPDIR}; # set the env var as well
+ $tmp ="${DEFAULT_TMPDIR}/$$.eht";
+ $ENV{'TMPDIR'} = ${DEFAULT_TMPDIR}; # set the env var as well
}
-$TopPwd = "${TOP_PWD}";
-$InstLibDirGhc = "${INSTLIBDIR_GHC}";
+$TopPwd = "${TOP_PWD}"; # *Only* needed when using it in-situ (i.e., INSTALLING=0).
+$InstLibDirGhc = "${libdir}";
+$InstLibExecDirGhc = "${libexecdir}";
$Unlit = ( $INSTALLING ?
- "${InstLibDirGhc}/unlit" :
+ "${InstLibExecDirGhc}/unlit" :
"${TopPwd}/ghc/utils/unlit/unlit" );
# but this is re-set to "cat" (after options) if -cpp not seen
$HsCpp = ( $INSTALLING ?
"${InstLibDirGhc}/hscpp" :
"${TopPwd}/ghc/utils/hscpp/hscpp" );
$HsP = ( $INSTALLING ?
- "${InstLibDirGhc}/hsp" :
+ "${InstLibExecDirGhc}/hsp" :
"${TopPwd}/ghc/compiler/hsp" );
$HsTagsHelp =
( $INSTALLING ?
- "${InstLibDirGhc}/hstags-help" :
+ "${InstLibExecDirGhc}/hstags-help" :
"${TopPwd}/ghc/utils/hstags/hstags-help" );
$Verbose = 0;
push(@Files, $_);
}
-$ghc_version_info = int(${PROJECTVERSION} * 100);
$DoHsCpp = ( ! $DoCpp ) ? 'cat'
- : "$HsCpp -D__HASKELL1__=2 -D__GLASGOW_HASKELL__=$ghc_version_info $Cpp_opts";
+ : "$HsCpp -D__HASKELL1__=2 -D__GLASGOW_HASKELL__=$ProjectVersionInt $Cpp_opts";
-# to find Prelude.hi
+# to find Prelude.hi and friends.
$HsP_opts .= ( $INSTALLING ?
"-J${InstLibDirGhc}/imports" :
( '-J' . join(' -J',split(/:/,${HSP_IMPORTS})) ));