Index: configure.php
===================================================================
RCS file: /repository/phpdoc/configure.php,v
retrieving revision 1.45
diff -u -u -r1.45 configure.php
--- configure.php	18 Feb 2008 14:22:34 -0000	1.45
+++ configure.php	28 Feb 2008 16:28:05 -0000
@@ -204,9 +204,7 @@
     libxml_clear_errors();
 } // }}}
 
-$s_CurLoc = getcwd();
-chdir(dirname(__FILE__));
-$srcdir = '.';
+$srcdir = dirname(__FILE__);
 
 // Settings {{{
 $cygwin_php_bat = "{$srcdir}/../phpdoc-tools/php.bat";
@@ -351,7 +349,6 @@
 if (!file_exists($ac['srcdir']) || !is_dir($ac['srcdir']) || !is_writable($ac['srcdir'])) {
     checkerror("Source directory doesn't exist or can't be written to.");
 }
-$ac['srcdir'] = abspath($ac['srcdir']);
 $ac['SRCDIR'] = $ac['srcdir'];
 $ac['WORKDIR'] = $ac['srcdir'];
 checkvalue($ac['srcdir']);
@@ -539,7 +536,6 @@
     $dom->save($filename);
     echo "done.\n";
     echo "Partial manual saved to {$filename}. To build it, run 'phd -d{$filename}'\n";
-    chdir($s_CurLoc);
     exit(0);
 } // }}} 
 
@@ -553,7 +549,6 @@
     echo "done.\n";
     echo "All you have to do now is run 'phd -d{$mxml}'\n";
     echo "If the script hangs here, you can abort with ^C. (Run `nice php configure.php` next time!)\n";
-    chdir($s_CurLoc);
     exit(0); // Tell the shell that this script finished successfully.
 } else {
     echo "failed.\n";
@@ -580,5 +575,4 @@
 
     errors_are_bad(1); // Tell the shell that this script finished with an error.
 }
-chdir($s_CurLoc);
-?>
+?>
\ No newline at end of file
Index: manual.xml.in
===================================================================
RCS file: /repository/phpdoc/manual.xml.in,v
retrieving revision 1.233
diff -u -u -r1.233 manual.xml.in
--- manual.xml.in	19 Feb 2008 21:45:31 -0000	1.233
+++ manual.xml.in	28 Feb 2008 14:35:25 -0000
@@ -1,48 +1,48 @@
 <?xml version='1.0' encoding='@ENCODING@' ?>
 <!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN"
