Menu

[r723]: / trunk / ext / build / subversion.build  Maximize  Restore  History

Download this file

173 lines (164 with data), 8.1 kB

<?xml version="1.0"?>
<project name="subversion" default="build" basedir="..\subversion">

  <!-- ====================================================================== -->
  <!-- Project targets                                                        -->
  <!-- ====================================================================== -->
  <target name="rebuild" depends="clean,build" />

  <target name="clean">
    <description>
      Cleans previous built files.
    </description>

    <if test="${cleanup == 'yes'}">
      <delete>
        <fileset>
          <include name="${configuration}_${platform}\**" />
        </fileset>
      </delete>
    </if>
  </target>

  <target name="build" depends="clean">
    <mkdir dir="${configuration}_${platform}" />
    <copy file="subversion\svn_private_config.hw" tofile="subversion\svn_private_config.h" overwrite="true" />
    <loadfile file="subversion\svn_private_config.hw" property="configfile">
      <filterchain>
        <replacestring from="#define SVN_LIBSVN_FS_LINKS_FS_FS" to="/* #define SVN_LIBSVN_FS_LINKS_FS_FS */" />
        <replacestring from="#define SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL" to="/* #define SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL */" />
        <replacestring from='#define DEFAULT_HTTP_LIBRARY "serf"' to='#define DEFAULT_HTTP_LIBRARY "neon"' />
      </filterchain>
    </loadfile>
    <echo file="subversion\svn_private_config.h" message="${configfile}" />

    <copy file="..\cyrus-sasl\include\prop.h" tofile="..\cyrus-sasl\include\orig_prop.h" overwrite="true" />
    <loadfile file="..\cyrus-sasl\include\prop.h" property="propfile">
      <filterchain>
        <replacestring from="#  define LIBSASL_API  __declspec(dllexport)" to="#  define LIBSASL_API  " />
        <replacestring from="#  define LIBSASL_VAR  __declspec(dllexport)" to="#  define LIBSASL_VAR  " />
        <replacestring from="#  define LIBSASL_API  __declspec(dllimport)" to="#  define LIBSASL_API  " />
        <replacestring from="#  define LIBSASL_VAR  __declspec(dllimport)" to="#  define LIBSASL_VAR  " />
      </filterchain>
    </loadfile>
    <echo file="..\cyrus-sasl\include\prop.h" message="${propfile}" />

    <exec program="python.exe">
      <arg value="build\transform_sql.py" />
      <arg value="subversion\libsvn_fs_fs\rep-cache-db.sql" />
      <arg value="subversion\libsvn_fs_fs\rep-cache-db.h" />
    </exec>
    <exec program="python.exe">
      <arg value="build\transform_sql.py" />
      <arg value="subversion\libsvn_wc\wc-metadata.sql" />
      <arg value="subversion\libsvn_wc\wc-metadata.h" />
    </exec>
    <exec program="python.exe">
      <arg value="build\transform_sql.py" />
      <arg value="subversion\libsvn_wc\wc-checks.sql" />
      <arg value="subversion\libsvn_wc\wc-checks.h" />
    </exec>
    <exec program="python.exe">
      <arg value="build\transform_sql.py" />
      <arg value="subversion\libsvn_wc\wc-queries.sql" />
      <arg value="subversion\libsvn_wc\wc-queries.h" />
    </exec>
    <exec program="python.exe">
      <arg value="build\transform_sql.py" />
      <arg value="subversion\libsvn_subr\internal_statements.sql" />
      <arg value="subversion\libsvn_subr\internal_statements.h" />
    </exec>

    <foreach item="Folder" property="foldername">
      <in>
        <items>
          <include name="subversion\libsvn*" />
          <exclude name="subversion\libsvn_fs*" />
          <exclude name="subversion\libsvn_auth_gnome_keyring" />
          <exclude name="subversion\libsvn_auth_kwallet" />
        </items>
      </in>
      <do>
        <property name="fname" value="${path::get-file-name(foldername)}" />
        <property name="soname" value="${path::change-extension(fname, 'so')}" />
        <property name="libname" value="${path::change-extension(fname, 'lib')}" />
        <mkdir dir="${configuration}_${platform}\${fname}" />
        <cl outputdir="${configuration}_${platform}\${fname}">
          <arg value="/O2" if="${configuration == 'release'}" />
          <arg value="/Oy" if="${configuration == 'release'}" />
          <arg value="/Od" if="${configuration != 'release'}" />
          <arg value="/FD" />
          <arg value="/EHsc" />
          <arg value="/MT" if="${configuration == 'release'}" />
          <arg value="/MTd" if="${configuration != 'release'}" />
          <arg value="/Gy" />
          <arg value="/W0" />
          <arg value="/nologo" />
          <arg value="/c" />
          <arg value="/Zi" />
          <arg value="/MP" />
          <arg value="/errorReport:prompt" />
          <arg value="/GL" if="${configuration == 'release'}" />
          <sources>
            <include name="subversion\${fname}\**.c" />
            <exclude name="subversion\libsvn_subr\win32_crash**.c" />
          </sources>
          <includedirs>
            <include name="subversion" />
            <include name="subversion\include" />
            <include name="subversion\${fname}" />
            <include name="..\apr\include" />
            <include name="..\apr-util\include" />
            <include name="..\apr-util\xml\expat\lib" />
            <include name="..\svn-win32-libintl\inc" />
            <include name="..\neon\src" />
            <include name="..\serf" />
            <include name="..\zlib" />
            <include name="..\sqlite" />
            <include name="..\cyrus-sasl\include" />
          </includedirs>
          <defines>
            <define name="APR_DECLARE_STATIC" />
            <define name="APU_DECLARE_STATIC" />
            <define name="SVN_LIBSVN_CLIENT_LINKS_RA_NEON=1" />
            <define name="SVN_LIBSVN_CLIENT_LINKS_RA_SERF=1" />
            <define name="SVN_NEON_0_25=1" />
            <define name="SVN_NEON_0_26=1" />
            <define name="SVN_NEON_0_27=1" />
            <define name="SVN_NEON_0_28=1" />
            <define name="SVN_NEON_0_29=1" />
            <define name="SVN_HAVE_NEON" />
            <define name="SVN_HAVE_SERF" />
            <define name="SVN_LIBSVN_CLIENT_LINKS_RA_DAV=1" />
            <define name="SVN_DEBUG" if="${configuration != 'release'}" />
            <define name="SVN_HAVE_SASL=1" />
            <define name="APR_HAVE_IPV6" />
            <define name="alloca=_alloca" />
            <define name="snprintf=_snprintf" />
            <define name="WIN32" />
            <define name="_WINDOWS" />
            <define name="_WIN32" />
            <define name="_WIN32_WINNT" value="0x0501" />
            <define name="WIN64" if="${platform == 'x64'}" />
            <define name="NDEBUG" if="${configuration == 'release'}"/>
            <define name="_DEBUG" if="${configuration != 'release'}"/>
            <define name="XML_STATIC" />
          </defines>
        </cl>
        <property name="machineoption" value="/MACHINE:X86" if="${platform == 'win32'}"  />
        <property name="machineoption" value="/MACHINE:X64" if="${platform == 'x64'}" />
        <property name="ssldbg" value="" if="${(configuration == 'release')}" />
        <property name="ssldbg" value=".dbg" if="${(configuration != 'release')}" />
        <lib
          output="${configuration}_${platform}\${fname}.lib"
          options='/NOLOGO /SUBSYSTEM:WINDOWS ${machineoption}'>
          <arg value="/LTCG" if="${configuration == 'release'}" />
          <sources>
            <include name="${configuration}_${platform}\${fname}\**.obj" />
            <include name="..\zlib\${configuration}_${platform}\zlibstat.lib" if="${fname == 'libsvn_subr'}"/>
            <include name="..\sqlite\${configuration}_${platform}\sqlite.lib" if="${fname == 'libsvn_fs_fs'}"/>
          </sources>
          <libdirs>
            <include name="..\openssl\out32${ssldbg}" if="${platform == 'win32'}" />
            <include name="..\openssl\out64${ssldbg}" if="${platform == 'x64'}" />
            <include name="..\neon\${configuration}_${platform}" />
          </libdirs>
        </lib>
      </do>
    </foreach>
    <copy file="..\cyrus-sasl\include\orig_prop.h" tofile="..\cyrus-sasl\include\prop.h" overwrite="true" />
  </target>

</project>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.