Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / java-sources.test
1 #! /bin/sh
2 # Copyright (C) 2011 Free Software Foundation, Inc.
3 #
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)
7 # any later version.
8 #
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.
13 #
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/>.
16
17 # Test definition of automake-generated private Makefile variable
18 # `$(am__java_sources)'.
19
20 . ./defs || Exit 1
21
22 set -e
23
24 cat >> configure.in << 'END'
25 AC_OUTPUT
26 END
27
28 cat > Makefile.am << 'END'
29 foodir = $(prefix)
30
31 foo_JAVA = a.java
32 dist_foo_JAVA = b.java
33 nodist_foo_JAVA = c.java
34 nobase_foo_JAVA = d.java
35 nobase_dist_foo_JAVA = e.java
36 nobase_nodist_foo_JAVA = f.java
37
38 .PHONY: debug
39 debug:
40         @echo 'am__java_sources: "$(am__java_sources)"'
41 got:
42         @lst='$(am__java_sources)'; \
43          for f in $$lst; do echo $$f; done | sort > $@
44 END
45
46 $ACLOCAL
47 $AUTOMAKE
48 $AUTOCONF
49
50 cat > exp << 'END'
51 a.java
52 b.java
53 c.java
54 d.java
55 e.java
56 f.java
57 END
58
59 ./configure
60 $MAKE debug
61 $MAKE got
62
63 cat got
64 cat exp
65 diff exp got
66
67 :