unix.xml 3.0 KB

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