2 # Copyright (C) 1998-2013 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.
22 cat >> configure.ac << 'END'
26 cat > Makefile.am << 'END'
27 javadir = $(prefix)/java
29 nobase_java_JAVA = Foo2.java
30 nobase_dist_java_JAVA = Bar.java
31 nodist_java_JAVA = Baz.java
33 # Java files are not distributed by default, so we distribute
36 # ... and make the other one generated.
39 echo 'class bClass {}' > $@-t
40 chmod a-w $@-t && mv -f $@-t $@
42 # Explicitly declared as 'nodist_', so generate it.
45 echo 'class Baz {}' > $@-t
46 echo 'class Baz2 {}' >> $@-t
47 chmod a-w $@-t && mv -f $@-t $@
49 DISTCLEANFILES = Baz.java Foo2.java
52 echo 'class aClass {}' > Foo.java
53 echo 'class Zardoz {}' > Bar.java
59 ./configure --prefix="$(pwd)"/_inst
62 check_uninstallation()
64 test ! -e $javadir/aClass.class
65 test ! -e $javadir/bClass.class
66 test ! -e $javadir/Zardoz.class
67 test ! -e $javadir/Baz.class
68 test ! -e $javadir/Baz2.class
69 test -f $javadir/Foo.class
70 test -f $javadir/Bar.class
71 test -f $javadir/xClass.class
77 : > $javadir/Foo.class
78 : > $javadir/Bar.class
79 : > $javadir/xClass.class
85 # FIXME: "make uninstall" should continue to work also after "make clean",
86 # but currently this doesn't happen. See automake bug#8540.