momo Wed Mar 19 04:36:49 2003 EDT
Modified files:
/phpdoc/scripts file-entities.php.in
Log:
the right fix. i forked the $out_dir into $script_out_dir using for inscript tasks.
Index: phpdoc/scripts/file-entities.php.in
diff -u phpdoc/scripts/file-entities.php.in:1.9
phpdoc/scripts/file-entities.php.in:1.10
--- phpdoc/scripts/file-entities.php.in:1.9 Wed Mar 19 04:14:04 2003
+++ phpdoc/scripts/file-entities.php.in Wed Mar 19 04:36:48 2003
@@ -17,7 +17,7 @@
# | Gabor Hojtsy <[EMAIL PROTECTED]> |
# +----------------------------------------------------------------------+
#
-# $Id: file-entities.php.in,v 1.9 2003/03/19 09:14:04 momo Exp $
+# $Id: file-entities.php.in,v 1.10 2003/03/19 09:36:48 momo Exp $
*/
/**
@@ -50,22 +50,23 @@
// XSL sheets are used or not (either "yes" or "no")
$xsl_sheet_used = ("@DOCBOOKXSL_USED@" == "yes" ? TRUE : FALSE);
+
// when php complied on cygwin, the working path have to be /cygdrive..
-// the below preg_replace have to be done only using binary php complied on MSVC:
+// the below preg_replace have to be done only using binary php complied on MSVC.
+// let's find if php was complied by cygwin:
ob_start();
phpinfo(1);
$tmp = ob_get_contents();
ob_end_clean();
$cygwin_complied = eregi("CYGWIN",$tmp) ? true : false;
-
-$ppath = (0&&$cygwin_complied)
- ? "@WORKDIR@"
- : preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", "@WORKDIR@");
-
+
// The output directory, which we need to parse for windows specific
// things, and correct all problems is needed.
// Also use absolute path to have meaningful error messages
-$out_dir = abs_path($ppath);
+$out_dir = abs_path(preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", "@WORKDIR@"));
+
+// this path if used for saving the ent file:
+$script_out_dir = $cygwin_complied ? "@WORKDIR@" : $out_dir;
// The source directory is passed in the 5th argument counting from backwards.
$srcdir = abs_path("@SRCDIR@");
@@ -84,9 +85,9 @@
file_entities($orig_dir, $trans_dir, $orig_dir, $entities);
// Open file for appending and write out all entitities
-$fp = fopen("$out_dir/entities/file-entities.ent", "w");
+$fp = fopen("$script_out_dir/entities/file-entities.ent", "w");
if (!$fp) {
- die("ERROR: Failed to open $out_dir/entities/file-entities.ent for writing\n");
+ die("ERROR: Failed to open $script_out_dir/entities/file-entities.ent for
writing\n");
}
echo "\ncreating entities/file-entities.ent...\n";
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php