Re: Update: gexace error with conditional options and clusters

"Brian Heilig" <Brian.Heilig-tdt4z+Mb/[email protected]> Mon, 12 May 2008 21:54:43 -0000
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
Eric wrote:

> Which cluster? Should you send us more than just the line
> with the <option> in order to figure out what's going on.

Here is the .eant file for the test directory:

<project name="posix_test" default="help">

  <description>
    description: "Eiffel Ant file for Serial Communications Library
Posix CSU tests"
    copyright: "Copyright (c) 2005, Brian E. Heilig"
    license: "Eiffel Forum License v2 (see license.txt)"
    date: "$Date: 2006/03/26 05:07:57 $"
    revision: "$Revision: 1.4 $"
  </description>

  <inherit>
    <parent location="${GOBO}/misc/test.eant">
      <redefine target="init_system"/>
      <redefine target="prepare_compile"/>
    </parent>
  </inherit>

<!-- Implementation -->

  <target name="prepare_compile">
    <available resource="${SECOM}/library/ewg/spec" variable="installed"/>
    <echo message="Installing secom" if="${installed}=false"/>
    <geant file="build.eant" target="install" dir="${SECOM}"
if="${installed}=false"/>
  </target>

  <target name="init_system">
    <echo message="Please set the SECOM environment variable"
unless="${SECOM}"/>
    <echo message="to the secom installation directory."
unless="${SECOM}"/>
    <exit code="1" unless="${SECOM}"/>

    <available resource="${SECOM}/.secom" variable="environment"/>
    <echo message="File .secom not found. Please set the SECOM
environment" if="${environment}=false"/>
    <echo message="variable to the secom installation directory where
the" if="${environment}=false"/>
    <echo message="file .secom is located." if="${environment}=false"/>
    <echo message="Current value of SECOM environment variable is
${SECOM}" if="${environment}=false"/>
    <exit code="1" if="${environment}=false"/>

    <set name="system" value="xposix"/>
    <set name="library" value="posix"/>
    <set name="system_dir" value="${SECOM}/test/${library}"/>
  </target>

</project>

-------------------------------------------------------------
And here is the system.xace file:

<?xml version="1.0"?>

<system name="xposix">
  <description>
    system: "Posix Serial Communications Library Tester"
    copyright: "Copyright (c) 2005, Brian E. Heilig"
    license: "Eiffel Forum License v2 (see license.txt)"
    date: "$Date: 2006/03/26 05:07:57 $"
    revision: "$Revision: 1.3 $"
  </description>

  <root class="XPOSIX" creation="make"/>

  <option unless="${DEBUG}">
    <option name="assertion" value="none"/>
    <option name="garbage_collector" value="none"/>
    <option name="finalize" value="true"/>
  </option>
  <option if="${DEBUG}">
    <option name="assertion" value="all"/>
    <option name="garbage_collector" value="internal"/>
    <option name="finalize" value="false"/>
    <option name="debug" value="true"/>
  </option>

  <cluster name="com_posix_testgen" location="TESTGEN"/>
  <cluster name="com_posix_test" location="${SECOM}/test/posix"/>

  <mount location="${SECOM}/library/library.xace"/>
  <mount location="${GOBO}/library/test/library.xace"/>
  <mount location="${GOBO}/library/kernel/library.xace"/>
  <mount location="${GOBO}/library/structure/library.xace"/>
  <mount location="${GOBO}/library/utility/library.xace"/>
  <mount location="${GOBO}/library/pattern/library.xace"/>
  <mount location="${GOBO}/library/kernel.xace"/>
</system>

----------------------------------------------------------
And finally, here is the library.xace file referenced in the above
system file:

<?xml version="1.0"?>

<library name="secom" prefix="com_">
  <description>
    description: "Xace file for the Serial Communications Library"
    library: "Serial Communications Library"
    copyright: "Copyright (c) 2005, Brian E. Heilig"
    license: "Eiffel Forum License v2 (see license.txt)"
    date: "$Date: 2006/03/26 05:07:52 $"
    revision: "$Revision: 1.8 $"
  </description>

  <cluster name="secom" location="${SECOM}/library">
    <cluster name="ewg">
      <cluster name="spec">
        <option name="abstract" value="true"/>
        <cluster name="${GOBO_EIFFEL}" prefix="ewg_spec_"/>
      </cluster>
    </cluster>

    <cluster name="windows" if="${GOBO_OS}=windows"/>
    <cluster name="posix" if="${GOBO_OS}=unix"/>
    <cluster name="abstract"/>
  </cluster>

  <option name="link" value="${SECOM}/library/posix/c/overall_timer.o"
if="${GOBO_OS}=unix"/>
  <option name="header" value="${SECOM}/library/ewg/c"/>
  <option name="header" value="${SECOM}/library/posix/c"
if="${GOBO_OS}=unix"/>
</library>


Thanks for your help,
Brian