[PATCH 3/5 v4] Show Xserver release/version date in DIX & DDX docs
Dan Nicholson
dbn.lists at gmail.com
Wed May 19 06:37:47 PDT 2010
On Tue, May 18, 2010 at 3:51 PM, Alan Coopersmith
<alan.coopersmith at oracle.com> wrote:
> Uses a catalog file to provide the path to an entity file in a
> different directory than the xml sources.
This commit message isn't really accurate anymore since the entity
file is used directly from the xml sources.
>
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>
> Back to using xmlto, thanks to Dan's suggestion on how to make it work
> with entity files in other directories.
>
> configure.ac | 2 ++
> doc/xml/.gitignore | 5 +++++
> doc/xml/Xserver-spec.xml | 4 +++-
> doc/xml/xmlrules.in | 15 ++++++++++++---
> doc/xml/xserver.ent.in | 3 +++
> hw/xfree86/doc/sgml/DESIGN.xml | 4 +++-
> 6 files changed, 28 insertions(+), 5 deletions(-)
> create mode 100644 doc/xml/.gitignore
> create mode 100644 doc/xml/xserver.ent.in
>
> diff --git a/configure.ac b/configure.ac
> index e981feb..d288fe9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2139,6 +2139,7 @@ AC_TRY_COMPILE([
>
> AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
>
> +AC_SUBST([RELEASE_DATE])
> BUILD_DATE="`date +'%Y%m%d'`"
> AC_SUBST([BUILD_DATE])
> BUILD_TIME="`date +'1%H%M%S'`"
> @@ -2162,6 +2163,7 @@ dbe/Makefile
> dix/Makefile
> doc/Makefile
> doc/xml/Makefile
> +doc/xml/xserver.ent
> fb/Makefile
> record/Makefile
> config/Makefile
> diff --git a/doc/xml/.gitignore b/doc/xml/.gitignore
> new file mode 100644
> index 0000000..4961738
> --- /dev/null
> +++ b/doc/xml/.gitignore
> @@ -0,0 +1,5 @@
> +# Add & Override for this directory and its subdirectories
> +xserver.ent
> +Xserver-spec.html
> +Xserver-spec.pdf
> +Xserver-spec.txt
> diff --git a/doc/xml/Xserver-spec.xml b/doc/xml/Xserver-spec.xml
> index 8691f18..4b1259b 100644
> --- a/doc/xml/Xserver-spec.xml
> +++ b/doc/xml/Xserver-spec.xml
> @@ -1,6 +1,7 @@
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
> "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
> + <!ENTITY % defs SYSTEM "file:///xserver.ent"> %defs;
Just FYI because I toyed around with this a little more. The file://
prefix seems to be redundant and just a normal absolute path is fine.
Also, any directory prefix is fine since the tools will strip down to
just the basename when searching. So, /X11/doc/xserver.ent or any
other bogus path would be fine, too.
> ]>
>
> <article>
> @@ -38,7 +39,8 @@
> <affiliation><orgname>X.org Foundation and Hewlett Packard</orgname></affiliation>
> </author>
> <publisher><publishername>The X.Org Foundation</publishername></publisher>
> - <pubdate>2004</pubdate>
> + <pubdate>&xserver.reldate;</pubdate>
> + <releaseinfo>X server version &xserver.version;</releaseinfo>
> <title>Definition of the Porting Layer for the X v11 Sample Server</title>
> <titleabbrev>X Porting Layer</titleabbrev>
> <revhistory>
> diff --git a/doc/xml/xmlrules.in b/doc/xml/xmlrules.in
> index a4d43f9..1be3691 100644
> --- a/doc/xml/xmlrules.in
> +++ b/doc/xml/xmlrules.in
> @@ -36,24 +36,33 @@ BUILT_DOC_FILES =
>
> SUFFIXES = .xml .txt .html .pdf
>
> +XML_ENT_DIR = $(abs_top_builddir)/doc/xml
> +XMLTO_FLAGS = --searchpath $(XML_ENT_DIR)
> +
> if HAVE_XMLTO
> BUILT_DOC_FILES += $(TXT_FILES)
> .xml.txt:
> @rm -f $@
> - $(AM_V_GEN)$(XMLTO) txt $<
> + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
>
> BUILT_DOC_FILES += $(HTML_FILES)
> .xml.html:
> @rm -f $@
> - $(AM_V_GEN)$(XMLTO) xhtml-nochunks $<
> + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
>
> if HAVE_FOP
> BUILT_DOC_FILES += $(PDF_FILES)
> .xml.pdf:
> @rm -f $@
> - $(AM_V_GEN)$(XMLTO) --with-fop pdf $<
> + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
> endif
>
> endif
>
> CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES)
> +
> +# All the files we build depend on the entities
> +$(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent
> +
> +$(XML_ENT_DIR)/xserver.ent:
> + (cd $(XML_ENT_DIR) && $(MAKE) $(AM_MAKEFLAGS) $(@F))
Is $(@F) a gnu makeism? I can't tell, but I don't think so. Note that
if you're using this variant to avoid writing "xserver.ent" twice, you
might as well use $(@D) for the "cd" so you don't have to write
"$(XML_ENT_DIR)" twice. Just a nitpick, though.
Once the commit message is cleaned up:
Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
More information about the xorg-devel
mailing list