source: greenstone3/trunk/dist-resources/convert-build-xml.xsl@ 14825

Last change on this file since 14825 was 14825, checked in by oranfry, 16 years ago

replace get-macos-etra target with an empty target when making a distribution

  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
5 <!-- we basically want to copy everything except for a few targets that no longer apply -->
6 <xsl:output method="xml"/>
7
8 <!-- for some reason, the default copy-of doesn't copy empty attributes, so have this to get the empty arg1 in equals-->
9 <xsl:template match="project|condition|and|isset|equals|not|or">
10 <xsl:copy>
11 <xsl:copy-of select="@*"/>
12 <xsl:apply-templates/>
13 </xsl:copy>
14 </xsl:template>
15
16 <!-- delete the old install target-->
17 <xsl:template match="target[@name='install']"></xsl:template>
18
19 <!-- delete the unnecessary targets -->
20 <xsl:template match="target[starts-with(@name, 'prepare')]"></xsl:template>
21 <xsl:template match="target[starts-with(@name, 'cvsupdate')]"></xsl:template>
22 <xsl:template match="target[starts-with(@name, 'update')]"></xsl:template>
23 <xsl:template match="target[starts-with(@name, 'checkout')]"></xsl:template>
24 <xsl:template match="target[starts-with(@name, 'rename-gs2build')]"></xsl:template>
25 <xsl:template match="target[@name='test']"></xsl:template>
26 <xsl:template match="target[@name='get-macos-extra']"><target name="get-macos-extra"></target></xsl:template>
27 <xsl:template match="target[@name='get-windows-binaries']"></xsl:template>
28
29 <xsl:variable name="usage-for-dist" select="document('dist-build.xml')/project/target[@name='usage-for-binary-dist']"/>
30
31 <!-- copy in our new usage target -->
32 <xsl:template match="target[@name='usage']">
33 <target name="usage">
34 <xsl:copy-of select="$usage-for-dist/@description|$usage-for-dist/node()"/>
35 </target>
36 </xsl:template>
37
38 <xsl:template match="*">
39 <xsl:copy-of select="."/>
40 </xsl:template>
41
42 <xsl:template match="comment()">
43 <xsl:copy-of select="."/>
44 <xsl:text>
45</xsl:text>
46 </xsl:template>
47
48</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.