I have the same problem.  The exec task is too primitive.  Here are things I 
would like to see:

1. <exec> tag with if and unless attributes
2. <arg> subtags with if and unless attributes
3. <envSet> subtag so that an environment set can be defined somewhere with id 
and then referenced multiple times with refid

Basically, my idea is to take the awesome flexibility of cpptasks (with its if 
and unless support and ability to reuse sets of tags) but apply it to <exec> 
since cpptasks won't work for arbitrary program execution.

---
Shawn Castrianni


-----Original Message-----
From: Yang Zhang [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2008 3:09 PM
To: [email protected]
Subject: Setting environment variables

Hi, I know that I can set environment variables for a subprocess by
using <env> inside an <exec>, but if I have a bunch of targets that all
do <exec>s, and I'd like them all to have this same environment set up,
how may I accomplish this duplicating a bunch of <env>s everywhere?

My goal is to set things up for building/running a native Linux
executable that links with the JVM and a JNI library (to make gdb-ing
the JNI library easier), by setting:

- LD_LIBRARY_PATH and LIBRARY_PATH to "${java.library.path}"
- JAVA_HOME to "${java.home}/.."
- CPATH to "${java.home}/../include:${java.home}/../include/linux"

If there's a better way to do what I'm trying to do, I'm all ears.
Thanks in advance for any answers!
--
Yang Zhang
http://www.mit.edu/~y_z/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and 
privileged information for the sole use of the intended recipient.  Any review, 
use, distribution, or disclosure by others is strictly prohibited.  If you are 
not the intended recipient (or authorized to receive information for the 
intended recipient), please contact the sender by reply e-mail and delete all 
copies of this message.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to