You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ha...@apache.org on 2003/12/27 20:46:57 UTC

cvs commit: avalon-sandbox/avalon-net/Castle Castle-compilations.build Castle-helper.build Castle.build README.txt build.cmd

hammett     2003/12/27 11:46:57

  Modified:    avalon-net/Castle/CastleManagementExtensions/Default/Strategy
                        CodeGenerationInvokerStrategy.cs
  Added:       avalon-net/Castle Castle-compilations.build
                        Castle-helper.build Castle.build README.txt
                        build.cmd
  Log:
  NAnt build scripts - plus more corrections.
  
  Revision  Changes    Path
  1.2       +11 -2     avalon-sandbox/avalon-net/Castle/CastleManagementExtensions/Default/Strategy/CodeGenerationInvokerStrategy.cs
  
  Index: CodeGenerationInvokerStrategy.cs
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/avalon-net/Castle/CastleManagementExtensions/Default/Strategy/CodeGenerationInvokerStrategy.cs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CodeGenerationInvokerStrategy.cs	27 Dec 2003 03:13:29 -0000	1.1
  +++ CodeGenerationInvokerStrategy.cs	27 Dec 2003 19:46:57 -0000	1.2
  @@ -349,7 +349,7 @@
   
   				CodeMethodInvokeExpression methodInv = 
   					new CodeMethodInvokeExpression(
  -						new CodeFieldReferenceExpression(thisRef, "instance"), methodInfo.Name);
  +					new CodeFieldReferenceExpression(thisRef, "instance"), methodInfo.Name);
   				
   				int index = 0;
   				foreach(ParameterInfo parameter in methodInfo.GetParameters())
  @@ -363,7 +363,16 @@
   					methodInv.Parameters.Add(castExp);
   				}
   
  -				stmt.TrueStatements.Add(methodInv);
  +				if (methodInfo.ReturnType != typeof(void))
  +				{
  +					CodeMethodReturnStatement retStmt = new CodeMethodReturnStatement(methodInv);
  +					
  +					stmt.TrueStatements.Add(retStmt);
  +				}
  +				else
  +				{
  +					stmt.TrueStatements.Add(methodInv);
  +				}
   
   				method.Statements.Add(stmt);
   			}
  
  
  
  1.1                  avalon-sandbox/avalon-net/Castle/Castle-compilations.build
  
  Index: Castle-compilations.build
  ===================================================================
  <?xml version="1.0" ?>
  <project name="avalon-castle-helper" xmlnds="http://tempuri.org/nant-vs.xsd">
  
      <target name="compile-runtime" description="Compile all build configurations for the current runtime configuration"
          depends="check-current-runtime-config, check-current-runtime-version">
  
          <echo message="Compiling all build configurations for the ${current.runtime.config}-${current.runtime.version} runtime configuration." />
          <call target="set-debug-build-configuration" />
          <!-- make sure that the runtime properties that rely on build configuration information are refreshed -->
          <call target="set-runtime-configuration" />
          <call target="compile-${current.runtime.config}-${current.runtime.version}" />
          <call target="set-release-build-configuration" />
          <!-- make sure that the runtime properties that rely on build configuration information are refreshed -->
          <call target="set-runtime-configuration" />
          <call target="compile-${current.runtime.config}-${current.runtime.version}" />
      </target>
  
      <target name="compile-build" description="Compile current build configurations for all runtime configurations">
          <echo message="Compiling all runtime configurations for the ${current.build.config} build configuration." />
          <available type="Framework" resource="net-1.0" property="temp.framework.available" />
          <if propertytrue="temp.framework.available">
              <call target="set-net-1.0-runtime-configuration" />
              <call target="compile-${current.runtime.config}-${current.runtime.version}" />
          </if>
          <ifnot propertytrue="temp.framework.available">
              <if propertyexists="project.build.package" propertytrue="project.build.package">
                  <fail message="The .NET Framework 1.0 is not available." />
              </if>
              <ifnot propertyexists="project.build.package" propertytrue="project.build.package">
                  <echo message="The .NET Framework 1.0 is not available. Build skipped." />
              </ifnot>
          </ifnot>
          <available type="Framework" resource="net-1.1" property="temp.framework.available" />
          <if propertytrue="temp.framework.available">
              <call target="set-net-1.1-runtime-configuration" />
              <call target="compile-${current.runtime.config}-${current.runtime.version}" />
          </if>
          <ifnot propertytrue="temp.framework.available">
              <if propertyexists="project.build.package" propertytrue="project.build.package">
                  <fail message="The .NET Framework 1.1 is not available." />
              </if>
              <ifnot propertyexists="project.build.package" propertytrue="project.build.package">
                  <echo message="The .NET Framework 1.1 is not available. Build skipped." />
              </ifnot>
          </ifnot>
          <available type="Framework" resource="mono-1.0" property="temp.framework.available" />
          <if propertytrue="temp.framework.available">
              <call target="set-mono-1.0-runtime-configuration" />
              <call target="compile-${current.runtime.config}-${current.runtime.version}" />
          </if>
          <ifnot propertytrue="temp.framework.available">
              <if propertyexists="project.build.package" propertytrue="project.build.package">
                  <fail message="Mono 1.0 is not available." />
              </if>
              <ifnot propertyexists="project.build.package" propertytrue="project.build.package">
                  <echo message="Mono 1.0 is not available. Build skipped." />
              </ifnot>
          </ifnot>
          <available type="Framework" resource="sscli-1.0" property="temp.framework.available" />
          <if propertytrue="temp.framework.available">
              <call target="set-sscli-1.0-runtime-configuration" />
              <call target="compile-${current.runtime.config}-${current.runtime.version}" />
          </if>
          <ifnot propertytrue="temp.framework.available">
              <if propertyexists="project.build.package" propertytrue="project.build.package">
                  <fail message="SSCLI 1.0 is not available." />
              </if>
              <ifnot propertyexists="project.build.package" propertytrue="project.build.package">
                  <echo message="SSCLI 1.0 is not available. Build skipped." />
              </ifnot>
          </ifnot>
      </target>
  
      <target name="compile" description="Builds the current build configuration for the current runtime configuration."
          depends="check-current-build-config, check-current-runtime-config, check-current-runtime-version">
          <call target="compile-${current.runtime.config}-${current.runtime.version}" />
      </target>
  
      <target name="compile-net-1.0" description="Builds .NET Framework 1.0 version" depends="set-net-1.0-runtime-configuration, check-castle-basedir">
          <!-- make sure the current binaries directory exists and is cleaned -->
          <call target="clean-current-bin-dir" />
          <!-- initialize the temp.build.skip property to false -->
          <property name="temp.build.skip" value="false" readonly="false" />
          <if propertytrue="current.build.config.release">
              <!-- check if the Avalon key file is available -->
              <available type="File" resource="${castle.basedir}/${castle.key}" property="temp.avalon.keyfile.available" />
              <ifnot propertytrue="temp.avalon.keyfile.available">
                  <if propertyexists="project.build.package" propertytrue="project.build.package">
                      <fail message="Key file not found." />
                  </if>
                  <ifnot propertyexists="project.build.package" propertytrue="project.build.package">
                      <echo message="Key file not found. You can generate a key file by running 'sn -k ${castle.key}'." />
                      <echo message="The generated key file should be stored in the Castle base directory." />
                      <echo message="The release build will be skipped." />
                      <property name="temp.build.skip" value="true" readonly="false" />
                  </ifnot>
              </ifnot>
              <if propertytrue="temp.avalon.keyfile.available">
                  <!-- copy the Avalon key file to the location where the compiler expects it to be -->
                  <copy file="${castle.basedir}/${castle.key}" todir="${current.bin.dir}/../../../" if="${current.build.config.release}" />
              </if>
          </if>
          <ifnot propertytrue="temp.build.skip">
              <csc nostdlib="true" noconfig="true" warnaserror="false" target="library" debug="${current.build.debug}"
                  define="${current.build.defines.csc}" output="${current.bin.dir}/${castle.assembly}" doc="${current.bin.dir}/${castle.doc}">
                  <sources basedir="${castle.src}" defaultexcludes="true">
                      <includes name="**/*.cs" />
                  </sources>
                  <references defaultexcludes="true">
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/mscorlib.dll"
                          fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll"
                          fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Web.dll"
                          fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Xml.dll"
                          fromPath="false" />
                      <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
                      <includes name="lib/${current.runtime.config}/${current.runtime.version}/${current.build.config}/*.dll"
                          fromPath="false" />
                  </references>
              </csc>
          </ifnot>
          <!-- Execute the testcases -->
          <call target="run-tests" />
      </target>
  
      <target name="compile-net-1.1" description="Builds .NET Framework 1.1 version" depends="set-net-1.1-runtime-configuration, check-castle-basedir">
          <!-- make sure the current binaries directory exists and is cleaned -->
          <call target="clean-current-bin-dir" />
          <!-- initialize the temp.build.skip property to false -->
          <property name="temp.build.skip" value="false" readonly="false" />
          <if propertytrue="current.build.config.release">
              <!-- check if the Avalon key file is available -->
              <available type="File" resource="${castle.basedir}/${castle.key}" property="temp.avalon.keyfile.available" />
              <ifnot propertytrue="temp.avalon.keyfile.available">
                  <if propertyexists="project.build.package" propertytrue="project.build.package">
                      <fail message="Key file not found." />
                  </if>
                  <ifnot propertyexists="project.build.package" propertytrue="project.build.package">
                      <echo message="Key file not found. You can generate a key file by running 'sn -k ${castle.key}'." />
                      <echo message="The generated key file should be stored in the Castle base directory." />
                      <echo message="The release build will be skipped." />
                      <property name="temp.build.skip" value="true" readonly="false" />
                  </ifnot>
              </ifnot>
              <if propertytrue="temp.avalon.keyfile.available">
                  <!-- copy the Avalon key file to the location where the compiler expects it to be -->
                  <copy file="${castle.basedir}/${castle.key}" todir="${current.bin.dir}/../../../" if="${current.build.config.release}" />
              </if>
          </if>
          <ifnot propertytrue="temp.build.skip">
              <csc nostdlib="true" noconfig="true" warnaserror="false" target="library" debug="${current.build.debug}"
                  define="${current.build.defines.csc}" output="${current.bin.dir}/${castle.assembly}" doc="${current.bin.dir}/${castle.doc}">
                  <sources basedir="${castle.src}" defaultexcludes="true">
                      <includes name="**/*.cs" />
                  </sources>
                  <references defaultexcludes="true">
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/mscorlib.dll"
                          fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll"
                          fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Web.dll"
                          fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Xml.dll"
                          fromPath="false" />
                      <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
                      <includes name="lib/${current.runtime.config}/${current.runtime.version}/${current.build.config}/*.dll"
                          fromPath="false" />
                  </references>
              </csc>
          </ifnot>
          <!-- Execute the testcases -->
          <call target="run-tests" />
      </target>
  
      <target name="compile-mono-1.0" description="Builds Mono 1.0 version" depends="set-mono-1.0-runtime-configuration, check-castle-basedir">
          <!-- make sure the current binaries directory exists and is cleaned -->
          <call target="clean-current-bin-dir" />
          <!-- initialize the temp.build.skip property to false -->
          <property name="temp.build.skip" value="false" readonly="false" />
          <if propertytrue="current.build.config.release">
              <!-- check if the Avalon key file is available -->
              <available type="File" resource="${castle.basedir}/${castle.key}" property="temp.avalon.keyfile.available" />
              <ifnot propertytrue="temp.avalon.keyfile.available">
                  <if propertyexists="project.build.package" propertytrue="project.build.package">
                      <fail message="Key file not found." />
                  </if>
                  <ifnot propertyexists="project.build.package" propertytrue="project.build.package">
                      <echo message="Key file not found. You can generate a key file by running 'sn -k ${castle.key}'." />
                      <echo message="The generated key file should be stored in the Castle base directory." />
                      <echo message="The release build will be skipped." />
                      <property name="temp.build.skip" value="true" readonly="false" />
                  </ifnot>
              </ifnot>
              <if propertytrue="temp.avalon.keyfile.available">
                  <!-- copy the Avalon key file to the location where the compiler expects it to be -->
                  <copy file="${castle.basedir}/${castle.key}" todir="${current.bin.dir}/../../../" if="${current.build.config.release}" />
              </if>
          </if>
          <ifnot propertytrue="temp.build.skip">
              <csc nostdlib="false" noconfig="true" warnaserror="false" target="library" debug="${current.build.debug}"
                  define="${current.build.defines.csc}" output="${current.bin.dir}/${castle.assembly}">
                  <sources basedir="${castle.src}" defaultexcludes="true">
                      <includes name="**/*.cs" />
                  </sources>
                  <references defaultexcludes="true">
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll"
                          fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Web.dll"
                          fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Xml.dll"
                          fromPath="false" />
                      <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
                      <includes name="lib/${current.runtime.config}/${current.runtime.version}/${current.build.config}/*.dll"
                          fromPath="false" />
                  </references>
              </csc>
          </ifnot>
          <!-- Execute the testcases -->
          <call target="run-tests" />
      </target>
  
      <target name="compile-sscli-1.0" description="Builds SSCLI 1.0 version" depends="set-sscli-1.0-runtime-configuration, check-castle-basedir">
          <!-- make sure the current binaries directory exists and is cleaned -->
          <call target="clean-current-bin-dir" />
          <!-- initialize the temp.build.skip property to false -->
          <property name="temp.build.skip" value="false" readonly="false" />
          <if propertytrue="current.build.config.release">
              <!-- check if the Avalon key file is available -->
              <available type="File" resource="${castle.basedir}/${castle.key}" property="temp.avalon.keyfile.available" />
              <ifnot propertytrue="temp.avalon.keyfile.available">
                  <if propertyexists="project.build.package" propertytrue="project.build.package">
                      <fail message="Key file not found." />
                  </if>
                  <ifnot propertyexists="project.build.package" propertytrue="project.build.package">
                      <echo message="Key file not found. You can generate a key file by running 'sn -k ${castle.key}'." />
                      <echo message="The generated key file should be stored in the Castle base directory." />
                      <echo message="The release build will be skipped." />
                      <property name="temp.build.skip" value="true" readonly="false" />
                  </ifnot>
              </ifnot>
              <if propertytrue="temp.avalon.keyfile.available">
                  <!-- copy the Avalon key file to the location where the compiler expects it to be -->
                  <copy file="${castle.basedir}/${castle.key}" todir="${current.bin.dir}/../../../" if="${current.build.config.release}" />
              </if>
          </if>
          <ifnot propertytrue="temp.build.skip">
              <csc nostdlib="true" noconfig="true" warnaserror="false" target="library" debug="${current.build.debug}"
                  define="${current.build.defines.csc}" output="${current.bin.dir}/${castle.assembly}">
                  <sources basedir="${castle.src}" defaultexcludes="true">
                      <includes name="**/*.cs" />
                      <!-- SSCLI 1.0 has no support for CodeDom -->
                      <!-- <excludes name="Default/Strategy/CodeGenerationInvokerStrategy.cs" /> -->
                  </sources>
                  <references defaultexcludes="true">
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/mscorlib.dll"
                          fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" fromPath="false" />
                      <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Xml.dll"
                          fromPath="false" />
                      <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
                      <includes name="lib/${current.runtime.config}/${current.runtime.version}/${current.build.config}/*.dll"
                          fromPath="false" />
                  </references>
              </csc>
          </ifnot>
          <!-- Execute the testcases -->
          <call target="run-tests" />
      </target>
  
      <target name="compile-tests" description="Compile test cases">
          <echo message="NAnt location is ${nant.location}" />
          <csc nostdlib="true" noconfig="true" warnaserror="false" target="library" debug="${current.build.debug}"
              define="${current.build.defines.csc}" output="${current.bin.dir}/${castle.test.assembly}">
              <sources basedir="${castle.test.src}" defaultexcludes="true">
                  <includes name="**/*.cs" />
              </sources>
              <references defaultexcludes="true">
                  <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/mscorlib.dll"
                      fromPath="false" />
                  <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.dll" fromPath="false" />
                  <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Data.dll"
                      fromPath="false" />
                  <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Web.dll"
                      fromPath="false" />
                  <includes name="${nant.settings.currentframework.frameworkassemblydirectory}/System.Xml.dll"
                      fromPath="false" />
                  <includes name="${nant.location}/nunit.framework.dll"
                      fromPath="false" />
                  <includes name="${current.bin.dir}/${castle.assembly}" fromPath="false" />
                  <!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
                  <includes name="lib/${current.runtime.config}/${current.runtime.version}/${current.build.config}/*.dll"
                      fromPath="false" />
              </references>
          </csc>
      </target>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/avalon-net/Castle/Castle-helper.build
  
  Index: Castle-helper.build
  ===================================================================
  <?xml version="1.0" ?>
  <project name="avalon-castle-helper" xmlnds="http://tempuri.org/nant-vs.xsd">
  
      <target name="check-bin-dir">
          <if test="${not nant::property-exists('bin.dir')}">
              <property name="bin.dir" value="bin" readonly="false" />
          </if>
          <mkdir dir="${bin.dir}" />
      </target>
  
      <target name="check-build-debug">
          <if test="${not nant::property-exists('build.debug')}">
              <fail message="The build debug setting has not been specified." />
          </if>
      </target>
  
      <target name="check-build-defines">
          <if test="${not nant::property-exists('build.defines.csc')}">
              <fail message="The build defines for the csc task have not been specified." />
          </if>
          <if test="${not nant::property-exists('build.defines.jsc')}">
              <fail message="The build defines for the jsc task have not been specified." />
          </if>
          <if test="${not nant::property-exists('build.defines.vbc')}">
              <fail message="The build defines for the vbc task have not been specified." />
          </if>
          <if test="${not nant::property-exists('build.defines.vjc')}">
              <fail message="The build defines for the vjc task have not been specified." />
          </if>
          <if test="${not nant::property-exists('build.defines.cl')}">
              <fail message="The build defines for the cl task have not been specified." />
          </if>
      </target>
  
      <target name="check-doc-dir">
          <if test="${not nant::property-exists('doc.dir')}">
              <property name="doc.dir" value="doc" readonly="false" />
          </if>
          <mkdir dir="${doc.dir}" />
      </target>
  
      <target name="check-sdkdoc-dir" depends="check-doc-dir">
          <if test="${not nant::property-exists('sdkdoc.dir')}">
              <property name="sdkdoc.dir" value="${doc.dir}/sdk" readonly="false" />
          </if>
          <mkdir dir="${sdkdoc.dir}" />
      </target>
  
      <target name="check-sdkdoc-debug">
          <if test="${not nant::property-exists('sdkdoc.debug')}">
              <fail message="The sdk documentation debug setting has not been specified." />
          </if>
      </target>
  
      <target name="check-current-bin-dir">
          <if test="${not nant::property-exists('current.bin.dir')}">
              <fail message="The current binaries directory has not been specified." />
          </if>
          <mkdir dir="${current.bin.dir}" />
      </target>
  
      <target name="check-current-build-debug">
          <if test="${not nant::property-exists('current.build.debug')}">
              <fail message="The current build debug setting has not been specified." />
          </if>
      </target>
  
      <target name="check-current-build-defines">
          <if test="${not nant::property-exists('current.build.defines.csc')}">
              <fail message="The current build defines for the csc task have not been specified." />
          </if>
          <if test="${not nant::property-exists('current.build.defines.jsc')}">
              <fail message="The current build defines for the jsc task have not been specified." />
          </if>
          <if test="${not nant::property-exists('current.build.defines.vbc')}">
              <fail message="The current build defines for the vbc task have not been specified." />
          </if>
          <if test="${not nant::property-exists('current.build.defines.vjc')}">
              <fail message="The current build defines for the vjc task have not been specified." />
          </if>
          <if test="${not nant::property-exists('current.build.defines.cl')}">
              <fail message="The current build defines for the cl task have not been specified." />
          </if>
      </target>
  
      <target name="check-current-sdkdoc-dir">
          <if test="${not nant::property-exists('current.sdkdoc.dir')}">
              <fail message="The current sdk document directory has not been specified." />
          </if>
          <mkdir dir="${sdkdoc.dir}" />
      </target>
  
      <target name="check-current-sdkdoc-debug">
          <if test="${not nant::property-exists('current.sdkdoc.debug')}">
              <fail message="The curernt sdk documentation debug setting has not been specified." />
          </if>
      </target>
  
      <target name="check-current-runtime-config">
          <if test="${not nant::property-exists('current.runtime.config')}">
              <fail message="The current runtime configuration has not been specified." />
          </if>
      </target>
  
      <target name="check-current-runtime-version">
          <if test="${not nant::property-exists('current.runtime.config')}">
              <fail message="The current runtime version has not been specified." />
          </if>
      </target>
  
      <target name="check-current-runtime-description">
          <if test="${not nant::property-exists('current.runtime.description')}">
              <if test="${not nant::property-exists('project.runtime.description')}">
                  <fail message="The runtime description has not been specified and no default runtime description is available." />
              </if>
              <if test="${nant::property-exists('project.runtime.description')}">
                  <property name="current.runtime.description" value="${project.runtime.description}" readonly="false" />
              </if>
          </if>
      </target>
  
      <target name="check-current-build-config">
          <if test="${not nant::property-exists('current.build.config')}">
              <if test="${not nant::property-exists('project.build.config')}">
                  <fail message="The build configuration has not been specified and no default build configuration is available." />
              </if>
              <if test="${nant::property-exists('project.build.config')}">
                  <property name="current.build.config" value="${project.build.config}" readonly="false" />
              </if>
          </if>
      </target>
  
      <target name="check-castle-basedir">
          <if test="${not nant::property-exists('castle.basedir')}">
              <fail message="The castle base directory has not been specified." />
          </if>
      </target>
  
      <target name="check-castle-assembly" depends="check-current-runtime-config, check-current-runtime-version, check-current-build-config, check-castle-basedir">
          <available type="File" resource="${castle.basedir}/bin/${current.runtime.config}/${current.runtime.version}/${current.build.config}/Castle.dll"
              property="temp.castle.assembly.available" />
          <if test="${not nant::property-exists('temp.castle.assembly.available')}">
              <fail message="The Castle '${current.build.config}' assembly for runtime '${current.runtime.config}-${current.runtime.version}' is not available." />
          </if>
      </target>
  
      <target name="check-current-runtime-available" depends="check-current-runtime-config, check-current-runtime-version">
          <available type="Framework" resource="${current.runtime.config}-${current.runtime.version}"
              property="current.runtime.available" />
      </target>
  
      <!-- Targets for cleaning up -->
      <target name="clean-current-bin-dir" depends="check-current-bin-dir" description="Cleans the current binaries directory">
          <echo message="Cleaning the ${current.bin.dir} binaries directory." />
          <available type="Directory" resource="${current.bin.dir}" property="temp.current.bin.dir.available" />
          <if test="${nant::property-exists('temp.current.bin.dir.available')}">
              <delete dir="${current.bin.dir}" />
          </if>
          <mkdir dir="${current.bin.dir}" />
      </target>
  
      <target name="clean-current-sdkdoc-dir" depends="check-current-sdkdoc-dir" description="cleaning the current SDK documentation directory">
          <echo message="Cleaning the ${current.sdkdoc.dir} SDK documentation directory." />
          <available type="Directory" resource="${current.sdkdoc.dir}" property="temp.current.sdkdoc.dir.available" />
          <if test="${nant::property-exists('temp.current.sdkdoc.dir.available')}">
              <delete dir="${current.sdkdoc.dir}" />
          </if>
          <mkdir dir="${current.sdkdoc.dir}" />
      </target>
  
      <!-- Targets for setting up the environment -->
      <target name="set-build-configuration" depends="check-current-build-config">
          <!--<if test="${not nant::target-exists('set-${current.build.config}-build-configuration')}">-->
          <ifnot targetexists="set-${current.build.config}-build-configuration">
              <fail message="The ${current.build.config} build configuration is not supported by Avalon-Castle." />
          </ifnot>
          <!--</if>-->
          <call target="set-${current.build.config}-build-configuration"  />
      </target>
  
      <target name="set-debug-build-configuration">
          <property name="build.debug" value="true" readonly="false" />
          <property name="build.defines.csc" value="DEBUG,TRACE" readonly="false" />
          <property name="build.defines.jsc" value="DEBUG,TRACE" readonly="false" />
          <property name="build.defines.vbc" value="DEBUG=True,TRACE=True" readonly="false" />
          <property name="build.defines.vjc" value="DEBUG,TRACE" readonly="false" />
          <property name="build.defines.cl" value="/D _DEBUG" readonly="false" />
          <property name="sdkdoc.debug" value="false" readonly="false" />
          <property name="current.build.config" value="debug" readonly="false" />
          <call target="set-build-configuration-flags" />
      </target>
  
      <target name="set-release-build-configuration">
          <property name="build.debug" value="false" readonly="false" />
          <property name="build.defines.csc" value="TRACE,STRONG" readonly="false" />
          <property name="build.defines.jsc" value="TRACE,STRONG" readonly="false" />
          <property name="build.defines.vbc" value="TRACE=True,STRONG=True" readonly="false" />
          <property name="build.defines.vjc" value="TRACE,STRONG" readonly="false" />
          <property name="build.defines.cl" value="/D STRONG" readonly="false" />
          <property name="sdkdoc.debug" value="false" readonly="false" />
          <property name="current.build.config" value="release" readonly="false" />
          <call target="set-build-configuration-flags" />
      </target>
  
      <target name="set-build-configuration-flags" depends="check-current-build-config">
          <property name="current.build.config.debug" value="false" readonly="false" />
          <property name="current.build.config.release" value="false" readonly="false" />
          <property name="current.build.config.${current.build.config}" value="true" readonly="false" />
      </target>
  
      <target name="set-runtime-configuration" depends="check-current-build-config">
          <if test="${not nant::property-exists('current.runtime.config')}">
              <if test="${not nant::property-exists('nant.settings.currentframework')}">
                  <fail message="No runtime configuration was specified and the default NAnt runtime is not available." />
              </if>
  
              <!-- <if test="${not nant::target-exists('set-${nant.settings.currentframework}-runtime-configuration')}"> -->
              <ifnot targetexists="set-${nant.settings.currentframework}-runtime-configuration">
                  <fail message="No runtime configuration was specified and the current runtime (${nant.settings.currentframework}) is not supported by Avalon-Castle." />
              <!-- </if> -->
              </ifnot>
              <call target="set-${nant.settings.currentframework}-runtime-configuration"  />
          </if>
          <if test="${not nant::property-exists('current.runtime.version')}">
              <if test="${not nant::property-exists('nant.settings.currentframework')}">
                  <fail message="No runtime configuration was specified and the default NAnt runtime is not available." />
              </if>
              <!-- <if test="${not nant::target-exists('set-${nant.settings.currentframework}-runtime-configuration')}"> -->
              <ifnot targetexists="set-${nant.settings.currentframework}-runtime-configuration">
                  <fail message="No runtime configuration was specified and the current runtime (${nant.settings.currentframework}) is not supported by Avalon-Castle." />
              </ifnot>
              <!-- </if> -->
              <call target="set-${nant.settings.currentframework}-runtime-configuration" />
          </if>
          <!-- <if test="${not nant::target-exists('set-${current.runtime.config}-${current.runtime.version}-runtime-configuration')}"> -->
          <ifnot targetexists="set-${current.runtime.config}-${current.runtime.version}-runtime-configuration">
              <fail message="The ${current.runtime.config}-${current.runtime.version} runtime is not supported by Avalon-Castle." />
          </ifnot>
          <!-- </if> -->
          <call target="set-${current.runtime.config}-${current.runtime.version}-runtime-configuration" />
      </target>
  
      <target name="set-net-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="current.runtime.config" value="net" readonly="false" />
          <property name="current.runtime.version" value="1.0" readonly="false" />
          <property name="current.runtime.description" value="Microsoft .NET Framework 1.0" readonly="false" />
          <property name="current.build.debug" value="${build.debug}" readonly="false" />
          <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_1_0" readonly="false" />
          <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_1_0" readonly="false" />
          <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_1_0=True"
              readonly="false" />
          <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_1_0" readonly="false" />
          <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_1_0" readonly="false" />
          <property name="current.bin.dir" value="${bin.dir}/${current.runtime.config}/${current.runtime.version}/${current.build.config}"
              readonly="false" />
          <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${current.runtime.config}/${current.runtime.version}"
              readonly="false" />
          <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" readonly="false" />
          <property name="nant.settings.currentframework" value="${current.runtime.config}-${current.runtime.version}" />
      </target>
  
      <target name="set-net-1.1-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
          <property name="current.runtime.config" value="net" readonly="false" />
          <property name="current.runtime.version" value="1.1" readonly="false" />
          <property name="current.runtime.description" value="Microsoft .NET Framework 1.1" readonly="false" />
          <property name="current.build.debug" value="${build.debug}" readonly="false" />
          <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_1_1" readonly="false" />
          <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_1_1" readonly="false" />
          <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_1_1=True"
              readonly="false" />
          <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_1_1" readonly="false" />
          <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_1_1" readonly="false" />
          <property name="current.bin.dir" value="${bin.dir}/${current.runtime.config}/${current.runtime.version}/${current.build.config}"
              readonly="false" />
          <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${current.runtime.config}/${current.runtime.version}"
              readonly="false" />
          <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" readonly="false" />
          <property name="nant.settings.currentframework" value="${current.runtime.config}-${current.runtime.version}" />
      </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="current.runtime.config" value="netcf" readonly="false" />
          <property name="current.runtime.version" value="1.0" readonly="false" />
          <property name="current.runtime.description" value="Microsoft .NET Compact Framework 1.0"
              readonly="false" />
          <property name="current.build.debug" value="${build.debug}" readonly="false" />
          <property name="current.build.defines.csc" value="${build.defines.csc},NETCF,NETCF_1_0" readonly="false" />
          <property name="current.build.defines.jsc" value="${build.defines.jsc},NETCF,NETCF_1_0" readonly="false" />
          <property name="current.build.defines.vbc" value="${build.defines.vbc},NETCF=True" readonly="false" />
          <property name="current.build.defines.vjc" value="${build.defines.vjc},NETCF" readonly="false" />
          <property name="current.build.defines.cl" value="${build.defines.cl} /D NETCF /D NETCF_1_0"
              readonly="false" />
          <property name="current.bin.dir" value="${bin.dir}/${current.runtime.config}/${current.runtime.version}/${current.build.config}"
              readonly="false" />
          <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${current.runtime.config}/${current.runtime.version}"
              readonly="false" />
          <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" readonly="false" />
          <property name="nant.settings.currentframework" value="${current.runtime.config}-${current.runtime.version}" />
      </target>
  
      <target name="set-mono-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="current.runtime.config" value="mono" readonly="false" />
          <property name="current.runtime.version" value="1.0" readonly="false" />
          <property name="current.runtime.description" value="Mono 1.0" readonly="false" />
          <property name="current.build.debug" value="${build.debug}" readonly="false" />
          <property name="current.build.defines.csc" value="${build.defines.csc},MONO,MONO_1_0" readonly="false" />
          <property name="current.build.defines.jsc" value="${build.defines.jsc},MONO,MONO_1_0" readonly="false" />
          <property name="current.build.defines.vbc" value="${build.defines.vbc},MONO=True,MONO_1_0=True"
              readonly="false" />
          <property name="current.build.defines.vjc" value="${build.defines.vjc},MONO,MONO_1_0" readonly="false" />
          <property name="current.build.defines.cl" value="${build.defines.cl} /D MONO /D MONO_1_0"
              readonly="false" />
          <property name="current.bin.dir" value="${bin.dir}/${current.runtime.config}/${current.runtime.version}/${current.build.config}"
              readonly="false" />
          <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${current.runtime.config}/${current.runtime.version}"
              readonly="false" />
          <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" readonly="false" />
          <property name="nant.settings.currentframework" value="${current.runtime.config}-${current.runtime.version}" />
      </target>
  
      <target name="set-sscli-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="current.runtime.config" value="sscli" readonly="false" />
          <property name="current.runtime.version" value="1.0" readonly="false" />
          <property name="current.runtime.description" value="Microsoft Shared Source CLI 1.0" readonly="false" />
          <property name="current.build.debug" value="${build.debug}" readonly="false" />
          <property name="current.build.defines.csc" value="${build.defines.csc},SSCLI,SSCLI_1_0" readonly="false" />
          <property name="current.build.defines.jsc" value="${build.defines.jsc},SSCLI,SSCLI_1_0" readonly="false" />
          <property name="current.build.defines.vbc" value="${build.defines.vbc},SSCLI=True,SSCLI_1_0=True"
              readonly="false" />
          <property name="current.build.defines.vjc" value="${build.defines.vjc},SSCLI,SSCLI_1_0" readonly="false" />
          <property name="current.build.defines.cl" value="${build.defines.cl} /D SSCLI /D SSCLI_1_0"
              readonly="false" />
          <property name="current.bin.dir" value="${bin.dir}/${current.runtime.config}/${current.runtime.version}/${current.build.config}"
              readonly="false" />
          <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${current.runtime.config}/${current.runtime.version}"
              readonly="false" />
          <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" readonly="false" />
          <property name="nant.settings.currentframework" value="${current.runtime.config}-${current.runtime.version}" />
      </target>
  </project>
  
  
  
  1.1                  avalon-sandbox/avalon-net/Castle/Castle.build
  
  Index: Castle.build
  ===================================================================
  <?xml version="1.0" ?>
  <project name="avalon-castle" default="compile-all" xmlnds="http://tempuri.org/nant-vs.xsd">
  
      <!-- Global project settings -->
      <property name="castle.basedir"        value="." readonly="false" />
      <property name="castle.src"            value="${castle.basedir}/CastleManagementExtensions" readonly="false" />
      <property name="castle.doc"            value="Apache.Avalon.Castle.ManagementExtensions.xml" readonly="false" />
      <property name="castle.test.src"       value="${castle.basedir}/CastleManagementExtensionsTest" readonly="false" />
      <property name="castle.assembly"       value="Apache.Avalon.Castle.ManagementExtensions.dll" readonly="true" />
      <property name="castle.test.assembly"  value="Apache.Avalon.Castle.ManagementExtensions.Test.dll" readonly="true" />
      <property name="castle.key"            value="AvalonCastle.key" readonly="true" />
      <property name="project.build.config"  value="debug" readonly="false" />
      <property name="project.build.package" value="false" readonly="false" />
  
      <include buildfile="${castle.basedir}/Castle-helper.build" />
      <include buildfile="${castle.basedir}/Castle-compilations.build" />
  
      <call target="set-build-configuration" />
      <call target="set-runtime-configuration" />
  
      <target name="compile-all" description="Compile all build configurations for all runtime configurations">
          <echo message="Compiling all build configurations for all runtime configurations." />
          <call target="set-debug-build-configuration" />
          <call target="compile-build" />
          <call target="set-release-build-configuration" />
          <call target="compile-build" />
      </target>
  
      <target name="run-tests" description="Run the test-cases." depends="check-castle-basedir">
          <echo message="Compiling all test cases." />
          <call target="compile-tests" />
          
          <copy todir="${current.bin.dir}">
              <fileset basedir="${nant.location}">
                  <includes name="nunit.*.dll" />
              </fileset>
          </copy>
          
          <nunit2 haltonerror="true" haltonfailure="true" failonerror="true">
              <formatter type="Plain" />
              <test assemblyname="${current.bin.dir}/${castle.test.assembly}" fork="true" /> 
          </nunit2>
          
          <delete>
              <fileset basedir="${current.bin.dir}">
                  <includes name="nunit.*.dll" />
                  <includes name="*Test.*" />
              </fileset>
          </delete>
      </target>
  
  </project>
  
  
  
  1.1                  avalon-sandbox/avalon-net/Castle/README.txt
  
  Index: README.txt
  ===================================================================
  To Build Castle you'll need:
  
  NAnt  -> http://nant.sourceforge.net
  
  NUnit is not a requirement as NAnt already includes it. 
  We cannot provide them for you due to licensing issues.
  Nant is a 100% .NET implmented build tool inspired by
  ANT (http://ant.apache.org).  It is licensed under the
  GPL, but if you install it separately as a tool (preferred)
  then all is well.  NUnit is a testing framework inspired
  by JUnit (http://junit.org), and has an installer for
  you. 
  
  Once your environment is set up you can type: 
  
  > build.cmd -defaultframework:?????? compile
  
  Where ?????? is one of the following:
  
    mono-1.0 for Mono 1.0
    net-1.1 for Microsoft .NET Framework 1.1
    net-1.0 for Microsoft .NET Framework 1.0
    sscli-1.0 for Shared CLI 1.0
  
  You may also type:
  
  > build.cmd
  
  To build everything that is supported by your machine configuration.
  
  
  Enjoy!
  
  -- The Avalon Team
  
  
  
  1.1                  avalon-sandbox/avalon-net/Castle/build.cmd
  
  Index: build.cmd
  ===================================================================
  @ECHO OFF
  
  REM Setup the build file
  IF EXIST nant.build (
  	set BUILD_FILE=nant.build
  ) ELSE (
  	set BUILD_FILE=Castle.build
  )
  
  REM Check for Mono install, update path to include mono libs
  IF EXIST %WINDIR%\monobasepath.bat (
  	CALL %WINDIR%\monobasepath.bat
  	
  	REM Remove quotes from path
  	SET CLEAN_MONO_BASEPATH=!MONO_BASEPATH:"=!
  
  	SET PATH="!CLEAN_MONO_BASEPATH!\bin\;!CLEAN_MONO_BASEPATH!\lib\;%path%"
  )
  
  REM echo PATH is %PATH%
  
  nant.exe "-buildfile:%BUILD_FILE%" %1 %2 %3 %4 %5 %6 %7 %8
  GOTO End
  
  REM ------------------------------------------
  REM Expand a string to a full path
  REM ------------------------------------------
  :FullPath
  set RESULT=%~f1
  goto :EOF
  
  REM ------------------------------------------
  REM Compute the current directory
  REM given a path to this batch script.
  REM ------------------------------------------
  :ComputeBase
  set RESULT=%~dp1
  REM Remove the trailing \
  set RESULT=%RESULT:~0,-1%
  Call :FullPath %RESULT%
  goto :EOF
  
  :End
  ENDLOCAL
  EXIT /B 0
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org