2 # Copyright (C) 2004-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 # Test for conditional _LISP.
22 cat > Makefile.am << 'EOF'
23 dist_lisp_LISP = am-one.el
25 dist_lisp_LISP += am-two.el
27 dist_noinst_LISP = am-three.el
30 test -f $(distdir)/am-one.el
31 test -f $(distdir)/am-two.el
32 test -f $(distdir)/am-three.el
35 cat >> configure.ac << 'EOF'
36 AM_CONDITIONAL([WANT_TWO], [test -n "$want_two"])
41 # Avoid possible spurious influences from the environment.
42 want_two=; unset want_two
44 echo "(provide 'am-one)" > am-one.el
45 echo "(require 'am-one)" > am-two.el
46 echo "(require 'am-one)" > am-three.el
50 $AUTOMAKE --add-missing
52 cwd=$(pwd) || fatal_ "getting current working directory"
54 ./configure --with-lispdir="$cwd/lisp"
62 test -f lisp/am-one.el
63 test -f lisp/am-one.elc
64 test ! -e lisp/am-two.el
65 test ! -e lisp/am-two.elc
66 test ! -e lisp/am-three.el
67 test ! -e lisp/am-three.elc
74 test ! -e am-three.elc
76 ./configure --with-lispdir="$cwd/lisp" want_two=1
83 # Let's mutilate the source tree, to check the recover rule.
91 test -f lisp/am-one.el
92 test -f lisp/am-one.elc
93 test -f lisp/am-two.el
94 test -f lisp/am-two.elc
95 test ! -e lisp/am-three.el
96 test ! -e lisp/am-three.elc
103 test ! -e am-three.elc