Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / lisp6.test
blobeccd1823629ecfad620e3b1411788a5487a0568f
1 #! /bin/sh
2 # Copyright (C) 2004, 2005, 2007 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 3, or (at your option)
7 # any later version.
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 GNU Automake; see the file COPYING. If not, write to
17 # Test for conditional _LISP.
19 required=emacs
20 . ./defs || Exit 1
22 set -e
24 cat > Makefile.am << 'EOF'
25 dist_lisp_LISP = am-one.el
26 if WANT_TWO
27 dist_lisp_LISP += am-two.el
28 endif
29 dist_noinst_LISP = am-three.el
31 dist-test: distdir
32 test -f $(distdir)/am-one.el
33 test -f $(distdir)/am-two.el
34 test -f $(distdir)/am-three.el
35 EOF
37 cat >> configure.in << 'EOF'
38 AM_CONDITIONAL([WANT_TWO], test -n "$want_two")
39 AM_PATH_LISPDIR
40 AC_OUTPUT
41 EOF
43 echo "(provide 'am-one)" > am-one.el
44 echo "(require 'am-one)" > am-two.el
45 echo "(require 'am-one)" > am-three.el
47 $ACLOCAL
48 $AUTOCONF
49 $AUTOMAKE --add-missing
50 ./configure "--with-lispdir=`pwd`/lisp"
52 $MAKE
53 test -f am-one.elc
54 test ! -f am-two.elc
55 test -f am-three.elc
56 test -f elc-stamp
58 $MAKE install
59 test -f lisp/am-one.el
60 test -f lisp/am-one.elc
61 test ! -f lisp/am-two.el
62 test ! -f lisp/am-two.elc
63 test ! -f lisp/am-three.el
64 test ! -f lisp/am-three.elc
66 $MAKE dist-test
68 $MAKE distclean
69 test ! -f am-one.elc
70 test ! -f am-two.elc
71 test ! -f am-three.elc
72 test ! -f elc-stamp
75 ./configure "--with-lispdir=`pwd`/lisp" want_two=1
76 $MAKE
77 test -f am-one.elc
78 test -f am-two.elc
79 test -f am-three.elc
80 test -f elc-stamp
82 # Let's mutilate the source tree, the check the recover rule.
83 rm -f am-*.elc
84 $MAKE
85 test -f am-one.elc
86 test -f am-two.elc
87 test -f am-three.elc
88 test -f elc-stamp
90 $MAKE install
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 ! -f lisp/am-three.el
96 test ! -f lisp/am-three.elc
98 $MAKE dist-test
100 $MAKE distclean
101 test ! -f am-one.elc
102 test ! -f am-two.elc
103 test ! -f am-three.elc
104 test ! -f elc-stamp