* tests/java.test: Do actually compile java files and run distcheck.
+2004-12-09 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * doc/automake.texi (Java): Mention dist_ and add an example.
+ * tests/java.test: Do actually compile java files and run distcheck.
+
2004-12-08 Peter O'Gorman <peter@pogma.com>
Alexandre Duret-Lutz <adl@gnu.org>
@samp{JAVA} primary.
Any @file{.java} files listed in a @samp{_JAVA} variable will be
-compiled with @code{JAVAC} at build time. By default, @file{.class}
-files are not included in the distribution.
+compiled with @code{JAVAC} at build time. By default, @file{.java}
+files are not included in the distribution, you should use the
+@code{dist_} prefix to distribute them.
+
+Here is a typical setup for distributing @file{.java} files and
+installing the @file{.class} files resulting from their compilation.
+
+@example
+javadir = $(datadir)/java
+dist_java_JAVA = a.java b.java @dots{}
+@end example
@cindex @code{JAVA} restrictions
@cindex Restrictions for @code{JAVA}
-@set UPDATED 5 December 2004
+@set UPDATED 9 December 2004
@set UPDATED-MONTH December 2004
@set EDITION 1.9a
@set VERSION 1.9a
-@set UPDATED 5 December 2004
+@set UPDATED 9 December 2004
@set UPDATED-MONTH December 2004
@set EDITION 1.9a
@set VERSION 1.9a
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
. ./defs || exit 1
+set -e
+
+cat >>configure.in <<'EOF'
+AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
+$HAS_JAVAC 77
+AC_OUTPUT
+EOF
+
+
cat > Makefile.am << 'END'
javadir = $(datadir)/java
-java_JAVA = a.java b.java c.java
+dist_java_JAVA = a.java b.java
END
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
-grep '^all[-a-z]*:.*classjava\.stamp' Makefile.in
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+grep '^all[-a-z]*:.*classdist_java\.stamp' Makefile.in
+
+cat >a.java <<EOF
+class a
+{
+}
+EOF
+
+cat >b.java <<EOF
+class b
+{
+}
+EOF
+
+./configure --prefix `pwd`
+$MAKE distcheck