[project @ 2003-07-21 11:01:06 by simonmar]
[ghc-hetmet.git] / ghc / utils / stat2resid / stat2resid.prl
index f1b3c9e..bf0a262 100644 (file)
@@ -3,20 +3,22 @@
 #
 # Perl script expect bindings for the following variables to be prepended
 #
-#   TMPDIR SCRIPT_PATH
+#   DEFAULT_TMPDIR libdir
+#
+# without them, not much success :-(
 #
 
-$debug = 0;
+$debug = 0; # first line of script, builds confidence :-)
 $outsuffix = ".resid.ps";      # change as appropriate
 
 if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
     $tmpfile = $ENV{'TMPDIR'} . "/$$.resid.data";
 } else {
-    $tmpfile ="${TMPDIR}/$$.resid.data";
-    $ENV{'TMPDIR'} = ${TMPDIR}; # set the env var as well
+    $tmpfile ="${DEFAULT_TMPDIR}/$$.resid.data";
+    $ENV{'TMPDIR'} = ${DEFAULT_TMPDIR}; # set the env var as well
 }
 
-@INC = ( ${SCRIPT_PATH} );
+@INC = ( ${libdir} );
 
 require('parse-gcstats.prl')   || die "Can't load parse-gcstats.prl!\n";
 require('process-gcstats.prl') || die "Can't load process-gcstats.prl!\n";