Date: Fri, 9 Apr 2004 17:20:02 -0600 From: Greg Lewis <glewis@eyesbeyond.com> To: java@FreeBSD.org Cc: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr> Subject: Re: Ant support in bsd.java.mk (was Re: [ports-i386@bento ...]) Message-ID: <20040409232002.GG8348@misty.eyesbeyond.com> In-Reply-To: <20040409142510.GA94278@arabica.esil.univ-mrs.fr> References: <20040409005028.GX42056@xor.obsecurity.org> <20040409095112.GA91905@arabica.esil.univ-mrs.fr> <20040409142510.GA94278@arabica.esil.univ-mrs.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 09, 2004 at 04:25:10PM +0200, Herve Quiroz wrote: > Previous attempts failed because of complexity. So we should stay > minimalist this time. > > That gives: > > Variables that a port may define: > > - USE_ANT: when set, it means that Ant should be part of the > dependencies of the port. > - ANT_BUILD: when set, it means that Ant should be part of > BUILD_DEPENDS. > - ANT_RUN: when set, it means that Ant should be part of RUN_DEPENDS. But ant is a build tool. I don't know of anything that uses it to run. If we're staying minimalist then maybe this should be left out. Maybe all we need of these three is USE_ANT which sets a BUILD_DEPENDS on ant. That will mean the theoretical port that needs ant to run will have to define an explicit RUN_DEPENDS, but I think that is fine since I think the number of such ports will approach zero. > - ANT_INCLUDE_SHARED_JARS: when set, it means that JARs from JAVAVARDIR > should be added to the classpath. Yay! > Variables/macros provided by bsd.java.mk in return: > > - ANT_CMD: the 'ant' executable Or could just be ANT. There are plenty of utilities which don't have _CMD in them (e.g. ${MAKE}, which is a close equivalent). Also I think a number of ports already use ${ANT}, so for them it would be easier to port. I don't know of any which use ${ANT_CMD}. > - ANT: the command-line for running Ant. This will setenv JAVA_HOME > according to the JDK set for this port build, and possibly setenv > ANT_INCLUDE_SHARED_JARS=YES according to the Make variable of the same > name (see above). How about ${ANT_ENV}, ${ANT} and ${ANT_FLAGS} as per make? Just trying to stick to something similar for a similar tool :). > NOTE: the ANT_BUILD/ANT_RUN variables may seem a bit odd. Actually, they > mimic the JAVA_RUN/JAVA_BUILD from bsd.java.mk. Still we have to be able > to differenciate build and run dependencies. Indeed, although most > applications will use Ant at build stage, some ports (devel/maven for > instance) use Ant to run. Furthermore, devel/maven does not even require > Ant at build stage (it's a binary port). Another method would be: Argh, ok, you shot down my comments above by finding a port that uses ant to run. Thats ok, I can live with that :). However, I think adding a variable to a central part of the build system for one port isn't a good option when it forces an extra burden on the other ports which would have to define ANT_BUILD as well as USE_ANT. I think maven can just do an explicit RUN_DEPENDS on ant. Are there other ports that use ant at run time? > Variables that a port may define: > > - USE_ANT: same as above > - ANT_INCLUDE_SHARED_JARS: same as above > > Variable provided by bsd.java.mk in return: > > - ANT_CMD: same as above > - ANT: same as above > - ANT_DEPENDS: the *_DEPENDS value regarding Ant only. This means the > Makefile may contain: No. Just please have bsd.java.mk add the depends itself, I don't see any need for it to define the dependency, nor can I think of anything else in the ports system that does this (although I'm sure you can prove me wrong again :). Thats my 2c worth. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040409232002.GG8348>