cvs: phpdoc / Makefile.in configure.in manual.xml.in /entities .cvsignore /scripts .cvsignore phpweb-entities.php.in

From: Date: Thu, 08 May 2003 17:02:32 +0000
Subject: cvs: phpdoc / Makefile.in configure.in manual.xml.in /entities .cvsignore /scripts .cvsignore phpweb-entities.php.in
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969353275@lists.php.net to get a copy of this message
goba Thu May 8 13:02:32 2003 EDT Added files: /phpdoc/scripts phpweb-entities.php.in Modified files: /phpdoc configure.in Makefile.in manual.xml.in /phpdoc/scripts .cvsignore /phpdoc/entities .cvsignore Log: Solve the 'absolute links to www.php.net on all mirror sites' problem, effectively keeping manual readers on the same mirror site Steps: - introduce entities/phpweb.ent autogenerated - this ent file contains the www.php.net entities, but only when the phpweb target is choosen - in configure this ent file is emptied and after make phpweb runs, it is also emptied - phpweb.ent is integrated in manual.xml before global.ent so the entities override those in global.ent Things to look for: - if the phpweb build is interrupted, phpweb.ent will stay there with inappropriate content for other targets [possible solution is to add a 'remove' line like we have now at the end of make phpweb to all the startpoints of other make targets, but I thought this would simply be ugly, so ignored the problem until someone can come up with a better idea :)] - relative links may not be good for those using our phpweb output in their own environments (like Mark on his website) IMHO this is not that bad, and those will realize why we do it this way - phpweb.ent should always exist, at least with 0 bytes, otherwise every build will fail, so never delete the file, just make it 0 bytes long or add some dummy comment (this is what configure and phpweb-enties.php does now) Index: phpdoc/configure.in diff -u phpdoc/configure.in:1.189 phpdoc/configure.in:1.190 --- phpdoc/configure.in:1.189 Fri Apr 25 10:37:05 2003 +++ phpdoc/configure.in Thu May 8 13:02:31 2003 @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.189 2003/04/25 14:37:05 goba Exp $ +dnl $Id: configure.in,v 1.190 2003/05/08 17:02:31 goba Exp $ dnl autoconf initialisation AC_INIT() @@ -755,6 +755,13 @@ done AC_OUTPUT($OUTFILES) find . -name "*.sh" | xargs chmod u+x +dnl }}} + +dnl {{{ create default empty phpweb.ent file + +unlink ./entities/phpweb.ent +touch ./entities/phpweb.ent + dnl }}} dnl {{{ generate entity mapping file, missing entities and IDs Index: phpdoc/Makefile.in diff -u phpdoc/Makefile.in:1.129 phpdoc/Makefile.in:1.130 --- phpdoc/Makefile.in:1.129 Fri Apr 25 12:23:52 2003 +++ phpdoc/Makefile.in Thu May 8 13:02:31 2003 @@ -13,7 +13,7 @@ # # -# $Id: Makefile.in,v 1.129 2003/04/25 16:23:52 goba Exp $ +# $Id: Makefile.in,v 1.130 2003/05/08 17:02:31 goba Exp $ # all: html @@ -180,8 +180,10 @@ $(PHP) -q $(scriptdir)/fixphpweb.php pwd/php php/index.php: manual.xml $(PHPWEB_DEPS) + $(PHP) -q $(scriptdir)/phpweb-entities.php pwd phpweb @test -d php || mkdir php -$(JADE) $(CATALOG) -d $(PHPWEB_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL) manual.xml + $(PHP) -q $(scriptdir)/phpweb-entities.php pwd remove palmdoc: @MANUAL@.doc.pdb @MANUAL@.doc.pdb: @MANUAL@.txt scripts/makedoc Index: phpdoc/manual.xml.in diff -u phpdoc/manual.xml.in:1.145 phpdoc/manual.xml.in:1.146 --- phpdoc/manual.xml.in:1.145 Thu May 8 06:05:14 2003 +++ phpdoc/manual.xml.in Thu May 8 13:02:31 2003 @@ -16,6 +16,9 @@ %language-defs.default; %language-snippets.default; +<!-- phpweb entities - autogenerated! --> +<!ENTITY % phpweb.entities SYSTEM "@srcdir@/entities/phpweb.ent"> + <!-- All global entities for the XML files --> <!ENTITY % global.entities SYSTEM "@srcdir@/entities/global.ent"> @@ -24,6 +27,7 @@ <!ENTITY % file.entities SYSTEM "entities/file-entities.ent"> <!-- Include all external DTD parts defined previously --> +%phpweb.entities; %global.entities; %file.entities; %build.version; Index: phpdoc/scripts/.cvsignore diff -u phpdoc/scripts/.cvsignore:1.8 phpdoc/scripts/.cvsignore:1.9 --- phpdoc/scripts/.cvsignore:1.8 Sat Apr 12 05:55:46 2003 +++ phpdoc/scripts/.cvsignore Thu May 8 13:02:32 2003 @@ -6,3 +6,4 @@ missing-entities.php file-entities.php test_missing-entities.php +phpweb-entities.php Index: phpdoc/entities/.cvsignore diff -u phpdoc/entities/.cvsignore:1.3 phpdoc/entities/.cvsignore:1.4 --- phpdoc/entities/.cvsignore:1.3 Tue Jun 11 06:55:56 2002 +++ phpdoc/entities/.cvsignore Thu May 8 13:02:32 2003 @@ -2,3 +2,4 @@ version.ent missing-entities.ent missing-ids.xml +phpweb.ent Index: phpdoc/scripts/phpweb-entities.php.in +++ phpdoc/scripts/phpweb-entities.php.in <?php /* # +----------------------------------------------------------------------+ # | PHP Version 4 | # +----------------------------------------------------------------------+ # | Copyright (c) 1997-2002 The PHP Group | # +----------------------------------------------------------------------+ # | This source file is subject to version 2.02 of the PHP licience, | # | that is bundled with this package in the file LICENCE and is | # | avalible through the world wide web at | # | http://www.php.net/license/2_02.txt. | # | If uou did not receive a copy of the PHP license and are unable to | # | obtain it through the world wide web, please send a note to | # | license@php.net so we can mail you a copy immediately | # +----------------------------------------------------------------------+ # | Authors: Gabor Hojtsy <goba@php.net> | # +----------------------------------------------------------------------+ # # $Id: phpweb-entities.php.in,v 1.1 2003/05/08 17:02:32 goba Exp $ */ set_time_limit(0); // Too few or too many parameters if ($argc != 3) { die("ERROR in " . __FILE__ . ": Too few or too many parameters"); } // Workdir is the first param $workdir = $argv[1]; // Whether we are in phpweb mode $phpweb_mode = ($argv[2] == "phpweb"); // Entity file for phpweb entities $phpweb_ent = "$workdir/entities/phpweb.ent"; // Automatically generated file note $autonote = "<!-- This file is autogenerated - don't touch it by hand! -->\n"; // Replace current phpweb.ent with a 0 byte file if (!$phpweb_mode) { $pe = fopen($phpweb_ent, "w"); fwrite($pe, $autonote); fclose($pe); echo "$phpweb_ent should be empty now...\n"; exit; } echo "creating $phpweb_ent...\n"; // Read in global.ent from the source dir $lines = file("@SRCDIR@/entities/global.ent"); // Collect all phpweb entities $phpweb_entities = array($autonote); foreach ($lines as $line) { if (strpos($line, "http://www.php.net") !== FALSE) { $phpweb_entities[] = str_replace("http://www.php.net", "", $line); } } // Write out entity file $pe = fopen($phpweb_ent, "w"); fwrite($pe, join("", $phpweb_entities)); fclose($pe);

« previous php.doc (#969353275) next »