This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Conditionally compiling Java
- From: Braden McDaniel <braden at endoframe dot com>
- To: automake at gnu dot org
- Date: Mon, 10 Jun 2002 00:36:02 -0400
- Subject: Conditionally compiling Java
I'm trying to conditionally compile some Java sources (with javac) using
an Automake conditional:
JAVAROOT = $(top_builddir)/java
JAVA_FILES = MyClass1.java MyClass2.java
if WITH_JDK
noinst_JAVA = $(JAVA_FILES)
endif
EXTRA_DIST = $(JAVA_FILES)
I am having trouble when the condition is false. If JAVAROOT is defined
outside the conditional (as above), I get this error:
CLASSPATH=../../../java:../../../../java/vrml/field/../../../java:$CLASSPATH -d ../../../java \
/bin/sh: -d: command not found
If the JAVAROOT definition is moved inside the conditional, I get this
error:
java/vrml/Makefile.am:10: JAVAROOT was already defined in condition WITH_JDK_TRUE, which is implied by condition TRUE
JAVAROOT (User, where = java/vrml/Makefile.am:10) =
{
WITH_JDK_TRUE => $(top_builddir)/java
}
What to do?
--
Braden McDaniel e-mail: <braden@endoframe.com>
<http://endoframe.com> Jabber: <braden@jabber.org>