svn: /phpdoc/doc-base/trunk/ configure.php manual.xml.in scripts/file-entities.php.in
| From: | Greg Beaver | Date: | Fri, 24 Jul 2009 21:10:51 +0000 |
| Subject: | svn: /phpdoc/doc-base/trunk/ configure.php manual.xml.in scripts/file-entities.php.in | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4510@lists.php.net to get a copy of this message | ||
cellog Fri, 24 Jul 2009 21:10:51 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=284721
Log:
allow building .manual.xml within a sparse checkout - phd needs fixes to find images in a sparse
checkout
Changed paths:
U phpdoc/doc-base/trunk/configure.php
U phpdoc/doc-base/trunk/manual.xml.in
U phpdoc/doc-base/trunk/scripts/file-entities.php.in
Modified: phpdoc/doc-base/trunk/configure.php
===================================================================
--- phpdoc/doc-base/trunk/configure.php 2009-07-24 21:06:10 UTC (rev 284720)
+++ phpdoc/doc-base/trunk/configure.php 2009-07-24 21:10:51 UTC (rev 284721)
@@ -221,6 +221,9 @@
$workdir = $srcdir;
$basedir = $srcdir;
$rootdir = dirname($basedir);
+if (basename($rootdir) == 'doc-base') {
+ $rootdir = dirname($rootdir);
+}
// Settings {{{
$cygwin_php_bat = "{$srcdir}/../phpdoc-tools/php.bat";
@@ -424,11 +427,20 @@
checking("whether the language is supported");
$LANGDIR = "{$ac['rootdir']}/{$ac['LANG']}";
+if (file_exists("{$LANGDIR}/trunk")) {
+ $LANGDIR .= '/trunk';
+}
if (!file_exists($LANGDIR) || !is_readable($LANGDIR)) {
checkerror("No language directory found.");
}
$ac['LANGDIR'] = basename($LANGDIR);
+if ($ac['LANGDIR'] == 'trunk') {
+ $ac['LANGDIR'] = '../' . basename(dirname($LANGDIR)) . '/trunk';
+ $ac['EN_DIR'] = '../en/trunk';
+} else {
+ $ac['EN_DIR'] = 'en';
+}
checkvalue("yes");
checking("for partial build");
@@ -478,7 +490,12 @@
echo "Iterating over extension specific version files... ";
- foreach(glob("{$ac['rootdir']}/en/*/*/versions.xml") as $file) {
+ if (file_exists($ac['rootdir'] . '/en/trunk')) {
+ $globdir = $ac['rootdir'] . '/en/trunk';
+ } else {
+ $globdir = $ac['rootdir'] . '/en';
+ }
+ foreach(glob("$globdir/*/*/versions.xml") as $file) {
if($tmp->load($file)) {
foreach($tmp->getElementsByTagName("function") as $function) {
$function = $dom->importNode($function, true);
Modified: phpdoc/doc-base/trunk/manual.xml.in
===================================================================
--- phpdoc/doc-base/trunk/manual.xml.in 2009-07-24 21:06:10 UTC (rev 284720)
+++ phpdoc/doc-base/trunk/manual.xml.in 2009-07-24 21:10:51 UTC (rev 284721)
@@ -23,9 +23,9 @@
%language-snippets;
<!-- Fallback to English definitions and snippets (in case of missing translation) -->
-<!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">
+<!ENTITY % language-defs.default SYSTEM "../@EN_DIR@/language-defs.ent">
+<!ENTITY % language-snippets.default SYSTEM "../@EN_DIR@/language-snippets.ent">
+<!ENTITY % extensions.default SYSTEM "../@EN_DIR@/extensions.ent">
%language-defs.default;
%extensions.default;
@@ -35,7 +35,7 @@
<!ENTITY % global.entities SYSTEM "./entities/global.ent">
<!-- These are language independent -->
-<!ENTITY % frontpage.entities SYSTEM "../en/contributors.ent">
+<!ENTITY % frontpage.entities SYSTEM "../@EN_DIR@/contributors.ent">
<!ENTITY % build.version SYSTEM "./entities/version.ent">
<!ENTITY % file.entities SYSTEM "./entities/file-entities.ent">
Modified: phpdoc/doc-base/trunk/scripts/file-entities.php.in
===================================================================
--- phpdoc/doc-base/trunk/scripts/file-entities.php.in 2009-07-24 21:06:10 UTC (rev 284720)
+++ phpdoc/doc-base/trunk/scripts/file-entities.php.in 2009-07-24 21:10:51 UTC (rev 284721)
@@ -284,10 +284,14 @@
function fname2entname($fname, $prefix=false)
{
$ent = str_replace("_", "-", str_replace("/", ".",
$fname));
- if ($prefix && !strstr($ent, $prefix)) {
- $ent = "$prefix.$ent";
- }
- return $ent;
+ if ($prefix && !strstr($ent, $prefix)) {
+ $ent = "$prefix.$ent";
+ }
+ // If we are running out of a sparse checkout, don't put "trunk" in entity
+ if (substr($ent, 0, 5) == 'trunk') {
+ $ent = substr($ent, 6);
+ }
+ return $ent;
}
/**