On 7/11/06, Mark Hindess <[EMAIL PROTECTED]> wrote:
On 11 July 2006 at 14:46, Mark Hindess <[EMAIL PROTECTED]> wrote: > > On 11 July 2006 at 13:56, Mark Hindess <[EMAIL PROTECTED]> wrote: > > > > On 11 July 2006 at 16:42, "Ivan Volosyuk" <[EMAIL PROTECTED]> wrote: > > > > > > [snip] > > > > > > Working on it. Not sure I like the way make is called from ant build. > > > Here is an example: > > > > > > (from modules/luni/build.xml) > > > > > > <target name="clean.native" if="is.windows"> > > > <exec failonerror="true" > > > executable="${make.command}" > > > dir="${hy.luni.src.main.native}/vmi/${hy.os}"> > > > <env key="HY_HDK" value="${hy.hdk}" /> > > > <arg line="clean" /> > > > </exec> > > > <exec failonerror="true" > > > executable="${make.command}" > > > dir="${hy.luni.src.main.native}/luni/${hy.os}"> > > > <env key="HY_HDK" value="${hy.hdk}" /> > > > <arg line="clean" /> > > > </exec> > > > <exec failonerror="true" > > > executable="${make.command}" > > > dir="${hy.luni.src.main.native}/launcher/${hy.os}"> > > > <env key="HY_HDK" value="${hy.hdk}" /> > > > <arg line="clean" /> > > > </exec> > > > <exec failonerror="true" > > > executable="${make.command}" > > > dir="${hy.luni.src.main.native}/vmls/${hy.os}"> > > > <env key="HY_HDK" value="${hy.hdk}" /> > > > <arg line="clean" /> > > > </exec> > > > </target> > > > > > > This means that I should copy paste the environment variable from ant > > > variable conversion code in dozen of places. BTW, why the clean up is > > > just windows specific? What about Linux? > > > > Good question. I look forward to Oliver's answer. ;-) > > > > > I'm going to create some kind of macro command which will include all > > > common settings for make execution. (/me is reading manuals) > > > > Excellent idea. Something like (untested): > > > > <make dir="${hy.luni.src.main.native}/vmls/${hy.os}" target="clean" /> > > > > and: > > > > <macrodef name="make"> > > <attribute name="dir" /> > > <attribute name="target" default="" /> > > <sequential> > > <exec failonerror="true" > > executable="${make.command}" > > dir="@{dir}"> > > <env key="HY_HDK" value="${hy.hdk}" /> > > <arg line="@{target}" /> > > </exec> > > <sequential> > > </macrodef> > > > > (You might have to make the default for target "all".) > > > > At the moment the only common file you could put this in is > > properties.xml which isn't elegant but it might be okay for now. We > > really need to have a common file that gets moved to the deploy tree - > > like the make fragments. > > Ivan, > > I'm going to add something like this to svn shortly. I decided I should > fix the windows only clean in luni. And a couple of other issues. The make macro is in r420855. Regards, Mark.
You have bit me. Here is my macro I was working on: <macrodef name="make"> <attribute name="dir"/> <attribute name="args" default=""/> <sequential> <echo message="hy.cfg=${hy.cfg}"/> <exec failonerror="true" executable="${make.command}" dir="${make.basedir}/@{dir}/${hy.os}"> <env key="HY_HDK" value="${hy.hdk}" /> <env key="HY_CFG" value="${hy.cfg}" /> <arg line="@{args}" /> </exec> </sequential> </macrodef> This macro I decided to use has one difference in usage I wanted to push: <property name="make.basedir" location="${hy.luni.src.main.native}"/> <make dir="vmi" args="clean"/> <make dir="luni" args="clean"/> <make dir="launcher" args="clean"/> <make dir="vmls" args="clean"/> In this notation it looks a bit more readable. -- Ivan Intel Middleware Products Division --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]