tests: fix/improve few heading comments
[platform/upstream/automake.git] / t / lisp-subdir2.sh
1 #! /bin/sh
2 # Copyright (C) 2012-2013 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 # Compiling elisp files in different subdirectories.
18
19 required=emacs
20 . test-init.sh
21
22 cat >> configure.ac << 'END'
23 AM_PATH_LISPDIR
24 AC_OUTPUT
25 END
26
27 cat > Makefile.am << 'END'
28 dist_lisp_LISP = am-one.el
29 nodist_lisp_LISP = sub/am-two.el
30 sub/am-two.el:
31         mkdir sub
32         echo "(provide 'am-two)" > $@
33 DISTCLEANFILES = $(nodist_lisp_LISP)
34 dist_noinst_LISP = x/y/z/am-three.el
35
36 elc-test:
37         test -f am-one.elc
38         test -f sub/am-two.elc
39         test -f x/y/z/am-three.elc
40 .PHONY: elc-test
41 check-local: elc-test
42 END
43
44 mkdir x x/y x/y/z
45 echo "(provide 'am-one)" > am-one.el
46 # sub/am-two.el is generated at make runtime
47 echo "(provide 'am-three)" > x/y/z/am-three.el
48
49 $ACLOCAL
50 $AUTOCONF
51 $AUTOMAKE --add-missing
52
53 ./configure
54
55 $MAKE
56 $MAKE elc-test
57 $MAKE clean
58 test ! -e am-one.elc
59 test ! -e sub/am-two.elc
60 test ! -e x/y/z/am-three.elc
61 test -f am-one.el
62 test -f sub/am-two.el
63 test -f x/y/z/am-three.el
64
65 # Byte-compiling only a subset of the elisp files.
66 $MAKE am-one.elc sub/am-two.elc
67 test -f am-one.elc
68 test -f sub/am-two.elc
69 test ! -e x/y/z/am-three.elc
70 rm -f am-one.elc sub/am-two.elc
71 $MAKE x/y/z/am-three.elc
72 test ! -e am-one.elc
73 test ! -e sub/am-two.elc
74 test -f x/y/z/am-three.elc
75
76 $MAKE distcheck
77
78 :