2 # Copyright (C) 1998, 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Check uninstallation of Java class files.
24 cat >> configure.in << 'END'
28 cat > Makefile.am << 'END'
29 javadir = $(prefix)/java
31 nobase_java_JAVA = Foo2.java
32 nobase_dist_java_JAVA = Bar.java
33 nodist_java_JAVA = Baz.java
35 # Java files are not distributed by default, so we distribute
38 # ... and make the other one generated.
41 echo 'class bClass {}' > $@-t
42 chmod a-w $@-t && mv -f $@-t $@
44 # Explicitly declared as `nodist_', so generate it.
47 echo 'class Baz {}' > $@-t
48 echo 'class Baz2 {}' >> $@-t
49 chmod a-w $@-t && mv -f $@-t $@
51 DISTCLEANFILES = Baz.java Foo2.java
54 echo 'class aClass {}' > Foo.java
55 echo 'class Zardoz {}' > Bar.java
61 ./configure --prefix="`pwd`"/_inst
64 check_uninstallation()
66 test ! -r $javadir/aClass.class
67 test ! -r $javadir/bClass.class
68 test ! -r $javadir/Zardoz.class
69 test ! -r $javadir/Baz.class
70 test ! -r $javadir/Baz2.class
71 test -f $javadir/Foo.class
72 test -f $javadir/Bar.class
73 test -f $javadir/xClass.class
74 test -f $javadir/aclass.class
80 : > $javadir/Foo.class
81 : > $javadir/Bar.class
82 : > $javadir/xClass.class
83 : > $javadir/aclass.class
89 # FIXME: "make uninstall" should continue to work also after "make clean",
90 # but currently this doesn't happen. See automake bug#8540.