bsd.java.mk 2.0

Greg Lewis glewis at misty.eyesbeyond.com
Tue Aug 19 22:27:34 PDT 2003


On Mon, Aug 18, 2003 at 04:10:31PM +0200, Herve Quiroz wrote:
> I'm in the process of getting this bsd.java.mk 2.0 working together with
> a demonstration java lib port. I've managed to stay compatible with the
> former bsd.java.mk (that I call 1.0), which means we don't have to
> change all java ports at once, but rather mark the old features as
> "deprecated".

Cool :).

> BTW, is there something in portlint(1) regarding java ports ? If so,
> that would be the right place to check those "deprecated" statements.
> 
> Anyway, that's not the main goal of my mail. Instead, I'm asking for
> help, not Java related but Make related...
> 
> So far, JDK/JRE dependency is resolved as follow:
> 
> It first builds a list of all JDK/JRE ports suitable according to their
> version number in _JAVA_PORTS_BY_VERSION.
> 
> Then, the same for _JAVA_PORTS_BY_OS and _JAVA_PORTS_BY_VENDOR.
> 
> I was trying to build a list which is the intersection of those 3 above
> lists. So far, the only answer I have found to this problem is using
> three for/do/done nested loops. But IMHO it relies too much on the
> underlying shell, which is subject to change depending on machines. I
> know GNU Make better than the BSD one (PMake IIRC) and I know that GNU
> Make provides 'for' loops on its own. I can't find anything similar with
> PMake...
> 
> There may be another solution. If anyone has any idea, or just knows
> how to do 'for' loops (or even lists intersections) in a generic (that
> is not shell dependent) fashion, please let me know about it.

As per make(1):

.for variable in expression
<make-rules>
.endfor

You can find many example usages in the various makefiles across the
system, e.g. /usr/share/mk, /usr/ports/Mk, etc.

-- 
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