[PATCH xorg-docs 3/3] Add Makefile XML profiling support

Gaetan Nadon memsize at videotron.ca
Fri Nov 5 18:22:24 PDT 2010


Each target type (html, pdf, ps, txt) needs its own stylesheet
which all use the common xorg.xsl stylesheet.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 profile.inc |   34 ++++++++++++++++++++++++++++++++++
 xmlrules.in |   19 ++++++++++++++-----
 2 files changed, 48 insertions(+), 5 deletions(-)
 create mode 100644 profile.inc

diff --git a/profile.inc b/profile.inc
new file mode 100644
index 0000000..9d1e332
--- /dev/null
+++ b/profile.inc
@@ -0,0 +1,34 @@
+# This file holds the profiles used in the Xorg documentation
+# Keeping all of it here, prevents duplication.
+
+# ***************************************
+# Xorg profiling (optional text) entities
+# ***************************************
+
+# These should be set according to which snapshot/release this is
+# Each of these should have an entry in Xorg-profile-mode.xsl.
+# That file handles the actual processing
+
+XORG_PROFILE_PARMS =						\
+	--stringparam profile.firstsnap="IGNORE"		\
+	--stringparam profile.latersnap="IGNORE"		\
+	--stringparam profile.snapshot="IGNORE"			\
+	--stringparam profile.notsnapshot="INCLUDE"		\
+	--stringparam profile.relcandidate="IGNORE"		\
+	--stringparam profile.release="INCLUDE"			\
+	--stringparam profile.firstrel="IGNORE"			\
+	--stringparam profile.earlyrel="IGNORE"			\
+	--stringparam profile.laterrel="INCLUDE"		\
+	--stringparam profile.majorrel="IGNORE"			\
+	--stringparam profile.minorrel="INCLUDE"		\
+	--stringparam profile.fullrel="IGNORE"			\
+	--stringparam profile.fullbinaries="INCLUDE"		\
+	--stringparam profile.updaterel="IGNORE"		\
+	--stringparam profile.prevrelwasupdate="IGNORE"		\
+	--stringparam profile.os="linux"			\
+	--stringparam profile.haverelnotes="INCLUDE"
+
+
+# ***************************************
+# End of Xorg profiling entities
+# ***************************************
diff --git a/xmlrules.in b/xmlrules.in
index 41abb1b..d5556a9 100644
--- a/xmlrules.in
+++ b/xmlrules.in
@@ -32,10 +32,14 @@ if HAVE_XMLTO_TEXT
 xml_DATA += $(doc_sources:.xml=.txt)
 endif
 
+# To use XML profiling, the document makefile should include profile.inc
+# THe module xorg-sgml-doctools must be installed
 if HAVE_STYLESHEETS
+include $(top_srcdir)/profile.inc
 XMLTO_FLAGS =								\
 	-m $(XSL_STYLESHEET)						\
 	--searchpath $(XORG_SGML_PATH)/X11				\
+	$(XORG_PROFILE_PARMS)						\
 	--stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css	\
 	--stringparam img.src.path=$(abs_builddir)/
 endif
@@ -45,19 +49,24 @@ CLEANFILES = $(xml_DATA)
 SUFFIXES = .xml .ps .pdf .txt .html
 
 %.txt: %.xml $(dist_xml_DATA)
-	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
+	$(AM_V_GEN)$(XMLTO) -x $(STYLESHEET_SRCDIR)/Xorg_profile-txt.xsl \
+	$(XMLTO_FLAGS) txt $<
 
 %.html: %.xml $(dist_xml_DATA)
-	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
+	$(AM_V_GEN)$(XMLTO) -x $(STYLESHEET_SRCDIR)/Xorg_profile-no-chunk-xhtml.xsl \
+	$(XMLTO_FLAGS) xhtml-nochunks $<
 
 %.pdf: %.xml $(dist_xml_DATA)
-	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
+	$(AM_V_GEN)$(XMLTO) -x $(STYLESHEET_SRCDIR)/Xorg_profile-pdf.xsl \
+	$(XMLTO_FLAGS) --with-fop pdf $<
 
 %.ps: %.xml $(dist_xml_DATA)
-	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
+	$(AM_V_GEN)$(XMLTO) -x $(STYLESHEET_SRCDIR)/Xorg_profile-pdf.xsl \
+	$(XMLTO_FLAGS) --with-fop ps $<
 
 chunked-html: $(doc_sources)
-	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) -o html xhtml $(doc_sources)
+	$(AM_V_GEN)$(XMLTO) -x $(STYLESHEET_SRCDIR)/Xorg_profile-chunk-xhtml.xsl \
+	$(XMLTO_FLAGS) -o html xhtml $(doc_sources)
 
 clean-local:
 	$(AM_V_GEN)rm -fr html/
-- 
1.6.0.4



More information about the xorg-devel mailing list