Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Oct 2005 12:50:52 +0200
From:      Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
To:        Mikhail Teterin <mi+kde@aldan.algebra.com>
Cc:        java@freebsd.org
Subject:   Re: some questions about Java ports
Message-ID:  <20051004105052.GA45214@arabica.esil.univ-mrs.fr>
In-Reply-To: <200510040219.00070@aldan>
References:  <200510030230.j932Uwbo005425@blue.virtual-estates.net> <20051004013739.GB4038@arabica.esil.univ-mrs.fr> <200510040219.00070@aldan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 04, 2005 at 02:18:59AM -0400, Mikhail Teterin wrote:
> = On Sun, Oct 02, 2005 at 10:30:58PM -0400, Mikhail T. wrote:
> = > 	4) How to pass javac options to ant (when relying on USE_ANT=yes)?
> = 
> = I don't know if it possible to pass javac options to Ant through the
> = command-line when invoking ant(1), unless a custom build.xml does
> = support such feature.
> 
> I don't think, the javac compilation needs to be explicitly described in
> build.xml. Hence there ought to be some standard property somewhere --
> not unlike CFLAGS settings in ours and GNU makes. Unfortunately, I have
> no idea, where or what it is, and am only guessing here...

There is no standard CFLAGS-like way to pass options to javac in Ant. At
least there is nothing like this mentioned in the manual:

  http://ant.apache.org/manual/running.html#envvars

Moreover, I had a look at some "standard" build.xml in the Jakarta
project and did not find any standardized way to pass options to javac.
So you'll have to patch the build.xml file to be able to pass them
through -Dvariable=value...

> = Anyway, I never had to pass some options to javac in my ports so I am
> = not proficient in this regard. Could you show us some sample use case
> = please?
> 
> javac has about a dozen of options. -g:xxx, -Jxxx, -encoding, -target,
> -Xxxx...

Well, I do know what options javac does support. What I was asking for
was a sample port where you would actually need to pass some options not
supported by the provided build.xml file. Again, I never had to do that
(for a port, that is) so I am not sure I truly understand the
circumstances when it would be needed and thus cannot think of a
workaround.

> = PS: I would be glad if you could show us some sample code to point out
> = the MAKE_ENV/JAVA_HOME issue as well.
> 
> See the attached dummy port. Note, it already has the .extract cookie
> created in its fake "work". Try running `make -V CONFIGURE_ENV' first --
> the JH will be part of it nicely.
> 
> Then run `make configure' and see it report an empty JH (and JAVA_HOME).

Thanks. It's on my TODO list as well now :)

Herve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051004105052.GA45214>