7.5-systemd
7.6-systemd
7.7-systemd
7.8-systemd
7.9-systemd
Line | |
---|
1 | # $Source$
|
---|
2 | # $Author$
|
---|
3 | # $Date$
|
---|
4 | # $Revision: 6759 $
|
---|
5 | # vim: number
|
---|
6 | #
|
---|
7 | # ------------------------------------------------------------------
|
---|
8 | # ** Makefile.paramDoc - create param.xsl files w/ embedded doc **
|
---|
9 | # ------------------------------------------------------------------
|
---|
10 |
|
---|
11 | PARAMFILES = $(wildcard ../../*/param.xsl)
|
---|
12 | PARAMFILESDOCD = $(foreach base,$(basename $(PARAMFILES)),$(base).docd.xsl)
|
---|
13 |
|
---|
14 | XSLT=xsltproc
|
---|
15 | XSLTFLAGS=
|
---|
16 |
|
---|
17 | COPYDOC := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
|
---|
18 | xmlns:doc="http://docbook.org/ns/docbook" \
|
---|
19 | version="1.0"> \
|
---|
20 | <xsl:template match="*[local-name() = 'param']"> \
|
---|
21 | <xsl:call-template name="copy-xsl-source"/> \
|
---|
22 | </xsl:template> \
|
---|
23 | <xsl:template match="*[local-name() = 'attribute-set']"> \
|
---|
24 | <xsl:call-template name="copy-xsl-source"/> \
|
---|
25 | </xsl:template> \
|
---|
26 | <xsl:template name="copy-xsl-source"> \
|
---|
27 | <xsl:variable \
|
---|
28 | name="source" \
|
---|
29 | select="concat('../../params/',@name,'.xml')"/> \
|
---|
30 | <xsl:apply-templates select="document($$source)/*[local-name() = 'refentry']"/> \
|
---|
31 | <xsl:copy> \
|
---|
32 | <xsl:apply-templates select="@* | node()"/> \
|
---|
33 | </xsl:copy> \
|
---|
34 | </xsl:template> \
|
---|
35 | <xsl:template match="node() | @*"> \
|
---|
36 | <xsl:copy> \
|
---|
37 | <xsl:apply-templates select="@* | node()"/> \
|
---|
38 | </xsl:copy> \
|
---|
39 | </xsl:template> \
|
---|
40 | <xsl:template match="*[local-name() = 'refentry']"> \
|
---|
41 | <xsl:text>&\#x0a;</xsl:text> \
|
---|
42 | <doc:refentry id="{@*[local-name() = 'id']}"> \
|
---|
43 | <xsl:apply-templates/> \
|
---|
44 | </doc:refentry> \
|
---|
45 | <xsl:text>&\#x0a;</xsl:text> \
|
---|
46 | </xsl:template> \
|
---|
47 | <xsl:template match="*[local-name() = 'refsynopsisdiv']"/> \
|
---|
48 | </xsl:stylesheet>
|
---|
49 |
|
---|
50 | all: $(PARAMFILESDOCD)
|
---|
51 |
|
---|
52 | %.docd.xsl: %.xsl
|
---|
53 | @echo '$(COPYDOC)' | $(XSLT) $(XSLTFLAGS) - $< > $@
|
---|
54 |
|
---|
55 | debug:
|
---|
56 | @echo $(PARAMFILESDOCD)
|
---|
57 |
|
---|
58 | clean:
|
---|
59 | $(RM) $(PARAMFILESDOCD)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.