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

next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_U7hQD8maDHVopAS
Content-Type: text/plain;
  charset="koi8-u"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

= The defined/undefined logic allows for more flexbility IMHO.

Right -- and the bsd.port.mk cares only for this one bit of information.
Then the included bsd.java.mk looks more closely at what is actually
defined and uses that.

= Are you advocating for a re-design of the Java support in bsd.java.mk?

I'd like it to remain legal to just use USE_JAVA=version -- instead of
having to use extra variables.

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

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

= 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).

	-mi


--Boundary-00=_U7hQD8maDHVopAS
Content-Type: text/plain;
  charset="koi8-u";
  name="java-test.shar"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="java-test.shar"

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	java-test
#	java-test/scripts
#	java-test/scripts/configure
#	java-test/Makefile
#	java-test/work
#	java-test/work/.extract_done.meow-1.0._opt
#	java-test/work/.extract_done.meow-1.0._usr_local
#	java-test/work/.patch_done.meow-1.0._opt
#
echo c - java-test
mkdir -p java-test > /dev/null 2>&1
echo c - java-test/scripts
mkdir -p java-test/scripts > /dev/null 2>&1
echo x - java-test/scripts/configure
sed 's/^X//' >java-test/scripts/configure << 'END-of-java-test/scripts/configure'
Xecho "The JH is set to $JH"
Xecho "The JAVA_HOME is set to $JAVA_HOME"
Xexit 1
END-of-java-test/scripts/configure
echo x - java-test/Makefile
sed 's/^X//' >java-test/Makefile << 'END-of-java-test/Makefile'
XPORTNAME=	meow
XPORTVERSION=	1.0
XCATEGORIES=	misc
X
XCOMMENT=	meow
X
XNO_EXTRACT=	yes
XUSE_JAVA=	1.3+
X
X.include <bsd.port.pre.mk>
XCONFIGURE_ENV+=	JH=${JAVA_HOME}
X.include <bsd.port.post.mk>
END-of-java-test/Makefile
echo c - java-test/work
mkdir -p java-test/work > /dev/null 2>&1
echo x - java-test/work/.extract_done.meow-1.0._opt
sed 's/^X//' >java-test/work/.extract_done.meow-1.0._opt << 'END-of-java-test/work/.extract_done.meow-1.0._opt'
END-of-java-test/work/.extract_done.meow-1.0._opt
echo x - java-test/work/.extract_done.meow-1.0._usr_local
sed 's/^X//' >java-test/work/.extract_done.meow-1.0._usr_local << 'END-of-java-test/work/.extract_done.meow-1.0._usr_local'
END-of-java-test/work/.extract_done.meow-1.0._usr_local
echo x - java-test/work/.patch_done.meow-1.0._opt
sed 's/^X//' >java-test/work/.patch_done.meow-1.0._opt << 'END-of-java-test/work/.patch_done.meow-1.0._opt'
END-of-java-test/work/.patch_done.meow-1.0._opt
exit


--Boundary-00=_U7hQD8maDHVopAS--



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