-"@srcdir@/docbook/docbook-xml/docbook.dtd" [
+"./docbook/docbook-xml/docbook.dtd" [
 
 <!-- $Revision: 1.233 $ -->
 <!-- We use xhtml entities all over the place -->
-<!ENTITY % xhtml-lat1        SYSTEM "@srcdir@/entities/ISO/xhtml1-lat1.ent">
-<!ENTITY % xhtml-symbol      SYSTEM "@srcdir@/entities/ISO/xhtml1-symbol.ent">
-<!ENTITY % xhtml-special     SYSTEM "@srcdir@/entities/ISO/xhtml1-special.ent">
-<!ENTITY % isopub            SYSTEM "@srcdir@/entities/ISO/isopub.ent">
+<!ENTITY % xhtml-lat1        SYSTEM "./entities/ISO/xhtml1-lat1.ent">
+<!ENTITY % xhtml-symbol      SYSTEM "./entities/ISO/xhtml1-symbol.ent">
+<!ENTITY % xhtml-special     SYSTEM "./entities/ISO/xhtml1-special.ent">
+<!ENTITY % isopub            SYSTEM "./entities/ISO/isopub.ent">
 %xhtml-lat1;
 %xhtml-symbol;
 %xhtml-special;
 %isopub;
 
 <!-- Add translated specific definitions and snippets -->
-<!ENTITY % language-defs     SYSTEM "@srcdir@/@LANGDIR@/language-defs.ent">
-<!ENTITY % language-snippets SYSTEM "@srcdir@/@LANGDIR@/language-snippets.ent">
-<!ENTITY % extensions        SYSTEM "@srcdir@/@LANGDIR@/extensions.ent">
+<!ENTITY % language-defs     SYSTEM "./@LANGDIR@/language-defs.ent">
+<!ENTITY % language-snippets SYSTEM "./@LANGDIR@/language-snippets.ent">
+<!ENTITY % extensions        SYSTEM "./@LANGDIR@/extensions.ent">
 
 %language-defs;
 %extensions;
 %language-snippets;
 
 <!-- Fallback to English definitions and snippets (in case of missing translation) -->
-<!ENTITY % language-defs.default     SYSTEM "@srcdir@/en/language-defs.ent">
-<!ENTITY % language-snippets.default SYSTEM "@srcdir@/en/language-snippets.ent">
-<!ENTITY % extensions.default        SYSTEM "@srcdir@/en/extensions.ent">
+<!ENTITY % language-defs.default     SYSTEM "./en/language-defs.ent">
+<!ENTITY % language-snippets.default SYSTEM "./en/language-snippets.ent">
+<!ENTITY % extensions.default        SYSTEM "./en/extensions.ent">
 
 %language-defs.default;
 %extensions.default;
 %language-snippets.default;
 
 <!-- phpweb entities - autogenerated! -->
-<!ENTITY % phpweb.entities  SYSTEM "@srcdir@/entities/phpweb.ent">
+<!ENTITY % phpweb.entities  SYSTEM "./entities/phpweb.ent">
 
 %phpweb.entities;
 
 <!-- All global entities for the XML files -->
-<!ENTITY % global.entities  SYSTEM "@srcdir@/entities/global.ent">
+<!ENTITY % global.entities  SYSTEM "./entities/global.ent">
 
 <!-- These are language independent -->
-<!ENTITY % frontpage.entities SYSTEM "@srcdir@/en/contributors.ent">
-<!ENTITY % build.version      SYSTEM "@srcdir@/entities/version.ent">
-<!ENTITY % file.entities      SYSTEM "@srcdir@/entities/file-entities.ent">
+<!ENTITY % frontpage.entities SYSTEM "./en/contributors.ent">
+<!ENTITY % build.version      SYSTEM "./entities/version.ent">
+<!ENTITY % file.entities      SYSTEM "./entities/file-entities.ent">
 
 <!-- Include all external DTD parts defined previously -->
 %global.entities;
@@ -51,10 +51,10 @@
 %frontpage.entities;
 
 <!-- Autogenerated missing entites and IDs to make build work -->
-<!ENTITY % missing-entities  SYSTEM "@srcdir@/entities/missing-entities.ent">
+<!ENTITY % missing-entities  SYSTEM "./entities/missing-entities.ent">
 %missing-entities;
 
-<!ENTITY missing-ids SYSTEM "entities/missing-ids.xml">
+<!ENTITY missing-ids SYSTEM "./entities/missing-ids.xml">
 ]>
  
 <set xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="index" xml:lang="@LANG@" xmlns:xlink="http://www.w3.org/1999/xlink">
Index: scripts/file-entities.php.in
===================================================================
RCS file: /repository/phpdoc/scripts/file-entities.php.in,v
retrieving revision 1.53
diff -u -u -r1.53 file-entities.php.in
--- scripts/file-entities.php.in	29 Feb 2008 16:51:20 -0000	1.53
+++ scripts/file-entities.php.in	29 Feb 2008 16:54:19 -0000
@@ -384,8 +384,8 @@
     if ($filename == "") {
         return sprintf("<!ENTITY %-40s        ''>\n", $entname);
     } else {
-        return sprintf("<!ENTITY %-40s SYSTEM '%s'>\n", $entname, get_relative_f(file2jade($filename)));
-    }
+        return sprintf("<!ENTITY %-40s SYSTEM '%s'>\n", $entname, str_replace(str_replace("\\", "/", $GLOBALS['out_dir']), '..', str_replace("\\", "/", $filename)));
+   }
 }
 
 /*

