2004-12-09 Alexandre Duret-Lutz <adl@gnu.org>
+ Fix PR automake/441:
+ * lib/am/java.am (install-%DIR%JAVA, uninstall-%DIR%JAVA): Do
+ not install *.class if "$(%DIR%_JAVA)" is empty.
+ * tests/java3.test: New file.
+ * tests/Makefile.am (TESTS): Add it.
+ Report from Johannes Nicolai.
+
* doc/automake.texi (Java): Mention dist_ and add an example.
* tests/java.test: Do actually compile java files and run distcheck.
Joel N. Weber II nemo@koa.iolani.honolulu.hi.us
Joerg-Martin Schwarz jms@jms.prima.ruhr.de
Johan Danielsson joda@pdc.kth.se
+Johannes Nicolai johannes.nicolai@student.hpi.uni-potsdam.de
John Pierce hawkfan@pyrotechnics.com
John W. Coomes jcoomes@eng.Sun.COM
Josh MacDonald jmacd@cs.berkeley.edu
## A single .java file can be compiled into multiple .class files. So
## we just install all the .class files that got built into this
## directory. This is not optimal, but will have to do for now.
- for p in *.class; do \
+ @test -z "$(%DIR%_JAVA)" || for p in *.class; do \
echo " $(INSTALL_DATA) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
$(INSTALL_DATA) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$p"; \
done
.PHONY uninstall-am: uninstall-%DIR%JAVA
uninstall-%DIR%JAVA:
@$(NORMAL_UNINSTALL)
- @for p in *.class; do \
+ @test -z "$(%DIR%_JAVA)" || for p in *.class; do \
echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
rm -f "$(DESTDIR)$(%NDIR%dir)/$$p"; \
done
interp2.test \
java.test \
java2.test \
+java3.test \
javaprim.test \
javasubst.test \
ldadd.test \
interp2.test \
java.test \
java2.test \
+java3.test \
javaprim.test \
javasubst.test \
ldadd.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Make sure that Java rules don't attempt to install *.java files when
+# there are none.
+# Report from Johannes Nicolai (PR/441).
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([WHO_CARES], false)
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+if WHO_CARES
+JAVA_FILES = MyClass1.java
+endif
+
+dist_pkgdata_JAVA = $(JAVA_FILES)
+END
+
+: >MyClass1.java
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE distcheck