Skip to main content

execution order in ant file

2 replies [Last post]
yelin
Offline
Joined: 2010-06-30
Points: 0

Under $OCAPROOT, build.xml says

I know init is executed first because everything depends on init. But for the rest build.blahblah files, which one is executed first? From left to right (build.jvm->build.java->build.mpe->build.assets->...)?

Can I build mpe, then jvm and java ? (Since I'm porting the stack, I would like to test from bottom up.)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
csweeney
Offline
Joined: 2009-04-11
Points: 0

From http://javaworkshop.sourceforge.net/chapter6.html...

[code]
A target element can have the following attributes:

name
depends
if
unless
description
The name is the name of the target and can be called to run via the command-line when Ant is run. Names should be short but descriptive of what the target does. An initialization target can be called "init" and "compile" is usually used for a target that compiles the source.

The "depends" attribute specifies which other targets must execute before this one. This is a comma-separated list. You should not make any assumptions about the order that targets get called, if you have the following:




and you run target D, the order of execution is not C, B, A, D but rather A, B, C and finally D.
[/code]

Which is to say that order may be important, but it is enforced by the depends attributes on each of the components.

Message was edited by: csweeney

greg80303
Offline
Joined: 2008-07-03
Points: 0

The top-level ant build target "build.mpe" builds ALL native code into a shared library. This includes MPEOS, MPE, and most relevant to your question, JNI. The JNI source depends on the generation of the JNI headers which depends on the compilation of the stack's Java source code. So, the order is important and should not be changed.

G