[win32] tweaks to win32 makefiles. This version builds and passes all
[p5sagit/p5-mst-13.2.git] / win32 / config_h.PL
index 98b474a..f317e5a 100644 (file)
@@ -27,6 +27,7 @@ eval $str;
 die "$str:$@" if $@;
 
 open(H,">$file.new") || die "Cannot open $file.new:$!";
+binmode H;             # no CRs (which cause a spurious rebuild)
 while (<SH>)
  {
   last if /^$term$/o;
@@ -37,14 +38,23 @@ while (<SH>)
   s#/[ *\*]*\*/#/**/#;
   if (/^\s*#define\s+ARCHLIB_EXP/)
    {
-     $_ = "#define ARCHLIB_EXP (win32PerlLibPath())\t/**/\n";
+     $_ = "#define ARCHLIB_EXP (win32_perllib_path(ARCHNAME,NULL))\t/**/\n";
+   }
+  if (/^\s*#define\s+PRIVLIB_EXP/)
+   {
+     $_ = "#define PRIVLIB_EXP (win32_perllib_path(NULL))\t/**/\n"
+   }
+  if (/^\s*#define\s+SITEARCH_EXP/)
+   {
+     $_ = "#define SITEARCH_EXP (win32_perllib_path(\"site\",ARCHNAME,NULL))\t/**/\n";
+   }
+  if (/^\s*#define\s+SITELIB_EXP/)
+   {
+     $_ = "#define SITELIB_EXP (win32_perllib_path(\"site\",NULL))\t/**/\n";
    }
   print H;
  }
 print H "#include <win32.h>
-#ifndef DEBUGGING
-#define DEBUGGING
-#endif
 ";
 close(H);
 close(SH);
@@ -60,7 +70,7 @@ if (compare("$file.new",$file))
   chmod(0666,$file);
   unlink($file);
   rename("$file.new",$file);
-  chmod(0444,$file);
+  #chmod(0444,$file);
   exit(1);
  }