Hi,
I have an idea for a task to handle file based build prerequisites in a somewhat make-like way.
Does this sound like a good idea?
The XML might be like:
<!ELEMENT ruleset (rule+)> <!ATTLIST ruleset id ID #IMPLIED name CDATA #IMPLIED default CDATA #IMPLIED>
<!ELEMENT rule (prerequisites?, targetfiles?, (%ant.tasks;)*> <!ATTLIST rule id ID #IMPLIED name CDATA #IMPLIED prerequisites CDATA #IMPLIED filetargets CDATA #IMPLIED>
<!ELEMENET prerequisites (%ant.path.elements;+)> <!ATTLIST prerequisites refid IDREFS #IMPLIED files CDATA #IMPLIED>
<!ELEMENET filetargets (%ant.path.elements;+)> <!ATTLIST filetargets refid IDREFS #IMPLIED files CDATA #IMPLIED>
For example (please forgive any ameturish tagging here):
<?xml version="1.0"?> <project name="example-ruleset" default="rules">
<filelist id="a.srcs" dir="src/a" files="a.bf,b.bf,c.bf"/> <filelist id="b.srcs" dir="src/b" files="a.ms,b.ms,c.ms"/>
<target name="rules">
<ruleset default="all">
<rule name="all" prerequisites="AAAA"/>
<rule name="aaaa-rule" filetargets="AAAA"> <prerequisites> <filelist refid="${a.srcs}"/> <filelist files="BBBB"/> </prerequisites> <some-ant-task src="${a.srcs}" out="AAAA"/> </rule>
<rule name="bbbb" prerequisites="${b.srcs}"> <filetargets> <filelist files="BBBB"/> </filetargets> <some-other-ant-task src="${b.srcs}" out="BBB"/> </rule>
</ruleset> </target> </project>
The idea being that the rules handle file oriented build dependencies, building only what is outofdate.
I think the tasks after prerequisites/filetargets in rule could include antcall as well, i.e. some currently useful thing involving ant targets and depends could be integrated into a rule by calling the target.
In the call to ant, the target name could identify the ruleset, and you could select rules by name or maybe by filename, e.g.:
ant rules ant rules -Dbuild="BBBB" or ant rules -Dbuild-name="aaaa-rule"
Kendall
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]