From cafe78b59cbb4c18591de10bd96171381882aa57 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 9 Dec 2004 21:48:19 +0000 Subject: [PATCH] * doc/automake.texi (Java): Mention dist_ and add an example. * tests/java.test: Do actually compile java files and run distcheck. --- ChangeLog | 5 +++++ doc/automake.texi | 13 +++++++++++-- doc/stamp-vti | 2 +- doc/version.texi | 2 +- tests/java.test | 35 ++++++++++++++++++++++++++++++----- 5 files changed, 48 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb3cedb4..5de9895a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-09 Alexandre Duret-Lutz + + * 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 Alexandre Duret-Lutz diff --git a/doc/automake.texi b/doc/automake.texi index 1a6c5bdb..110bea58 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -5205,8 +5205,17 @@ Automake provides some minimal support for Java compilation with the @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} diff --git a/doc/stamp-vti b/doc/stamp-vti index ae9f40c7..a0cba8e6 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 5 December 2004 +@set UPDATED 9 December 2004 @set UPDATED-MONTH December 2004 @set EDITION 1.9a @set VERSION 1.9a diff --git a/doc/version.texi b/doc/version.texi index ae9f40c7..a0cba8e6 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 5 December 2004 +@set UPDATED 9 December 2004 @set UPDATED-MONTH December 2004 @set EDITION 1.9a @set VERSION 1.9a diff --git a/tests/java.test b/tests/java.test index 8933514a..e5e91f9c 100755 --- a/tests/java.test +++ b/tests/java.test @@ -1,5 +1,5 @@ #! /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. # @@ -22,11 +22,36 @@ . ./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 <b.java <