File: unix.xml

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (91 lines) | stat: -rw-r--r-- 3,063 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="utf-8"?>

<!--
    Name:       include/unix.xml
    Purpose:    Declarations for unix slaves
    Author:     Michael Wetherell
    Copyright:  (c) Michael Wetherell
    Licence:    wxWindows licence
-->

<bot xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:xi="http://www.w3.org/2001/XInclude">

<xi:include href="defs.xml"/>

<!--
    build - Override <build> to add a slave lock. This has the effect of
            serialising all the builds on this machine
-->
<xsl:template name="build">
    <xsl:param name="content"/>
    <build>
        <lock>slave</lock>
        <xsl:copy-of select="$content"/>
    </build>
</xsl:template>

<!--
    checkout - checks out to a shared directory

    Checks out to a directory '../$branch' shared between builds. Then creates
    a directory 'build' for this job to build in, and 'src' which is a link to
    the shared sources. This relies on all builds for the same branch being
    serialised with lock so that one build doesn't update the sources while
    another is building them.

    Usage typically just:
        <checkout/>
    for the trunk, or:
        <checkout branch="branches/WX_2_8_BRANCH"/>
    to checkout a branch.
-->
<xsl:template name="checkout">
    <xsl:param name="content"/>
    <xsl:param name="branch" select="'trunk'"/>
    <xsl:variable name="nodes" select="exsl:node-set($content)"/>
    <svn>
        <xsl:if test="not($nodes/svnurl)">
            <xsl:if test="not($nodes/baseURL)">
                <baseURL><SVN_URL/></baseURL>
            </xsl:if>
            <xsl:if test="not($nodes/defaultBranch)">
                <defaultBranch><xsl:value-of select="$branch"/></defaultBranch>
            </xsl:if>
        </xsl:if>
        <xsl:if test="not($nodes/workdir)">
            <workdir>../<xsl:value-of select="$branch"/></workdir>
        </xsl:if>
        <xsl:copy-of select="$content"/>
    </svn>
    <shellcommand>
        <description>creating build directory</description>
        <descriptionDone>create build directory</descriptionDone>
        <workdir>.</workdir>
        <command>
            rm -rf build &amp;&amp;
            mkdir build &amp;&amp;
            ln -sf ../<xsl:value-of select="$branch"/> src
        </command>
    </shellcommand>
</xsl:template>

<!--
    configure - use '../src/configure' as the default configure command,
                include disable-precomp-headers in the default options and
                post process the Makefiles to use ccache.

    Usage: <configure options="-with-foobar"/>
-->
<xsl:template name="configure">
    <xsl:param name="content"/>
    <xsl:param name="options"/>
    <configure>
        <copy-with-defaults content="{$content}">
            <command>../src/configure --disable-precomp-headers --disable-compat28 --disable-compat26 <xsl:value-of select="normalize-space($options)"/></command>
        </copy-with-defaults>
        <command>find . -name Makefile | xargs perl -pi -e 's/^(?:CC|CXX) = /$&amp;ccache /'</command>
    </configure>
</xsl:template>

</bot>