summaryrefslogtreecommitdiff
path: root/lib/am/java.am
diff options
context:
space:
mode:
authorDaniel Richard G <skunk@iskunk.org>2011-08-16 15:19:14 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-08-18 21:33:51 +0200
commit720f0a2e5ad7e232390e2c590c331773389e8a25 (patch)
treed111bbcc885aa9fae102eb01de97652dbabecd30 /lib/am/java.am
parentb3afcecf956210275843c3e6e2d6f639f48156eb (diff)
downloadautomake-720f0a2e5ad7e232390e2c590c331773389e8a25.tar.gz
java: avoid compilation errors when CLASSPATH is empty
* lib/am/java.am (CLASSPATH_ENV): When redefining `$CLASSPATH', do not append an empty component in case the previous value of CLASSPATH is empty or unset. * tests/java-empty-classpath.test: New test. * tests/Makefile.am (TESTS): Update. Fixes automake bug#9306.
Diffstat (limited to 'lib/am/java.am')
-rw-r--r--lib/am/java.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/am/java.am b/lib/am/java.am
index d6eb45585..604df2229 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -21,7 +21,7 @@
## ---------- ##
JAVAC = javac
-CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH
+CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT)$${CLASSPATH:+":$$CLASSPATH"}
JAVAROOT = $(top_builddir)
class%DIR%.stamp: $(%DIR%_JAVA)