source: vendor/automake/1.9.6/tests/lisp6.test

Last change on this file was 3086, checked in by bird, 18 years ago

automake 1.9.6

File size: 2.3 KB
Line 
1#! /bin/sh
2# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
3#
4# This file is part of GNU Automake.
5#
6# GNU Automake is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)
9# any later version.
10#
11# GNU Automake is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with GNU Automake; see the file COPYING. If not, write to
18# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19# Boston, MA 02110-1301, USA.
20
21# Test for conditional _LISP.
22
23required=emacs
24. ./defs || exit 1
25
26set -e
27
28cat > Makefile.am << 'EOF'
29dist_lisp_LISP = am-one.el
30if WANT_TWO
31 dist_lisp_LISP += am-two.el
32endif
33dist_noinst_LISP = am-three.el
34
35dist-test: distdir
36 test -f $(distdir)/am-one.el
37 test -f $(distdir)/am-two.el
38 test -f $(distdir)/am-three.el
39EOF
40
41cat >> configure.in << 'EOF'
42AM_CONDITIONAL([WANT_TWO], test -n "$want_two")
43AM_PATH_LISPDIR
44AC_OUTPUT
45EOF
46
47echo "(provide 'am-one)" > am-one.el
48echo "(require 'am-one)" > am-two.el
49echo "(require 'am-one)" > am-three.el
50
51$ACLOCAL
52$AUTOCONF
53$AUTOMAKE --add-missing
54./configure --with-lispdir=`pwd`/lisp
55
56$MAKE
57test -f am-one.elc
58test ! -f am-two.elc
59test -f am-three.elc
60test -f elc-stamp
61
62$MAKE install
63test -f lisp/am-one.el
64test -f lisp/am-one.elc
65test ! -f lisp/am-two.el
66test ! -f lisp/am-two.elc
67test ! -f lisp/am-three.el
68test ! -f lisp/am-three.elc
69
70$MAKE dist-test
71
72$MAKE distclean
73test ! -f am-one.elc
74test ! -f am-two.elc
75test ! -f am-three.elc
76test ! -f elc-stamp
77
78
79./configure --with-lispdir=`pwd`/lisp want_two=1
80$MAKE
81test -f am-one.elc
82test -f am-two.elc
83test -f am-three.elc
84test -f elc-stamp
85
86# Let's mutilate the source tree, the check the recover rule.
87rm -f am-*.elc
88$MAKE
89test -f am-one.elc
90test -f am-two.elc
91test -f am-three.elc
92test -f elc-stamp
93
94$MAKE install
95test -f lisp/am-one.el
96test -f lisp/am-one.elc
97test -f lisp/am-two.el
98test -f lisp/am-two.elc
99test ! -f lisp/am-three.el
100test ! -f lisp/am-three.elc
101
102$MAKE dist-test
103
104$MAKE distclean
105test ! -f am-one.elc
106test ! -f am-two.elc
107test ! -f am-three.elc
108test ! -f elc-stamp
Note: See TracBrowser for help on using the repository browser.