[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: fix install rules when no *.java files (PR/411)
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: fix install rules when no *.java files (PR/411) |
Date: |
Thu, 09 Dec 2004 23:07:34 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
I'm installing this on HEAD and branch-1-9.
2004-12-09 Alexandre Duret-Lutz <address@hidden>
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.
Index: THANKS
===================================================================
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.262
diff -u -r1.262 THANKS
--- THANKS 8 Dec 2004 22:00:47 -0000 1.262
+++ THANKS 9 Dec 2004 22:05:20 -0000
@@ -114,6 +114,7 @@
Joel N. Weber II address@hidden
Joerg-Martin Schwarz address@hidden
Johan Danielsson address@hidden
+Johannes Nicolai address@hidden
John Pierce address@hidden
John W. Coomes address@hidden
Josh MacDonald address@hidden
Index: lib/am/java.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/java.am,v
retrieving revision 1.22
diff -u -r1.22 java.am
--- lib/am/java.am 28 Jan 2004 20:50:43 -0000 1.22
+++ lib/am/java.am 9 Dec 2004 22:05:20 -0000
@@ -48,7 +48,7 @@
## 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
@@ -63,7 +63,7 @@
.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
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.575
diff -u -r1.575 Makefile.am
--- tests/Makefile.am 8 Dec 2004 22:00:50 -0000 1.575
+++ tests/Makefile.am 9 Dec 2004 22:05:20 -0000
@@ -270,6 +270,7 @@
interp2.test \
java.test \
java2.test \
+java3.test \
javaprim.test \
javasubst.test \
ldadd.test \
Index: tests/java3.test
===================================================================
RCS file: tests/java3.test
diff -N tests/java3.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/java3.test 9 Dec 2004 22:05:20 -0000
@@ -0,0 +1,48 @@
+#! /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
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: fix install rules when no *.java files (PR/411),
Alexandre Duret-Lutz <=