From: Alexandre Duret-Lutz Date: Thu, 9 Dec 2004 21:48:20 +0000 (+0000) Subject: * doc/automake.texi (Java): Mention dist_ and add an example. X-Git-Tag: Release-1-9b~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9681f98ff592d3d9469d9888d2c762b79456bebc;p=thirdparty%2Fautomake.git * doc/automake.texi (Java): Mention dist_ and add an example. * tests/java.test: Do actually compile java files and run distcheck. --- diff --git a/ChangeLog b/ChangeLog index cb3cedb4e..5de9895ae 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 1a6c5bdb6..110bea586 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 ae9f40c70..a0cba8e6c 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 ae9f40c70..a0cba8e6c 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 8933514af..e5e91f9c9 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 <