[m-rev.] For review: Have configure decide whether to install the Java grade

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 10 20:19:07 AEDT 2004


On 10-Feb-2004, James Goddard <goddardjames at yahoo.com> wrote:
> +++ library/Mmakefile	10 Feb 2004 07:36:26 -0000
> @@ -26,6 +26,7 @@
>  MERCURY_DIR=..
>  LINK_RUNTIME_ONLY=yes
>  include $(MERCURY_DIR)/Mmake.common
> +include $(MERCURY_DIR)/scripts/Mmake.vars

That is not needed; Mmake.vars gets included automatically when you run mmake.
(To test out changes to Mmake.vars in your own workspace, you may need
to set the MMAKE_DIR environment variable to point to your .../scripts
directory.)

I would suggest s/JAVAI/JAVA_INTERPRETER/g.

If AC_PATH_PROG doesn't find the program, it will leave the variable
set to the empty string.  This can have confusing results later
if they are referenced unconditionally.  If configure can't find them,
it's probably better to leave the variables set to just "javac", "java",
and "jar" respectively, so that any attempts to invoke them will give a
reasonable error message from the shell, e.g. "bash: javac: command not
found", rather than leaving JAVAC blank and then getting a confusing
error such as "bash: ./hello.java: Permission denied" when you invoke
"$(JAVAC) hello.java".  (Our existing code in configure.in suffers from
this problem a lot already, but no need to make it worse.)

Also, you should pass the setting of JAVAC and JAVAI on to the Mercury
compiler by putting them in scripts/Mercury.config.in, similar to the way
we do for the C compiler setting.  For the C compiler we allow it to be
overridden by an environment variable MERCURY_C_COMPILER and you might
want to do the same for Java.

Otherwise that looks good.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list