svn: phpdoc/doc-base/trunk/
| From: | Philip Olson | Date: | Tue, 14 Jul 2009 03:14:26 +0000 |
| Subject: | svn: phpdoc/doc-base/trunk/ | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4439@lists.php.net to get a copy of this message | ||
philip Tue, 14 Jul 2009 03:14:26 +0000
URL: http://svn.php.net/viewvc?view=revision&revision=284049
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
Log:
Fixed build for our CVS->SVN change, and added root/base dir configure options
Modified: phpdoc/doc-base/trunk/configure.php
===================================================================
--- phpdoc/doc-base/trunk/configure.php 2009-07-14 03:02:46 UTC (rev 284048)
+++ phpdoc/doc-base/trunk/configure.php 2009-07-14 03:14:26 UTC (rev 284049)
@@ -44,6 +44,8 @@
-V, --version Display version information and exit
-q, --quiet, --silent Do not print `checking...' messages
--srcdir=DIR Find the sources in DIR [configure dir or `.']
+ --basedir Doc-base directory [{$acd['BASEDIR']}]
+ --rootdir Root directory of SVN Doc checkouts [{$acd['ROOTDIR']})
Package-specific:
--enable-force-dom-save Force .manual.xml to be saved in a full build even
@@ -215,7 +217,10 @@
libxml_clear_errors();
} // }}}
-$srcdir = dirname(__FILE__);
+$srcdir = dirname(__FILE__);
+$workdir = $srcdir;
+$basedir = $srcdir;
+$rootdir = dirname($basedir);
// Settings {{{
$cygwin_php_bat = "{$srcdir}/../phpdoc-tools/php.bat";
@@ -234,15 +239,20 @@
$acd = array( // {{{
'srcdir' => $srcdir,
+ 'basedir' => $basedir,
+ 'rootdir' => $rootdir,
+ 'workdir' => $workdir,
'quiet' => 'no',
'WORKDIR' => $srcdir,
'SRCDIR' => $srcdir,
+ 'BASEDIR' => $basedir,
+ 'ROOTDIR' => $rootdir,
'PHP' => '',
'CHMENABLED' => 'no',
'CHMONLY_INCL_BEGIN' => '<!--',
'CHMONLY_INCL_END' => '-->',
'LANG' => 'en',
- 'LANGDIR' => "{$srcdir}/en",
+ 'LANGDIR' => "{$rootdir}/en",
'PHP_BUILD_DATE' => date('Y-m-d'),
'ENCODING' => 'utf-8',
'FORCE_DOM_SAVE' => 'no',
@@ -351,6 +361,14 @@
case 'howto':
$ac['HOWTO'] =$v;
break;
+
+ case 'rootdir':
+ $ac['rootdir'] = $v;
+ break;
+
+ case 'basedir':
+ $ac['basedir'] = $v;
+ break;
case 'broken-file-listing':
$ac['USE_BROKEN_TRANSLATION_FILENAME'] = $v;
@@ -367,6 +385,8 @@
}
$ac['SRCDIR'] = $ac['srcdir'];
$ac['WORKDIR'] = $ac['srcdir'];
+$ac['ROOTDIR'] = $ac['rootdir'];
+$ac['BASEDIR'] = $ac['basedir'];
checkvalue($ac['srcdir']);
checking('whether to save an invalid .manual.xml');
@@ -403,7 +423,7 @@
checkvalue($ac['LANG']);
checking("whether the language is supported");
-$LANGDIR = "{$ac['srcdir']}/{$ac['LANG']}";
+$LANGDIR = "{$ac['rootdir']}/{$ac['LANG']}";
if (!file_exists($LANGDIR) || !is_readable($LANGDIR)) {
checkerror("No language directory found.");
}
@@ -427,7 +447,7 @@
);
foreach ($infiles as $in) {
- $in = chop("{$ac['srcdir']}/{$in}");
+ $in = chop("{$ac['basedir']}/{$in}");
$out = substr($in, 0, -3);
echo "Generating {$out}... ";
@@ -508,11 +528,11 @@
exit(1);
}
-globbetyglob("{$ac['srcdir']}/scripts", 'make_scripts_executable');
+globbetyglob("{$ac['basedir']}/scripts", 'make_scripts_executable');
$redir = ($ac['quiet'] == 'yes') ? " > /dev/null" : '';
-quietechorun("\"{$ac['PHP']}\" -q
\"{$ac['srcdir']}/scripts/file-entities.php\"{$redir}");
+quietechorun("\"{$ac['PHP']}\" -q
\"{$ac['basedir']}/scripts/file-entitiesphp\"{$redir}");
echo "Loading and parsing manual.xml... ";
flush(STDOUT);
Modified: phpdoc/doc-base/trunk/manual.xml.in
===================================================================
--- phpdoc/doc-base/trunk/manual.xml.in 2009-07-14 03:02:46 UTC (rev 284048)
+++ phpdoc/doc-base/trunk/manual.xml.in 2009-07-14 03:14:26 UTC (rev 284049)
@@ -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/language-defs.ent">
+<!ENTITY % language-snippets.default SYSTEM "../en/language-snippets.ent">
+<!ENTITY % extensions.default SYSTEM "../en/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/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-14 03:02:46 UTC (rev 284048)
+++ phpdoc/doc-base/trunk/scripts/file-entities.php.in 2009-07-14 03:14:26 UTC (rev 284049)
@@ -49,7 +49,10 @@
$not_windows = (0 < strcasecmp('WIN',PHP_OS));
// The dir for PHP. If the cygwin wasn't compiled on Cygwin, the path needs to be stripped.
-$out_dir = ($not_windows || !strcasecmp('CYGWIN',php_uname()))? '@WORKDIR@' :
abs_path(strip_cygdrive('@WORKDIR@'));
+$out_dir = ($not_windows || !strcasecmp('CYGWIN',php_uname()))? '@WORKDIR@' :
abs_path(strip_cygdrive('@WORKDIR@'));
+$src_dir = ($not_windows || !strcasecmp('CYGWIN',php_uname()))? '@SRCDIR@' :
abs_path(strip_cygdrive('@SRCDIR@'));
+$base_dir = ($not_windows || !strcasecmp('CYGWIN',php_uname()))? '@BASEDIR@' :
abs_path(strip_cygdrive('@BASEDIR@'));
+$root_dir = ($not_windows || !strcasecmp('CYGWIN',php_uname()))? '@ROOTDIR@' :
abs_path(strip_cygdrive('@ROOTDIR@'));
// The language encoding to use
$encoding = '@ENCODING@';
@@ -59,15 +62,15 @@
// Put all the file entities into $entities
$entities = array();
-file_entities("$out_dir/en", "$out_dir/@LANGDIR@", "$out_dir/en",
$entities);
+file_entities("$root_dir/en", "$root_dir/@LANGDIR@", "$root_dir/en",
$entities);
// Open file for appending and write out all entitities
-$fp = fopen("$out_dir/entities/file-entities.ent", "w");
+$fp = fopen("$base_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 $base_dir/entities/file-entities.ent for writing\n");
}
-echo "Creating file {$out_dir}/entities/file-entities.ent... ";
+echo "Creating file {$base_dir}/entities/file-entities.ent... ";
// File header
fputs($fp, "<!-- DON'T TOUCH - AUTOGENERATED BY file-entities.php -->\n\n");