Menu

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

Download this file

137 lines (128 with data), 5.8 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>
		
		<delete>
			<fileset>
				<include name="${configuration}_${platform}\**" />
			</fileset>
		</delete>
	</target>

	<target name="build" >
		<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 */" />
			</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>

		<property name="machineoption" value="/MACHINE:X86" if="${platform == 'win32'}" />
		<property name="machineoption" value="/MACHINE:x64" if="${platform == 'x64'}" />
		<foreach item="Folder" property="foldername">
			<in>
				<items>
					<include name="subversion\libsvn*" />
					<exclude name="subversion\libsvn_ra_local" />
					<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="/Ob1" if="${configuration == 'release'}" />
					<arg value="/Od" if="${configuration != 'release'}" />
					<arg value="/GF" 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="/W3" />
					<arg value="/nologo" />
					<arg value="/c" />
					<arg value="/Zi" />
					<arg value="/errorReport:prompt" />
					<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="..\..\common\zlib" />
						<include name="..\sqlite" />
						<include name="..\cyrus-sasl\include" />
					</includedirs>
					<defines>
						<define name="APR_DECLARE_STATIC" />
						<define name="APU_DECLARE_STATIC" />
						<define name="SVN_NEON_0_25=1" />
						<define name="SVN_NEON_0_26=1" />
						<define name="SVN_LIBSVN_CLIENT_LINKS_RA_NEON=1" />
						<define name="SVN_LIBSVN_CLIENT_LINKS_RA_SERF=1" />
						<define name="SVN_LIBSVN_CLIENT_LINKS_RA_DAV=1" />
						<define name="SVN_HAVE_SASL=1" />
						<define name="SVN_HAVE_NEON" />
						<define name="SVN_HAVE_SERF" />
						<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'}"/>
					</defines>
				</cl>
				<lib 
					output="${configuration}_${platform}\${fname}.lib" 
					options='/NOLOGO /SUBSYSTEM:WINDOWS ${machineoption}'>
					<sources>
						<include name="${configuration}_${platform}\${fname}\**.obj" />
                        <include name="..\..\common\zlib\${configuration}_${platform}\zlibstat.lib" if="${fname == 'libsvn_subr'}"/>
                        <include name="..\sqlite\${configuration}_${platform}\sqlite.lib" if="${fname == 'libsvn_fs_fs'}"/>
					</sources>
				</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.