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 echo "(provide 'am-one)" > am-one.el
42 echo "(require 'am-one)" > am-two.el
43 echo "(require 'am-one)" > am-three.el
47 $AUTOMAKE --add-missing
49 ./configure "--with-lispdir=`pwd`/lisp"
58 test -f lisp/am-one.el
59 test -f lisp/am-one.elc
60 test ! -f lisp/am-two.el
61 test ! -f lisp/am-two.elc
62 test ! -f lisp/am-three.el
63 test ! -f lisp/am-three.elc
70 test ! -f am-three.elc
73 ./configure "--with-lispdir=`pwd`/lisp" want_two=1
81 # Let's mutilate the source tree, to check the recover rule.
90 test -f lisp/am-one.el
91 test -f lisp/am-one.elc
92 test -f lisp/am-two.el
93 test -f lisp/am-two.elc
94 test ! -f lisp/am-three.el
95 test ! -f lisp/am-three.elc
102 test ! -f am-three.elc