2 # Copyright (C) 2004-2012 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"
63 test -f lisp/am-one.el
64 test -f lisp/am-one.elc
65 test ! -e lisp/am-two.el
66 test ! -e lisp/am-two.elc
67 test ! -e lisp/am-three.el
68 test ! -e lisp/am-three.elc
75 test ! -e am-three.elc
78 ./configure --with-lispdir="$cwd/lisp" want_two=1
86 # Let's mutilate the source tree, to check the recover rule.
95 test -f lisp/am-one.el
96 test -f lisp/am-one.elc
97 test -f lisp/am-two.el
98 test -f lisp/am-two.elc
99 test ! -e lisp/am-three.el
100 test ! -e lisp/am-three.elc
107 test ! -e am-three.elc