You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by bo...@apache.org on 2013/11/23 16:25:24 UTC
svn commit: r1544817 - in /logging/log4net/trunk: extensions.build
src/buildsupport/multi-framework-compilation.include tests.build
Author: bodewig
Date: Sat Nov 23 15:25:24 2013
New Revision: 1544817
URL: http://svn.apache.org/r1544817
Log:
reduce redundancy
Added:
logging/log4net/trunk/src/buildsupport/multi-framework-compilation.include
Modified:
logging/log4net/trunk/extensions.build
logging/log4net/trunk/tests.build
Modified: logging/log4net/trunk/extensions.build
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/extensions.build?rev=1544817&r1=1544816&r2=1544817&view=diff
==============================================================================
--- logging/log4net/trunk/extensions.build (original)
+++ logging/log4net/trunk/extensions.build Sat Nov 23 15:25:24 2013
@@ -22,45 +22,17 @@ limitations under the License.
<property name="current.assembly" value="log4net.Ext.EventID"/>
<!-- Include log4net helpers -->
<include buildfile="${log4net.basedir}/src/buildsupport/log4net.include" />
+ <include buildfile="${log4net.basedir}/src/buildsupport/multi-framework-compilation.include" />
<!-- Targets that should always be executed -->
<call target="set-build-configuration" />
<call target="set-framework-configuration" />
- <!-- Target for compiling the tests on all frameworks -->
- <target name="compile-all" description="Builds all log4net extensions">
- <if test="${framework::exists('net-2.0')}">
- <call target="compile-net-2.0" />
- </if>
+ <!-- Target for compiling the extensions on all frameworks -->
+ <target name="compile-all"
+ description="Builds all log4net extensions"
+ depends="-compile-all"/>
- <if test="${framework::exists('mono-2.0')}">
- <call target="compile-mono-2.0" />
- </if>
-
- <if test="${framework::exists('net-3.5')}">
- <call target="compile-net-3.5" />
- <call target="compile-net-3.5-cp" />
- </if>
-
- <if test="${framework::exists('net-4.0')}">
- <call target="compile-net-4.0" />
- <call target="compile-net-4.0-cp" />
- </if>
-
- </target>
-
- <target name="compile-net-2.0" description="Builds log4net extensions .NET Framework 2.0 version" depends="set-net-2.0-runtime-configuration,-compile-extensions"/>
-
- <target name="compile-mono-2.0" description="Builds log4net extensions Mono Framework 2.0 version" depends="set-mono-2.0-runtime-configuration,-compile-extensions"/>
-
- <target name="compile-net-3.5" description="Builds log4net extensions .NET Framework 3.5 version" depends="set-net-3.5-runtime-configuration,-compile-extensions"/>
-
- <target name="compile-net-3.5-cp" description="Builds log4net extensions .NET Framework 3.5 Client Profile version" depends="set-net-3.5-cp-runtime-configuration,-compile-extensions"/>
-
- <target name="compile-net-4.0" description="Builds log4net extensions .NET Framework 4.0 version" depends="set-net-4.0-runtime-configuration,-compile-extensions"/>
-
- <target name="compile-net-4.0-cp" description="Builds log4net extensions .NET Framework 4.0 Client Profile version" depends="set-net-4.0-cp-runtime-configuration,-compile-extensions"/>
-
- <target name="-compile-extensions" depends="check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly">
+ <target name="-compile-for-one-framework" depends="check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly">
<foreach item="String" delim=","
in="log4net.Ext.EventID,log4net.Ext.MarshalByRef"
Added: logging/log4net/trunk/src/buildsupport/multi-framework-compilation.include
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/buildsupport/multi-framework-compilation.include?rev=1544817&view=auto
==============================================================================
--- logging/log4net/trunk/src/buildsupport/multi-framework-compilation.include (added)
+++ logging/log4net/trunk/src/buildsupport/multi-framework-compilation.include Sat Nov 23 15:25:24 2013
@@ -0,0 +1,53 @@
+<?xml version="1.0" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<project name="log4net-multi-compilation" xmlns="http://tempuri.org/nant-vs.xsd">
+ <!-- Target for compiling on all frameworks -->
+ <target name="-compile-all">
+ <if test="${framework::exists('net-2.0')}">
+ <call target="-compile-net-2.0" />
+ </if>
+
+ <if test="${framework::exists('mono-2.0')}">
+ <call target="-compile-mono-2.0" />
+ </if>
+
+ <if test="${framework::exists('net-3.5')}">
+ <call target="-compile-net-3.5" />
+ <call target="-compile-net-3.5-cp" />
+ </if>
+
+ <if test="${framework::exists('net-4.0')}">
+ <call target="-compile-net-4.0" />
+ <call target="-compile-net-4.0-cp" />
+ </if>
+
+ </target>
+
+ <target name="-compile-net-2.0" description="Builds the .NET Framework 2.0 version" depends="set-net-2.0-runtime-configuration,-compile-for-one-framework"/>
+
+ <target name="-compile-mono-2.0" description="Builds the Mono Framework 2.0 version" depends="set-mono-2.0-runtime-configuration,-compile-for-one-framework"/>
+
+ <target name="-compile-net-3.5" description="Builds the .NET Framework 3.5 version" depends="set-net-3.5-runtime-configuration,-compile-for-one-framework"/>
+
+ <target name="-compile-net-3.5-cp" description="Builds the .NET Framework 3.5 Client Profile version" depends="set-net-3.5-cp-runtime-configuration,-compile-for-one-framework"/>
+
+ <target name="-compile-net-4.0" description="Builds the .NET Framework 4.0 version" depends="set-net-4.0-runtime-configuration,-compile-for-one-framework"/>
+
+ <target name="-compile-net-4.0-cp" description="Builds the .NET Framework 4.0 Client Profile version" depends="set-net-4.0-cp-runtime-configuration,-compile-for-one-framework"/>
+
+</project>
Modified: logging/log4net/trunk/tests.build
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests.build?rev=1544817&r1=1544816&r2=1544817&view=diff
==============================================================================
--- logging/log4net/trunk/tests.build (original)
+++ logging/log4net/trunk/tests.build Sat Nov 23 15:25:24 2013
@@ -22,47 +22,17 @@ limitations under the License.
<property name="current.assembly" value="log4net.Tests"/>
<!-- Include log4net helpers -->
<include buildfile="${log4net.basedir}/src/buildsupport/log4net.include" />
+ <include buildfile="${log4net.basedir}/src/buildsupport/multi-framework-compilation.include" />
<!-- Targets that should always be executed -->
<call target="set-build-configuration" />
<call target="set-framework-configuration" />
<!-- Target for compiling the tests on all frameworks -->
- <target name="compile-all" description="Builds all log4net tests">
- <echo message="Compiling all runtime configurations for the ${current.build.config} build configuration." />
+ <target name="compile-all"
+ description="Builds all log4net tests"
+ depends="-compile-all"/>
- <if test="${framework::exists('net-2.0')}">
- <call target="compile-net-2.0" />
- </if>
-
- <if test="${framework::exists('mono-2.0')}">
- <call target="compile-mono-2.0" />
- </if>
-
- <if test="${framework::exists('net-3.5')}">
- <call target="compile-net-3.5" />
- <call target="compile-net-3.5-cp" />
- </if>
-
- <if test="${framework::exists('net-4.0')}">
- <call target="compile-net-4.0" />
- <call target="compile-net-4.0-cp" />
- </if>
-
- </target>
-
- <target name="compile-net-2.0" description="Builds log4net tests .NET Framework 2.0 version" depends="set-net-2.0-runtime-configuration,-compile-tests"/>
-
- <target name="compile-mono-2.0" description="Builds log4net tests Mono Framework 2.0 version" depends="set-mono-2.0-runtime-configuration,-compile-tests"/>
-
- <target name="compile-net-3.5" description="Builds log4net tests .NET Framework 3.5 version" depends="set-net-3.5-runtime-configuration,-compile-tests"/>
-
- <target name="compile-net-3.5-cp" description="Builds log4net tests .NET Framework 3.5 Client Profile version" depends="set-net-3.5-cp-runtime-configuration,-compile-tests"/>
-
- <target name="compile-net-4.0" description="Builds log4net tests .NET Framework 4.0 version" depends="set-net-4.0-runtime-configuration,-compile-tests"/>
-
- <target name="compile-net-4.0-cp" description="Builds log4net tests .NET Framework 4.0 Client Profile version" depends="set-net-4.0-cp-runtime-configuration,-compile-tests"/>
-
- <target name="-compile-tests" depends="check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly">
+ <target name="-compile-for-one-framework" depends="check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly">
<foreach item="Folder" property="dir">
<in>
@@ -101,19 +71,6 @@ limitations under the License.
Because the <nunit2> task does not support multiple frameworks through the
nant.settings.currentframework setting we cannot just run the tests for each framework.
Only the tests for the current framework are run.
-
- <if test="${framework::exists('net-1.0')}">
- <call target="runtests-net-1.0" />
- </if>
- <if test="${framework::exists('net-1.1')}">
- <call target="runtests-net-1.1" />
- </if>
- <if test="${framework::exists('net-2.0')}">
- <call target="runtests-net-2.0" />
- </if>
- <if test="${framework::exists('mono-2.0')}">
- <call target="runtests-mono-2.0" />
- </if>
-->
<if test="${target::exists('runtests-' + nant.settings.currentframework)}">
<echo message="Running tests for ${framework::get-target-framework()}" />
@@ -121,17 +78,17 @@ limitations under the License.
</if>
</target>
- <target name="runtests-net-2.0" description="Runs log4net tests on .NET Framework 2.0 version" depends="compile-net-2.0,-runtests"/>
+ <target name="runtests-net-2.0" description="Runs log4net tests on .NET Framework 2.0 version" depends="-compile-net-2.0,-runtests"/>
- <target name="runtests-mono-2.0" description="Runs log4net tests on Mono Framework 2.0 version" depends="compile-mono-2.0,-runtests"/>
+ <target name="runtests-mono-2.0" description="Runs log4net tests on Mono Framework 2.0 version" depends="-compile-mono-2.0,-runtests"/>
- <target name="runtests-net-3.5" description="Runs log4net tests on .NET Framework 3.5 version" depends="compile-net-3.5,-runtests"/>
+ <target name="runtests-net-3.5" description="Runs log4net tests on .NET Framework 3.5 version" depends="-compile-net-3.5,-runtests"/>
- <target name="runtests-net-3.5-cp" description="Runs log4net tests on .NET Framework 3.5 Client Profile version" depends="compile-net-3.5-cp,-runtests"/>
+ <target name="runtests-net-3.5-cp" description="Runs log4net tests on .NET Framework 3.5 Client Profile version" depends="-compile-net-3.5-cp,-runtests"/>
- <target name="runtests-net-4.0" description="Runs log4net tests on .NET Framework 4.0 version" depends="compile-net-4.0,-runtests"/>
+ <target name="runtests-net-4.0" description="Runs log4net tests on .NET Framework 4.0 version" depends="-compile-net-4.0,-runtests"/>
- <target name="runtests-net-4.0-cp" description="Runs log4net tests on .NET Framework 4.0 Client Profile version" depends="compile-net-4.0-cp,-runtests"/>
+ <target name="runtests-net-4.0-cp" description="Runs log4net tests on .NET Framework 4.0 Client Profile version" depends="-compile-net-4.0-cp,-runtests"/>
<target name="-runtests">
<nunit2>