java: allow both dist_JAVA and nodist_JAVA in the same Makefile.am
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 18 Apr 2011 13:18:08 +0000 (15:18 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 18 Apr 2011 19:06:58 +0000 (21:06 +0200)
commitd76b503883525aaab6048102cbfe96bbdd9a0a85
treea5cda6ed8b20e46f49d5492893e90cf5e1c92e5a
parent141f17ca87d007fdfde0da85475dea7556c636a0
java: allow both dist_JAVA and nodist_JAVA in the same Makefile.am

Fixes automake bug#8434.

* automake.in (handle_java): Strip `dist_' and `nodist_' from
the given prefix.  Define a new internal Makefile variable
`am__java_sources'.  Related adjustments.
* lib/am/java.am (JAVAC, JAVAROOT, CLASSPATH_ENV): Define only the
first time this am file is processed.
(class%DIR%.stamp): Stamp file renamed ...
(class%NDIR%.stamp): ... to this, so that the `dist_' and `nodist_'
prefixes are stripped from the name of the stampfile.  Adjust
declaration of dependencies by using the new automake-generated
internal variable `$(am__java_sources)'.  In the rule, use `$@'
as the name of the target, rather than hard-coding it.
* tests/java.test: Update and extend.
* tests/java-no-duplicate.test: New test.
* tests/java-mix-dist-nodist.test: Likewise.
* tests/java-compile-and-install.test: Likewise.
* tests/java-clean.test: Likewise.
* tests/java-sources.test: Likewise.
* tests/Makefile.am (TESTS): Update.
ChangeLog
automake.in
lib/am/java.am
tests/Makefile.am
tests/Makefile.in
tests/java-clean.test [new file with mode: 0755]
tests/java-compile-install.test [new file with mode: 0755]
tests/java-mix-dist-nodist.test [new file with mode: 0755]
tests/java-no-duplicate.test [new file with mode: 0755]
tests/java-sources.test [new file with mode: 0755]
tests/java.test