source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/tools/make/Makefile.docParam@ 1fa2099

multilib-10.1
Last change on this file since 1fa2099 was 1fa2099, checked in by Thomas Trepl <thomas@…>, 5 years ago

Initial creation of multilib branch

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11565 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 1.9 KB
Line 
1# $Source$
2# $Author: xmldoc $
3# $Date: 2007-03-23 21:57:22 +0000 (Fri, 23 Mar 2007) $
4# $Revision: 6759 $
5# vim: number
6#
7# ------------------------------------------------------------------
8# ** Makefile.paramDoc - create param.xsl files w/ embedded doc **
9# ------------------------------------------------------------------
10
11PARAMFILES = $(wildcard ../../*/param.xsl)
12PARAMFILESDOCD = $(foreach base,$(basename $(PARAMFILES)),$(base).docd.xsl)
13
14XSLT=xsltproc
15XSLTFLAGS=
16
17COPYDOC := <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() = &apos;param&apos;]"> \
21 <xsl:call-template name="copy-xsl-source"/> \
22 </xsl:template> \
23 <xsl:template match="*[local-name() = &apos;attribute-set&apos;]"> \
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(&apos;../../params/&apos;,@name,&apos;.xml&apos;)"/> \
30 <xsl:apply-templates select="document($$source)/*[local-name() = &apos;refentry&apos;]"/> \
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() = &apos;refentry&apos;]"> \
41 <xsl:text>&\#x0a;</xsl:text> \
42 <doc:refentry id="{@*[local-name() = &apos;id&apos;]}"> \
43 <xsl:apply-templates/> \
44 </doc:refentry> \
45 <xsl:text>&\#x0a;</xsl:text> \
46 </xsl:template> \
47 <xsl:template match="*[local-name() = &apos;refsynopsisdiv&apos;]"/> \
48</xsl:stylesheet>
49
50all: $(PARAMFILESDOCD)
51
52%.docd.xsl: %.xsl
53 @echo '$(COPYDOC)' | $(XSLT) $(XSLTFLAGS) - $< > $@
54
55debug:
56 @echo $(PARAMFILESDOCD)
57
58clean:
59 $(RM) $(PARAMFILESDOCD)
Note: See TracBrowser for help on using the repository browser.