[project @ 2003-08-20 15:10:22 by simonmar]
[ghc-hetmet.git] / ghc / utils / hstags / hstags.prl
index c7e137a..16e770b 100644 (file)
@@ -3,35 +3,37 @@
 # set:
 #
 #   INSTALLING
-#   TMPDIR
+#   DEFAULT_TMPDIR
 #   TOP_PWD
 #   libdir
-#   PROJECTVERSION
+#   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}"; # *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;
@@ -54,9 +56,8 @@ while ($ARGV[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 and friends.
 $HsP_opts .= ( $INSTALLING  ?