goba            Sun Apr  3 16:56:09 2005 EDT

  Modified files:              
    /phpdoc     configure.in 
    /phpdoc/scripts     file-entities.php.in 
  Log:
  idetify windows jade usage and act on that
  
http://cvs.php.net/diff.php/phpdoc/configure.in?r1=1.226&r2=1.227&ty=u
Index: phpdoc/configure.in
diff -u phpdoc/configure.in:1.226 phpdoc/configure.in:1.227
--- phpdoc/configure.in:1.226   Sun Apr  3 07:49:18 2005
+++ phpdoc/configure.in Sun Apr  3 16:56:08 2005
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.226 2005/04/03 11:49:18 techtonik Exp $
+dnl $Id: configure.in,v 1.227 2005/04/03 20:56:08 goba Exp $
 
 dnl autoconf initialisation
 AC_INIT()
@@ -150,7 +150,13 @@
 if test $JADE = "no"; then
   AC_MSG_ERROR([can't find jade or openjade])
 fi
+if test ${JADE:0:15} = "../phpdoc-tools"; then
+  WINJADE=1
+else
+  WINJADE=0
+fi
 AC_SUBST(JADE)
+AC_SUBST(WINJADE)
 
 dnl }}}
 
http://cvs.php.net/diff.php/phpdoc/scripts/file-entities.php.in?r1=1.35&r2=1.36&ty=u
Index: phpdoc/scripts/file-entities.php.in
diff -u phpdoc/scripts/file-entities.php.in:1.35 
phpdoc/scripts/file-entities.php.in:1.36
--- phpdoc/scripts/file-entities.php.in:1.35    Sun Apr  3 14:47:41 2005
+++ phpdoc/scripts/file-entities.php.in Sun Apr  3 16:56:09 2005
@@ -17,7 +17,7 @@
   |             Gabor Hojtsy <[EMAIL PROTECTED]>                              |
   +----------------------------------------------------------------------+
   
-  $Id: file-entities.php.in,v 1.35 2005/04/03 18:47:41 goba Exp $
+  $Id: file-entities.php.in,v 1.36 2005/04/03 20:56:09 goba Exp $
 */
 
 /**
@@ -50,8 +50,9 @@
 // Zend API integration info (either a path or "not found")
 $zendapi = ("@ZENDAPI@" == "not found" ? FALSE : "@ZENDAPI@");
 
-// If PHP is compiled on Cygwin, the working path have to start with /cygdrive.
-$cygwin_compiled = eregi("CYGWIN",php_uname()) ? true : false;
+// If Jade is used on Windows outside Cygwin, it
+// needs Windows like path values later on
+$windows_jade = ((bool) @WINJADE@);
     
 // The output directory, which we need to parse for windows specific
 // things, and correct all problems is needed.
@@ -59,7 +60,7 @@
 $out_dir = abs_path(strip_cygdrive("@WORKDIR@"));
 
 // this path if used for saving the ent file:
-$script_out_dir = $cygwin_compiled ? "@WORKDIR@" : $out_dir;
+$script_out_dir = $windows_jade ? $out_dir : "@WORKDIR@";
 
 // The documentation source directory 
 $srcdir = abs_path("@SRCDIR@");
@@ -428,12 +429,9 @@
  * @return string windows style path
  */
 function strip_cygdrive($path){
-    global $cygwin_compiled;
-
-    if ($cygwin_compiled) {
+    if (!$GLOBALS['windows_jade']) {
         return $path;
     }
-
     return preg_replace(array('!^/cygdrive/(\w)/!', '@^/home/.+$@'), 
array('\1:/', strtr(dirname(dirname(__FILE__)), '\\', '/')), $path);
 }
 

Reply via email to