ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Castrianni <Shawn.Castria...@halliburton.com>
Subject RE: Setting environment variables
Date Fri, 01 Aug 2008 20:19:22 GMT
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:yanghatespam@gmail.com]
Sent: Friday, August 01, 2008 3:09 PM
To: user@ant.apache.org
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

----------------------------------------------------------------------
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message