2 # Copyright (C) 2011 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 # Test on compilation and installation of Java class files.
24 cat >>configure.in <<'EOF'
28 cat > Makefile.am << 'END'
29 javadir = $(datadir)/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 $@
52 ls -l $(srcdir) . ;: For debugging.
53 test -f $(srcdir)/Foo.java
54 test -f $(srcdir)/Bar.java
64 test -f classjava.stamp
67 ls -l $(javadir) ;: For debugging.
68 test -f '$(javadir)/bClass.class'
69 test -f '$(javadir)/aClass.class'
70 test -f '$(javadir)/Zardoz.class'
71 test -f '$(javadir)/Baz.class'
72 test -f '$(javadir)/Baz2.class'
73 test ! -r '$(javadir)/Foo.class'
74 test ! -r '$(javadir)/Bar.class'
75 if find $(prefix) | grep '\.stamp$$'; then exit 1; else :; fi
78 installcheck-local: test-install
80 .PHONY: test test-install
82 DISTCLEANFILES = Baz.java Foo2.java
85 echo 'class aClass {}' > Foo.java
86 echo 'class Zardoz {}' > Bar.java
92 ./configure --prefix="`pwd`"/_inst