I did not see a response to this question.
Peter Horan wrote:
How do I use a common parent in conjunction with a child target, in which I want
to nominate a parent cluster and give it a <file_rule> for that target?
For example, I would like to promote "cluster_1" below from both "target_1" and
"target_2" into "basics", because it is the same cluster. Some <exclude>
conditions would also be promoted, but the ones that differ, need to remain with
their target.
Working code:
<target name="basics">
<option warning="true" msil_application_optimize="true">
<assertions precondition="true" check="true" invariant="true"/>
</option>
<setting name="console_application" value="true"/>
<external_include location="library_directory"/>
<external_library location="library.lib"/>
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
<cluster name="cluster_2" location="directory_name\" recursive="true"/>
<!-- Some targets need cluster_2, some don't -->
</target>
<target name="target_1" extends="basics">
<root class="APPLICATION" feature="make"/>
<cluster name="cluster_1" location=".\" recursive="true">
<file_rule>
<exclude>/EIFGENs$</exclude>
<exclude>/.svn$</exclude>
<exclude>/CVS$</exclude>
<!-- The above is common and could be promoted -->
<!-- target_1 uses class_1_a -->
<exclude>class_1_b.e</exclude>
<exclude>cluster_2</exclude>
<!-- target_1 does not use cluster_2,
nor does it need library.lib -->
</file_rule>
</cluster>
</target>
<target name="target_2" extends="basics">
<root class="APPLICATION" feature="make"/>
<setting name="inlining" value="false"/>
<cluster name="cluster_1" location=".\" recursive="true">
<file_rule>
<exclude>/EIFGENs$</exclude>
<exclude>/.svn$</exclude>
<exclude>/CVS$</exclude>
<!-- The above is common and could be promoted -->
<exclude>class_1_a.e</exclude>
<!-- target_2 uses class_1_b -->
<!-- target_2 uses cluster_2, and library.lib -->
</file_rule>
</cluster>
</target>
What I tried, which failed because of the name clash of cluster_1:
<target name="basics">
<option warning="true" msil_application_optimize="true">
<assertions precondition="true" check="true" invariant="true"/>
</option>
<setting name="console_application" value="true"/>
<cluster name="cluster_1" location=".\" recursive="true">
<file_rule>
<exclude>/EIFGENs$</exclude>
<exclude>/.svn$</exclude>
<exclude>/CVS$</exclude>
</file_rule>
</cluster>
<external_include location="library_directory"/>
<external_library location="library.lib"/>
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
<cluster name="cluster_2" location="directory_name\" recursive="true"/>
<!-- Some targets need cluster_2, some don't -->
</target>
<target name="target_1" extends="basics">
<root class="APPLICATION" feature="make"/>
<cluster name="cluster_1" location=".\" recursive="true">
<!-- Name clash: cluster_1 exists in taget basics -->
<file_rule> <!-- How do I put in an addtional rule? -->
<exclude>class_1_b.e</exclude>
<exclude>cluster_2</exclude>
</file_rule>
</cluster>
</target>
<target name="target_2" extends="basics">
<root class="APPLICATION" feature="make"/>
<setting name="inlining" value="false"/>
<cluster name="cluster_1" location=".\" recursive="true">
<file_rule>
<exclude>class_1_a.e</exclude>
</file_rule>
</cluster>
</target>
--
Peter Horan School of Engineering and Information Technology
[EMAIL PROTECTED] Deakin University
+61-3-5227 1234 (Voice) Geelong, Victoria 3217, AUSTRALIA
+61-3-5227 2028 (FAX) http://www.eit.deakin.edu.au/~peter
-- The Eiffel guarantee: From specification to implementation
-- (http://www.cetus-links.org/oo_eiffel.html)
_______________________________________________
Es-users mailing list
[email protected]
http://rock.inf.ethz.ch/cgi-bin/mailman/listinfo/es-users