I build a new version with the ideas from Goba
(Thanks!), now there is only one script in php and it is in
english.
This is more simple, so, to use:
Apply the path to Makefile.in
Add the script to /scripts
./configure
make file=file to generate, example:
make
file=./en/reference/mysql/functions/mysql-query.xml
Index:
Makefile.in===RCS
file: /repository/phpdoc/Makefile.in,vretrieving revision 1.146diff -u
-r1.146 Makefile.in--- Makefile.in 3 Jan 2004 12:32:15
- 1.146+++ Makefile.in 10 Jan 2004 19:35:29 -@@ -21,6
+21,12 @@ all: html +ifdef
file+buildfile=addentities.xml.tmp+else+buildfile=manual.xml+endif+ #
{{{ variables [EMAIL PROTECTED]@@@ -167,7 +173,8
@@ html/index.html: manual.xml $(HTML_DEPS) @test -d
html || mkdir html $(PHP) -q
$(scriptdir)/rtlpatch/hackmanuallang.php $(LANGDIR)- $(JADE) $(CATALOG)
-d $(HTML_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL)
manual.xml+ $(PHP) -q $(scriptdir)/addentities.php
$(file)+ $(JADE) $(CATALOG) -d $(HTML_STYLESHEET) -V use-output-dir -t
sgml $(XMLDCL) $(buildfile) $(PHP) -q
$(scriptdir)/html_syntax.php html html/ $(PHP) -q
$(scriptdir)/rtlpatch/hackmanuallang.php
en $(HACK_RTL_LANGS_PAGES)
***
addentities.php.in
/*** by Fernando Correa da
Conceição ** This script let you compile
only one file. Use:* make file=filename* example:* make
file=./en/reference/mysql/functions/mysql-query.xml* to all functions from a
extension* make
file=./en/reference/mysql/reference.xml*/$file=$argv[1];// if we are
working with the default rule, exit// TODO: maybe do this on
Makefileif($file == "") exit;
$lines=file($file);
// this is the beginning from
manual.xml.in$header = <<
"@srcdir@/dtds/dbxml-4.1.2/docbookx.dtd" [
%language-defs;%language-snippets;
%language-defs.default;%language-snippets.default;
%phpweb.entities;
%global.entities;%file.entities;%build.version;
%missing-entities;
]>endblock;
// here a add the beginning from
manual.xml.in// and the tags and to make jade
happy$lines[1].="\n".$header."\n\n";
// join all again and add closing tags for book and
article$output=join("",$lines);$output.="\n\n";
// generate a temp file with all
things$saveto="./addentities.xml.tmp";if (!$handle = fopen($saveto,
'w')) { echo "Error, can´t create/open
($saveto)"; exit;}if (!fwrite($handle, $output))
{ print "Error, can´t write
($saveto)"; exit;}
?>
Fernando Correa da ConceiçãoICQ
168518047 http://manualphp.sourceforge.netParticipe
da Tradução do Manual do PHP