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 unnecessary targets -->
|
---|
17 | <xsl:template match="target[starts-with(@name, 'prepare')]"></xsl:template>
|
---|
18 | <xsl:template match="target[starts-with(@name, 'cvsupdate')]"></xsl:template>
|
---|
19 | <xsl:template match="target[starts-with(@name, 'update')]"></xsl:template>
|
---|
20 | <xsl:template match="target[starts-with(@name, 'checkout')]"></xsl:template>
|
---|
21 | <xsl:template match="target[starts-with(@name, 'rename-gs2build')]"></xsl:template>
|
---|
22 | <xsl:template match="target[@name='test']"></xsl:template>
|
---|
23 | <xsl:template match="target[@name='get-macos-extra']"><target name="get-macos-extra"></target></xsl:template>
|
---|
24 | <xsl:template match="target[@name='get-windows-binaries']"></xsl:template>
|
---|
25 |
|
---|
26 | <xsl:template match="property[@name='install-command']">
|
---|
27 | <property name="install-command" value="ant [options] install"/>
|
---|
28 | </xsl:template>
|
---|
29 |
|
---|
30 | <xsl:variable name="install-for-dist" select="document('dist-build.xml')/project/target[@name='install-for-source-dist']"/>
|
---|
31 |
|
---|
32 | <!-- copy in our new install target -->
|
---|
33 | <xsl:template match="target[@name='install']">
|
---|
34 | <target name="install">
|
---|
35 | <xsl:copy-of select="$install-for-dist/@depends|$install-for-dist/@description|$install-for-dist/@if|$install-for-dist/@unless|$install-for-dist/node()"/>
|
---|
36 | </target>
|
---|
37 | </xsl:template>
|
---|
38 |
|
---|
39 | <xsl:template match="*">
|
---|
40 | <xsl:copy-of select="."/>
|
---|
41 | </xsl:template>
|
---|
42 |
|
---|
43 | <xsl:template match="comment()">
|
---|
44 | <xsl:copy-of select="."/>
|
---|
45 | <xsl:text>
|
---|
46 | </xsl:text>
|
---|
47 | </xsl:template>
|
---|
48 |
|
---|
49 | </xsl:stylesheet>
|
---|