cvs: php-gtk-doc / .cvsignore Makefile.in check_chapterusage.php cleanup.sh configure.in distribute_html.php gen_chapterents.php
gen_docs_from_source.sh gen_manual.sh gen_manualxml.php live.php liveGen.php liveTest.php notes runfirst.sh /updater updateMethods.php
| From: | Steph Fox | Date: | Sun, 26 Mar 2006 02:59:54 +0000 |
| Subject: | cvs: php-gtk-doc / .cvsignore Makefile.in check_chapterusage.php cleanup.sh configure.in distribute_html.php gen_chapterents.php gen_docs_from_source.sh gen_manual.sh gen_manualxml.php live.php liveGen.php liveTest.php notes runfirst.sh /updater updateMethods.php |
||
| Groups: | php.gtk.doc | ||
| Request: | Send a blank email to php-gtk-doc+get-1970@lists.php.net to get a copy of this message | ||
sfox Sun Mar 26 02:59:54 2006 UTC
Removed files:
/php-gtk-doc check_chapterusage.php cleanup.sh distribute_html.php
gen_chapterents.php gen_docs_from_source.sh
gen_manual.sh gen_manualxml.php live.php liveGen.php
liveTest.php
Modified files:
/php-gtk-doc .cvsignore Makefile.in configure.in notes runfirst.sh
/php-gtk-doc/updater updateMethods.php
Log:
That should be everything.
Hopefully.
http://cvs.php.net/viewcvs.cgi/php-gtk-doc/.cvsignore?r1=1.9&r2=1.10&diff_format=u Index: php-gtk-doc/.cvsignore diff -u /dev/null php-gtk-doc/.cvsignore:1.10 --- /dev/null Sun Mar 26 02:59:54 2006 +++ php-gtk-doc/.cvsignore Sun Mar 26 02:59:54 2006 @@ -0,0 +1,8 @@ +autom4te.cache +build +chm +config.log +config.status +configure +Makefile +testbuild http://cvs.php.net/viewcvs.cgi/php-gtk-doc/Makefile.in?r1=1.22&r2=1.23&diff_format=u Index: php-gtk-doc/Makefile.in diff -u /dev/null php-gtk-doc/Makefile.in:1.23 --- /dev/null Sun Mar 26 02:59:54 2006 +++ php-gtk-doc/Makefile.in Sun Mar 26 02:59:54 2006 @@ -0,0 +1,143 @@ +# +----------------------------------------------------------------------+ +# | PHP Version 5.1 | +# +----------------------------------------------------------------------+ +# | Copyright (c) 1999-2006 The PHP Group | +# +----------------------------------------------------------------------+ +# | This source file is subject to version 3.0.1 of the PHP license, | +# | that is bundled with this package in the file LICENSE and is | +# | available online at http://www.php.net/license/3_0_1.txt. | +# | If you 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: James Moore <jmoore@php.net>, Steph Fox <sfox@php.net> | +# +----------------------------------------------------------------------+ + +# +# $Id: Makefile.in,v 1.23 2006/03/26 02:59:54 sfox Exp $ +# + +# +# Paths +# +STYLESHEET_DIR = @STYLESHEET_DIR@ +SCRIPT_DIR = @SCRIPT_DIR@ +MANUAL = @MANUAL@ +LANG = @LANG@ +BUILD = build/@LANG@ +BUILD_TEST = testbuild +HISTORY = @HISTORY@ + +# +# Programs and scripts +# +XSLTPROC = @XSLTPROC@ +PHP = @PHP@ +HIGHLIGHT = $(SCRIPT_DIR)/highlight.php +SPLIT = $(SCRIPT_DIR)/distribute_html.php +IMAGES = $(SCRIPT_DIR)/copy_images.php +TMP = $(BUILD_TEST)/temp.php +TS = @TS@ + +# +# Default Rule +# +all: html + +# +# Build Aliases +# +bigmanual.html: $(BUILD)/bigmanual.html +html: $(BUILD)/html/index.html +phpweb: $(BUILD)/php/index.php +mtoc: $(BUILD_TEST)/mtoc.xml +test: $(BUILD_TEST)/index.html +updates: $(BUILD_TEST)/updates-$(LANG).php + +mirror-files: $(BUILD)/bigmanual.html.gz \ + $(BUILD)/php_gtk_manual_$(LANG).tar.bz2 \ + $(BUILD)/php_gtk_manual_$(LANG).tar.gz \ + $(BUILD)/php_gtk_manual_$(LANG).zip + +# +# Dependency Aliases +# +html = $(STYLESHEET_DIR)/html.xsl +chunk = $(STYLESHEET_DIR)/chunk.xsl +phpweb = $(STYLESHEET_DIR)/phpweb.xsl +docbook = $(STYLESHEET_DIR)/docbook.xsl +updates = $(STYLESHEET_DIR)/updates.xsl + +# +# Make Rules +# +$(BUILD)/bigmanual.html: $(SCRIPT_DIR)/manual.xml + @mkdir -p $(BUILD) + $(XSLTPROC) --xinclude $(docbook) $(SCRIPT_DIR)/manual.xml > $(BUILD)/bigmanual.html + +$(BUILD)/html/index.html: scripts/manual.xml + @mkdir -p $(BUILD)/html + $(XSLTPROC) --param base.dir "'$(BUILD)/html/'" --xinclude $(chunk) $(SCRIPT_DIR)/manual.xml + $(PHP) $(SPLIT) $(BUILD)/html + $(PHP) $(IMAGES) $(BUILD)/html + +$(BUILD)/php/index.php: scripts/manual.xml + @mkdir -p $(BUILD)/php + $(XSLTPROC) --param base.dir "'$(BUILD)/php/'" --xinclude $(phpweb) $(SCRIPT_DIR)/manual.xml + $(PHP) $(HIGHLIGHT) php $(BUILD)/php + $(PHP) $(IMAGES) $(BUILD)/php + +$(BUILD)/bigmanual.html.gz: $(BUILD)/bigmanual.html + @mkdir -p $(BUILD) + gzip -c -9 $< > $@ + +$(BUILD)/php_gtk_manual_$(LANG).tar.bz2: $(BUILD)/html/index.html + (cd $(BUILD); tar -cf - html) | bzip2 -9 > $@ + +$(BUILD)/php_gtk_manual_$(LANG).tar.gz: $(BUILD)/html/index.html + (cd $(BUILD); tar -c html) | gzip -9 > $@ + +$(BUILD)/php_gtk_manual_$(LANG).zip: $(BUILD)/html/index.html + (cd $(BUILD); zip -q -r -9 - html) > $@ + +$(BUILD_TEST)/index.html: $(SCRIPT_DIR)/testmanual.xml + @mkdir -p $(BUILD_TEST) + $(XSLTPROC) --param base.dir --xinclude "'$(BUILD_TEST)/'" $(chunk) $(SCRIPT_DIR)/testmanual.xml + +$(BUILD_TEST)/mtoc.xml: $(SCRIPT_DIR)/mtoc.xml + @mkdir -p $(BUILD_TEST) + $(XSLTPROC) --param base.dir --xinclude "'$(BUILD_TEST)/'" $(chunk) $(SCRIPT_DIR)/mtoc.xml + +$(BUILD_TEST)/updates-$(LANG).php: $(SCRIPT_DIR)/testclasses.xml + @mkdir -p $(BUILD_TEST) + $(XSLTPROC) $(updates) $(SCRIPT_DIR)/testmanual.xml > $(TMP) + @cat $(TMP) | sed -e 's/ \[en\]//;s/\"\"/"$(TS)"/;/php/!d;s/^ *//' > $(BUILD_TEST)/updates-new.php + @if test -f $(HISTORY)/updates-$(LANG).php; then \ + cp $(HISTORY)/updates-$(LANG).php $@; \ + $(PHP) $(SCRIPT_DIR)/merge_updates.php $(BUILD_TEST)/updates-new.php $@; \ + else \ + mv $(BUILD_TEST)/updates-new.php $@; \ + fi + @rm -f $(TMP) + +# +# Clean Rules +# +clean: + rm -rf $(BUILD) + rm -rf autom4te.cache + rm -f config.status config.log configure Makefile + rm -f $(MANUAL)/chapters.ent + rm -f $(SCRIPT_DIR)/manual.xml $(SCRIPT_DIR)/genchapterents.php $(SCRIPT_DIR)/update.xsl + +distclean: clean + rm -f Makefile $(SCRIPT_DIR)/manual.xml configure + rm -f config.cache config.log config.status version.ent + cd $(SCRIPT_DIR); rm -f genchapterents.php + cd $(STYLESHEET_DIR); rm -f phpweb.xsl + rm -rf $(BUILD_TEST) + +cvsclean: + @for i in `find . -name .cvsignore`; do \ + (cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` || true); \ + done http://cvs.php.net/viewcvs.cgi/php-gtk-doc/configure.in?r1=1.28&r2=1.29&diff_format=u Index: php-gtk-doc/configure.in diff -u php-gtk-doc/configure.in:1.28 php-gtk-doc/configure.in:1.29 --- php-gtk-doc/configure.in:1.28 Sat Mar 25 18:33:02 2006 +++ php-gtk-doc/configure.in Sun Mar 26 02:59:54 2006 @@ -0,0 +1,141 @@ +# +----------------------------------------------------------------------+ +# | PHP Version 4.0 | +# +----------------------------------------------------------------------+ +# | Copyright (c) 1999-2006 The PHP Group | +# +----------------------------------------------------------------------+ +# | This source file is subject to version 3.0.1 of the PHP license, | +# | that is bundled with this package in the file LICENSE and is | +# | available online at http://www.php.net/license/3_0_1.txt. | +# | If you 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: James Moore <jmoore@php.net>, Steph Fox <sfox@php.net> | +# +----------------------------------------------------------------------+ + +# +# $Id: configure.in,v 1.29 2006/03/26 02:59:54 sfox Exp $ + +AC_INIT +AC_CONFIG_SRCDIR([manual/global.ent]) + +AC_PATH_PROG(XSLTPROC, xsltproc, no) +AC_PATH_PROG(PHP, php, no) + +if test "$XSLTPROC" = "no"; +then + AC_MSG_ERROR(cannot find xsltproc) +fi + +if test "$PHP" = "no"; +then + AC_MSG_ERROR(unable to locate php executable) +fi + +DOCBOOK_DOCTYPE="-//PHP Group//DTD DocBk XML V3.1.7-Based Extension//EN" +AC_SUBST(DOCBOOK_DOCTYPE) + +SCRIPT_DIR="./scripts" +AC_SUBST(SCRIPT_DIR) + +STYLESHEET_DIR="./stylesheets/html" +AC_SUBST(STYLESHEET_DIR) + +MANUAL="manual" +AC_SUBST(MANUAL) + +PHP_GTK2_DOC_BUILD_DATE=`date` +AC_SUBST(PHP_GTK2_DOC_BUILD_DATE) + +AC_MSG_CHECKING(for language) +AC_ARG_WITH(lang, +[ --with-lang=LANG choose a language to work with], +[ + if test "$withval" + then + if test ! -d "$MANUAL/$withval"; + then + AC_MSG_RESULT() + AC_MSG_ERROR(Language "$withval" not supported!) + fi + LANG=$withval + LANGDIR=$MANUAL/$withval + AC_MSG_RESULT($withval) + fi +],[ + LANG=en + LANGDIR=$MANUAL/en + AC_MSG_RESULT([en (default)]) +]) + +AC_SUBST(LANG) +AC_SUBST(LANGDIR) + +TS=`date -u +%Y%m%d` +AC_SUBST(TS) + +# need an old copy of the source to check against for updates +AC_ARG_WITH(history, +[ --with-history=HISTORY path to archived module copy (for updates) ], +[ + if test "$withval" + then + AC_MSG_CHECKING(for path to archived module copy (for updates)) + HISTORY=$withval + AC_MSG_RESULT($withval) + AC_SUBST(HISTORY) + fi +]) + +AC_SUBST(HISTORY) + +if [ test -d $HISTORY/manual/$LANG ]; then + for xmlfile in `find $LANGDIR -name "*.xml" | sed -e"s%^$LANGDIR\/%%g" | sort` +do + if test -f $LANGDIR/$xmlfile + then + newfilepath=$LANGDIR/$xmlfile + oldfilepath=$HISTORY/manual/$LANG/$xmlfile + if test $newfilepath -nt $oldfilepath + then + echo Updating "$xmlfile"... + updates="$updates $newfilepath" + fi + fi +done; +fi + +AC_CONFIG_FILES([\ +Makefile \ +$SCRIPT_DIR/manual.xml \ +$SCRIPT_DIR/mtoc.xml \ +$SCRIPT_DIR/testmanual.xml \ +$STYLESHEET_DIR/phpweb.xsl \ +$STYLESHEET_DIR/updates.xsl \ +$SCRIPT_DIR/genchapterents.php ]) +AC_OUTPUT + +echo creating chapters.ent +$PHP -q $SCRIPT_DIR/genchapterents.php > $MANUAL/chapters.ent +echo creating name_to_id.xsl +$XSLTPROC $SCRIPT_DIR/gen_name_to_id.xsl $SCRIPT_DIR/manual.xml > $STYLESHEET_DIR/name_to_id.xsl + +#now add the list of updated files to the testclasses.xml +# this has to be done after chapters.ent is created + +if test -n "$updates" ; then + echo creating $SCRIPT_DIR/testclasses.xml +for updatedfile in $updates +do + # need to remove 'manual/' from the search path since the dir structure changed + updatedfile=`echo $updatedfile | sed -e "s/$MANUAL\///g"` + ref=`grep -e "$updatedfile" $MANUAL/chapters.ent | sed "s/^<!ENTITY //" | sed "s/ .*//"` + if test -n "$ref"; then + refs="$refs \&$ref;" + fi +done + +sed "s/@TEST_REFERENCES@/$refs/g" $SCRIPT_DIR/testclasses.xml.in > $SCRIPT_DIR/testclasses.xml +fi + +chmod +x $SCRIPT_DIR/genchapterents.php http://cvs.php.net/viewcvs.cgi/php-gtk-doc/notes?r1=1.7&r2=1.8&diff_format=u Index: php-gtk-doc/notes diff -u php-gtk-doc/notes:1.7 php-gtk-doc/notes:1.8 --- php-gtk-doc/notes:1.7 Tue Jan 31 15:55:29 2006 +++ php-gtk-doc/notes Sun Mar 26 02:59:54 2006 @@ -1,42 +1,79 @@ +== Intro to the docs file system == -== File system == -/ (root) - all the script files required for doc generation - - distribute_html.php moves the generated html files in several subdirectories - that we don't have 1800+ files in one directory - - gen_chapterents.php generates a file called manual/<lang>/chapters.ent - which includes all the .xml files in one big one - - gen_docs_from_source.sh uses the php-gtk sources to generate the - reference section of the manual with all the functions, properties - and so - - gen_manual.sh compiles the html files out of the .xml ones - - gen_manualxml.php generates manual/<lang>/manual.xml from the - manual/manual.xml.in - - check_chapterusage.php: checks if all the xml files in the reference - section are used in the manual -build/ - the compiled manual files are stored here +/. + Build system entry point + - configure.in + - makefile.in + usage: autoconf, ./configure [--with-lang=$lang], make [html|phpweb|dist] + Default behaviour: lang=en and make html + - runfirst.sh is the entry point to the basic build system (no i18n support and HTML only) + usage: [sh] runfirst.sh + You can use whichever system you're most comfortable with, locally - either works. The + PHP-GTK web site uses the autoconf version +dbxml/ + DocBook XML .dtd, .xml and .ent files. phpgtkdoc.dtd is among them +examples/ + Sample code is filed here for auto-inclusion in the manual +images/ + Images for the manual are filed here +livedocs/ + Experimental livedocs scripts intended as an authoring tool only manual/ - base manual files - - manual.xml.in -> will be compiled to manual/<lang>/manual.xml -manual/en/, manual/de/, .. - full manual for the language, including: - - manual.xml is generated automatically - - chapters.ent is generated automatically by gen_chapterents.php from the xml files + Base manual files + - appendix.xml (manually-created index for all appendix files) + - chapters.ent (generated file mapping the file paths used by the current manual build) + - global.ent (entities used across all translations) + - reference.xml (manually-created index for all reference files) + - tutorials.xml (manually-created index for all tutorial files) +manual/$lang + Completed XML files for the language, including: + - bookinfo.xml + - language-defs.ent (translations of headings etc to $lang) + - license.xml (copy of the GNU Free Documentation License, in /en ONLY) + - preface.xml + appendix + - credits.xml (coding credits) + - doccredits.xml (documentation credits - add yourself here!) + - translicense.xml (translation of the GNU Free Documentation License to $lang) + reference + Class documentation is filed here + tutorials + Tutorials are filed here +scripts/ + - cleanup.sh removes a bunch of generated files. Use with trepidation! + - distribute_html.php splits the generated files into several subdirectories, in both build systems + - gen_chapterents.php generates manual/chapters.ent for the 'basic' build + - gen_docs_from_source.sh generates the manual reference section from PHP-GTK 2 source + - gen_manual.sh generates multiple HTML files for the 'basic' build + - gen_manualxml.php generates scripts/manual.xml for the 'basic' build + - gen_name_to_id.xsl is the template file for the name_to_id.xsl stylesheet, which is + used by both systems but generated only by the standard build. This shouldn't (but might) + cause language conflicts in the 'basic' build + - genchapterents.php.in generates manual/chapters.ent for the 'standard' build + - highlight.php highlights the source code in the phpweb build and in the 'basic' build + - manual.xml.in is the template file for scripts/manual.xml in both build systems stylesheets/ - stylesheets which convert the xml manual files to html, phpweb, ... - + XSL stylesheets, used to convert the XML manual files to HTML or PHP + common + Language support files. Translators will need to update these to match en.xml + html + Clever stuff. Includes name_to_id.xsl and phpweb.xsl, both of which are generated + during the standard build but not during the 'basic' build. Again, this shouldn't + (but may) cause language conflicts in the 'basic' build. + lib + Even cleverer stuff. Don't touch this! +updater/ + Anant's scripts to update the reference entries from PHP-GTK 2 source via reflection == Small FAQ == Q: The livedocs don't work! Some file couldn't be found. A: Call the live.php with "debug=1" as parameter and check the output. -Q: Livedocs give me a "Could not startup" error! +Q: Livedocs gives me a "Could not startup" error! A: The problem is that the called php tries to load the php-gtk extension, but has no X-Server - so php can't start. Disable the loading of php-gtk.so in the php.ini, and it will work. - == Todo == - automatically link returned classes in functions - automatically link classes in function parameters @@ -47,20 +84,7 @@ - check if build was successful - check if something has changed before building -== Done == -+ signal linking works -+ index pages for classes, methods, properties and signals -+ <function> tags don't need class=".." attribute when used inside class (link to same class) +== Other == - return value of functions is void sometimes | that's ok IMO - static constructors are linked to themselves | that's because the new "get_func_id_from_name" is too good in guessing the ids - static constructors have the same title as normal constructor (<class> Constructor) | how should they be named? they *are* constructors -+ name_to_id: signal names (for that, andrei have to get the generator support signals) -+ functions have no paramdef sometimes -+ docgen: cross-link properties -+ foo(void) paramdef -> foo() -+ docgen: link from getter to setter and vice versa -+ classtree -+ generate <constructors> -+ multiple constructors in class -+ stylesheets/html/name_to_id.xsl rewrite so that it haven't to be generated from sources - http://cvs.php.net/viewcvs.cgi/php-gtk-doc/runfirst.sh?r1=1.3&r2=1.4&diff_format=u Index: php-gtk-doc/runfirst.sh diff -u php-gtk-doc/runfirst.sh:1.3 php-gtk-doc/runfirst.sh:1.4 --- php-gtk-doc/runfirst.sh:1.3 Sat Jul 30 22:32:15 2005 +++ php-gtk-doc/runfirst.sh Sun Mar 26 02:59:54 2006 @@ -1,25 +1,16 @@ #!/bin/sh -# first time setup php="php" language="en" cd "`dirname "$0"`" -#if [ ! -d ../php-gtk ]; then -# echo "Please checkout php-gtk first and make sure that" -# echo "the directory ../php-gtk is reachable" -# exit 1 -#fi - -#./gen_docs_from_source.sh -$php -q gen_chapterents.php $language -$php -q check_chapterusage.php -$php -q gen_manualxml.php $language +$php -q scripts/gen_chapterents.php $language +$php -q scripts/gen_manualxml.php $language echo "" -echo "everything is set up for docc'ing" +echo "Everything is set up for doccing" echo "" -echo "now you can do:" -echo " ./gen_manual.sh $language html" +echo "Now type:" +echo " scripts/gen_manual.sh $language html" echo "to compile the manual" http://cvs.php.net/viewcvs.cgi/php-gtk-doc/updater/updateMethods.php?r1=1.4&r2=1.5&diff_format=u Index: php-gtk-doc/updater/updateMethods.php diff -u php-gtk-doc/updater/updateMethods.php:1.4 php-gtk-doc/updater/updateMethods.php:1.5 --- php-gtk-doc/updater/updateMethods.php:1.4 Sun Feb 26 21:59:52 2006 +++ php-gtk-doc/updater/updateMethods.php Sun Mar 26 02:59:54 2006 @@ -12,7 +12,7 @@ public $missingClasses = array(); function __construct() - { + { /* Get all classes and filter out Gtk classes only */ $gtkClasses = array(); $allClasses = get_declared_classes();
http://cvs.php.net/viewcvs.cgi/php-gtk-doc/.cvsignore?r1=1.9&r2=1.10&diff_format=u Index: php-gtk-doc/.cvsignore diff -u /dev/null php-gtk-doc/.cvsignore:1.10 --- /dev/null Sun Mar 26 02:59:54 2006 +++ php-gtk-doc/.cvsignore Sun Mar 26 02:59:54 2006 @@ -0,0 +1,8 @@ +autom4te.cache +build +chm +config.log +config.status +configure +Makefile +testbuild http://cvs.php.net/viewcvs.cgi/php-gtk-doc/Makefile.in?r1=1.22&r2=1.23&diff_format=u Index: php-gtk-doc/Makefile.in diff -u /dev/null php-gtk-doc/Makefile.in:1.23 --- /dev/null Sun Mar 26 02:59:54 2006 +++ php-gtk-doc/Makefile.in Sun Mar 26 02:59:54 2006 @@ -0,0 +1,143 @@ +# +----------------------------------------------------------------------+ +# | PHP Version 5.1 | +# +----------------------------------------------------------------------+ +# | Copyright (c) 1999-2006 The PHP Group | +# +----------------------------------------------------------------------+ +# | This source file is subject to version 3.0.1 of the PHP license, | +# | that is bundled with this package in the file LICENSE and is | +# | available online at http://www.php.net/license/3_0_1.txt. | +# | If you 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: James Moore <jmoore@php.net>, Steph Fox <sfox@php.net> | +# +----------------------------------------------------------------------+ + +# +# $Id: Makefile.in,v 1.23 2006/03/26 02:59:54 sfox Exp $ +# + +# +# Paths +# +STYLESHEET_DIR = @STYLESHEET_DIR@ +SCRIPT_DIR = @SCRIPT_DIR@ +MANUAL = @MANUAL@ +LANG = @LANG@ +BUILD = build/@LANG@ +BUILD_TEST = testbuild +HISTORY = @HISTORY@ + +# +# Programs and scripts +# +XSLTPROC = @XSLTPROC@ +PHP = @PHP@ +HIGHLIGHT = $(SCRIPT_DIR)/highlight.php +SPLIT = $(SCRIPT_DIR)/distribute_html.php +IMAGES = $(SCRIPT_DIR)/copy_images.php +TMP = $(BUILD_TEST)/temp.php +TS = @TS@ + +# +# Default Rule +# +all: html + +# +# Build Aliases +# +bigmanual.html: $(BUILD)/bigmanual.html +html: $(BUILD)/html/index.html +phpweb: $(BUILD)/php/index.php +mtoc: $(BUILD_TEST)/mtoc.xml +test: $(BUILD_TEST)/index.html +updates: $(BUILD_TEST)/updates-$(LANG).php + +mirror-files: $(BUILD)/bigmanual.html.gz \ + $(BUILD)/php_gtk_manual_$(LANG).tar.bz2 \ + $(BUILD)/php_gtk_manual_$(LANG).tar.gz \ + $(BUILD)/php_gtk_manual_$(LANG).zip + +# +# Dependency Aliases +# +html = $(STYLESHEET_DIR)/html.xsl +chunk = $(STYLESHEET_DIR)/chunk.xsl +phpweb = $(STYLESHEET_DIR)/phpweb.xsl +docbook = $(STYLESHEET_DIR)/docbook.xsl +updates = $(STYLESHEET_DIR)/updates.xsl + +# +# Make Rules +# +$(BUILD)/bigmanual.html: $(SCRIPT_DIR)/manual.xml + @mkdir -p $(BUILD) + $(XSLTPROC) --xinclude $(docbook) $(SCRIPT_DIR)/manual.xml > $(BUILD)/bigmanual.html + +$(BUILD)/html/index.html: scripts/manual.xml + @mkdir -p $(BUILD)/html + $(XSLTPROC) --param base.dir "'$(BUILD)/html/'" --xinclude $(chunk) $(SCRIPT_DIR)/manual.xml + $(PHP) $(SPLIT) $(BUILD)/html + $(PHP) $(IMAGES) $(BUILD)/html + +$(BUILD)/php/index.php: scripts/manual.xml + @mkdir -p $(BUILD)/php + $(XSLTPROC) --param base.dir "'$(BUILD)/php/'" --xinclude $(phpweb) $(SCRIPT_DIR)/manual.xml + $(PHP) $(HIGHLIGHT) php $(BUILD)/php + $(PHP) $(IMAGES) $(BUILD)/php + +$(BUILD)/bigmanual.html.gz: $(BUILD)/bigmanual.html + @mkdir -p $(BUILD) + gzip -c -9 $< > $@ + +$(BUILD)/php_gtk_manual_$(LANG).tar.bz2: $(BUILD)/html/index.html + (cd $(BUILD); tar -cf - html) | bzip2 -9 > $@ + +$(BUILD)/php_gtk_manual_$(LANG).tar.gz: $(BUILD)/html/index.html + (cd $(BUILD); tar -c html) | gzip -9 > $@ + +$(BUILD)/php_gtk_manual_$(LANG).zip: $(BUILD)/html/index.html + (cd $(BUILD); zip -q -r -9 - html) > $@ + +$(BUILD_TEST)/index.html: $(SCRIPT_DIR)/testmanual.xml + @mkdir -p $(BUILD_TEST) + $(XSLTPROC) --param base.dir --xinclude "'$(BUILD_TEST)/'" $(chunk) $(SCRIPT_DIR)/testmanual.xml + +$(BUILD_TEST)/mtoc.xml: $(SCRIPT_DIR)/mtoc.xml + @mkdir -p $(BUILD_TEST) + $(XSLTPROC) --param base.dir --xinclude "'$(BUILD_TEST)/'" $(chunk) $(SCRIPT_DIR)/mtoc.xml + +$(BUILD_TEST)/updates-$(LANG).php: $(SCRIPT_DIR)/testclasses.xml + @mkdir -p $(BUILD_TEST) + $(XSLTPROC) $(updates) $(SCRIPT_DIR)/testmanual.xml > $(TMP) + @cat $(TMP) | sed -e 's/ \[en\]//;s/\"\"/"$(TS)"/;/php/!d;s/^ *//' > $(BUILD_TEST)/updates-new.php + @if test -f $(HISTORY)/updates-$(LANG).php; then \ + cp $(HISTORY)/updates-$(LANG).php $@; \ + $(PHP) $(SCRIPT_DIR)/merge_updates.php $(BUILD_TEST)/updates-new.php $@; \ + else \ + mv $(BUILD_TEST)/updates-new.php $@; \ + fi + @rm -f $(TMP) + +# +# Clean Rules +# +clean: + rm -rf $(BUILD) + rm -rf autom4te.cache + rm -f config.status config.log configure Makefile + rm -f $(MANUAL)/chapters.ent + rm -f $(SCRIPT_DIR)/manual.xml $(SCRIPT_DIR)/genchapterents.php $(SCRIPT_DIR)/update.xsl + +distclean: clean + rm -f Makefile $(SCRIPT_DIR)/manual.xml configure + rm -f config.cache config.log config.status version.ent + cd $(SCRIPT_DIR); rm -f genchapterents.php + cd $(STYLESHEET_DIR); rm -f phpweb.xsl + rm -rf $(BUILD_TEST) + +cvsclean: + @for i in `find . -name .cvsignore`; do \ + (cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` || true); \ + done http://cvs.php.net/viewcvs.cgi/php-gtk-doc/configure.in?r1=1.28&r2=1.29&diff_format=u Index: php-gtk-doc/configure.in diff -u php-gtk-doc/configure.in:1.28 php-gtk-doc/configure.in:1.29 --- php-gtk-doc/configure.in:1.28 Sat Mar 25 18:33:02 2006 +++ php-gtk-doc/configure.in Sun Mar 26 02:59:54 2006 @@ -0,0 +1,141 @@ +# +----------------------------------------------------------------------+ +# | PHP Version 4.0 | +# +----------------------------------------------------------------------+ +# | Copyright (c) 1999-2006 The PHP Group | +# +----------------------------------------------------------------------+ +# | This source file is subject to version 3.0.1 of the PHP license, | +# | that is bundled with this package in the file LICENSE and is | +# | available online at http://www.php.net/license/3_0_1.txt. | +# | If you 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: James Moore <jmoore@php.net>, Steph Fox <sfox@php.net> | +# +----------------------------------------------------------------------+ + +# +# $Id: configure.in,v 1.29 2006/03/26 02:59:54 sfox Exp $ + +AC_INIT +AC_CONFIG_SRCDIR([manual/global.ent]) + +AC_PATH_PROG(XSLTPROC, xsltproc, no) +AC_PATH_PROG(PHP, php, no) + +if test "$XSLTPROC" = "no"; +then + AC_MSG_ERROR(cannot find xsltproc) +fi + +if test "$PHP" = "no"; +then + AC_MSG_ERROR(unable to locate php executable) +fi + +DOCBOOK_DOCTYPE="-//PHP Group//DTD DocBk XML V3.1.7-Based Extension//EN" +AC_SUBST(DOCBOOK_DOCTYPE) + +SCRIPT_DIR="./scripts" +AC_SUBST(SCRIPT_DIR) + +STYLESHEET_DIR="./stylesheets/html" +AC_SUBST(STYLESHEET_DIR) + +MANUAL="manual" +AC_SUBST(MANUAL) + +PHP_GTK2_DOC_BUILD_DATE=`date` +AC_SUBST(PHP_GTK2_DOC_BUILD_DATE) + +AC_MSG_CHECKING(for language) +AC_ARG_WITH(lang, +[ --with-lang=LANG choose a language to work with], +[ + if test "$withval" + then + if test ! -d "$MANUAL/$withval"; + then + AC_MSG_RESULT() + AC_MSG_ERROR(Language "$withval" not supported!) + fi + LANG=$withval + LANGDIR=$MANUAL/$withval + AC_MSG_RESULT($withval) + fi +],[ + LANG=en + LANGDIR=$MANUAL/en + AC_MSG_RESULT([en (default)]) +]) + +AC_SUBST(LANG) +AC_SUBST(LANGDIR) + +TS=`date -u +%Y%m%d` +AC_SUBST(TS) + +# need an old copy of the source to check against for updates +AC_ARG_WITH(history, +[ --with-history=HISTORY path to archived module copy (for updates) ], +[ + if test "$withval" + then + AC_MSG_CHECKING(for path to archived module copy (for updates)) + HISTORY=$withval + AC_MSG_RESULT($withval) + AC_SUBST(HISTORY) + fi +]) + +AC_SUBST(HISTORY) + +if [ test -d $HISTORY/manual/$LANG ]; then + for xmlfile in `find $LANGDIR -name "*.xml" | sed -e"s%^$LANGDIR\/%%g" | sort` +do + if test -f $LANGDIR/$xmlfile + then + newfilepath=$LANGDIR/$xmlfile + oldfilepath=$HISTORY/manual/$LANG/$xmlfile + if test $newfilepath -nt $oldfilepath + then + echo Updating "$xmlfile"... + updates="$updates $newfilepath" + fi + fi +done; +fi + +AC_CONFIG_FILES([\ +Makefile \ +$SCRIPT_DIR/manual.xml \ +$SCRIPT_DIR/mtoc.xml \ +$SCRIPT_DIR/testmanual.xml \ +$STYLESHEET_DIR/phpweb.xsl \ +$STYLESHEET_DIR/updates.xsl \ +$SCRIPT_DIR/genchapterents.php ]) +AC_OUTPUT + +echo creating chapters.ent +$PHP -q $SCRIPT_DIR/genchapterents.php > $MANUAL/chapters.ent +echo creating name_to_id.xsl +$XSLTPROC $SCRIPT_DIR/gen_name_to_id.xsl $SCRIPT_DIR/manual.xml > $STYLESHEET_DIR/name_to_id.xsl + +#now add the list of updated files to the testclasses.xml +# this has to be done after chapters.ent is created + +if test -n "$updates" ; then + echo creating $SCRIPT_DIR/testclasses.xml +for updatedfile in $updates +do + # need to remove 'manual/' from the search path since the dir structure changed + updatedfile=`echo $updatedfile | sed -e "s/$MANUAL\///g"` + ref=`grep -e "$updatedfile" $MANUAL/chapters.ent | sed "s/^<!ENTITY //" | sed "s/ .*//"` + if test -n "$ref"; then + refs="$refs \&$ref;" + fi +done + +sed "s/@TEST_REFERENCES@/$refs/g" $SCRIPT_DIR/testclasses.xml.in > $SCRIPT_DIR/testclasses.xml +fi + +chmod +x $SCRIPT_DIR/genchapterents.php http://cvs.php.net/viewcvs.cgi/php-gtk-doc/notes?r1=1.7&r2=1.8&diff_format=u Index: php-gtk-doc/notes diff -u php-gtk-doc/notes:1.7 php-gtk-doc/notes:1.8 --- php-gtk-doc/notes:1.7 Tue Jan 31 15:55:29 2006 +++ php-gtk-doc/notes Sun Mar 26 02:59:54 2006 @@ -1,42 +1,79 @@ +== Intro to the docs file system == -== File system == -/ (root) - all the script files required for doc generation - - distribute_html.php moves the generated html files in several subdirectories - that we don't have 1800+ files in one directory - - gen_chapterents.php generates a file called manual/<lang>/chapters.ent - which includes all the .xml files in one big one - - gen_docs_from_source.sh uses the php-gtk sources to generate the - reference section of the manual with all the functions, properties - and so - - gen_manual.sh compiles the html files out of the .xml ones - - gen_manualxml.php generates manual/<lang>/manual.xml from the - manual/manual.xml.in - - check_chapterusage.php: checks if all the xml files in the reference - section are used in the manual -build/ - the compiled manual files are stored here +/. + Build system entry point + - configure.in + - makefile.in + usage: autoconf, ./configure [--with-lang=$lang], make [html|phpweb|dist] + Default behaviour: lang=en and make html + - runfirst.sh is the entry point to the basic build system (no i18n support and HTML only) + usage: [sh] runfirst.sh + You can use whichever system you're most comfortable with, locally - either works. The + PHP-GTK web site uses the autoconf version +dbxml/ + DocBook XML .dtd, .xml and .ent files. phpgtkdoc.dtd is among them +examples/ + Sample code is filed here for auto-inclusion in the manual +images/ + Images for the manual are filed here +livedocs/ + Experimental livedocs scripts intended as an authoring tool only manual/ - base manual files - - manual.xml.in -> will be compiled to manual/<lang>/manual.xml -manual/en/, manual/de/, .. - full manual for the language, including: - - manual.xml is generated automatically - - chapters.ent is generated automatically by gen_chapterents.php from the xml files + Base manual files + - appendix.xml (manually-created index for all appendix files) + - chapters.ent (generated file mapping the file paths used by the current manual build) + - global.ent (entities used across all translations) + - reference.xml (manually-created index for all reference files) + - tutorials.xml (manually-created index for all tutorial files) +manual/$lang + Completed XML files for the language, including: + - bookinfo.xml + - language-defs.ent (translations of headings etc to $lang) + - license.xml (copy of the GNU Free Documentation License, in /en ONLY) + - preface.xml + appendix + - credits.xml (coding credits) + - doccredits.xml (documentation credits - add yourself here!) + - translicense.xml (translation of the GNU Free Documentation License to $lang) + reference + Class documentation is filed here + tutorials + Tutorials are filed here +scripts/ + - cleanup.sh removes a bunch of generated files. Use with trepidation! + - distribute_html.php splits the generated files into several subdirectories, in both build systems + - gen_chapterents.php generates manual/chapters.ent for the 'basic' build + - gen_docs_from_source.sh generates the manual reference section from PHP-GTK 2 source + - gen_manual.sh generates multiple HTML files for the 'basic' build + - gen_manualxml.php generates scripts/manual.xml for the 'basic' build + - gen_name_to_id.xsl is the template file for the name_to_id.xsl stylesheet, which is + used by both systems but generated only by the standard build. This shouldn't (but might) + cause language conflicts in the 'basic' build + - genchapterents.php.in generates manual/chapters.ent for the 'standard' build + - highlight.php highlights the source code in the phpweb build and in the 'basic' build + - manual.xml.in is the template file for scripts/manual.xml in both build systems stylesheets/ - stylesheets which convert the xml manual files to html, phpweb, ... - + XSL stylesheets, used to convert the XML manual files to HTML or PHP + common + Language support files. Translators will need to update these to match en.xml + html + Clever stuff. Includes name_to_id.xsl and phpweb.xsl, both of which are generated + during the standard build but not during the 'basic' build. Again, this shouldn't + (but may) cause language conflicts in the 'basic' build. + lib + Even cleverer stuff. Don't touch this! +updater/ + Anant's scripts to update the reference entries from PHP-GTK 2 source via reflection == Small FAQ == Q: The livedocs don't work! Some file couldn't be found. A: Call the live.php with "debug=1" as parameter and check the output. -Q: Livedocs give me a "Could not startup" error! +Q: Livedocs gives me a "Could not startup" error! A: The problem is that the called php tries to load the php-gtk extension, but has no X-Server - so php can't start. Disable the loading of php-gtk.so in the php.ini, and it will work. - == Todo == - automatically link returned classes in functions - automatically link classes in function parameters @@ -47,20 +84,7 @@ - check if build was successful - check if something has changed before building -== Done == -+ signal linking works -+ index pages for classes, methods, properties and signals -+ <function> tags don't need class=".." attribute when used inside class (link to same class) +== Other == - return value of functions is void sometimes | that's ok IMO - static constructors are linked to themselves | that's because the new "get_func_id_from_name" is too good in guessing the ids - static constructors have the same title as normal constructor (<class> Constructor) | how should they be named? they *are* constructors -+ name_to_id: signal names (for that, andrei have to get the generator support signals) -+ functions have no paramdef sometimes -+ docgen: cross-link properties -+ foo(void) paramdef -> foo() -+ docgen: link from getter to setter and vice versa -+ classtree -+ generate <constructors> -+ multiple constructors in class -+ stylesheets/html/name_to_id.xsl rewrite so that it haven't to be generated from sources - http://cvs.php.net/viewcvs.cgi/php-gtk-doc/runfirst.sh?r1=1.3&r2=1.4&diff_format=u Index: php-gtk-doc/runfirst.sh diff -u php-gtk-doc/runfirst.sh:1.3 php-gtk-doc/runfirst.sh:1.4 --- php-gtk-doc/runfirst.sh:1.3 Sat Jul 30 22:32:15 2005 +++ php-gtk-doc/runfirst.sh Sun Mar 26 02:59:54 2006 @@ -1,25 +1,16 @@ #!/bin/sh -# first time setup php="php" language="en" cd "`dirname "$0"`" -#if [ ! -d ../php-gtk ]; then -# echo "Please checkout php-gtk first and make sure that" -# echo "the directory ../php-gtk is reachable" -# exit 1 -#fi - -#./gen_docs_from_source.sh -$php -q gen_chapterents.php $language -$php -q check_chapterusage.php -$php -q gen_manualxml.php $language +$php -q scripts/gen_chapterents.php $language +$php -q scripts/gen_manualxml.php $language echo "" -echo "everything is set up for docc'ing" +echo "Everything is set up for doccing" echo "" -echo "now you can do:" -echo " ./gen_manual.sh $language html" +echo "Now type:" +echo " scripts/gen_manual.sh $language html" echo "to compile the manual" http://cvs.php.net/viewcvs.cgi/php-gtk-doc/updater/updateMethods.php?r1=1.4&r2=1.5&diff_format=u Index: php-gtk-doc/updater/updateMethods.php diff -u php-gtk-doc/updater/updateMethods.php:1.4 php-gtk-doc/updater/updateMethods.php:1.5 --- php-gtk-doc/updater/updateMethods.php:1.4 Sun Feb 26 21:59:52 2006 +++ php-gtk-doc/updater/updateMethods.php Sun Mar 26 02:59:54 2006 @@ -12,7 +12,7 @@ public $missingClasses = array(); function __construct() - { + { /* Get all classes and filter out Gtk classes only */ $gtkClasses = array(); $allClasses = get_declared_classes();