Skip to main content

execution order in ant file

2 replies [Last post]
Joined: 2010-06-30

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.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.
Joined: 2009-04-11


A target element can have the following attributes:

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.

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

Joined: 2008-07-03

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.