[gimp-help-2] [make] Generate MAINTAINERS from gimp-help-2.doap
- From: Ulf-D. Ehlert <ulfehlert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help-2] [make] Generate MAINTAINERS from gimp-help-2.doap
- Date: Thu, 22 Apr 2010 18:44:28 +0000 (UTC)
commit 60740eee0214bd9d3d80ef9e49456ecb7298c7b8
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date: Thu Apr 22 20:06:07 2010 +0200
[make] Generate MAINTAINERS from gimp-help-2.doap
MAINTAINERS | 17 +++++++-
Makefile.GNU | 13 +++++-
Makefile.am | 17 ++++++--
stylesheets/doap2text.xsl | 97 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 136 insertions(+), 8 deletions(-)
---
diff --git a/MAINTAINERS b/MAINTAINERS
index 40b7094..aa6a7e4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1,6 +1,21 @@
Currently active maintainers
----------------------------
-Roman Joost
+Róman Joost
E-mail: romanofski gimp org
Userid: romanofski
+
+Ulf-D. Ehlert
+E-mail: ulfehlert svn gnome org
+Userid: ulfehlert
+
+Marco Ciampa
+E-mail: ciampix libero it
+Userid: marcoc
+
+Julien Hardelin
+E-mail: jm hard wanadoo fr
+Userid: jhardlin
+
+(This file was generated automatically
+from "gimp-help-2.doap". Do not edit.)
diff --git a/Makefile.GNU b/Makefile.GNU
index d698c88..3336426 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -109,9 +109,11 @@ AUTHORS_TEXT_STYLESHEETS = \
AUTHORS_DOCBOOK_STYLESHEETS = \
stylesheets/authors_docbook.xsl \
stylesheets/authors_common.xsl
+# Stylesheet generating MAINTAINERS
+DOAP_STYLESHEET = stylesheets/doap2text.xsl
# Targets which don't require source file list
-QUICK_TARGETS = help clean dot image-% AUTHORS
+QUICK_TARGETS = help clean dot image-% AUTHORS MAINTAINERS
# Files & directories
ifeq ($(filter $(QUICK_TARGETS),$(MAKECMDGOALS)),)
@@ -279,7 +281,7 @@ endif
########################################################################
.PHONY: all
-all: html index AUTHORS
+all: html index AUTHORS MAINTAINERS
########################################################################
@@ -317,7 +319,7 @@ help: make.help
########################################################################
-#### Make AUTHORS file ####
+#### Make AUTHORS and MAINTAINERS file ####
########################################################################
AUTHORS: $(AUTHORS_SOURCE_XML) $(AUTHORS_TEXT_STYLESHEETS)
@@ -337,6 +339,11 @@ $(AUTHORS_DOCBOOK_XML): $(AUTHORS_SOURCE_XML) $(AUTHORS_DOCBOOK_STYLESHEETS)
$< \
> $@
+MAINTAINERS: gimp-help-2.doap $(DOAP_STYLESHEET)
+ $(msg) "[DOC] $@"
+ $(cmd) $(XSLTPROC) --output $@ $(XSLTFLAGS) $(XSLTEXTRAFLAGS) \
+ $(DOAP_STYLESHEET) $<
+
########################################################################
#### Make pot files: XML(en) --> POT ####
diff --git a/Makefile.am b/Makefile.am
index 128708f..c60b27e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -106,9 +106,11 @@ AUTHORS_TEXT_STYLESHEETS = \
AUTHORS_DOCBOOK_STYLESHEETS = \
stylesheets/authors_docbook.xsl \
stylesheets/authors_common.xsl
+# Stylesheet generating MAINTAINERS
+DOAP_STYLESHEET = stylesheets/doap2text.xsl
# Targets which don't require source file list
-QUICK_TARGETS = help clean dot image-% AUTHORS
+QUICK_TARGETS = help clean dot image-% AUTHORS MAINTAINERS
# lists of source (XML) files and source directories
# HIDE FROM AUTOMAKE #ifeq ($(filter $(QUICK_TARGETS),$(MAKECMDGOALS)),)
@@ -152,7 +154,8 @@ XSL_FILES = \
stylesheets/makeindex.xsl \
stylesheets/plainprint.xsl \
stylesheets/plainhtml.xsl.in \
- stylesheets/htmlalternate.xsl
+ stylesheets/htmlalternate.xsl \
+ stylesheets/doap2text.xsl
# tools needed for building
DIST_TOOLS = \
@@ -163,6 +166,7 @@ DIST_TOOLS = \
# additional files to be distributed (automake)
EXTRA_DIST = \
AUTHORS \
+ MAINTAINERS \
HACKING \
INSTALL \
TERMINOLOGY \
@@ -335,7 +339,7 @@ copy = $(LN_S) $(abs_srcdir)/$(1) $(2)
# at top of Makefile, so running "make" might create some random file
# (depending on which target is the first one in the Makefile).
# Use "make all" instead. (FIXME: and get rid of automake/autoconf!)
-all-local: html-local index AUTHORS
+all-local: html-local index AUTHORS MAINTAINERS
# TODO?: check-local: validate
@@ -375,7 +379,7 @@ help: make.help
########################################################################
-#### Make AUTHORS file ####
+#### Make AUTHORS and MAINTAINERS file ####
########################################################################
AUTHORS: $(AUTHORS_DATA_XML) $(AUTHORS_TEXT_STYLESHEETS)
@@ -396,6 +400,11 @@ $(AUTHORS_DOCBOOK_XML): $(AUTHORS_DATA_XML) $(AUTHORS_DOCBOOK_STYLESHEETS)
> $@
$(cmd) touch -c -r $< $@ || true
+MAINTAINERS: gimp-help-2.doap $(DOAP_STYLESHEET)
+ $(msg) "[DOC] $@"
+ $(cmd) $(XSLTPROC) --output $@ $(XSLTFLAGS) $(XSLTEXTRAFLAGS) \
+ $(DOAP_STYLESHEET) $<
+
########################################################################
#### Make pot files: XML(en) --> POT ####
diff --git a/stylesheets/doap2text.xsl b/stylesheets/doap2text.xsl
new file mode 100644
index 0000000..a3c7955
--- /dev/null
+++ b/stylesheets/doap2text.xsl
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Simple XSL transformation to create MAINTAINERS text version from
+ gimp-help-2.doap.
+
+ This file is part of the gimp-help-2 project and is
+ (C) 2010 The GIMP Documentation Team (License: GPL).
+-->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:doap="http://usefulinc.com/ns/doap#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/"
+ xmlns:gnome="http://api.gnome.org/doap-extensions#">
+
+ <xsl:output method="text"/>
+
+ <!-- valid mode: 'maintainers' (we may add 'authors' in the future) -->
+ <xsl:param name="doap2text.mode" select="'maintainers'"/>
+ <!-- not used yet -->
+ <xsl:param name="doap2text.debug" select="0"/>
+ <!-- add an "automatically generated" note? -->
+ <xsl:param name="doap2text.maintainers.add-footnote" select="1"/>
+
+
+ <!--=======================================================-->
+ <xsl:template match="/doap:Project">
+ <!--=======================================================-->
+ <xsl:variable name="doap2text.target">
+ <xsl:value-of select="$doap2text.mode"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$doap2text.target='maintainers'">
+ <xsl:text>Currently active maintainers
+----------------------------
+</xsl:text>
+ <xsl:apply-templates select="doap:maintainer/foaf:Person"
+ mode="maintainers"/>
+ <xsl:if test="$doap2text.maintainers.add-footnote=1">
+ <xsl:text>
+(This file was generated automatically
+from "gimp-help-2.doap". Do not edit.)
+</xsl:text>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="$doap2text.target='authors'">
+ <xsl:message terminate="yes">
+ <xsl:text>Error: Generating AUTHORS from gimp-help-2.doap is </xsl:text>
+ <xsl:text>not implemented yet.</xsl:text>
+ </xsl:message>
+ </xsl:when>
+ <xsl:when test="$doap2text.target=''">
+ <xsl:message terminate="yes">
+ <xsl:text>Error: 'doap2text.mode' parameter not set.</xsl:text>
+ </xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>Error: Unknown doap2text.mode specified: </xsl:text>
+ <xsl:value-of select="$doap2text.target"/>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!--===============================================================-->
+ <xsl:template match="doap:maintainer/foaf:Person" mode="maintainers">
+ <!--===============================================================-->
+ <xsl:text>
+</xsl:text>
+ <xsl:value-of select="foaf:name"/>
+ <xsl:text>
+E-mail: </xsl:text>
+ <xsl:variable name="mbox">
+ <xsl:choose>
+ <xsl:when test="contains(foaf:mbox/@rdf:resource,'mailto:')">
+ <xsl:value-of select="substring-after(foaf:mbox/@rdf:resource,':')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="foaf:mbox/@rdf:resource"/>
+ <xsl:message>
+ <xsl:text>doap2text.xsl: warning: missing "mailto:" in "</xsl:text>
+ <xsl:value-of select="foaf:mbox/@rdf:resource"/>
+ <xsl:text>"</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="$mbox"/>
+ <xsl:text>
+Userid: </xsl:text>
+ <xsl:value-of select="gnome:userid"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]