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 |
|
---|
23 | required=emacs
|
---|
24 | . ./defs || exit 1
|
---|
25 |
|
---|
26 | set -e
|
---|
27 |
|
---|
28 | cat > Makefile.am << 'EOF'
|
---|
29 | dist_lisp_LISP = am-one.el
|
---|
30 | if WANT_TWO
|
---|
31 | dist_lisp_LISP += am-two.el
|
---|
32 | endif
|
---|
33 | dist_noinst_LISP = am-three.el
|
---|
34 |
|
---|
35 | dist-test: distdir
|
---|
36 | test -f $(distdir)/am-one.el
|
---|
37 | test -f $(distdir)/am-two.el
|
---|
38 | test -f $(distdir)/am-three.el
|
---|
39 | EOF
|
---|
40 |
|
---|
41 | cat >> configure.in << 'EOF'
|
---|
42 | AM_CONDITIONAL([WANT_TWO], test -n "$want_two")
|
---|
43 | AM_PATH_LISPDIR
|
---|
44 | AC_OUTPUT
|
---|
45 | EOF
|
---|
46 |
|
---|
47 | echo "(provide 'am-one)" > am-one.el
|
---|
48 | echo "(require 'am-one)" > am-two.el
|
---|
49 | echo "(require 'am-one)" > am-three.el
|
---|
50 |
|
---|
51 | $ACLOCAL
|
---|
52 | $AUTOCONF
|
---|
53 | $AUTOMAKE --add-missing
|
---|
54 | ./configure --with-lispdir=`pwd`/lisp
|
---|
55 |
|
---|
56 | $MAKE
|
---|
57 | test -f am-one.elc
|
---|
58 | test ! -f am-two.elc
|
---|
59 | test -f am-three.elc
|
---|
60 | test -f elc-stamp
|
---|
61 |
|
---|
62 | $MAKE install
|
---|
63 | test -f lisp/am-one.el
|
---|
64 | test -f lisp/am-one.elc
|
---|
65 | test ! -f lisp/am-two.el
|
---|
66 | test ! -f lisp/am-two.elc
|
---|
67 | test ! -f lisp/am-three.el
|
---|
68 | test ! -f lisp/am-three.elc
|
---|
69 |
|
---|
70 | $MAKE dist-test
|
---|
71 |
|
---|
72 | $MAKE distclean
|
---|
73 | test ! -f am-one.elc
|
---|
74 | test ! -f am-two.elc
|
---|
75 | test ! -f am-three.elc
|
---|
76 | test ! -f elc-stamp
|
---|
77 |
|
---|
78 |
|
---|
79 | ./configure --with-lispdir=`pwd`/lisp want_two=1
|
---|
80 | $MAKE
|
---|
81 | test -f am-one.elc
|
---|
82 | test -f am-two.elc
|
---|
83 | test -f am-three.elc
|
---|
84 | test -f elc-stamp
|
---|
85 |
|
---|
86 | # Let's mutilate the source tree, the check the recover rule.
|
---|
87 | rm -f am-*.elc
|
---|
88 | $MAKE
|
---|
89 | test -f am-one.elc
|
---|
90 | test -f am-two.elc
|
---|
91 | test -f am-three.elc
|
---|
92 | test -f elc-stamp
|
---|
93 |
|
---|
94 | $MAKE install
|
---|
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 ! -f lisp/am-three.el
|
---|
100 | test ! -f lisp/am-three.elc
|
---|
101 |
|
---|
102 | $MAKE dist-test
|
---|
103 |
|
---|
104 | $MAKE distclean
|
---|
105 | test ! -f am-one.elc
|
---|
106 | test ! -f am-two.elc
|
---|
107 | test ! -f am-three.elc
|
---|
108 | test ! -f elc-stamp
|
---|