]>
Commit | Line | Data |
---|---|---|
1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | ||
3 | <!-- | |
4 | Name: include/unix.xml | |
5 | Purpose: Declarations for unix slaves | |
6 | Author: Michael Wetherell | |
7 | Copyright: (c) Michael Wetherell | |
8 | Licence: wxWindows licence | |
9 | --> | |
10 | ||
11 | <bot xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
12 | xmlns:xi="http://www.w3.org/2001/XInclude"> | |
13 | ||
14 | <xi:include href="defs.xml"/> | |
15 | ||
16 | <!-- | |
17 | build - Override <build> to add a slave lock. This has the effect of | |
18 | serialising all the builds on this machine | |
19 | --> | |
20 | <xsl:template name="build"> | |
21 | <xsl:param name="content"/> | |
22 | <build> | |
23 | <lock>slave</lock> | |
24 | <xsl:copy-of select="$content"/> | |
25 | </build> | |
26 | </xsl:template> | |
27 | ||
28 | <!-- | |
29 | checkout - checks out to a shared directory | |
30 | ||
31 | Checks out to a directory '../$branch' shared between builds. Then creates | |
32 | a directory 'build' for this job to build in, and 'src' which is a link to | |
33 | the shared sources. This relies on all builds for the same branch being | |
34 | serialised with lock so that one build doesn't update the sources while | |
35 | another is building them. | |
36 | ||
37 | Usage typically just: | |
38 | <checkout/> | |
39 | for the trunk, or: | |
40 | <checkout branch="branches/WX_2_8_BRANCH"/> | |
41 | to checkout a branch. | |
42 | --> | |
43 | <xsl:template name="checkout"> | |
44 | <xsl:param name="content"/> | |
45 | <xsl:param name="branch" select="'trunk'"/> | |
46 | <xsl:variable name="nodes" select="exsl:node-set($content)"/> | |
47 | <svn> | |
48 | <xsl:if test="not($nodes/svnurl)"> | |
49 | <xsl:if test="not($nodes/baseURL)"> | |
50 | <baseURL><SVN_URL/></baseURL> | |
51 | </xsl:if> | |
52 | <xsl:if test="not($nodes/defaultBranch)"> | |
53 | <defaultBranch><xsl:value-of select="$branch"/></defaultBranch> | |
54 | </xsl:if> | |
55 | </xsl:if> | |
56 | <xsl:if test="not($nodes/workdir)"> | |
57 | <workdir>../<xsl:value-of select="$branch"/></workdir> | |
58 | </xsl:if> | |
59 | <xsl:copy-of select="$content"/> | |
60 | </svn> | |
61 | <shellcommand> | |
62 | <description>creating build directory</description> | |
63 | <descriptionDone>create build directory</descriptionDone> | |
64 | <workdir>.</workdir> | |
65 | <command> | |
66 | rm -rf build && | |
67 | mkdir build && | |
68 | ln -sf ../<xsl:value-of select="$branch"/> src | |
69 | </command> | |
70 | </shellcommand> | |
71 | </xsl:template> | |
72 | ||
73 | <!-- | |
74 | configure - use '../src/configure' as the default configure command, | |
75 | include disable-precomp-headers in the default options and | |
76 | post process the Makefiles to use ccache. | |
77 | ||
78 | Usage: <configure options="-with-foobar"/> | |
79 | --> | |
80 | <xsl:template name="configure"> | |
81 | <xsl:param name="content"/> | |
82 | <xsl:param name="options"/> | |
83 | <configure> | |
84 | <copy-with-defaults content="{$content}"> | |
85 | <command>../src/configure --disable-precomp-headers --disable-compat28 --disable-compat26 <xsl:value-of select="normalize-space($options)"/></command> | |
86 | </copy-with-defaults> | |
87 | <command>find . -name Makefile | xargs perl -pi -e 's/^(?:CC|CXX) = /$&ccache /'</command> | |
88 | </configure> | |
89 | </xsl:template> | |
90 | ||
91 | </bot> |