You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by dr...@apache.org on 2004/09/07 07:47:30 UTC

cvs commit: logging-log4net log4net.build log4net.include

drieseng    2004/09/06 22:47:30

  Modified:    .        log4net.build log4net.include
  Log:
  added support for building log4net assembly targeting .NET 2.0 (doesn't compile right now, because of warnings, that are always treated as errors by us)
  
  Revision  Changes    Path
  1.9       +58 -0     logging-log4net/log4net.build
  
  Index: log4net.build
  ===================================================================
  RCS file: /home/cvs/logging-log4net/log4net.build,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- log4net.build	24 Jul 2004 14:52:10 -0000	1.8
  +++ log4net.build	7 Sep 2004 05:47:30 -0000	1.9
  @@ -74,6 +74,14 @@
           <if test="${not framework::exists('net-1.1')}">
               <echo message=".NET Framework 1.1 runtime is not available." />
           </if>
  +        <!-- .NET Framework 2.0 -->
  +        <if test="${framework::exists('net-2.0')}">
  +            <property name="nant.settings.currentframework" value="net-2.0" />
  +            <call target="display-target-framework" />
  +        </if>
  +        <if test="${not framework::exists('net-2.0')}">
  +            <echo message=".NET Framework 2.0 runtime is not available." />
  +        </if>
           <!-- .NET Compact Framework 1.0 -->
           <if test="${framework::exists('netcf-1.0')}">
               <property name="nant.settings.currentframework" value="netcf-1.0" />
  @@ -188,6 +196,17 @@
                   <echo message="The .NET Framework 1.1 is not available. Build skipped." />
               </if>
           </if>
  +        <if test="${framework::exists('net-2.0')}">
  +            <call target="compile-net-2.0" />
  +        </if>
  +        <if test="${not framework::exists('net-2.0')}">
  +            <if test="${property::exists('project.build.package') and project.build.package}">
  +                <fail message="The .NET Framework 2.0 is not available." />
  +            </if>
  +            <if test="${not(property::exists('project.build.package') and project.build.package)}">
  +                <echo message="The .NET Framework 2.0 is not available. Build skipped." />
  +            </if>
  +        </if>
           <if test="${framework::exists('mono-1.0')}">
               <call target="compile-mono-1.0" />
           </if>
  @@ -327,6 +346,44 @@
               </csc>
           </if>
       </target>
  +    <target name="compile-net-2.0" description="Builds .NET Framework 2.0 version" depends="set-net-2.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir">
  +        <!-- initialize the temp.build.skip property to false -->
  +        <property name="temp.build.skip" value="false" />
  +        <if test="${current.build.config.release}">
  +            <!-- check if the log4net key file is available -->
  +            <if test="${not file::exists(log4net.basedir + '/log4net.snk')}">
  +                <if test="${property::exists('project.build.package') and project.build.package}">
  +                    <fail message="Key file not found." />
  +                </if>
  +                <if test="${not(property::exists('project.build.package') and project.build.package)}">
  +                    <echo message="Key file not found. You can generate a key file by running 'sn -k log4net.snk'." />
  +                    <echo message="The generated key file should be stored in the log4net base directory." />
  +                    <echo message="The release build will be skipped." />
  +                    <property name="temp.build.skip" value="true" />
  +                </if>
  +            </if>
  +            <if test="${file::exists(log4net.basedir + '/log4net.snk')}">
  +                <!-- copy the log4net key file to the location where the compiler expects it to be -->
  +                <copy file="${log4net.basedir}/log4net.snk" todir="${current.bin.dir}/../../../" />
  +            </if>
  +        </if>
  +        <if test="${not temp.build.skip}">
  +            <csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.dll" doc="${current.bin.dir}/log4net.xml">
  +                <sources basedir="${log4net.basedir}/src">
  +                    <include name="**/*.cs" />
  +                </sources>
  +                <references>
  +                    <include name="mscorlib.dll" />
  +                    <include name="System.dll" />
  +                    <include name="System.Data.dll" />
  +                    <include name="System.Web.dll" />
  +                    <include name="System.Xml.dll" />
  +                    <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework family>/<framework version>/<build configuration> directory -->
  +                    <include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" />
  +                </references>
  +            </csc>
  +        </if>
  +    </target>
       <target name="compile-mono-1.0" description="Builds Mono 1.0 version" depends="set-mono-1.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir">
           <!-- initialize the temp.build.skip property to false -->
           <property name="temp.build.skip" value="false" />
  @@ -473,6 +530,7 @@
               <call target="set-net-1.1-runtime-configuration" />
               <call target="generate-sdkdoc" />
           </if>
  +        <!-- NAnt doesn't yet come with a version of NDoc that can handle .NET 2.0 assemblies -->
           <!-- Mono 1.0 does not support extracting xml documentation -->
           <!-- SSCLI 1.0 does not support extracting xml documentation -->
       </target>
  
  
  
  1.6       +12 -0     logging-log4net/log4net.include
  
  Index: log4net.include
  ===================================================================
  RCS file: /home/cvs/logging-log4net/log4net.include,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- log4net.include	24 Jul 2004 14:52:10 -0000	1.5
  +++ log4net.include	7 Sep 2004 05:47:30 -0000	1.6
  @@ -189,6 +189,18 @@
           <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}" />
           <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
       </target>
  +    <target name="set-net-2.0-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
  +        <property name="nant.settings.currentframework" value="net-2.0" />
  +        <property name="current.build.debug" value="${build.debug}" dynamic="true" />
  +        <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_2_0" dynamic="true" />
  +        <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_2_0" dynamic="true" />
  +        <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_2_0=True" dynamic="true" />
  +        <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_2_0" dynamic="true" />
  +        <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_2_0" dynamic="true" />
  +        <property name="current.bin.dir" value="${bin.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}" />
  +        <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}" />
  +        <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
  +    </target>
       <target name="set-netcf-1.0-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
           <property name="nant.settings.currentframework" value="netcf-1.0" />
           <property name="current.build.debug" value="${build.debug}" dynamic="true" />