Hi all
Attached is a patch to simplify partial phpdoc builds, i.e. building
only a single function page, complete reference section or whatever.
Usage:
gmake part/<ID>
i.e. to build the function.strpos manual page and the complete imagick docs:
gmake part/function.strpos part/ref.imagick
This will do a phpweb_xsl/html_xsl build, depending on the configure
option, default is phpweb_xsl. To change the build type to html_xsl
use the --buildstyle=html configure option.
I personally only do phpweb_xsl builds and therefor picked that as the
default... Maybe we should change it the html_xsl?
Comments? Objections? Other ideas?
-Hannes
Index: configure.in
===================================================================
RCS file: /repository/phpdoc/configure.in,v
retrieving revision 1.242
diff -u -r1.242 configure.in
--- configure.in 20 Mar 2007 10:44:18 -0000 1.242
+++ configure.in 6 Jun 2007 10:47:54 -0000
@@ -494,6 +494,37 @@
AC_SUBST(EXT_SOURCE)
dnl {{{
+AC_MSG_CHECKING([for preferred buildstyle (for partial build)])
+AC_ARG_WITH(buildstyle,
+[ --with-buildstyle=name Which build style to use for partial function/reference builds],
+[
+ case $withval in
+ html)
+ PARTIAL_STYLESHEET="html.xsl";
+ PARTIAL_STYLE="html"
+ ;;
+ phpweb)
+ PARTIAL_STYLESHEET="phpweb.xsl";
+ PARTIAL_STYLE="php"
+ ;;
+ *)
+ AC_MSG_RESULT([$withval])
+ AC_MSG_ERROR([Only phpweb and html are recognized])
+ esac
+
+ AC_MSG_RESULT([$withval])
+],[
+ PARTIAL_STYLESHEET="phpweb.xsl";
+ PARTIAL_STYLE="php"
+ AC_MSG_RESULT([phpweb (default)])
+])
+
+AC_SUBST(PARTIAL_STYLESHEET)
+AC_SUBST(PARTIAL_STYLE)
+
+dnl }}}
+
+dnl {{{
AC_MSG_CHECKING(for CSS to use for html docs)
AC_ARG_WITH(htmlcss,
[ --with-htmlcss=URL specify a CSS file to include in html docs],
Index: Makefile.in
===================================================================
RCS file: /repository/phpdoc/Makefile.in,v
retrieving revision 1.192
diff -u -r1.192 Makefile.in
--- Makefile.in 20 Feb 2007 21:17:39 -0000 1.192
+++ Makefile.in 6 Jun 2007 10:47:54 -0000
@@ -39,7 +39,7 @@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
-
[EMAIL PROTECTED]@
PHPBOOK=phpbook
PHPDSSSL=$(PHPBOOK)/phpbook-dsssl
@@ -59,6 +59,7 @@
HOWTO_XSL_SHEET=$(PHPXSL)/howto.xsl
QUICKREF_XSL_SHEET=$(PHPXSL)/quickref.xsl
XUL_XSL_SHEET=$(PHPXSL)/htmlhelp.xsl
+PARTIAL_STYLESHEET=$(PHPXSL)/@PARTIAL_STYLESHEET@
BIGHTML_DEPS=$(HTML_STYLESHEET) $(PHPDSSSL)/html-common.dsl $(PHPDSSSL)/html-locale.dsl.in $(PHPDSSSL)/common.dsl.in images
HTML_DEPS=$(HTML_STYLESHEET) $(PHPDSSSL)/html-common.dsl $(PHPDSSSL)/html-locale.dsl.in $(PHPDSSSL)/common.dsl.in images_html
@@ -324,6 +325,13 @@
-jadetex $<
-jadetex $<
+# {{{ partial builds
+part/%: manual.xml
+ @if test ! -d $(PARTIAL_STYLE); then mkdir $(PARTIAL_STYLE); fi
+ ${XSLTPROC} --stringparam rootid $(@F) $(PARTIAL_STYLESHEET) manual.xml
+ $(PHP) -q $(scriptdir)/html_syntax.php $(PARTIAL_STYLE) xsl $(PARTIAL_STYLE)/
+# }}}
+
# {{{ tests
# test all possible errors