bsd.java.mk 2.0
Greg Lewis
glewis at misty.eyesbeyond.com
Thu May 29 10:53:22 PDT 2003
On Fri, May 23, 2003 at 02:31:29PM +0200, Herve Quiroz wrote:
> Hi Greg,
>
> On Fri, 23 May 2003, Greg Lewis wrote:
>
> > > > This may need extending to cope with ports that need a JDK at run time
> > > > (any examples?).
> > >
> > > devel/jakarta-ant ?
> >
> > Good call. How about:
> >
> > USE_JAVA = [ BUILD-RUN ]
> >
> > Where BUILD and RUN may take the values jdk or jre. I think this should
> > be clear, but the BUILD portion adds a build depends and the RUN portion
> > adds a run depends. The most common case will be jdk-jre, meaning the
> > port requires the JDK to build but only the jre to run.
> >
> > This kinda feels a little clunky, so as an alternative maybe:
> >
> > USE_JAVA = yes
> > JAVA_BUILD = jdk
> > JAVA_RUN = jre
> >
> > Comments?
>
> At first, I would have said I prefer the second. But I don't know really.
> Maybe with an example I can figure what you mean exactly. Tell me f I
> understand correctly:
>
> For most of the ports (libs):
> USE_JAVA= BUILD=jdk RUN=jre
If the two variants I proposed this would be done as:
USE_JAVA = jdk-jre
or
USE_JAVA = yes
JAVA_BUILD = jdk
JAVA_RUN = jre
> Which means build dependency for the chosen JDK and run dependency for the
> chosen JRE
>
> For devel/jakarta-ant:
> USE_JAVA= RUN=JDK
USE_JAVA = -jdk
(no build required)
or
USE_JAVA = yes
JAVA_RUN = jdk
This example makes me want to choose the second version :).
> Which means it builds without anything (JDK related I mean) as ant is
> "install only" and need a JDK to run.
>
[snip]
> > > I think we've got something here: use space separated preferences (in the
> > > right order) for all JDK/JRE properties. So no more "+" (e.g. "1.3+") but
> > > instead an explicit list of versions...
> >
> > I like the space separation :). However, I think the "+" sign is still
> > useful as a short hand for 1.x 1.y ... 1.current. It also means we don't
> > have to do a sweep when a new Java version comes out and add (for example)
> > 1.5 to the list. I think for maximum flexibility and to preserve the
> > usefulness of the "+" we should allow both a "+" and a space separated
> > list. If the version is written with a "+" it must be the only version,
> > i.e. you can't have "1.1 1.3+" as a list.
>
> That's a good point. The "+" is still greatly needed. And may be overriden
> by the bsd.java.mk:
>
> .if ${USE_JAVA_VERSION} == "1.3+"
> USE_JAVA_VERSION= 1.3 1.2 1.1
> .endif
>
> So we need to update only bsd.java.mk when a new version of Java comes
> out.
Yes, exactly.
--
Greg Lewis Email : glewis at eyesbeyond.com
Eyes Beyond Web : http://www.eyesbeyond.com
Information Technology FreeBSD : glewis at FreeBSD.org
More information about the freebsd-java
mailing list